diff --git a/core/bookmarkmanager.cpp b/core/bookmarkmanager.cpp index 03ed4de50..94102205a 100644 --- a/core/bookmarkmanager.cpp +++ b/core/bookmarkmanager.cpp @@ -607,7 +607,7 @@ QList< QAction * > BookmarkManager::actionsForUrl(const QUrl &url ) const } break; } - qSort( ret.begin(), ret.end(), okularBookmarkActionLessThan ); + std::sort(ret.begin(), ret.end(), okularBookmarkActionLessThan); return ret; } @@ -705,7 +705,7 @@ bool BookmarkManager::isBookmarked( const DocumentViewport &viewport ) const KBookmark BookmarkManager::nextBookmark( const DocumentViewport &viewport) const { KBookmark::List bmarks = bookmarks(); - qSort( bmarks.begin(), bmarks.end(), bookmarkLessThan); + std::sort(bmarks.begin(), bmarks.end(), bookmarkLessThan); KBookmark bookmark; foreach ( const KBookmark &bm, bmarks ) @@ -724,7 +724,7 @@ KBookmark BookmarkManager::nextBookmark( const DocumentViewport &viewport) const KBookmark BookmarkManager::previousBookmark( const DocumentViewport &viewport ) const { KBookmark::List bmarks = bookmarks(); - qSort( bmarks.begin(), bmarks.end(), bookmarkLessThan ); + std::sort(bmarks.begin(), bmarks.end(), bookmarkLessThan); KBookmark bookmark; for ( KBookmark::List::const_iterator it = bmarks.constEnd(); it != bmarks.constBegin(); --it ) diff --git a/core/document.cpp b/core/document.cpp index 2a477e102..ddc00e5ee 100644 --- a/core/document.cpp +++ b/core/document.cpp @@ -4569,7 +4569,7 @@ QStringList Document::supportedMimeTypes() const // Sorting by mimetype name doesn't make a ton of sense, // but ensures that the list is ordered the same way every time - qSort(result); + std::sort(result.begin(), result.end()); d->m_supportedMimeTypes = result; } diff --git a/core/form.cpp b/core/form.cpp index 049dbae44..e0aeaf968 100644 --- a/core/form.cpp +++ b/core/form.cpp @@ -241,7 +241,7 @@ class Okular::FormFieldChoicePrivate : public Okular::FormFieldPrivate { Q_Q( const FormFieldChoice ); QList choices = q->currentChoices(); - qSort( choices ); + std::sort(choices.begin(), choices.end()); QStringList list; foreach ( int c, choices ) { diff --git a/core/textpage.cpp b/core/textpage.cpp index 325e09108..b6b2a6cc3 100644 --- a/core/textpage.cpp +++ b/core/textpage.cpp @@ -1295,7 +1295,7 @@ QList< QPair > makeAndSortLines(const WordsWithChara QList words = wordsTmp; // Step 1 - qSort(words.begin(),words.end(),compareTinyTextEntityY); + std::sort(words.begin(),words.end(), compareTinyTextEntityY); // Step 2 QList::Iterator it = words.begin(), itEnd = words.end(); @@ -1358,7 +1358,7 @@ QList< QPair > makeAndSortLines(const WordsWithChara for(int i = 0 ; i < lines.length() ; i++) { WordsWithCharacters &list = lines[i].first; - qSort(list.begin(), list.end(), compareTinyTextEntityX); + std::sort(list.begin(), list.end(), compareTinyTextEntityX); } return lines; diff --git a/core/tilesmanager.cpp b/core/tilesmanager.cpp index 7f3c7f2ac..a2d798e47 100644 --- a/core/tilesmanager.cpp +++ b/core/tilesmanager.cpp @@ -471,7 +471,7 @@ void TilesManager::cleanupPixmapMemory( qulonglong numberOfBytes, const Normaliz { d->rankTiles( d->tiles[ i ], rankedTiles, visibleRect, visiblePageNumber ); } - qSort( rankedTiles.begin(), rankedTiles.end(), rankedTilesLessThan ); + std::sort(rankedTiles.begin(), rankedTiles.end(), rankedTilesLessThan); while ( numberOfBytes > 0 && !rankedTiles.isEmpty() ) { diff --git a/generators/chm/lib/helper_search_index.cpp b/generators/chm/lib/helper_search_index.cpp index aff0008e0..7b955b4cc 100644 --- a/generators/chm/lib/helper_search_index.cpp +++ b/generators/chm/lib/helper_search_index.cpp @@ -380,7 +380,7 @@ QList< QUrl > Index::query(const QStringList &terms, const QStringList &termSeq, if ( !termList.count() ) return QList< QUrl >(); - qSort( termList ); + std::sort(termList.begin(), termList.end()); QVector minDocs = termList.takeFirst().documents; for(QList::Iterator it = termList.begin(); it != termList.end(); ++it) { @@ -403,7 +403,7 @@ QList< QUrl > Index::query(const QStringList &terms, const QStringList &termSeq, } QList< QUrl > results; - qSort( minDocs ); + std::sort(minDocs.begin(), minDocs.end()); if ( termSeq.isEmpty() ) { for(QVector::Iterator it = minDocs.begin(); it != minDocs.end(); ++it) results << docList.at((int)(*it).docNumber); diff --git a/generators/comicbook/document.cpp b/generators/comicbook/document.cpp index e2d2568c0..d9c1e49df 100644 --- a/generators/comicbook/document.cpp +++ b/generators/comicbook/document.cpp @@ -163,7 +163,7 @@ bool Document::processArchive() { void Document::pages( QVector * pagesVector ) { - qSort( mEntries.begin(), mEntries.end(), caseSensitiveNaturalOrderLessThen ); + std::sort(mEntries.begin(), mEntries.end(), caseSensitiveNaturalOrderLessThen); QScopedPointer< QIODevice > dev; int count = 0; diff --git a/generators/xps/generator_xps.cpp b/generators/xps/generator_xps.cpp index 9b3b31855..4d1f256f8 100644 --- a/generators/xps/generator_xps.cpp +++ b/generators/xps/generator_xps.cpp @@ -507,7 +507,7 @@ static QByteArray readFileOrDirectoryParts( const KArchiveEntry *entry, QString if ( entry->isDirectory() ) { const KArchiveDirectory* relDir = static_cast( entry ); QStringList entries = relDir->entries(); - qSort( entries ); + std::sort(entries.begin(), entries.end()); Q_FOREACH ( const QString &entry, entries ) { const KArchiveEntry* relSubEntry = relDir->entry( entry ); if ( !relSubEntry->isFile() ) @@ -552,7 +552,7 @@ static const KArchiveEntry* loadEntry( KZip *archive, const QString &fileName, Q if ( newEntry->isDirectory() ) { const KArchiveDirectory* relDir = static_cast< const KArchiveDirectory * >( newEntry ); QStringList relEntries = relDir->entries(); - qSort( relEntries ); + std::sort(relEntries.begin(), relEntries.end()); Q_FOREACH ( const QString &relEntry, relEntries ) { if ( relEntry.compare( entryName, Qt::CaseInsensitive ) == 0 ) { return relDir->entry( relEntry ); diff --git a/mobile/components/documentitem.cpp b/mobile/components/documentitem.cpp index 57461f6c2..27368c020 100644 --- a/mobile/components/documentitem.cpp +++ b/mobile/components/documentitem.cpp @@ -144,7 +144,7 @@ QVariantList DocumentItem::bookmarkedPages() const pages << viewport.pageNumber; } list = pages.toList(); - qSort(list); + std::sort(list.begin(), list.end()); QVariantList variantList; foreach (const int page, list) { diff --git a/ui/pageview.cpp b/ui/pageview.cpp index b81aa2f3a..74f5099e0 100644 --- a/ui/pageview.cpp +++ b/ui/pageview.cpp @@ -905,7 +905,7 @@ QString PageViewPrivate::selectedText() const QString text; QList< int > selpages = pagesWithTextSelection.toList(); - qSort( selpages ); + std::sort(selpages.begin(), selpages.end()); const Okular::Page * pg = nullptr; if ( selpages.count() == 1 ) { @@ -2435,7 +2435,7 @@ void PageView::mousePressEvent( QMouseEvent * e ) col += tsp.rectInSelection.left; // at this point, it's normalised within the whole table d->tableSelectionCols.append(col); - qSort(d->tableSelectionCols); + std::sort(d->tableSelectionCols.begin(), d->tableSelectionCols.end()); } } else { bool deleted=false; @@ -2456,7 +2456,7 @@ void PageView::mousePressEvent( QMouseEvent * e ) row += tsp.rectInSelection.top; // at this point, it's normalised within the whole table d->tableSelectionRows.append(row); - qSort(d->tableSelectionRows); + std::sort(d->tableSelectionRows.begin(), d->tableSelectionRows.end()); } } } @@ -3207,8 +3207,8 @@ void PageView::guessTableDividers() int tally = 0; - qSort( colSelectionTicks ); - qSort( rowSelectionTicks ); + std::sort(colSelectionTicks.begin(), colSelectionTicks.end()); + std::sort(rowSelectionTicks.begin(), rowSelectionTicks.end()); for (int i = 0; i < colSelectionTicks.length(); ++i) { @@ -3231,8 +3231,8 @@ void PageView::guessTableDividers() } Q_ASSERT( tally == 0 ); - qSort( colTicks ); - qSort( rowTicks ); + std::sort(colTicks.begin(), colTicks.end()); + std::sort(rowTicks.begin(), rowTicks.end()); for (int i = 0; i < colTicks.length(); ++i) { @@ -3991,7 +3991,7 @@ void PageView::updateZoom( ZoomMode newZoomMode ) qCopy(kZoomValues, kZoomValues + 13, zoomValue.begin()); zoomValue[13] = zoomFactorFitWidth; zoomValue[14] = zoomFactorFitPage; - qSort(zoomValue.begin(), zoomValue.end()); + std::sort(zoomValue.begin(), zoomValue.end()); QVector::iterator i; if ( newZoomMode == ZoomOut ) {