From db54b5d51d5269c2e17964e0e9842f4a2f210673 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Tue, 12 May 2020 01:11:19 +0800 Subject: Stop using a dumber version of QRect(). This is going to break old configuration, so bump QMP_CONFIGURATION_FILE_REV. --- qmidiplayer-desktop/qmpefxwindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'qmidiplayer-desktop/qmpefxwindow.cpp') diff --git a/qmidiplayer-desktop/qmpefxwindow.cpp b/qmidiplayer-desktop/qmpefxwindow.cpp index ec1cef3..154b053 100644 --- a/qmidiplayer-desktop/qmpefxwindow.cpp +++ b/qmidiplayer-desktop/qmpefxwindow.cpp @@ -34,8 +34,8 @@ qmpEfxWindow::qmpEfxWindow(QWidget *parent) : 0, true ); - if (settings->getOptionRaw("DialogStatus/EfxW", QRect(-999, -999, 999, 999)).toRect() != QRect(-999, -999, 999, 999)) - setGeometry(settings->getOptionRaw("DialogStatus/EfxW", QRect(-999, -999, 999, 999)).toRect()); + if (!settings->getOptionRaw("DialogStatus/EfxW", QRect()).toRect().isNull()) + setGeometry(settings->getOptionRaw("DialogStatus/EfxW", QRect()).toRect()); if (settings->getOptionRaw("DialogStatus/EfxWShown", 0).toInt()) { show(); @@ -104,8 +104,8 @@ void qmpEfxWindow::showEvent(QShowEvent *event) } initialized = true; qmpSettings *settings = qmpMainWindow::getInstance()->getSettings(); - if (settings->getOptionRaw("DialogStatus/EfxW", QRect(-999, -999, 999, 999)).toRect() != QRect(-999, -999, 999, 999)) - setGeometry(settings->getOptionRaw("DialogStatus/EfxW", QRect(-999, -999, 999, 999)).toRect()); + if (!settings->getOptionRaw("DialogStatus/EfxW", QRect()).toRect().isNull()) + setGeometry(settings->getOptionRaw("DialogStatus/EfxW", QRect()).toRect()); if (settings->getOptionBool("Behavior/DialogStatus")) { settings->setOptionRaw("DialogStatus/EfxWShown", 1); -- cgit v1.2.3