summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2017-10-19 10:07:50 +0200
committerLiang Qi <liang.qi@qt.io>2017-10-24 12:23:15 +0000
commit7c5475f1c03a4b9d6c023bc7ff937e1fc2f62271 (patch)
tree4479ce1f84fbbfdb2acd9ba705e2e9c9b05c0105 /src/gui
parent0261c22d41ed7be5adb5bab8a8ae4ee3c10968e9 (diff)
Doc: add hint about QMimeDatabase to QImageReader::canRead()
Task-number: QTBUG-63568 Change-Id: I5b700138487dbebfc8cbe70eb3a076efceafb361 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qimagereader.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index 381ddb5b45..f49e90ba0a 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -1211,10 +1211,13 @@ float QImageReader::gamma() const
see if the image data is valid. read() may still return false
after canRead() returns \c true, if the image data is corrupt.
+ \note A QMimeDatabase lookup is normally a better approach than this
+ function for identifying potentially non-image files or data.
+
For images that support animation, canRead() returns \c false when
all frames have been read.
- \sa read(), supportedImageFormats()
+ \sa read(), supportedImageFormats(), QMimeDatabase
*/
bool QImageReader::canRead() const
{