summaryrefslogtreecommitdiffstats
path: root/src/assistant/assistant/preferencesdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/assistant/assistant/preferencesdialog.cpp')
-rw-r--r--src/assistant/assistant/preferencesdialog.cpp55
1 files changed, 24 insertions, 31 deletions
diff --git a/src/assistant/assistant/preferencesdialog.cpp b/src/assistant/assistant/preferencesdialog.cpp
index 7955e08df..67f91326c 100644
--- a/src/assistant/assistant/preferencesdialog.cpp
+++ b/src/assistant/assistant/preferencesdialog.cpp
@@ -142,31 +142,6 @@ PreferencesDialog::PreferencesDialog(QWidget *parent)
setFont(helpEngine.appFont());
}
-PreferencesDialog::~PreferencesDialog()
-{
- if (m_appFontChanged) {
- helpEngine.setAppFont(m_appFontPanel->selectedFont());
- helpEngine.setUseAppFont(m_appFontPanel->isChecked());
- helpEngine.setAppWritingSystem(m_appFontPanel->writingSystem());
- emit updateApplicationFont();
- }
-
- if (m_browserFontChanged) {
- helpEngine.setBrowserFont(m_browserFontPanel->selectedFont());
- helpEngine.setUseBrowserFont(m_browserFontPanel->isChecked());
- helpEngine.setBrowserWritingSystem(m_browserFontPanel->writingSystem());
- emit updateBrowserFont();
- }
-
- QString homePage = m_ui.homePageLineEdit->text();
- if (homePage.isEmpty())
- homePage = QLatin1String("help");
- helpEngine.setHomePage(homePage);
-
- int option = m_ui.helpStartComboBox->currentIndex();
- helpEngine.setStartOption(option);
-}
-
FilterSetup PreferencesDialog::readOriginalSetup() const
{
FilterSetup filterSetup;
@@ -195,12 +170,6 @@ FilterSetup PreferencesDialog::readOriginalSetup() const
return filterSetup;
}
-void PreferencesDialog::showDialog()
-{
- if (exec() != Accepted)
- m_appFontChanged = m_browserFontChanged = false;
-}
-
void PreferencesDialog::updateFilterPage()
{
if (m_hideFiltersTab)
@@ -563,6 +532,30 @@ void PreferencesDialog::applyChanges()
helpEngine.setShowTabs(m_ui.showTabs->isChecked());
if (m_showTabs != m_ui.showTabs->isChecked())
emit updateUserInterface();
+
+ if (m_appFontChanged) {
+ helpEngine.setAppFont(m_appFontPanel->selectedFont());
+ helpEngine.setUseAppFont(m_appFontPanel->isChecked());
+ helpEngine.setAppWritingSystem(m_appFontPanel->writingSystem());
+ emit updateApplicationFont();
+ m_appFontChanged = false;
+ }
+
+ if (m_browserFontChanged) {
+ helpEngine.setBrowserFont(m_browserFontPanel->selectedFont());
+ helpEngine.setUseBrowserFont(m_browserFontPanel->isChecked());
+ helpEngine.setBrowserWritingSystem(m_browserFontPanel->writingSystem());
+ emit updateBrowserFont();
+ m_browserFontChanged = false;
+ }
+
+ QString homePage = m_ui.homePageLineEdit->text();
+ if (homePage.isEmpty())
+ homePage = QLatin1String("help");
+ helpEngine.setHomePage(homePage);
+
+ const int option = m_ui.helpStartComboBox->currentIndex();
+ helpEngine.setStartOption(option);
}
void PreferencesDialog::updateFontSettingsPage()