Commit 0ac20fc1 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Qt: Use any desktop Qt version if the Qt in PATH is not found



Avoid having a default kit without any Qt version set if we have
one that could be used for the desktop.

Task-number: QTCREATORBUG-7892
Change-Id: I58ae9b286eb6424757ee44bad9021340720e5826
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 3c4e6332
......@@ -31,6 +31,7 @@
#include "qtkitinformation.h"
#include "qtkitconfigwidget.h"
#include "qtsupportconstants.h"
#include "qtversionmanager.h"
#include <utils/environment.h>
......@@ -71,10 +72,15 @@ QVariant QtKitInformation::defaultValue(ProjectExplorer::Kit *k) const
return -1;
QList<BaseQtVersion *> versionList = mgr->versions();
BaseQtVersion *fallBack = 0;
foreach (BaseQtVersion *v, versionList) {
if (qmake == v->qmakeCommand())
return v->uniqueId();
if (v->type() == QLatin1String(QtSupport::Constants::DESKTOPQT) && !fallBack)
fallBack = v;
}
if (fallBack)
return fallBack->uniqueId();
return -1;
}
......
Markdown is supported
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