Merge branch 'master' into single_prodname
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2011-2014 The Bitcoin Core developers
|
||||
// Copyright (c) 2011-2015 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#endif
|
||||
|
||||
#include "init.h"
|
||||
#include "rpcserver.h"
|
||||
#include "rpc/server.h"
|
||||
#include "scheduler.h"
|
||||
#include "ui_interface.h"
|
||||
#include "util.h"
|
||||
@@ -201,6 +201,8 @@ public:
|
||||
/// Create payment server
|
||||
void createPaymentServer();
|
||||
#endif
|
||||
/// parameter interaction/setup based on rules
|
||||
void parameterSetup();
|
||||
/// Create options model
|
||||
void createOptionsModel(bool resetSettings);
|
||||
/// Create main window
|
||||
@@ -309,14 +311,8 @@ BitcoinApplication::BitcoinApplication(int &argc, char **argv):
|
||||
// UI per-platform customization
|
||||
// This must be done inside the BitcoinApplication constructor, or after it, because
|
||||
// PlatformStyle::instantiate requires a QApplication
|
||||
#if defined(Q_OS_MAC)
|
||||
std::string platformName = "macosx";
|
||||
#elif defined(Q_OS_WIN)
|
||||
std::string platformName = "windows";
|
||||
#else
|
||||
std::string platformName = "other";
|
||||
#endif
|
||||
platformName = GetArg("-uiplatform", platformName);
|
||||
std::string platformName;
|
||||
platformName = GetArg("-uiplatform", BitcoinGUI::DEFAULT_UIPLATFORM);
|
||||
platformStyle = PlatformStyle::instantiate(QString::fromStdString(platformName));
|
||||
if (!platformStyle) // Fall back to "other" if specified name not found
|
||||
platformStyle = PlatformStyle::instantiate("other");
|
||||
@@ -397,6 +393,12 @@ void BitcoinApplication::startThread()
|
||||
coreThread->start();
|
||||
}
|
||||
|
||||
void BitcoinApplication::parameterSetup()
|
||||
{
|
||||
InitLogging();
|
||||
InitParameterInteraction();
|
||||
}
|
||||
|
||||
void BitcoinApplication::requestInitialize()
|
||||
{
|
||||
qDebug() << __func__ << ": Requesting initialize";
|
||||
@@ -644,13 +646,15 @@ int main(int argc, char *argv[])
|
||||
// Install qDebug() message handler to route to debug.log
|
||||
qInstallMessageHandler(DebugMessageHandler);
|
||||
#endif
|
||||
// Allow parameter interaction before we create the options model
|
||||
app.parameterSetup();
|
||||
// Load GUI settings from QSettings
|
||||
app.createOptionsModel(mapArgs.count("-resetguisettings") != 0);
|
||||
|
||||
// Subscribe to global signals from core
|
||||
uiInterface.InitMessage.connect(InitMessage);
|
||||
|
||||
if (GetBoolArg("-splash", true) && !GetBoolArg("-min", false))
|
||||
if (GetBoolArg("-splash", DEFAULT_SPLASHSCREEN) && !GetBoolArg("-min", false))
|
||||
app.createSplashScreen(networkStyle.data());
|
||||
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user