From c8042a48f01aaf306e108683e40db4bfaf0bbcaa Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 29 Nov 2016 15:17:34 -0800 Subject: Remove arguments to ParseConfigFile --- src/qt/bitcoin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qt/bitcoin.cpp') diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index cfd0955a74..3ae54f3119 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -608,7 +608,7 @@ int main(int argc, char *argv[]) return EXIT_FAILURE; } try { - ReadConfigFile(GetArg("-conf", BITCOIN_CONF_FILENAME), mapArgs, mapMultiArgs); + ReadConfigFile(GetArg("-conf", BITCOIN_CONF_FILENAME)); } catch (const std::exception& e) { QMessageBox::critical(0, QObject::tr(PACKAGE_NAME), QObject::tr("Error: Cannot parse configuration file: %1. Only use key=value syntax.").arg(e.what())); -- cgit v1.2.3 From 0cf86a6678413aa03e765a7133f048df4001ff4c Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 29 Nov 2016 17:51:30 -0800 Subject: Introduce (and use) an IsArgSet accessor method --- src/qt/bitcoin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qt/bitcoin.cpp') diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 3ae54f3119..9d80a38008 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -587,9 +587,9 @@ int main(int argc, char *argv[]) // Show help message immediately after parsing command-line options (for "-lang") and setting locale, // but before showing splash screen. - if (mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version")) + if (IsArgSet("-?") || IsArgSet("-h") || IsArgSet("-help") || IsArgSet("-version")) { - HelpMessageDialog help(NULL, mapArgs.count("-version")); + HelpMessageDialog help(NULL, IsArgSet("-version")); help.showOrPrint(); return EXIT_SUCCESS; } @@ -672,7 +672,7 @@ int main(int argc, char *argv[]) // Allow parameter interaction before we create the options model app.parameterSetup(); // Load GUI settings from QSettings - app.createOptionsModel(mapArgs.count("-resetguisettings") != 0); + app.createOptionsModel(IsArgSet("-resetguisettings")); // Subscribe to global signals from core uiInterface.InitMessage.connect(InitMessage); -- cgit v1.2.3 From 4cd373aea8d20356727f7d65e0bc818beb6523dc Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 29 Nov 2016 18:45:24 -0800 Subject: Un-expose mapArgs from utils.h --- src/qt/bitcoin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qt/bitcoin.cpp') diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 9d80a38008..36d803ce07 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -604,7 +604,7 @@ int main(int argc, char *argv[]) if (!boost::filesystem::is_directory(GetDataDir(false))) { QMessageBox::critical(0, QObject::tr(PACKAGE_NAME), - QObject::tr("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(mapArgs["-datadir"]))); + QObject::tr("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(GetArg("-datadir", "")))); return EXIT_FAILURE; } try { -- cgit v1.2.3