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