diff options
author | hjk <qtc-committer@nokia.com> | 2010-08-27 14:57:36 +0200 |
---|---|---|
committer | hjk <qtc-committer@nokia.com> | 2010-08-27 14:58:29 +0200 |
commit | 0aa12867498c83e415f8759d83af4165c22debea (patch) | |
tree | a06a3c8e7874b55656c1ec04f62c3028c6763be0 | |
parent | 8cee882d4113c6206f746265eea99fb5f49b1737 (diff) | |
download | qt-creator-0aa12867498c83e415f8759d83af4165c22debea.tar.gz |
fix detection of Simulator Qt
backport of ndk/commits/113d4c56180b8f59cb03d738f76dab46dd7fafe0
-rw-r--r-- | src/plugins/qt4projectmanager/qtversionmanager.cpp | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp index 06b9d18ecd..71b67ea2e9 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.cpp +++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp @@ -1451,35 +1451,15 @@ void QtVersion::updateToolChainAndMkspec() const else if (value == "build_all") m_defaultConfigIsDebugAndRelease = true; } + // Is this actually a simulator Qt? + if (configValues.contains(QLatin1String("simulator"))) { + m_targetIds.clear(); + m_targetIds.insert(QLatin1String(Constants::QT_SIMULATOR_TARGET_ID)); + } delete reader; ProFileCacheManager::instance()->decRefCount(); m_toolChainUpToDate = true; - - // Check qconfig.h for QT_SIMULATOR define on desktop builds and switch the - // Qt version to Qt simulator target: - if (m_targetIds.contains(Constants::DESKTOP_TARGET_ID)) { - QString path(headerInstallPath()); - path.append(QLatin1String("/Qt/qconfig.h")); - QFile qconfig(path); - if (!qconfig.exists()) - return; - qconfig.open(QIODevice::ReadOnly); - QTextStream stream(&qconfig); - QString line; - bool isSimulator = false; - while (!(line = stream.readLine()).isNull()) { - if (line.startsWith(QLatin1String("#define QT_SIMULATOR"))) { - isSimulator = true; - break; - } - } - qconfig.close(); - if (isSimulator) { - m_targetIds.remove(QLatin1String(Constants::DESKTOP_TARGET_ID)); - m_targetIds.insert(QLatin1String(Constants::QT_SIMULATOR_TARGET_ID)); - } - } } QString QtVersion::mwcDirectory() const |