diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-04-16 10:03:48 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-04-16 10:03:48 +0200 |
commit | 6b8167c663f3e2b2b5b421f59045602e2e9bc633 (patch) | |
tree | 8c8f4fffebb790867cd75121f888af49f986b33e /src/plugins/qtsupport | |
parent | bf4d9aed33f0b49cf8f6d4d5edd1915d70f326c3 (diff) | |
parent | 53553165ba6a9d8dfbac6dab2e246d6a60221a7e (diff) | |
download | qt-creator-6b8167c663f3e2b2b5b421f59045602e2e9bc633.tar.gz |
Merge remote-tracking branch 'origin/2.5'
Diffstat (limited to 'src/plugins/qtsupport')
-rw-r--r-- | src/plugins/qtsupport/baseqtversion.cpp | 14 | ||||
-rw-r--r-- | src/plugins/qtsupport/qtoptionspage.cpp | 15 | ||||
-rw-r--r-- | src/plugins/qtsupport/qtoptionspage.h | 1 | ||||
-rw-r--r-- | src/plugins/qtsupport/qtversionmanager.h | 2 |
4 files changed, 27 insertions, 5 deletions
diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index f4c6854eda..7c5e74ecf1 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -1119,9 +1119,19 @@ bool BaseQtVersion::queryQMakeVariables(const Utils::FileName &binary, QHash<QSt const QString line = stream.readLine(); const int index = line.indexOf(QLatin1Char(':')); if (index != -1) { + const QString name = line.left(index); const QString value = QDir::fromNativeSeparators(line.mid(index+1)); - if (value != QLatin1String("**Unknown**")) - versionInfo->insert(line.left(index), value); + if (value != QLatin1String("**Unknown**")) { + versionInfo->insert(name, value); + if (name.startsWith(QLatin1String("QT_")) && !name.contains(QLatin1Char('/'))) { + if (name.startsWith(QLatin1String("QT_INSTALL_"))) { + versionInfo->insert(name + QLatin1String("/raw"), value); + versionInfo->insert(name + QLatin1String("/get"), value); + } else if (name.startsWith(QLatin1String("QT_HOST_"))) { + versionInfo->insert(name + QLatin1String("/get"), value); + } + } + } } } return true; diff --git a/src/plugins/qtsupport/qtoptionspage.cpp b/src/plugins/qtsupport/qtoptionspage.cpp index d113448ce3..4d493b0ea8 100644 --- a/src/plugins/qtsupport/qtoptionspage.cpp +++ b/src/plugins/qtsupport/qtoptionspage.cpp @@ -113,8 +113,7 @@ void QtOptionsPage::apply() return; m_widget->finish(); - QtVersionManager *vm = QtVersionManager::instance(); - vm->setNewQtVersions(m_widget->versions()); + m_widget->apply(); } bool QtOptionsPage::matches(const QString &s) const @@ -1049,6 +1048,18 @@ void QtOptionsPageWidget::finish() fixQtVersionName(indexForTreeItem(item)); } +void QtOptionsPageWidget::apply() +{ + disconnect(QtVersionManager::instance(), SIGNAL(qtVersionsChanged(QList<int>,QList<int>,QList<int>)), + this, SLOT(updateQtVersions(QList<int>,QList<int>,QList<int>))); + + QtVersionManager *vm = QtVersionManager::instance(); + vm->setNewQtVersions(versions()); + + connect(QtVersionManager::instance(), SIGNAL(qtVersionsChanged(QList<int>,QList<int>,QList<int>)), + this, SLOT(updateQtVersions(QList<int>,QList<int>,QList<int>))); +} + /* Checks that the qt version name is unique * and otherwise changes the name * diff --git a/src/plugins/qtsupport/qtoptionspage.h b/src/plugins/qtsupport/qtoptionspage.h index ef854bc57e..499ed77cbb 100644 --- a/src/plugins/qtsupport/qtoptionspage.h +++ b/src/plugins/qtsupport/qtoptionspage.h @@ -68,6 +68,7 @@ public: ~QtOptionsPageWidget(); QList<BaseQtVersion *> versions() const; void finish(); + void apply(); QString searchKeywords() const; virtual bool eventFilter(QObject *o, QEvent *e); diff --git a/src/plugins/qtsupport/qtversionmanager.h b/src/plugins/qtsupport/qtversionmanager.h index 7a95a5fe51..1db9a36ca6 100644 --- a/src/plugins/qtsupport/qtversionmanager.h +++ b/src/plugins/qtsupport/qtversionmanager.h @@ -58,7 +58,7 @@ class QTSUPPORT_EXPORT QtVersionManager : public QObject Q_OBJECT // for getUniqueId(); friend class BaseQtVersion; - friend class Internal::QtOptionsPage; + friend class Internal::QtOptionsPageWidget; public: static QtVersionManager *instance(); QtVersionManager(); |