diff --git a/src/qt/dash.cpp b/src/qt/dash.cpp index 764e33192e..bd95dd9c27 100644 --- a/src/qt/dash.cpp +++ b/src/qt/dash.cpp @@ -195,8 +195,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 = "dash-qt"; + +BitcoinApplication::BitcoinApplication(interfaces::Node& node): + QApplication(qt_argc, const_cast(&qt_argv)), coreThread(nullptr), m_node(node), optionsModel(nullptr), @@ -468,7 +471,7 @@ int GuiMain(int argc, char* argv[]) QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif - BitcoinApplication app(*node, argc, argv); + BitcoinApplication app(*node); // Register meta types used for QMetaObject::invokeMethod and Qt::QueuedConnection qRegisterMetaType(); diff --git a/src/qt/dash.h b/src/qt/dash.h index 276b0e794d..b018c3a8c5 100644 --- a/src/qt/dash.h +++ b/src/qt/dash.h @@ -57,7 +57,7 @@ class BitcoinApplication: public QApplication { Q_OBJECT public: - explicit BitcoinApplication(interfaces::Node& node, int &argc, char **argv); + explicit BitcoinApplication(interfaces::Node& node); ~BitcoinApplication(); #ifdef ENABLE_WALLET diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp index 1d5fb6991e..b63121ef78 100644 --- a/src/qt/test/test_main.cpp +++ b/src/qt/test/test_main.cpp @@ -67,7 +67,7 @@ int main(int argc, char *argv[]) // Don't remove this, it's needed to access // QApplication:: and QCoreApplication:: in the tests - BitcoinApplication app(*node, argc, argv); + BitcoinApplication app(*node); app.setApplicationName("Dash-Qt-test"); SSL_library_init();