diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-01-16 11:44:20 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-01-16 11:48:55 +0100 |
commit | e2a546a18be88f380b3d9d3efbed390fe1a9e93f (patch) | |
tree | f7a6a0c7a60ee7b771ee9d6256c385f761113135 /src/gui | |
parent | 0be8f59d725d4a5e79709487e3aac1d351a6c04c (diff) | |
parent | 99b89d30fa5484c5d1f3cbda828648c28af4fb7d (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: I896b0cf54f317c4336cc3d3db319a0b89e421728
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qimage.cpp | 20 | ||||
-rw-r--r-- | src/gui/painting/qbackingstore.cpp | 3 |
2 files changed, 12 insertions, 11 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 99c2271581..7999ce6bbe 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -931,7 +931,8 @@ QImage::QImage(const uchar *data, int width, int height, int bytesPerLine, Forma The loader attempts to read the image using the specified \a format. If the \a format is not specified (which is the default), - the loader probes the file for a header to guess the file format. + it is auto-detected based on the file's suffix and header. For + details, see {QImageReader::setAutoDetectImageFormat()}{QImageReader}. If the loading of the image failed, this object is a null image. @@ -3406,8 +3407,9 @@ void QImage::rgbSwapped_inplace() and returns \c false. The loader attempts to read the image using the specified \a format, e.g., - PNG or JPG. If \a format is not specified (which is the default), the - loader probes the file for a header to guess the file format. + PNG or JPG. If \a format is not specified (which is the default), it is + auto-detected based on the file's suffix and header. For details, see + {QImageReader::setAutoDetectImageFormat()}{QImageReader}. The file name can either refer to an actual file on disk or to one of the application's embedded resources. See the @@ -3474,14 +3476,10 @@ bool QImage::loadFromData(const uchar *data, int len, const char *format) Constructs a QImage from the first \a size bytes of the given binary \a data. The loader attempts to read the image using the specified \a format. If \a format is not specified (which is the default), - the loader probes the file for a header to guess the file format. - binary \a data. The loader attempts to read the image, either using the - optional image \a format specified or by determining the image format from - the data. - - If \a format is not specified (which is the default), the loader probes the - file for a header to determine the file format. If \a format is specified, - it must be one of the values returned by QImageReader::supportedImageFormats(). + the loader probes the data for a header to guess the file format. + + If \a format is specified, it must be one of the values returned by + QImageReader::supportedImageFormats(). If the loading of the image fails, the image returned will be a null image. diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp index d2c0912878..8d71d1c3a9 100644 --- a/src/gui/painting/qbackingstore.cpp +++ b/src/gui/painting/qbackingstore.cpp @@ -186,6 +186,9 @@ QPaintDevice *QBackingStore::paintDevice() */ void QBackingStore::endPaint() { + if (paintDevice()->paintingActive()) + qWarning() << "QBackingStore::endPaint() called with active painter on backingstore paint device"; + d_ptr->platformBackingStore->endPaint(); } |