diff options
| author | MeshCollider <[email protected]> | 2017-09-15 16:38:42 +1200 |
|---|---|---|
| committer | MeshCollider <[email protected]> | 2017-09-21 22:34:58 +1200 |
| commit | 13baf7217bf8394ae02efc376208ae86eac4d0f6 (patch) | |
| tree | a7fc95221ed9049b4daf1f18716644704197518a /src/qt/guiutil.cpp | |
| parent | Merge #11326: Fix crash on shutdown with invalid wallet (diff) | |
| download | discoin-13baf7217bf8394ae02efc376208ae86eac4d0f6.tar.xz discoin-13baf7217bf8394ae02efc376208ae86eac4d0f6.zip | |
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 c3f98f764..b916df69a 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); |