Browse Source

Merge pull request #7127

a6cbc02 Bugfix: Default -uiplatform is not actually the platform this build was compiled on (Luke Dashjr)
0.13
Jonas Schnelli 9 years ago
parent
commit
fa93174a7c
No known key found for this signature in database
GPG Key ID: 29D4BCB6416F53EC
  1. 10
      src/qt/bitcoin.cpp
  2. 10
      src/qt/bitcoingui.cpp
  3. 1
      src/qt/bitcoingui.h
  4. 2
      src/qt/utilitydialog.cpp

10
src/qt/bitcoin.cpp

@ -311,14 +311,8 @@ BitcoinApplication::BitcoinApplication(int &argc, char **argv):
// UI per-platform customization // UI per-platform customization
// This must be done inside the BitcoinApplication constructor, or after it, because // This must be done inside the BitcoinApplication constructor, or after it, because
// PlatformStyle::instantiate requires a QApplication // PlatformStyle::instantiate requires a QApplication
#if defined(Q_OS_MAC) std::string platformName;
std::string platformName = "macosx"; platformName = GetArg("-uiplatform", BitcoinGUI::DEFAULT_UIPLATFORM);
#elif defined(Q_OS_WIN)
std::string platformName = "windows";
#else
std::string platformName = "other";
#endif
platformName = GetArg("-uiplatform", platformName);
platformStyle = PlatformStyle::instantiate(QString::fromStdString(platformName)); platformStyle = PlatformStyle::instantiate(QString::fromStdString(platformName));
if (!platformStyle) // Fall back to "other" if specified name not found if (!platformStyle) // Fall back to "other" if specified name not found
platformStyle = PlatformStyle::instantiate("other"); platformStyle = PlatformStyle::instantiate("other");

10
src/qt/bitcoingui.cpp

@ -59,6 +59,16 @@
#include <QUrlQuery> #include <QUrlQuery>
#endif #endif
const std::string BitcoinGUI::DEFAULT_UIPLATFORM =
#if defined(Q_OS_MAC)
"macosx"
#elif defined(Q_OS_WIN)
"windows"
#else
"other"
#endif
;
const QString BitcoinGUI::DEFAULT_WALLET = "~Default"; const QString BitcoinGUI::DEFAULT_WALLET = "~Default";
BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *networkStyle, QWidget *parent) : BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *networkStyle, QWidget *parent) :

1
src/qt/bitcoingui.h

@ -48,6 +48,7 @@ class BitcoinGUI : public QMainWindow
public: public:
static const QString DEFAULT_WALLET; static const QString DEFAULT_WALLET;
static const std::string DEFAULT_UIPLATFORM;
explicit BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *networkStyle, QWidget *parent = 0); explicit BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *networkStyle, QWidget *parent = 0);
~BitcoinGUI(); ~BitcoinGUI();

2
src/qt/utilitydialog.cpp

@ -86,7 +86,7 @@ HelpMessageDialog::HelpMessageDialog(QWidget *parent, bool about) :
strUsage += HelpMessageOpt("-splash", strprintf(_("Show splash screen on startup (default: %u)"), DEFAULT_SPLASHSCREEN)); strUsage += HelpMessageOpt("-splash", strprintf(_("Show splash screen on startup (default: %u)"), DEFAULT_SPLASHSCREEN));
strUsage += HelpMessageOpt("-resetguisettings", _("Reset all settings changes made over the GUI")); strUsage += HelpMessageOpt("-resetguisettings", _("Reset all settings changes made over the GUI"));
if (showDebug) { if (showDebug) {
strUsage += HelpMessageOpt("-uiplatform", "Select platform to customize UI for (one of windows, macosx, other; default: platform compiled on)"); strUsage += HelpMessageOpt("-uiplatform", strprintf("Select platform to customize UI for (one of windows, macosx, other; default: %s)", BitcoinGUI::DEFAULT_UIPLATFORM));
} }
QString coreOptions = QString::fromStdString(strUsage); QString coreOptions = QString::fromStdString(strUsage);
text = version + "\n" + header + "\n" + coreOptions; text = version + "\n" + header + "\n" + coreOptions;

Loading…
Cancel
Save