diff options
Diffstat (limited to 'src/gui/painting/qcolormap_qpa.cpp')
-rw-r--r-- | src/gui/painting/qcolormap_qpa.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gui/painting/qcolormap_qpa.cpp b/src/gui/painting/qcolormap_qpa.cpp index 40bf364c5a..6ad3abb3aa 100644 --- a/src/gui/painting/qcolormap_qpa.cpp +++ b/src/gui/painting/qcolormap_qpa.cpp @@ -42,8 +42,8 @@ #include "qcolormap.h" #include "qcolor.h" #include "qpaintdevice.h" -#include "private/qapplication_p.h" -#include "private/qgraphicssystem_p.h" +#include "qscreen.h" +#include "qguiapplication.h" QT_BEGIN_NAMESPACE @@ -67,10 +67,7 @@ void QColormap::initialize() { screenMap = new QColormapPrivate; - QPlatformIntegration *pi = QApplicationPrivate::platformIntegration(); - QList<QPlatformScreen*> screens = pi->screens(); - - screenMap->depth = screens.at(0)->depth(); + screenMap->depth = QGuiApplication::primaryScreen()->depth(); if (screenMap->depth < 8) { screenMap->mode = QColormap::Indexed; screenMap->numcolors = 256; |