summaryrefslogtreecommitdiff
path: root/src/plugins/qt4projectmanager/qmlobservertool.cpp
diff options
context:
space:
mode:
authordt <qtc-committer@nokia.com>2011-05-04 13:14:46 +0200
committerdt <qtc-committer@nokia.com>2011-05-12 12:23:06 +0200
commit8e171e0be0239c18843fc65784cb91120b252c8f (patch)
tree06900feae14b15b3897fff193cf36dbd44bad8b3 /src/plugins/qt4projectmanager/qmlobservertool.cpp
parent9ef4ea40f27befa4b5b553c3dfa94d979a34748c (diff)
downloadqt-creator-8e171e0be0239c18843fc65784cb91120b252c8f.tar.gz
Qt Version refactoring
Split up target specific code into subclasses. Also change Qt4BuildConfiguration to allow a null qtversion. Remove code that relied on always having a qt version. Also make it possible to remove all qt versions. Completly change the qt in path autodetection to be only a fall back if no configuration was found. Note: For now the old settings are not removed, as such 2.2 and master can coexist. Reviewed-By: hunger
Diffstat (limited to 'src/plugins/qt4projectmanager/qmlobservertool.cpp')
-rw-r--r--src/plugins/qt4projectmanager/qmlobservertool.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/qt4projectmanager/qmlobservertool.cpp b/src/plugins/qt4projectmanager/qmlobservertool.cpp
index 33c2314975..34268b85a4 100644
--- a/src/plugins/qt4projectmanager/qmlobservertool.cpp
+++ b/src/plugins/qt4projectmanager/qmlobservertool.cpp
@@ -34,6 +34,7 @@
#include "qt4project.h"
#include "qt4projectmanagerconstants.h"
+#include "baseqtversion.h"
#include <coreplugin/icore.h>
#include <utils/qtcassert.h>
@@ -54,7 +55,7 @@ static inline QStringList validBinaryFilenames()
<< QLatin1String("QMLObserver.app/Contents/MacOS/QMLObserver");
}
-bool QmlObserverTool::canBuild(const QtVersion *qtVersion)
+bool QmlObserverTool::canBuild(const BaseQtVersion *qtVersion)
{
return (qtVersion->supportsTargetId(Constants::DESKTOP_TARGET_ID)
|| qtVersion->supportsTargetId(Constants::QT_SIMULATOR_TARGET_ID))
@@ -67,8 +68,8 @@ QString QmlObserverTool::toolForProject(ProjectExplorer::Project *project)
Qt4Project *qt4Project = static_cast<Qt4Project*>(project);
if (qt4Project && qt4Project->activeTarget()
&& qt4Project->activeTarget()->activeBuildConfiguration()) {
- QtVersion *version = qt4Project->activeTarget()->activeBuildConfiguration()->qtVersion();
- if (version->isValid()) {
+ BaseQtVersion *version = qt4Project->activeTarget()->activeBuildConfiguration()->qtVersion();
+ if (version && version->isValid()) {
QString qtInstallData = version->versionInfo().value("QT_INSTALL_DATA");
QString toolPath = toolByInstallData(qtInstallData);
return toolPath;