summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-10-30 08:43:14 +0100
committerLiang Qi <liang.qi@qt.io>2017-10-30 08:54:05 +0100
commit17d51411132edef53e79dcbaf1046f06f79bed5d (patch)
tree38398d448b30313f91960c70a3a28cce91293da9 /src/gui
parentea0e868c4881944207e9b3a77011e05a505ff3b7 (diff)
parent9f0dda29d5d070f63b7f098139f01f07ec91ffdf (diff)
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts: src/plugins/platforms/windows/qwindowswindow.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ia017a825ed2ca2d53ac586f4ae48df6f65818d40
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qimagereader.cpp10
-rw-r--r--src/gui/text/qtexttable.cpp4
2 files changed, 11 insertions, 3 deletions
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index 7a5a630495..7086e102ea 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -72,6 +72,11 @@
that occurred, or errorString() to get a human readable
description of what went wrong.
+ \note QImageReader assumes exclusive control over the file or
+ device that is assigned. Any attempts to modify the assigned file
+ or device during the lifetime of the QImageReader object will
+ yield undefined results.
+
\section1 Formats
Call supportedImageFormats() for a list of formats that
@@ -1220,10 +1225,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
{
diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp
index e4a3c2b915..9639c18d2b 100644
--- a/src/gui/text/qtexttable.cpp
+++ b/src/gui/text/qtexttable.cpp
@@ -1048,7 +1048,7 @@ void QTextTable::mergeCells(int row, int column, int numRows, int numCols)
QFragmentFindHelper helper(origCellPosition, p->fragmentMap());
const auto begin = d->cells.cbegin();
const auto it = std::lower_bound(begin, d->cells.cend(), helper);
- Q_ASSERT(it != d->cells.end());
+ Q_ASSERT(it != d->cells.cend());
Q_ASSERT(!(helper < *it));
Q_ASSERT(*it == cellFragment);
const int insertCellIndex = it - begin;
@@ -1082,7 +1082,7 @@ void QTextTable::mergeCells(int row, int column, int numRows, int numCols)
QFragmentFindHelper helper(pos, p->fragmentMap());
const auto begin = d->cells.cbegin();
const auto it = std::lower_bound(begin, d->cells.cend(), helper);
- Q_ASSERT(it != d->cells.end());
+ Q_ASSERT(it != d->cells.cend());
Q_ASSERT(!(helper < *it));
Q_ASSERT(*it == fragment);
firstCellIndex = cellIndex = it - begin;