When using Qt GUI, move parameter-parsing to start of qt/bitcoin.cpp:main()
authorRune K Svendsen <runesvend@gmail.com>
Fri, 9 Dec 2011 18:19:27 +0000 (19:19 +0100)
committerRune K Svendsen <runesvend@gmail.com>
Fri, 9 Dec 2011 18:19:27 +0000 (19:19 +0100)
src/init.cpp
src/qt/bitcoin.cpp

index dd8bdf5..291510f 100644 (file)
@@ -148,7 +148,10 @@ bool AppInit2(int argc, char* argv[])
     //
     // Parameters
     //
+    // If Qt is used, parameters are parsed in qt/bitcoin.cpp's main()
+#if !defined(QT_GUI)
     ParseParameters(argc, argv);
+#endif
 
     if (mapArgs.count("-datadir"))
     {
index 4aaad6b..808a9f4 100644 (file)
@@ -118,6 +118,8 @@ int main(int argc, char *argv[])
     Q_INIT_RESOURCE(bitcoin);
     QApplication app(argc, argv);
 
+    ParseParameters(argc, argv);
+
     // Load language files for system locale:
     // - First load the translator for the base language, without territory
     // - Then load the more specific locale translator