summaryrefslogtreecommitdiff
path: root/src/plugins/qmldesigner
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@nokia.com>2012-04-24 15:49:09 +0200
committerTobias Hunger <tobias.hunger@nokia.com>2012-06-21 12:08:12 +0200
commit24314562165588b56a318b3b8a846bf5deda7c41 (patch)
treeb5dcf951e76d003c2623011b0e91994e06e7e061 /src/plugins/qmldesigner
parent8c77b8c9d7b25d0c89003c8c4a54e8da5bfb7edd (diff)
downloadqt-creator-24314562165588b56a318b3b8a846bf5deda7c41.tar.gz
Profile introduction
Introduce Profiles to store sets of values that describe a system/device. These profiles are held by a target, getting rid of much of the information stored in the Build-/Run-/DeployConfigurations, greatly simplifying those. This is a squash of the wip/profile branch which has been on gerrit for a while, rebased to current master. Change-Id: I25956c8dd4d1962b2134bfaa8a8076ae3909460f Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Diffstat (limited to 'src/plugins/qmldesigner')
-rw-r--r--src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp27
1 files changed, 7 insertions, 20 deletions
diff --git a/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp b/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
index e3c16c1e5d..1c0d118e67 100644
--- a/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
+++ b/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
@@ -37,7 +37,9 @@
#include "subcomponentmanager.h"
#include "model/viewlogger.h"
+#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
+#include <qtsupport/qtprofileinformation.h>
#include <itemlibraryview.h>
#include <itemlibrarywidget.h>
@@ -89,9 +91,8 @@
#include <projectexplorer/projectexplorer.h>
#include <qt4projectmanager/qt4project.h>
-#include <qt4projectmanager/qt4target.h>
#include <qtsupport/qtversionmanager.h>
-#include <qt4projectmanager/qt4projectmanagerconstants.h>
+#include <qtsupport/qtsupportconstants.h>
#include <qmlprojectmanager/qmlprojectrunconfiguration.h>
enum {
@@ -221,8 +222,8 @@ QString DesignDocumentController::pathToQt() const
{
QtSupport::BaseQtVersion *activeQtVersion = QtSupport::QtVersionManager::instance()->version(d->qt_versionId);
if (activeQtVersion && (activeQtVersion->qtVersion().majorVersion > 3)
- && (activeQtVersion->supportsTargetId(Qt4ProjectManager::Constants::QT_SIMULATOR_TARGET_ID)
- || activeQtVersion->supportsTargetId(Qt4ProjectManager::Constants::DESKTOP_TARGET_ID)))
+ && (activeQtVersion->type() == QLatin1String(QtSupport::Constants::DESKTOPQT)
+ || activeQtVersion->type() == QLatin1String(QtSupport::Constants::SIMULATORQT)))
return activeQtVersion->versionInfo().value("QT_INSTALL_DATA");
return QString();
}
@@ -925,22 +926,8 @@ static inline QtSupport::BaseQtVersion *getActiveQtVersion(DesignDocumentControl
if (!target)
return 0;
- ProjectExplorer::RunConfiguration *runConfiguration = target->activeRunConfiguration();
- QmlProjectManager::QmlProjectRunConfiguration *qmlRunConfiguration = qobject_cast<QmlProjectManager::QmlProjectRunConfiguration* >(runConfiguration);
-
- if (qmlRunConfiguration) {
- controller->connect(target, SIGNAL(activeRunConfigurationChanged(ProjectExplorer::RunConfiguration*)), controller, SLOT(activeQtVersionChanged()));
- return qmlRunConfiguration->qtVersion();
- }
-
- Qt4ProjectManager::Qt4BuildConfiguration *activeBuildConfiguration = qobject_cast<Qt4ProjectManager::Qt4BuildConfiguration *>(target->activeBuildConfiguration());
-
- if (activeBuildConfiguration) {
- controller->connect(target, SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)), controller, SLOT(activeQtVersionChanged()));
- return activeBuildConfiguration->qtVersion();
- }
-
- return 0;
+ controller->connect(target, SIGNAL(profileChanged()), controller, SLOT(activeQtVersionChanged()));
+ return QtSupport::QtProfileInformation::qtVersion(target->profile());
}
void DesignDocumentController::activeQtVersionChanged()