summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qmovie.cpp2
-rw-r--r--src/gui/text/qsyntaxhighlighter.cpp6
-rw-r--r--src/gui/text/qtextdocumentlayout.cpp6
3 files changed, 3 insertions, 11 deletions
diff --git a/src/gui/image/qmovie.cpp b/src/gui/image/qmovie.cpp
index e99093d582..6c5922df0f 100644
--- a/src/gui/image/qmovie.cpp
+++ b/src/gui/image/qmovie.cpp
@@ -1022,7 +1022,7 @@ QList<QByteArray> QMovie::supportedFormats()
return !QImageReader(&buffer, format).supportsOption(QImageIOHandler::Animation);
};
- list.erase(std::remove_if(list.begin(), list.end(), doesntSupportAnimation), list.end());
+ list.removeIf(doesntSupportAnimation);
return list;
}
diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp
index 5a837b29e3..9e7a7c4d2c 100644
--- a/src/gui/text/qsyntaxhighlighter.cpp
+++ b/src/gui/text/qsyntaxhighlighter.cpp
@@ -109,12 +109,8 @@ void QSyntaxHighlighterPrivate::applyFormatChanges()
return range.start < preeditAreaStart
|| range.start + range.length > preeditAreaStart + preeditAreaLength;
};
- const auto it = std::remove_if(ranges.begin(), ranges.end(),
- isOutsidePreeditArea);
- if (it != ranges.end()) {
- ranges.erase(it, ranges.end());
+ if (ranges.removeIf(isOutsidePreeditArea) > 0)
formatsChanged = true;
- }
} else if (!ranges.isEmpty()) {
ranges.clear();
formatsChanged = true;
diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp
index 3138168e90..81fe6eb640 100644
--- a/src/gui/text/qtextdocumentlayout.cpp
+++ b/src/gui/text/qtextdocumentlayout.cpp
@@ -3756,11 +3756,7 @@ static void markFrames(QTextFrame *current, int from, int oldLength, int length)
QTextFrameData *fd = data(current);
// float got removed in editing operation
- QTextFrame *null = nullptr; // work-around for (at least) MSVC 2012 emitting
- // warning C4100 for its own header <algorithm>
- // when passing nullptr directly to std::remove
- fd->floats.erase(std::remove(fd->floats.begin(), fd->floats.end(), null),
- fd->floats.end());
+ fd->floats.removeAll(nullptr);
fd->layoutDirty = true;
fd->sizeDirty = true;