aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2010-08-10 14:07:28 +0200
committerhjk <qtc-committer@nokia.com>2010-08-10 14:42:41 +0200
commit440f55bd26c3d9bd40d07943852b8ec324e4a240 (patch)
treeb666f375dbfcd0e739a7c7153222ab871338c82d
parentef96bd98c67c0619d5094b87c4e20d385be8f7f3 (diff)
maemo device configuration was not saved on MacOS
The code relies on getting the dialog accepted after the editFinished singnals. This does not work on MacOS. Reviewed-by: ck (cherry picked from commit 1c095f88d05a22a7956645e002e78282cbe2576b)
-rw-r--r--src/plugins/qt4projectmanager/qt-maemo/maemosettingswidget.cpp8
-rw-r--r--src/plugins/qt4projectmanager/qt-maemo/maemosettingswidget.h1
2 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemosettingswidget.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemosettingswidget.cpp
index 602cbe2c47f..011e9644e9e 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemosettingswidget.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemosettingswidget.cpp
@@ -98,13 +98,16 @@ MaemoSettingsWidget::MaemoSettingsWidget(QWidget *parent)
m_ui(new Ui_MaemoSettingsWidget),
m_devConfs(MaemoDeviceConfigurations::instance().devConfigs()),
m_nameValidator(new NameValidator(m_devConfs)),
- m_keyDeployer(0)
+ m_keyDeployer(0),
+ m_saveSettingsRequested(false)
{
initGui();
}
MaemoSettingsWidget::~MaemoSettingsWidget()
{
+ if (m_saveSettingsRequested)
+ MaemoDeviceConfigurations::instance().setDevConfigs(m_devConfs);
}
QString MaemoSettingsWidget::searchKeywords() const
@@ -225,7 +228,8 @@ void MaemoSettingsWidget::fillInValues()
void MaemoSettingsWidget::saveSettings()
{
- MaemoDeviceConfigurations::instance().setDevConfigs(m_devConfs);
+ // We must defer this step because of a stupid bug on MacOS. See QTCREATORBUG-1675.
+ m_saveSettingsRequested = true;
}
MaemoDeviceConfig &MaemoSettingsWidget::currentConfig()
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemosettingswidget.h b/src/plugins/qt4projectmanager/qt-maemo/maemosettingswidget.h
index e8c676696a0..d7a195f3928 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemosettingswidget.h
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemosettingswidget.h
@@ -103,6 +103,7 @@ private:
MaemoDeviceConfig m_lastConfigSim;
NameValidator * const m_nameValidator;
MaemoSshRunner *m_keyDeployer;
+ bool m_saveSettingsRequested;
};
} // namespace Internal