fs: consistently use fsbridge for {i,o}fstream
Part of #20744, but this can be done now, and will simplify the diff.
This commit is contained in:
6 files changed
+7
-7
No files matched your search
@@ -158,7 +158,7 @@ void PSBTOperationsDialog::saveTransaction() {
|
||||
if (filename.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
std::ofstream out(filename.toLocal8Bit().data(), std::ofstream::out | std::ofstream::binary);
|
||||
fsbridge::ofstream out{filename.toLocal8Bit().data(), fsbridge::ofstream::out | fsbridge::ofstream::binary};
|
||||
out << ssTx.str();
|
||||
out.close();
|
||||
showStatus(tr("PSBT saved to disk."), StatusLevel::INFO);
|
||||
|
||||
@@ -509,7 +509,7 @@ void SendCoinsDialog::sendButtonClicked([[maybe_unused]] bool checked)
|
||||
if (filename.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
std::ofstream out(filename.toLocal8Bit().data(), std::ofstream::out | std::ofstream::binary);
|
||||
fsbridge::ofstream out{filename.toLocal8Bit().data(), fsbridge::ofstream::out | fsbridge::ofstream::binary};
|
||||
out << ssTx.str();
|
||||
out.close();
|
||||
Q_EMIT message(tr("PSBT saved"), "PSBT saved to disk", CClientUIInterface::MSG_INFORMATION);
|
||||
|
||||
@@ -210,7 +210,7 @@ void WalletFrame::gotoLoadPSBT(bool from_clipboard)
|
||||
Q_EMIT message(tr("Error"), tr("PSBT file must be smaller than 100 MiB"), CClientUIInterface::MSG_ERROR);
|
||||
return;
|
||||
}
|
||||
std::ifstream in(filename.toLocal8Bit().data(), std::ios::binary);
|
||||
fsbridge::ifstream in{filename.toLocal8Bit().data(), std::ios::binary};
|
||||
data = std::string(std::istreambuf_iterator<char>{in}, {});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user