Commit 2b88fedc authored by Daniel Teske's avatar Daniel Teske

Fix Options/Qt Versions adding versions on apply

Task-number: QTCREATORBUG-7242
Change-Id: I4e4955e45c69fe3a7124a4d54d98228876e510bb
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 6ba03794
......@@ -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
*
......
......@@ -68,6 +68,7 @@ public:
~QtOptionsPageWidget();
QList<BaseQtVersion *> versions() const;
void finish();
void apply();
QString searchKeywords() const;
virtual bool eventFilter(QObject *o, QEvent *e);
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment