From 424ef68bd2938baa19287cf1353be37263bdcadc Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 21 Sep 2023 10:51:28 +0200 Subject: 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 Reviewed-by: Reviewed-by: hjk --- src/app/main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/app/main.cpp') diff --git a/src/app/main.cpp b/src/app/main.cpp index b403799e933..8a433d28d9e 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(); -- cgit v1.2.3