diff options
author | Eike Ziller <eike.ziller@qt.io> | 2023-09-21 10:51:28 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2023-09-25 07:13:41 +0000 |
commit | 424ef68bd2938baa19287cf1353be37263bdcadc (patch) | |
tree | 12986734334677f3af2480ab437f06b6490e0895 /src/app/main.cpp | |
parent | db00f563860e1b05745881880b9155339435cd63 (diff) |
main: Warn if -installsettings points to a path without settings
Especially confusing is that the "QtProject" part must be omitted, so
include that information in the warning.
Change-Id: I4214502fd045b0e13a55c50fa036194dec6dab35
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/app/main.cpp')
-rw-r--r-- | src/app/main.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/app/main.cpp b/src/app/main.cpp index b403799e93..8a433d28d9 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -614,6 +614,15 @@ int main(int argc, char **argv) QSettings::SystemScope, QLatin1String(Core::Constants::IDE_SETTINGSVARIANT_STR), QLatin1String(Core::Constants::IDE_CASED_ID)); + // warn if -installsettings points to a place where no install settings are located + if (!options.installSettingsPath.isEmpty() && !QFileInfo::exists(installSettings->fileName())) { + displayError(QLatin1String("The install settings \"%1\" do not exist. The %2 option must " + "point to a path with existing settings, excluding the %3 part " + "of the path.") + .arg(QDir::toNativeSeparators(installSettings->fileName()), + INSTALL_SETTINGS_OPTION, + Core::Constants::IDE_SETTINGSVARIANT_STR)); + } Utils::TerminalCommand::setSettings(settings); setPixmapCacheLimit(); loadFonts(); |