Commit 2d8326d2 authored by hjk's avatar hjk
Browse files

Merge branch '0.9.2-rc1' of git@scm.dev.nokia.troll.no:creator/mainline into 0.9.2-rc1

parents 2c77b0b9 9e75f6e1
...@@ -177,7 +177,10 @@ void QtVersionManager::apply() ...@@ -177,7 +177,10 @@ void QtVersionManager::apply()
} }
} }
} }
m_versions = m_widget->versions(); qDeleteAll(m_versions);
m_versions.clear();
foreach(QtVersion *version, m_widget->versions())
m_versions.append(new QtVersion(*version));
if (versionPathsChanged) if (versionPathsChanged)
updateDocumentation(); updateDocumentation();
updateUniqueIdToIndexMap(); updateUniqueIdToIndexMap();
...@@ -361,11 +364,16 @@ QtVersion *QtVersionManager::currentQtVersion() const ...@@ -361,11 +364,16 @@ QtVersion *QtVersionManager::currentQtVersion() const
QtDirWidget::QtDirWidget(QWidget *parent, QList<QtVersion *> versions, int defaultVersion) QtDirWidget::QtDirWidget(QWidget *parent, QList<QtVersion *> versions, int defaultVersion)
: QWidget(parent) : QWidget(parent)
, m_versions(versions)
, m_defaultVersion(defaultVersion) , m_defaultVersion(defaultVersion)
, m_specifyNameString(tr("<specify a name>")) , m_specifyNameString(tr("<specify a name>"))
, m_specifyPathString(tr("<specify a path>")) , m_specifyPathString(tr("<specify a path>"))
{ {
// Initialize m_versions
foreach(QtVersion *version, versions) {
m_versions.append(new QtVersion(*version));
}
m_ui.setupUi(this); m_ui.setupUi(this);
m_ui.qtPath->setExpectedKind(Core::Utils::PathChooser::Directory); m_ui.qtPath->setExpectedKind(Core::Utils::PathChooser::Directory);
m_ui.qtPath->setPromptDialogTitle(tr("Select QTDIR")); m_ui.qtPath->setPromptDialogTitle(tr("Select QTDIR"));
...@@ -417,6 +425,11 @@ QtDirWidget::QtDirWidget(QWidget *parent, QList<QtVersion *> versions, int defau ...@@ -417,6 +425,11 @@ QtDirWidget::QtDirWidget(QWidget *parent, QList<QtVersion *> versions, int defau
updateState(); updateState();
} }
QtDirWidget::~QtDirWidget()
{
qDeleteAll(m_versions);
}
void QtDirWidget::addQtDir() void QtDirWidget::addQtDir()
{ {
QtVersion *newVersion = new QtVersion(m_specifyNameString, m_specifyPathString); QtVersion *newVersion = new QtVersion(m_specifyNameString, m_specifyPathString);
......
...@@ -122,7 +122,6 @@ private: ...@@ -122,7 +122,6 @@ private:
// This is updated on first call to qmakeCommand // This is updated on first call to qmakeCommand
// That function is called from updateVersionInfo() // That function is called from updateVersionInfo()
mutable QString m_qtVersionString; mutable QString m_qtVersionString;
Q_DISABLE_COPY(QtVersion);
}; };
...@@ -131,6 +130,7 @@ class QtDirWidget : public QWidget ...@@ -131,6 +130,7 @@ class QtDirWidget : public QWidget
Q_OBJECT Q_OBJECT
public: public:
QtDirWidget(QWidget *parent, QList<QtVersion *> versions, int defaultVersion); QtDirWidget(QWidget *parent, QList<QtVersion *> versions, int defaultVersion);
~QtDirWidget();
QList<QtVersion *> versions() const; QList<QtVersion *> versions() const;
int defaultVersion() const; int defaultVersion() const;
void finish(); void finish();
......
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