From 12103e0f676f762658310b885f8d427cdd755a18 Mon Sep 17 00:00:00 2001 From: Nikita Baryshnikov Date: Mon, 16 Jun 2014 18:25:52 +0400 Subject: Reinvent deprecated qSort as Utils::sort Change-Id: I4f6011cc2b6127037249aabc2426a88ad7108ebf Reviewed-by: Orgad Shaneh Reviewed-by: Daniel Teske Reviewed-by: hjk --- src/plugins/texteditor/syntaxhighlighter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins/texteditor/syntaxhighlighter.cpp') 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 #include #include @@ -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 all = block.layout()->additionalFormats(); QList 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) { -- cgit v1.2.1