aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2019-08-09 15:39:30 -0400
committerAndrew Chow <achow101-github@achow101.com>2019-08-09 15:47:37 -0400
commita2714a5c69f0b0506689af04c3e785f71ee0915d (patch)
treed0c6e99bacabc9078040fd2f8c9b467027616064 /src/qt/bitcoin.cpp
parente47e36cb4975b332a4d9552bc73b031ab8fd6ab1 (diff)
downloadbitcoin-a2714a5c69f0b0506689af04c3e785f71ee0915d.tar.xz
Give QApplication dummy arguments
QApplication takes the command line arguments and parses them itself for some built in command line arguments that it has. We don't want any of those built in arguments, so instead give it dummy arguments.
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r--src/qt/bitcoin.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 482bf0543d..5ce4f3c191 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -169,8 +169,11 @@ void BitcoinCore::shutdown()
}
}
-BitcoinApplication::BitcoinApplication(interfaces::Node& node, int &argc, char **argv):
- QApplication(argc, argv),
+static int qt_argc = 1;
+static const char* qt_argv = "bitcoin-qt";
+
+BitcoinApplication::BitcoinApplication(interfaces::Node& node):
+ QApplication(qt_argc, const_cast<char **>(&qt_argv)),
coreThread(nullptr),
m_node(node),
optionsModel(nullptr),
@@ -433,7 +436,7 @@ int GuiMain(int argc, char* argv[])
QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
#endif
- BitcoinApplication app(*node, argc, argv);
+ BitcoinApplication app(*node);
// Register meta types used for QMetaObject::invokeMethod
qRegisterMetaType< bool* >();