diff options
author | Nikita Baryshnikov <nib952051@gmail.com> | 2014-06-16 18:25:52 +0400 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2014-06-19 14:00:32 +0200 |
commit | 12103e0f676f762658310b885f8d427cdd755a18 (patch) | |
tree | 1f6ea995e86e0895fee3776e84fe75ffd717c881 /src/plugins/texteditor/syntaxhighlighter.cpp | |
parent | eefd0f43320bccfeecf162bf398b50ccad7e90dc (diff) | |
download | qt-creator-12103e0f676f762658310b885f8d427cdd755a18.tar.gz |
Reinvent deprecated qSort as Utils::sort
Change-Id: I4f6011cc2b6127037249aabc2426a88ad7108ebf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/plugins/texteditor/syntaxhighlighter.cpp')
-rw-r--r-- | src/plugins/texteditor/syntaxhighlighter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/texteditor/syntaxhighlighter.cpp b/src/plugins/texteditor/syntaxhighlighter.cpp index f0ee7bf382..bd99b752bc 100644 --- a/src/plugins/texteditor/syntaxhighlighter.cpp +++ b/src/plugins/texteditor/syntaxhighlighter.cpp @@ -33,6 +33,7 @@ #include "texteditorsettings.h" #include "fontsettings.h" +#include <utils/algorithm.h> #include <utils/qtcassert.h> #include <qtimer.h> @@ -659,7 +660,7 @@ void SyntaxHighlighter::setExtraAdditionalFormats(const QTextBlock& block, if (block.layout() == 0 || blockLength == 0) return; - qSort(formats.begin(), formats.end(), byStartOfRange); + Utils::sort(formats, byStartOfRange); const QList<QTextLayout::FormatRange> all = block.layout()->additionalFormats(); QList<QTextLayout::FormatRange> previousSemanticFormats; @@ -678,7 +679,7 @@ void SyntaxHighlighter::setExtraAdditionalFormats(const QTextBlock& block, } if (formats.size() == previousSemanticFormats.size()) { - qSort(previousSemanticFormats.begin(), previousSemanticFormats.end(), byStartOfRange); + Utils::sort(previousSemanticFormats, byStartOfRange); int index = 0; for (; index != formats.size(); ++index) { |