qt6-bb10/src/gui
Marc Mutz 294c870bed QImage: cache colortable size
Coverity threw an error that in the else branch, the expression
colorTableRGB16[tableSize - 1] accesses uninit'ed data. The working
theory is that it fails to perform the implication

   isEmpty() → size() == 0

This patch, therefore, checks for size() == 0 instead of isEmpty(),
which is hardly less readable and might help Coverity understand the
code better.

Then again, Coverity might not understand that the tableSize can never
be negative.  If that's the case, another patch will be needed, but
let's try the simpler solution first.

Coverity-Id: 11420
Change-Id: Ibfe2a798c55af95c8001fa909aa94a6c5bc7c647
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2016-10-21 06:19:21 +00:00
..
accessible Doc: Change instances of '(Mac) OS X' to 'macOS' 2016-08-12 08:30:29 +00:00
animation Update copyright headers 2015-02-11 06:49:51 +00:00
doc Doc: Change instances of '(Mac) OS X' to 'macOS' 2016-08-12 08:30:29 +00:00
image QImage: cache colortable size 2016-10-21 06:19:21 +00:00
itemmodels QtGui: Pass types with copy-ctor or dtor by const-ref 2015-07-19 10:46:53 +00:00
kernel Document QClipboard::mimeData can be null 2016-10-19 08:58:18 +00:00
math3d Merge remote-tracking branch 'origin/5.5' into 5.6 2015-10-02 16:59:55 +02:00
opengl Unset qgl_current_fbo when the default FBO is bound 2016-10-13 15:38:08 +00:00
painting PDF: Handle monochrome images correctly 2016-10-19 15:48:31 +00:00
text Don't crash while parsing malformed CSS 2016-10-19 15:38:56 +00:00
util QtBase: remove explicit function info from qWarning() etc 2015-11-28 16:34:26 +00:00
Qt5GuiConfigExtras.cmake.in Add default path to CFLAGS for OpenGL 2014-12-16 11:48:40 +01:00
QtGui.dynlist Add dynlist file for QtGui 2013-03-18 17:11:04 +01:00
gui.pro consistently put {qt,qml}_{module,plugin} at the end of project files 2016-03-07 14:09:49 +00:00