Qt5: QDesktopWidget is deprecated use QScreen [-Wdeprecated-declarations]

This commit is contained in:
wmayer
2020-06-11 02:21:57 +02:00
committed by wwmayer
parent deb39c4321
commit eced0cb568
6 changed files with 48 additions and 0 deletions

View File

@@ -44,6 +44,10 @@
# include <QGLContext>
#endif
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
# include <QScreen>
#endif
#include <LibraryVersions.h>
#include <zlib.h>
#include <boost/version.hpp>
@@ -234,7 +238,11 @@ AboutDialog::AboutDialog(bool showLic, QWidget* parent)
setModal(true);
ui->setupUi(this);
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
QRect rect = QApplication::primaryScreen()->availableGeometry();
#else
QRect rect = QApplication::desktop()->availableGeometry();
#endif
QPixmap image = getMainWindow()->splashImage();
// Make sure the image is not too big