Remove QtAlgorithms usage from Qt Assistant.
authorFriedemann Kleint <Friedemann.Kleint@digia.com>
Tue, 24 Sep 2013 14:19:40 +0000 (16:19 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 25 Sep 2013 09:48:18 +0000 (11:48 +0200)
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: I6f02d91289c3f455d8643b145fb2c6477863056c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
src/assistant/help/qhelpindexwidget.cpp
src/assistant/help/qhelpsearchindexreader_default.cpp

index c5f26a7..64c2e05 100644 (file)
@@ -49,6 +49,8 @@
 #include <QtWidgets/QListView>
 #include <QtWidgets/QHeaderView>
 
+#include <algorithm>
+
 QT_BEGIN_NAMESPACE
 
 class QHelpIndexProvider : public QThread
@@ -192,7 +194,7 @@ void QHelpIndexProvider::run()
     }
     m_mutex.lock();
     m_indices = indicesSet.values();
-    qSort(m_indices.begin(), m_indices.end(), caseInsensitiveLessThan);
+    std::sort(m_indices.begin(), m_indices.end(), caseInsensitiveLessThan);
     m_mutex.unlock();
 }
 
index a088456..9e7d050 100644 (file)
@@ -50,6 +50,8 @@
 #include <QtCore/QDataStream>
 #include <QtCore/QTextStream>
 
+#include <algorithm>
+
 QT_BEGIN_NAMESPACE
 
 namespace fulltextsearch {
@@ -276,7 +278,7 @@ void Reader::searchInIndex(const QStringList &terms)
             }
         }
     }
-    qSort(termList);
+    ::std::sort(termList.begin(), termList.end());
 }
 
 QVector<DocumentInfo> Reader::hits()
@@ -307,7 +309,7 @@ QVector<DocumentInfo> Reader::hits()
         }
     }
 
-    qSort(documents);
+    ::std::sort(documents.begin(), documents.end());
     return documents;
 }
 
@@ -405,7 +407,7 @@ QVector<Document> Reader::setupDummyTerm(const QStringList &terms,
     QVector<Document> maxList(0);
     if ( !termList.count() )
         return maxList;
-    qSort(termList);
+    ::std::sort(termList.begin(), termList.end());
 
     maxList = termList.takeLast().documents;
     for(QList<Term>::Iterator it = termList.begin(); it != termList.end(); ++it) {