Skip to content

Commit

Permalink
qxcb: output clear error message when running on an 8-bit display
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Samuel Rødal <[email protected]>
  • Loading branch information
dfaure authored and The Qt Project committed Apr 23, 2013
1 parent 3821047 commit 71a1ff3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugins/platforms/xcb/qxcbwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 71a1ff3

Please sign in to comment.