diff --git a/src/frontends/qt4/GuiDialog.cpp b/src/frontends/qt4/GuiDialog.cpp index eb2e9f6a14..950fedf40b 100644 --- a/src/frontends/qt4/GuiDialog.cpp +++ b/src/frontends/qt4/GuiDialog.cpp @@ -15,10 +15,10 @@ #include "qt_helpers.h" #include "frontends/LyXView.h" -#include -#include -#include - +#include +#include +#include + using std::string; namespace lyx { @@ -241,26 +241,26 @@ void GuiDialog::setController(Controller * controller) } -void GuiDialog::showEvent(QShowEvent * e) -{ -#if (QT_VERSION >= 0x040200) - QSettings settings; - string key = name_ + "/geometry"; - restoreGeometry(settings.value(key.c_str()).toByteArray()); -#endif - QDialog::showEvent(e); -} - - -void GuiDialog::closeEvent(QCloseEvent * e) -{ -#if (QT_VERSION >= 0x040200) - QSettings settings; - string key = name_ + "/geometry"; - settings.setValue(key.c_str(), saveGeometry()); -#endif - QDialog::closeEvent(e); -} +void GuiDialog::showEvent(QShowEvent * e) +{ +#if (QT_VERSION >= 0x040200) + QSettings settings; + string key = name_ + "/geometry"; + restoreGeometry(settings.value(key.c_str()).toByteArray()); +#endif + QDialog::showEvent(e); +} + + +void GuiDialog::closeEvent(QCloseEvent * e) +{ +#if (QT_VERSION >= 0x040200) + QSettings settings; + string key = name_ + "/geometry"; + settings.setValue(key.c_str(), saveGeometry()); +#endif + QDialog::closeEvent(e); +} } // namespace frontend } // namespace lyx diff --git a/src/frontends/qt4/GuiDialog.h b/src/frontends/qt4/GuiDialog.h index da51ee9244..9185a8770e 100644 --- a/src/frontends/qt4/GuiDialog.h +++ b/src/frontends/qt4/GuiDialog.h @@ -79,10 +79,10 @@ public: /// default: do nothing virtual void updateContents() {} /// - void closeEvent(QCloseEvent *); - /// - void showEvent(QShowEvent *); - + void closeEvent(QCloseEvent *); + /// + void showEvent(QShowEvent *); + protected: /// Hide the dialog. virtual void hideView();