Skip to content

Commit 644f00f

Browse files
Merge dashpay#6021: backport: (scripted-diff) Merge bitcoin-core/gui#523:, 23044, 22423, 22520
38649da Merge bitcoin#22520: test: improve rpc_blockchain.py tests and assert on time and mediantime (MarcoFalke) 61f9d96 Merge bitcoin#22423: test: wallet_listtransactions improvements (speedup, cleanup, logging) (MarcoFalke) 0959f0f Merge bitcoin#23044: refactor: Remove unused validation includes (merge-script) ea678b5 scripted-diff: Merge bitcoin-core/gui#523: scripted-diff: Rename functions to drop mention of boost (Vijay) Pull request description: bitcoin backports Top commit has no ACKs. Tree-SHA512: 5903bbe51d03a2e91e4e69481f3cbef228b97b5d8ac9f1d1350d7fb0b66a4c1f31bd3dd665011c6dbded4e85dc426befc6f2f00fac525dc3687d2630de4c854b
2 parents 8b7f9c8 + 38649da commit 644f00f

File tree

11 files changed

+77
-69
lines changed

11 files changed

+77
-69
lines changed

src/qt/clientmodel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,12 @@ QString ClientModel::formatClientStartupTime() const
246246

247247
QString ClientModel::dataDir() const
248248
{
249-
return GUIUtil::boostPathToQString(GetDataDir());
249+
return GUIUtil::PathToQString(GetDataDir());
250250
}
251251

252252
QString ClientModel::blocksDir() const
253253
{
254-
return GUIUtil::boostPathToQString(gArgs.GetBlocksDirPath());
254+
return GUIUtil::PathToQString(gArgs.GetBlocksDirPath());
255255
}
256256

257257
void ClientModel::updateBanlist()

src/qt/guiutil.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ bool hasEntryData(const QAbstractItemView *view, int column, int role)
487487

488488
QString getDefaultDataDirectory()
489489
{
490-
return boostPathToQString(GetDefaultDataDir());
490+
return PathToQString(GetDefaultDataDir());
491491
}
492492

493493
QString getSaveFileName(QWidget *parent, const QString &caption, const QString &dir,
@@ -624,7 +624,7 @@ void openDebugLogfile()
624624

625625
/* Open debug.log with the associated application */
626626
if (fs::exists(pathDebug))
627-
QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathDebug)));
627+
QDesktopServices::openUrl(QUrl::fromLocalFile(PathToQString(pathDebug)));
628628
}
629629

630630
void openConfigfile()
@@ -634,9 +634,9 @@ void openConfigfile()
634634
/* Open dash.conf with the associated application */
635635
if (fs::exists(pathConfig)) {
636636
// Workaround for macOS-specific behavior; see #15409.
637-
if (!QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathConfig)))) {
637+
if (!QDesktopServices::openUrl(QUrl::fromLocalFile(PathToQString(pathConfig)))) {
638638
#ifdef Q_OS_MAC
639-
QProcess::startDetached("/usr/bin/open", QStringList{"-t", boostPathToQString(pathConfig)});
639+
QProcess::startDetached("/usr/bin/open", QStringList{"-t", PathToQString(pathConfig)});
640640
#endif
641641
return;
642642
}
@@ -649,7 +649,7 @@ void showBackups()
649649

650650
/* Open folder with default browser */
651651
if (fs::exists(backupsDir))
652-
QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(backupsDir)));
652+
QDesktopServices::openUrl(QUrl::fromLocalFile(PathToQString(backupsDir)));
653653
}
654654

655655
ToolTipToRichTextFilter::ToolTipToRichTextFilter(int _size_threshold, QObject *parent) :
@@ -1636,12 +1636,12 @@ void setClipboard(const QString& str)
16361636
}
16371637
}
16381638

1639-
fs::path qstringToBoostPath(const QString &path)
1639+
fs::path QStringToPath(const QString &path)
16401640
{
16411641
return fs::path(path.toStdString());
16421642
}
16431643

1644-
QString boostPathToQString(const fs::path &path)
1644+
QString PathToQString(const fs::path &path)
16451645
{
16461646
return QString::fromStdString(path.string());
16471647
}

src/qt/guiutil.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,10 +389,10 @@ namespace GUIUtil
389389
void updateButtonGroupShortcuts(QButtonGroup* buttonGroup);
390390

391391
/** Convert QString to OS specific boost path through UTF-8 */
392-
fs::path qstringToBoostPath(const QString &path);
392+
fs::path QStringToPath(const QString &path);
393393

394394
/** Convert OS specific boost path to QString through UTF-8 */
395-
QString boostPathToQString(const fs::path &path);
395+
QString PathToQString(const fs::path &path);
396396

397397
/** Convert enum Network to QString */
398398
QString NetworkToQString(Network net);

src/qt/intro.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ FreespaceChecker::FreespaceChecker(Intro *_intro)
6868
void FreespaceChecker::check()
6969
{
7070
QString dataDirStr = intro->getPathToCheck();
71-
fs::path dataDir = GUIUtil::qstringToBoostPath(dataDirStr);
71+
fs::path dataDir = GUIUtil::QStringToPath(dataDirStr);
7272
uint64_t freeBytesAvailable = 0;
7373
int replyStatus = ST_OK;
7474
QString replyMessage = tr("A new data directory will be created.");
@@ -219,7 +219,7 @@ bool Intro::showIfNeeded(bool& did_show_intro, int64_t& prune_MiB)
219219
/* 3) Check to see if default datadir is the one we expect */
220220
QString dataDirDefaultSettings = settings.value("strDataDirDefault").toString();
221221

222-
if(!fs::exists(GUIUtil::qstringToBoostPath(dataDir)) || gArgs.GetBoolArg("-choosedatadir", DEFAULT_CHOOSE_DATADIR) || dataDirDefaultCurrent != dataDirDefaultSettings || settings.value("fReset", false).toBool() || gArgs.GetBoolArg("-resetguisettings", false))
222+
if(!fs::exists(GUIUtil::QStringToPath(dataDir)) || gArgs.GetBoolArg("-choosedatadir", DEFAULT_CHOOSE_DATADIR) || dataDirDefaultCurrent != dataDirDefaultSettings || settings.value("fReset", false).toBool() || gArgs.GetBoolArg("-resetguisettings", false))
223223
{
224224
/* Use selectParams here to guarantee Params() can be used by node interface */
225225
try {
@@ -245,9 +245,9 @@ bool Intro::showIfNeeded(bool& did_show_intro, int64_t& prune_MiB)
245245
}
246246
dataDir = intro.getDataDirectory();
247247
try {
248-
if (TryCreateDirectories(GUIUtil::qstringToBoostPath(dataDir))) {
248+
if (TryCreateDirectories(GUIUtil::QStringToPath(dataDir))) {
249249
// If a new data directory has been created, make wallets subdirectory too
250-
TryCreateDirectories(GUIUtil::qstringToBoostPath(dataDir) / "wallets");
250+
TryCreateDirectories(GUIUtil::QStringToPath(dataDir) / "wallets");
251251
}
252252
break;
253253
} catch (const fs::filesystem_error&) {
@@ -269,7 +269,7 @@ bool Intro::showIfNeeded(bool& did_show_intro, int64_t& prune_MiB)
269269
* (to be consistent with dashd behavior)
270270
*/
271271
if(dataDir != GUIUtil::getDefaultDataDirectory()) {
272-
gArgs.SoftSetArg("-datadir", GUIUtil::qstringToBoostPath(dataDir).string()); // use OS locale for path setting
272+
gArgs.SoftSetArg("-datadir", GUIUtil::QStringToPath(dataDir).string()); // use OS locale for path setting
273273
}
274274
return true;
275275
}

src/qt/optionsmodel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ static void CopySettings(QSettings& dst, const QSettings& src)
315315
/** Back up a QSettings to an ini-formatted file. */
316316
static void BackupSettings(const fs::path& filename, const QSettings& src)
317317
{
318-
qInfo() << "Backing up GUI settings to" << GUIUtil::boostPathToQString(filename);
319-
QSettings dst(GUIUtil::boostPathToQString(filename), QSettings::IniFormat);
318+
qInfo() << "Backing up GUI settings to" << GUIUtil::PathToQString(filename);
319+
QSettings dst(GUIUtil::PathToQString(filename), QSettings::IniFormat);
320320
dst.clear();
321321
CopySettings(dst, src);
322322
}

src/qt/paymentserver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static QString ipcServerName()
5252
// Append a simple hash of the datadir
5353
// Note that GetDataDir(true) returns a different path
5454
// for -testnet versus main net
55-
QString ddir(GUIUtil::boostPathToQString(GetDataDir(true)));
55+
QString ddir(GUIUtil::PathToQString(GetDataDir(true)));
5656
name.append(QString::number(qHash(ddir)));
5757

5858
return name;

src/validation.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <node/blockstorage.h>
2626
#include <node/coinstats.h>
2727
#include <node/ui_interface.h>
28+
#include <node/utxo_snapshot.h>
2829
#include <policy/policy.h>
2930
#include <policy/settings.h>
3031
#include <pow.h>

src/validation.h

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,10 @@
1313

1414
#include <amount.h>
1515
#include <attributes.h>
16-
#include <coins.h>
17-
#include <consensus/validation.h>
18-
#include <crypto/common.h> // for ReadLE64
16+
#include <chain.h>
1917
#include <fs.h>
20-
#include <node/utxo_snapshot.h>
2118
#include <policy/feerate.h>
2219
#include <policy/packages.h>
23-
#include <protocol.h> // For CMessageHeader::MessageStartChars
2420
#include <script/script_error.h>
2521
#include <sync.h>
2622
#include <txdb.h>
@@ -49,23 +45,18 @@ class CInstantSendManager;
4945
class CEvoDB;
5046

5147
class CChainState;
52-
class BlockValidationState;
5348
class CBlockIndex;
5449
class CBlockTreeDB;
55-
class CBlockUndo;
5650
class CChainParams;
5751
struct CCheckpointData;
58-
class CInv;
59-
class CConnman;
6052
class CMNHFManager;
61-
class CScriptCheck;
6253
class CTxMemPool;
6354
class TxValidationState;
6455
class CChainstateHelper;
6556
class ChainstateManager;
6657
struct PrecomputedTransactionData;
58+
class SnapshotMetadata;
6759
struct ChainTxData;
68-
6960
struct DisconnectedBlockTransactions;
7061
struct LockPoints;
7162
struct AssumeutxoData;

0 commit comments

Comments
 (0)