summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-10-22 09:58:08 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-10-22 09:58:08 (GMT)
commit98824c2ebe97f61bf294b0be07ac164aed470fbf (patch)
tree0621c3002e2f2fe28fc6e39a14429928cc2aa072 /src/gui
parenta3c2f84f1a33610b86a600c68653b96de1d2b9f5 (diff)
parente5be06e53a33605a4f5987e9d451b2143470bdf4 (diff)
downloadQt-98824c2ebe97f61bf294b0be07ac164aed470fbf.zip
Qt-98824c2ebe97f61bf294b0be07ac164aed470fbf.tar.gz
Qt-98824c2ebe97f61bf294b0be07ac164aed470fbf.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fall back to Qt for loading images with DICAPS_COLORKEY. Implement QWidget::metric PdmNumColors for QWS Adding ::scroll capabilities to live pixmaps. Major refactoring: creating a new QPixmapData subclass for live textures.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qpixmap_x11_p.h2
-rw-r--r--src/gui/kernel/qwidget_qws.cpp24
2 files changed, 25 insertions, 1 deletions
diff --git a/src/gui/image/qpixmap_x11_p.h b/src/gui/image/qpixmap_x11_p.h
index f171281..7eab64c 100644
--- a/src/gui/image/qpixmap_x11_p.h
+++ b/src/gui/image/qpixmap_x11_p.h
@@ -115,7 +115,7 @@ private:
friend class QEglContext; // Needs gl_surface
friend class QGLContext; // Needs gl_surface
friend class QX11GLPixmapData; // Needs gl_surface
- friend class QMeeGoGraphicsSystem; // Needs gl_surface and flags
+ friend class QMeeGoLivePixmapData; // Needs gl_surface and flags
friend bool qt_createEGLSurfaceForPixmap(QPixmapData*, bool); // Needs gl_surface
void release();
diff --git a/src/gui/kernel/qwidget_qws.cpp b/src/gui/kernel/qwidget_qws.cpp
index 3145136..c6cbbd0 100644
--- a/src/gui/kernel/qwidget_qws.cpp
+++ b/src/gui/kernel/qwidget_qws.cpp
@@ -1017,6 +1017,30 @@ int QWidget::metric(PaintDeviceMetric m) const
return static_cast<QWidget *>(d->parent)->metric(m);
const QScreen *screen = d->getScreen();
return qRound(screen->height() / double(screen->physicalHeight() / 25.4));
+ } else if (m == PdmNumColors) {
+ QScreen *screen = d->getScreen();
+ int ret = screen->colorCount();
+ if (!ret) {
+ const int depth = qwsDisplay()->depth();
+ switch (depth) {
+ case 1:
+ ret = 2;
+ break;
+ case 8:
+ ret = 256;
+ break;
+ case 16:
+ ret = 65536;
+ break;
+ case 24:
+ ret = 16777216;
+ break;
+ case 32:
+ ret = 2147483647;
+ break;
+ }
+ }
+ return ret;
} else {
val = QPaintDevice::metric(m);// XXX
}