diff options
Diffstat (limited to 'tests/manual/qcursor/qcursorhighdpi/main.cpp')
-rw-r--r-- | tests/manual/qcursor/qcursorhighdpi/main.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/tests/manual/qcursor/qcursorhighdpi/main.cpp b/tests/manual/qcursor/qcursorhighdpi/main.cpp index e70be333fd..5a8bc542b9 100644 --- a/tests/manual/qcursor/qcursorhighdpi/main.cpp +++ b/tests/manual/qcursor/qcursorhighdpi/main.cpp @@ -28,7 +28,6 @@ #include <QAction> #include <QApplication> -#include <QDesktopWidget> #include <QGridLayout> #include <QLabel> #include <QMainWindow> @@ -83,8 +82,7 @@ static QString screenInfo(const QWidget *w) { QString result; QTextStream str(&result); -#if QT_VERSION > 0x050000 - QScreen *screen = Q_NULLPTR; + QScreen *screen = nullptr; if (const QWindow *window = w->windowHandle()) screen = window->screen(); if (screen) { @@ -98,12 +96,6 @@ static QString screenInfo(const QWidget *w) } else { str << "<null>"; } -#else - QDesktopWidget *desktop = QApplication::desktop(); - int screenNumber = desktop->screenNumber(w); - str << "Screen #" <<screenNumber << ' ' << desktop->screenGeometry(screenNumber).width() - << 'x' << desktop->screenGeometry(screenNumber).height() << " PD: " << w->logicalDpiX() << "DPI"; -#endif #ifdef Q_OS_WIN str << ", SM_C_CURSOR: " << GetSystemMetrics(SM_CXCURSOR) << 'x' << GetSystemMetrics(SM_CYCURSOR); #endif |