Commit e89c4775 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Allow loading of projects even with no valid Qt

This patch marks up invalid Qt versions as Desktop.

Make sure we add a the always existing invalid Qt version in the path
available in the targetselectionpage if no valid Qt versions could be found.

This way a project can be set up and loaded without a valid Qt version set up.
Trying to build this will fail of course. This is basically how we handled
this situation before we had targets, too.

Task-number: QTCREATORBUG-1066
Reviewed-by: dt
parent ef46c31d
......@@ -1155,8 +1155,10 @@ void QtVersion::updateToolChainAndMkspec() const
if (!isValid())
if (!isValid()) {
// qDebug()<<"Finding mkspec for"<<qmakeCommand();
......@@ -280,6 +280,9 @@ TargetSetupPage::importInfosForKnownQtVersions(Qt4ProjectManager::Qt4Project *pr
QList<ImportInfo> results;
QtVersionManager * vm = QtVersionManager::instance();
QList<QtVersion *> validVersions = vm->validVersions();
// Fallback in case no valid versions are found:
if (validVersions.isEmpty())
validVersions.append(vm->versions().at(0)); // there is always one!
foreach (QtVersion *v, validVersions) {
ImportInfo info;
// ToDo: Check whether shadowbuilding is possible and use sourcedir if not:
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