summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qmessagebox.cpp
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@qt.io>2018-07-27 12:25:12 +0200
committerGatis Paeglis <gatis.paeglis@qt.io>2018-08-13 22:14:26 +0000
commit833b9997fd8c93132186d6538770f0c415f73d53 (patch)
treef54b4ceafdee1a6455bcdd6874642c9e239180b5 /src/widgets/dialogs/qmessagebox.cpp
parent6256729a6da532079505edfe4c56a6ef29cd8ab8 (diff)
xcb: make sure we have a valid m_qimage in backing store
This patch amends a62f1d03560937a306c7586669a46cd9575e9464. If the initial backing store resize request is called with QSize(0, 0), we end up with QXcbBackingStoreImage holding a default contructed QImage / m_qimage. This happens because of the logic in QXcbBackingStoreImage::create(), where if we detect that the requested segmentSize == 0, we do not allocate any memory, and thus don't create a valid image in m_qimage. On subsequent call to QXcbBackingStore::resize() we would only check if QXcbBackingStoreImage object has been created, but not if it is in a valid state. This obviously would cause problems. This patch re-factors the logic to handle better resize to QSize(0, 0). And make the code cleaner by: - merging ::create and ::resize as semantically it is always resize(). - dropping unnecessary argument passing. Task-number: QTBUG-69581 Change-Id: Ied337beb449dea8259fcf6b7d29f0a5bd553019d Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/widgets/dialogs/qmessagebox.cpp')
0 files changed, 0 insertions, 0 deletions