diff options
author | Katja Marttila <katja.marttila@qt.io> | 2020-11-24 06:20:07 +0200 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2020-11-24 06:20:07 +0200 |
commit | 79011733f7a00da988d482dde443418c9df38784 (patch) | |
tree | aae5e8dbdd254cb2538e66e4649b1c86d39191ae /src/sdk | |
parent | d863c8abcf29e971e0adb8dcb2fc12971a4e98f1 (diff) | |
parent | 13c9e1111d89d1a2a06954c00bb3d3c33d4ecfa3 (diff) |
Merge remote-tracking branch 'origin/4.0' into master
Change-Id: If5205ff6ef2c8989520e24d41595c04d5920d207
Diffstat (limited to 'src/sdk')
-rw-r--r-- | src/sdk/main.cpp | 2 | ||||
-rw-r--r-- | src/sdk/sdkapp.h | 5 | ||||
-rw-r--r-- | src/sdk/tabcontroller.cpp | 17 |
3 files changed, 23 insertions, 1 deletions
diff --git a/src/sdk/main.cpp b/src/sdk/main.cpp index ecff6e7d2..8c21cc39a 100644 --- a/src/sdk/main.cpp +++ b/src/sdk/main.cpp @@ -57,12 +57,12 @@ static const char PLACEHOLDER[32] = "MY_InstallerCreateDateTime_MY"; int main(int argc, char *argv[]) { -#if defined(Q_OS_WIN) if (!qEnvironmentVariableIsSet("QT_AUTO_SCREEN_SCALE_FACTOR") && !qEnvironmentVariableIsSet("QT_SCALE_FACTOR") && !qEnvironmentVariableIsSet("QT_SCREEN_SCALE_FACTORS")) { QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); } +#if defined(Q_OS_WIN) QCoreApplication::setAttribute(Qt::AA_DisableWindowContextHelpButton); #endif // increase maximum numbers of file descriptors diff --git a/src/sdk/sdkapp.h b/src/sdk/sdkapp.h index a5175e04c..249714fea 100644 --- a/src/sdk/sdkapp.h +++ b/src/sdk/sdkapp.h @@ -57,6 +57,9 @@ #include <QMessageBox> #include <QMetaEnum> +#define QUOTE_(x) #x +#define QUOTE(x) QUOTE_(x) + template<class T> class SDKApp : public T { @@ -196,6 +199,8 @@ public: QUuid::createUuid().toString(), QUuid::createUuid().toString(), QInstaller::Protocol::Mode::Production, userArgs, isCommandLineInterface); } + // Set this for convenience usage with the installer JS object + m_core->setValue(QLatin1String("FrameworkVersion"), QLatin1String(QUOTE(IFW_VERSION_STR))); // From Qt5.8 onwards system proxy is used by default. If Qt is built with // QT_USE_SYSTEM_PROXIES false then system proxies are not used by default. diff --git a/src/sdk/tabcontroller.cpp b/src/sdk/tabcontroller.cpp index b69c69b33..5e2f1ed13 100644 --- a/src/sdk/tabcontroller.cpp +++ b/src/sdk/tabcontroller.cpp @@ -166,6 +166,23 @@ void TabController::restartWizard() void TabController::onSettingsButtonClicked() { SettingsDialog dialog(d->m_core); + // set custom stylesheet + const QString styleSheetFile = d->m_core->settings().styleSheet(); + if (!styleSheetFile.isEmpty()) { + QFile sheet(styleSheetFile); + if (sheet.exists()) { + if (sheet.open(QIODevice::ReadOnly)) { + dialog.setStyleSheet(QString::fromLatin1(sheet.readAll())); + } else { + qCWarning(QInstaller::lcDeveloperBuild) << "The specified style sheet file " + "can not be opened."; + } + } else { + qCWarning(QInstaller::lcDeveloperBuild) << "A style sheet file is specified, " + "but it does not exist."; + } + } + connect(&dialog, &SettingsDialog::networkSettingsChanged, this, &TabController::onNetworkSettingsChanged); dialog.exec(); |