aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2013-04-28 17:37:50 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2013-06-01 12:53:57 +0200
commit3260b4c09006ea5c1b00c599a14e6c706ac760f8 (patch)
treef413a27870dbbf73933c73c58823e377a5c4b22f /src/qt
parent3d661110dae5fe62585ab753ef996f081a11855d (diff)
remove GetBoolArg() fDefault parameter defaulting to false
- explicitly set the default of all GetBoolArg() calls - rework getarg_test.cpp and util_tests.cpp to cover this change - some indentation fixes - move macdockiconhandler.h include in bitcoin.cpp to the "our headers" section
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoin.cpp16
-rw-r--r--src/qt/splashscreen.cpp2
2 files changed, 9 insertions, 9 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index f525d1bb38..fbf57fffd2 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -15,6 +15,9 @@
#include "ui_interface.h"
#include "paymentserver.h"
#include "splashscreen.h"
+#ifdef Q_OS_MAC
+#include "macdockiconhandler.h"
+#endif
#include <QMessageBox>
#include <QTextCodec>
@@ -23,10 +26,6 @@
#include <QTranslator>
#include <QLibraryInfo>
-#ifdef Q_OS_MAC
-#include "macdockiconhandler.h"
-#endif
-
#if defined(BITCOIN_NEED_QT_PLUGINS) && !defined(_BITCOIN_QT_PLUGINS_INCLUDED)
#define _BITCOIN_QT_PLUGINS_INCLUDED
#define __INSURE__
@@ -152,7 +151,7 @@ int main(int argc, char *argv[])
// as it is used to locate QSettings)
QApplication::setOrganizationName("Bitcoin");
QApplication::setOrganizationDomain("bitcoin.org");
- if(GetBoolArg("-testnet")) // Separate UI settings for testnet
+ if (GetBoolArg("-testnet", false)) // Separate UI settings for testnet
QApplication::setApplicationName("Bitcoin-Qt-testnet");
else
QApplication::setApplicationName("Bitcoin-Qt");
@@ -204,13 +203,14 @@ int main(int argc, char *argv[])
#ifdef Q_OS_MAC
// on mac, also change the icon now because it would look strange to have a testnet splash (green) and a std app icon (orange)
- if(GetBoolArg("-testnet")) {
+ if(GetBoolArg("-testnet", false))
+ {
MacDockIconHandler::instance()->setIcon(QIcon(":icons/bitcoin_testnet"));
}
#endif
SplashScreen splash(QPixmap(), 0);
- if (GetBoolArg("-splash", true) && !GetBoolArg("-min"))
+ if (GetBoolArg("-splash", true) && !GetBoolArg("-min", false))
{
splash.show();
splash.setAutoFillBackground(true);
@@ -254,7 +254,7 @@ int main(int argc, char *argv[])
window.setCurrentWallet("~Default");
// If -min option passed, start window minimized.
- if(GetBoolArg("-min"))
+ if(GetBoolArg("-min", false))
{
window.showMinimized();
}
diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
index f8d16699ca..d60b2ef4ba 100644
--- a/src/qt/splashscreen.cpp
+++ b/src/qt/splashscreen.cpp
@@ -26,7 +26,7 @@ SplashScreen::SplashScreen(const QPixmap &pixmap, Qt::WindowFlags f) :
// load the bitmap for writing some text over it
QPixmap newPixmap;
- if(GetBoolArg("-testnet")) {
+ if(GetBoolArg("-testnet", false)) {
newPixmap = QPixmap(":/images/splash_testnet");
}
else {