aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpchannelswindow.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2020-05-12 01:11:19 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2020-05-12 01:11:19 +0800
commitdb54b5d51d5269c2e17964e0e9842f4a2f210673 (patch)
treeebc7b5858e1cc712fcc6de4ec50896051ebfaf0b /qmidiplayer-desktop/qmpchannelswindow.cpp
parenta7407edaf81c685d4a389785a405a53a5de4b148 (diff)
downloadQMidiPlayer-db54b5d51d5269c2e17964e0e9842f4a2f210673.tar.xz
Stop using a dumber version of QRect().
This is going to break old configuration, so bump QMP_CONFIGURATION_FILE_REV.
Diffstat (limited to 'qmidiplayer-desktop/qmpchannelswindow.cpp')
-rw-r--r--qmidiplayer-desktop/qmpchannelswindow.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/qmidiplayer-desktop/qmpchannelswindow.cpp b/qmidiplayer-desktop/qmpchannelswindow.cpp
index e22d75e..8957254 100644
--- a/qmidiplayer-desktop/qmpchannelswindow.cpp
+++ b/qmidiplayer-desktop/qmpchannelswindow.cpp
@@ -300,8 +300,8 @@ qmpChannelsWindow::qmpChannelsWindow(QWidget *parent):
0,
true
);
- if (mainwindow->getSettings()->getOptionRaw("DialogStatus/ChnlW", QRect(-999, -999, 999, 999)).toRect() != QRect(-999, -999, 999, 999))
- setGeometry(mainwindow->getSettings()->getOptionRaw("DialogStatus/ChnlW", QRect(-999, -999, 999, 999)).toRect());
+ if (!mainwindow->getSettings()->getOptionRaw("DialogStatus/ChnlW", QRect()).toRect().isNull())
+ setGeometry(mainwindow->getSettings()->getOptionRaw("DialogStatus/ChnlW", QRect()).toRect());
if (mainwindow->getSettings()->getOptionRaw("DialogStatus/ChnlWShown", 0).toInt())
{
show();
@@ -315,8 +315,8 @@ void qmpChannelsWindow::showEvent(QShowEvent *event)
{
mainwindow->getSettings()->setOptionRaw("DialogStatus/ChnlWShown", 1);
}
- if (mainwindow->getSettings()->getOptionRaw("DialogStatus/ChnlW", QRect(-999, -999, 999, 999)).toRect() != QRect(-999, -999, 999, 999))
- setGeometry(mainwindow->getSettings()->getOptionRaw("DialogStatus/ChnlW", QRect(-999, -999, 999, 999)).toRect());
+ if (!mainwindow->getSettings()->getOptionRaw("DialogStatus/ChnlW", QRect()).toRect().isNull())
+ setGeometry(mainwindow->getSettings()->getOptionRaw("DialogStatus/ChnlW", QRect()).toRect());
event->accept();
}