summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2013-04-22 16:18:58 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-23 21:02:50 +0200
commit71a1ff39bcf67117e94b669aa0ee059bf1f03b3a (patch)
treeca42960b4f780ec6a142ffa3a0a157c681d94681 /src/plugins
parent3821047e6c40485a14f7173c6ded07474997820e (diff)
qxcb: output clear error message when running on an 8-bit display
Currently, running a Qt5 widget app in Xvfb (with its default setup, 8 bit color depth) outputs a stream of error messages, starting with: QWidget::paintEngine: QWidget::paintEngine: Should no longer be called Better output clearly the reason why we end up in that method: painting on a null image, due to the unsupported image format. Maybe this should even be a qFatal... Change-Id: Iae8f1b057518c146bf8e034999c1b5e67ce6ef5e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 68ccbfb8c0..f2ec4ce4b0 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -170,7 +170,9 @@ static inline QImage::Format imageFormatForDepth(int depth)
case 32: return QImage::Format_ARGB32_Premultiplied;
case 24: return QImage::Format_RGB32;
case 16: return QImage::Format_RGB16;
- default: return QImage::Format_Invalid;
+ default:
+ qWarning("Unsupported screen depth: %d", depth);
+ return QImage::Format_Invalid;
}
}