diff options
Diffstat (limited to 'src/libs/installer/settings.cpp')
-rw-r--r-- | src/libs/installer/settings.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/libs/installer/settings.cpp b/src/libs/installer/settings.cpp index e6395e44c..97c20243d 100644 --- a/src/libs/installer/settings.cpp +++ b/src/libs/installer/settings.cpp @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -291,7 +291,7 @@ Settings Settings::fromFileAndPrefix(const QString &path, const QString &prefix, << scAllowSpaceInPath << scAllowNonAsciiCharacters << scDisableAuthorizationFallback << scDisableCommandLineInterface << scWizardStyle << scStyleSheet << scTitleColor - << scWizardDefaultWidth << scWizardDefaultHeight + << scWizardDefaultWidth << scWizardDefaultHeight << scWizardShowPageList << scRepositorySettingsPageVisible << scTargetConfigurationFile << scRemoteRepositories << scTranslations << scUrlQueryString << QLatin1String(scControlScript) << scCreateLocalRepository << scInstallActionColumnVisible << scSupportsModify << scAllowUnstableComponents @@ -455,7 +455,10 @@ static int lengthToInt(const QVariant &variant) int Settings::wizardDefaultWidth() const { - return lengthToInt(d->m_data.value(scWizardDefaultWidth)); + // Add a bit more sensible default width in case the page list widget is shown + // as it can take quite a lot horizontal space. A vendor can always override + // the default value. + return lengthToInt(d->m_data.value(scWizardDefaultWidth, wizardShowPageList() ? 800 : 0)); } int Settings::wizardDefaultHeight() const @@ -463,6 +466,11 @@ int Settings::wizardDefaultHeight() const return lengthToInt(d->m_data.value(scWizardDefaultHeight)); } +bool Settings::wizardShowPageList() const +{ + return d->m_data.value(scWizardShowPageList, true).toBool(); +} + QString Settings::installerApplicationIcon() const { return d->absolutePathFromKey(scInstallerApplicationIcon, systemIconSuffix()); |