GuiView::saveLayout(): Use QSettings::beginGroup.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26490 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-09-22 06:50:35 +00:00
parent 305079fb23
commit 475a48b78d

View File

@ -347,15 +347,16 @@ GuiView::~GuiView()
void GuiView::saveLayout() const
{
QSettings settings;
QString const key = "views/" + QString::number(id_);
settings.beginGroup("views");
settings.beginGroup(QString::number(id_));
#ifdef Q_WS_X11
settings.setValue(key + "/pos", pos());
settings.setValue(key + "/size", size());
settings.setValue("pos", pos());
settings.setValue("size", size());
#else
settings.setValue(key + "/geometry", saveGeometry());
settings.setValue("geometry", saveGeometry());
#endif
settings.setValue(key + "/layout", saveState(0));
settings.setValue(key + "/icon_size", iconSize());
settings.setValue("layout", saveState(0));
settings.setValue("icon_size", iconSize());
}