diff options
author | MeshCollider <dobsonsa68@gmail.com> | 2017-09-15 16:38:42 +1200 |
---|---|---|
committer | MeshCollider <dobsonsa68@gmail.com> | 2017-09-21 22:34:58 +1200 |
commit | 13baf7217bf8394ae02efc376208ae86eac4d0f6 (patch) | |
tree | a7fc95221ed9049b4daf1f18716644704197518a /src/qt/guiutil.cpp | |
parent | 0f399a9ff227896265cafab9b2e9fab6cdb9b5b9 (diff) |
Replace save|restoreWindowGeometry with Qt functions
Diffstat (limited to 'src/qt/guiutil.cpp')
-rw-r--r-- | src/qt/guiutil.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index c3f98f764b..b916df69aa 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -862,32 +862,6 @@ bool SetStartOnSystemStartup(bool fAutoStart) { return false; } #endif -void saveWindowGeometry(const QString& strSetting, QWidget *parent) -{ - QSettings settings; - settings.setValue(strSetting + "Pos", parent->pos()); - settings.setValue(strSetting + "Size", parent->size()); -} - -void restoreWindowGeometry(const QString& strSetting, const QSize& defaultSize, QWidget *parent) -{ - QSettings settings; - QPoint pos = settings.value(strSetting + "Pos").toPoint(); - QSize size = settings.value(strSetting + "Size", defaultSize).toSize(); - - parent->resize(size); - parent->move(pos); - - if ((!pos.x() && !pos.y()) || (QApplication::desktop()->screenNumber(parent) == -1)) - { - QRect screen = QApplication::desktop()->screenGeometry(); - QPoint defaultPos((screen.width() - defaultSize.width()) / 2, - (screen.height() - defaultSize.height()) / 2); - parent->resize(defaultSize); - parent->move(defaultPos); - } -} - void setClipboard(const QString& str) { QApplication::clipboard()->setText(str, QClipboard::Clipboard); |