diff --git a/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp b/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp
index 7bccc2ecce6..dcb9a7fce6b 100644
--- a/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp
+++ b/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp
@@ -284,7 +284,9 @@ void Qt4ProjectConfigWidget::shadowBuildEdited()
void Qt4ProjectConfigWidget::updateImportLabel()
{
bool visible = false;
+ bool targetMatches = false;
+ QtVersionManager *vm = QtVersionManager::instance();
// we only show if we actually have a qmake and makestep
if (m_buildConfiguration->qmakeStep() && m_buildConfiguration->makeStep()) {
QString qmakePath = QtVersionManager::findQMakeBinaryFromMakefile(m_buildConfiguration->buildDirectory());
@@ -295,6 +297,15 @@ void Qt4ProjectConfigWidget::updateImportLabel()
if (qmakePath != (version ? version->qmakeCommand() : QString())) {
// import enable
visible = true;
+ QtVersion *newVersion = vm->qtVersionForQMakeBinary(qmakePath);
+ bool mustDelete(false);
+ if (!newVersion) {
+ newVersion = new QtVersion(qmakePath);
+ mustDelete = true;
+ }
+ targetMatches = newVersion->supportsTargetId(m_buildConfiguration->target()->id());
+ if (mustDelete)
+ delete newVersion;
} else {
// check that the qmake flags, arguments match
visible = !m_buildConfiguration->compareToImportFrom(m_buildConfiguration->buildDirectory());
@@ -304,7 +315,19 @@ void Qt4ProjectConfigWidget::updateImportLabel()
}
}
- m_ui->importLabel->setVisible(visible);
+ if (targetMatches) {
+ m_ui->importProblemLabel->setVisible(false);
+ m_ui->importWarningLabel->setVisible(false);
+ m_ui->importLabel->setVisible(visible);
+ } else {
+ m_ui->importWarningLabel->setVisible(visible);
+ m_ui->importProblemLabel->setVisible(visible);
+ m_ui->importProblemLabel->setText(tr("Qt Version used in %1 does not support target %2.",
+ "%1 is the build directory, %2 the targets display name.").
+ arg(m_ui->shadowBuildDirEdit->path()).
+ arg(m_buildConfiguration->target()->displayName()));
+ m_ui->importLabel->setVisible(false);
+ }
}
void Qt4ProjectConfigWidget::importLabelClicked()
diff --git a/src/plugins/qt4projectmanager/qt4projectconfigwidget.ui b/src/plugins/qt4projectmanager/qt4projectconfigwidget.ui
index f5e9d318b9a..b644ed89c59 100644
--- a/src/plugins/qt4projectmanager/qt4projectconfigwidget.ui
+++ b/src/plugins/qt4projectmanager/qt4projectconfigwidget.ui
@@ -6,15 +6,19 @@
0
0
- 455
- 201
+ 487
+ 194
-
-
- 0
-
- -
+
+
-
+
+
+ Configuration Name:
+
+
+
+ -
@@ -24,7 +28,7 @@
- -
+
-
@@ -37,7 +41,7 @@
- -
+
-
4
@@ -74,21 +78,31 @@
- -
+
-
+
+
+ Tool Chain:
+
+
+
+ -
+
+
+ -
Shadow Build:
- -
+
-
- -
+
-
@@ -101,7 +115,7 @@
- -
+
-
@@ -111,32 +125,46 @@
- -
-
-
- <a href="import">Import existing build</a>
-
-
- Qt::RichText
-
-
-
- -
-
-
- Configuration Name:
-
-
-
-
-
-
- -
-
-
- Tool Chain:
-
-
+
+
-
+
+
+ <a href="import">Import existing build</a>
+
+
+ Qt::RichText
+
+
+
+ -
+
+
+ :/projectexplorer/images/compile_warning.png
+
+
+
+ -
+
+
+ Qt Version to import does not support this target!
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
@@ -148,6 +176,8 @@
1
-
+
+
+