Mercurial > hg > svgui
diff widgets/KeyReference.cpp @ 1478:d39db4673676 by-id
Fix a number of Qt deprecation warnings
author | Chris Cannam |
---|---|
date | Wed, 03 Jul 2019 08:55:02 +0100 |
parents | c8a6fd3f9dff |
children |
line wrap: on
line diff
--- a/widgets/KeyReference.cpp Tue Jul 02 19:05:45 2019 +0100 +++ b/widgets/KeyReference.cpp Wed Jul 03 08:55:02 2019 +0100 @@ -21,7 +21,7 @@ #include <QVBoxLayout> #include <QDialogButtonBox> #include <QApplication> -#include <QDesktopWidget> +#include <QScreen> KeyReference::KeyReference() : m_text(nullptr), @@ -185,9 +185,9 @@ layout->addWidget(bb); m_dialog->show(); - - QDesktopWidget *desktop = QApplication::desktop(); - QRect available = desktop->availableGeometry(); + + QScreen *screen = QGuiApplication::primaryScreen(); + QRect available = screen->availableGeometry(); int width = available.width() * 3 / 5; int height = available.height() * 2 / 3;