diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2010-04-18 13:59:11 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2010-04-18 13:59:11 (GMT) |
commit | adff8506a1c654db63ef362bbc90cddf7c156dd7 (patch) | |
tree | 5a45c08fe6f9334d87e18a8b8271d2c8cbb71e93 /addon | |
parent | eb1cb68e11a3b24222a49ed254f8f7aea2f73bae (diff) | |
download | Doxygen-adff8506a1c654db63ef362bbc90cddf7c156dd7.zip Doxygen-adff8506a1c654db63ef362bbc90cddf7c156dd7.tar.gz Doxygen-adff8506a1c654db63ef362bbc90cddf7c156dd7.tar.bz2 |
Release-1.6.3-20100418
Diffstat (limited to 'addon')
-rw-r--r-- | addon/doxywizard/doxywizard.cpp | 19 | ||||
-rw-r--r-- | addon/doxywizard/expert.cpp | 5 |
2 files changed, 18 insertions, 6 deletions
diff --git a/addon/doxywizard/doxywizard.cpp b/addon/doxywizard/doxywizard.cpp index 2001687..b746db1 100644 --- a/addon/doxywizard/doxywizard.cpp +++ b/addon/doxywizard/doxywizard.cpp @@ -101,14 +101,10 @@ MainWindow::MainWindow() setCentralWidget(topPart); statusBar()->showMessage(tr("Welcome to Doxygen"),messageTimeout); - loadSettings(); m_runProcess = new QProcess; m_running = false; m_timer = new QTimer; - updateLaunchButtonState(); - m_modified = false; - updateTitle(); // connect signals and slots connect(tabs,SIGNAL(currentChanged(int)),SLOT(selectTab(int))); @@ -123,6 +119,12 @@ MainWindow::MainWindow() connect(m_saveLog,SIGNAL(clicked()),SLOT(saveLog())); connect(showSettings,SIGNAL(clicked()),SLOT(showSettings())); connect(m_expert,SIGNAL(changed()),SLOT(configChanged())); + + loadSettings(); + updateLaunchButtonState(); + m_modified = false; + updateTitle(); + m_wizard->refresh(); } void MainWindow::closeEvent(QCloseEvent *event) @@ -274,6 +276,7 @@ void MainWindow::makeDefaults() //printf("MainWindow:makeDefaults()\n"); m_expert->saveSettings(&m_settings); m_settings.setValue(QString::fromAscii("wizard/loadsettings"), true); + m_settings.sync(); } } @@ -288,6 +291,7 @@ void MainWindow::resetToDefaults() //printf("MainWindow:resetToDefaults()\n"); m_expert->resetToDefaults(); m_settings.setValue(QString::fromAscii("wizard/loadsettings"), false); + m_settings.sync(); m_wizard->refresh(); } } @@ -298,6 +302,7 @@ void MainWindow::loadSettings() QVariant state = m_settings.value(QString::fromAscii("main/state"), QVariant::Invalid); QVariant wizState = m_settings.value(QString::fromAscii("wizard/state"), QVariant::Invalid); QVariant loadSettings = m_settings.value(QString::fromAscii("wizard/loadsettings"), QVariant::Invalid); + QVariant workingDir = m_settings.value(QString::fromAscii("wizard/workingdir"), QVariant::Invalid); if (geometry !=QVariant::Invalid) restoreGeometry(geometry.toByteArray()); if (state !=QVariant::Invalid) restoreState (state.toByteArray()); @@ -307,6 +312,11 @@ void MainWindow::loadSettings() m_expert->loadSettings(&m_settings); } + if (workingDir!=QVariant::Invalid && QDir(workingDir.toString()).exists()) + { + setWorkingDir(workingDir.toString()); + } + for (int i=0;i<10;i++) { QString entry = m_settings.value(QString().sprintf("recent/config%d",i)).toString(); @@ -322,6 +332,7 @@ void MainWindow::saveSettings() m_settings.setValue(QString::fromAscii("main/geometry"), saveGeometry()); m_settings.setValue(QString::fromAscii("main/state"), saveState()); m_settings.setValue(QString::fromAscii("wizard/state"), m_wizard->saveState()); + m_settings.setValue(QString::fromAscii("wizard/workingdir"), m_workingDir->text()); } void MainWindow::selectTab(int id) diff --git a/addon/doxywizard/expert.cpp b/addon/doxywizard/expert.cpp index 9b665ca..e328ef0 100644 --- a/addon/doxywizard/expert.cpp +++ b/addon/doxywizard/expert.cpp @@ -321,9 +321,9 @@ void Expert::loadSettings(QSettings *s) { i.next(); QVariant var = s->value(SA("config/")+i.key()); - //printf("Loading key %s: type=%d\n",qPrintable(i.key()),var.type()); if (i.value()) { + //printf("Loading key %s: type=%d value='%s'\n",qPrintable(i.key()),var.type(),qPrintable(var.toString())); i.value()->value() = var; i.value()->update(); } @@ -336,9 +336,10 @@ void Expert::saveSettings(QSettings *s) while (i.hasNext()) { i.next(); + //printf("Saving key %s: type=%d value='%s'\n",qPrintable(i.key()),i.value()->value().type(),qPrintable(i.value()->value().toString())); if (i.value()) { - s->value(SA("config/")+i.key(),i.value()->value()); + s->setValue(SA("config/")+i.key(),i.value()->value()); } } } |