aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTommi Asp <tommi@mowhi.com>2011-05-04 16:37:56 +0300
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-06-08 17:57:17 +0200
commit462278b0710316819372571fbcf40c62088302d4 (patch)
tree9ec979c5dff9663ddce6f6c036721af3d9492023
parent3f44219a9ba2d0ef94ebb767eebb7c43a9bdf67f (diff)
Custom targets can set QtVersion to support id and set abis
QtVersion targetIds and abis set are forced updateAbiAndMkspec() wont reset them (cherry picked from commit 1c86ab05a73838e8127984f1cc0220d4de90eea5) Change-Id: I1c86ab05a73838e8127984f1cc0220d4de90eea5x Merge-request: 2193 Reviewed-on: http://codereview.qt.nokia.com/396 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: hjk <qthjk@ovi.com>
-rw-r--r--src/plugins/qt4projectmanager/qtversionmanager.cpp18
-rw-r--r--src/plugins/qt4projectmanager/qtversionmanager.h5
2 files changed, 23 insertions, 0 deletions
diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp
index 6bfb61d952..e92d92d22e 100644
--- a/src/plugins/qt4projectmanager/qtversionmanager.cpp
+++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp
@@ -1413,21 +1413,39 @@ QString QtVersion::systemRoot() const
bool QtVersion::supportsTargetId(const QString &id) const
{
updateAbiAndMkspec();
+ if (!m_forcedTargetIds.isEmpty())
+ return m_forcedTargetIds.contains(id);
return m_targetIds.contains(id);
}
QSet<QString> QtVersion::supportedTargetIds() const
{
updateAbiAndMkspec();
+ if (!m_forcedTargetIds.isEmpty())
+ return m_forcedTargetIds;
return m_targetIds;
}
QList<ProjectExplorer::Abi> QtVersion::qtAbis() const
{
updateAbiAndMkspec();
+ if (!m_forcedAbis.isEmpty())
+ return m_forcedAbis;
return m_abis;
}
+void QtVersion::setForcedTargetIds(const QSet<QString> &ids)
+{
+ updateAbiAndMkspec();
+ m_forcedTargetIds = ids;
+}
+
+void QtVersion::setForcedQtAbis(const QList<ProjectExplorer::Abi> &abis)
+{
+ updateAbiAndMkspec();
+ m_forcedAbis = abis;
+}
+
// if none, then it's INVALID everywhere this function is called
void QtVersion::updateAbiAndMkspec() const
{
diff --git a/src/plugins/qt4projectmanager/qtversionmanager.h b/src/plugins/qt4projectmanager/qtversionmanager.h
index 901b7cb9b6..f66f208b15 100644
--- a/src/plugins/qt4projectmanager/qtversionmanager.h
+++ b/src/plugins/qt4projectmanager/qtversionmanager.h
@@ -118,6 +118,9 @@ public:
QList<ProjectExplorer::Abi> qtAbis() const;
+ void setForcedTargetIds(const QSet<QString> &ids);
+ void setForcedQtAbis(const QList<ProjectExplorer::Abi> &abis);
+
/// @returns the name of the mkspec, which is generally not enough
/// to pass to qmake.
QString mkspec() const;
@@ -221,6 +224,7 @@ private:
mutable QString m_mkspec; // updated lazily
mutable QString m_mkspecFullPath;
mutable QList<ProjectExplorer::Abi> m_abis;
+ mutable QList<ProjectExplorer::Abi> m_forcedAbis;
mutable bool m_versionInfoUpToDate;
mutable QHash<QString,QString> m_versionInfo; // updated lazily
@@ -238,6 +242,7 @@ private:
mutable QString m_linguistCommand;
mutable QString m_qmlviewerCommand;
mutable QSet<QString> m_targetIds;
+ mutable QSet<QString> m_forcedTargetIds;
mutable bool m_isBuildUsingSbsV2;
mutable bool m_qmakeIsExecutable;