mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
disable window geometry session handling for Qt < 4.2.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20543 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
90d1935d94
commit
cd56d44a69
@ -95,17 +95,21 @@ private:
|
||||
|
||||
void showEvent(QShowEvent * e)
|
||||
{
|
||||
#if (QT_VERSION >= 0x040200)
|
||||
QSettings settings;
|
||||
std::string key = name_ + "/geometry";
|
||||
QDialog::restoreGeometry(settings.value(key.c_str()).toByteArray());
|
||||
#endif
|
||||
QDialog::showEvent(e);
|
||||
}
|
||||
|
||||
void closeEvent(QCloseEvent * e)
|
||||
{
|
||||
#if (QT_VERSION >= 0x040200)
|
||||
QSettings settings;
|
||||
std::string key = name_ + "/geometry";
|
||||
settings.setValue(key.c_str(), QDialog::saveGeometry());
|
||||
#endif
|
||||
QDialog::closeEvent(e);
|
||||
}
|
||||
};
|
||||
|
@ -243,18 +243,22 @@ 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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user