Remove QtAlgorithms usage from Qt Linguist and its tools.
authorFriedemann Kleint <Friedemann.Kleint@digia.com>
Wed, 25 Sep 2013 09:45:35 +0000 (11:45 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 25 Sep 2013 09:47:48 +0000 (11:47 +0200)
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: I3d74510693a5144b536cf515077d870e380d47df
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
src/linguist/shared/ts.cpp

index b2744c9..27b8bee 100644 (file)
@@ -48,6 +48,8 @@
 
 #include <QtCore/QXmlStreamReader>
 
+#include <algorithm>
+
 #define STRINGIFY_INTERNAL(x) #x
 #define STRINGIFY(x) STRINGIFY_INTERNAL(x)
 #define STRING(s) static QString str##s(QLatin1String(STRINGIFY(s)))
@@ -571,7 +573,7 @@ bool saveTS(const Translator &translator, QIODevice &dev, ConversionData &cd)
         context.append(msg);
     }
     if (cd.sortContexts())
-        qSort(contextOrder);
+        std::sort(contextOrder.begin(), contextOrder.end());
 
     QHash<QString, int> currentLine;
     QString currentFile;