Commit 7ea4d2bb authored by Daniel Molkentin's avatar Daniel Molkentin
Browse files

Make preferred version work in all cases

Reviewed-by: dt
parent eb63db5c
......@@ -242,8 +242,15 @@ void QtVersionManager::updateExamples()
// in SDKs, we want to prefer the Qt version shipping with the SDK
QString preferred = Core::ICore::instance()->settings()->value("General/PreferredQMakePath").toString();
QSettings *settings = Core::ICore::instance()->settings();
QString preferred = settings->value(QLatin1String("PreferredQMakePath")).toString();
preferred = QDir::fromNativeSeparators(preferred);
if (!preferred.isEmpty()) {
#ifdef Q_OS_WIN
preferred = preferred.toLower();
if (!preferred.endsWith(QLatin1String(".exe")))
foreach (version, candidates) {
if (version->qmakeCommand() == preferred) {
emit updateExamples(version->examplesPath(), version->demosPath(), version->sourcePath());
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment