r24476 by jghali - Fix Qt deprecation warning

scribus-commit scribus-commit at lists.scribus.net
Sat Feb 13 13:14:37 UTC 2021


Author: jghali
Date: Sat Feb 13 13:14:36 2021
New Revision: 24476

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24476
Log:
Fix Qt deprecation warning

Modified:
    trunk/Scribus/scribus/third_party/zip/zip.cpp

Modified: trunk/Scribus/scribus/third_party/zip/zip.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24476&path=/trunk/Scribus/scribus/third_party/zip/zip.cpp
==============================================================================
--- trunk/Scribus/scribus/third_party/zip/zip.cpp	(original)
+++ trunk/Scribus/scribus/third_party/zip/zip.cpp	Sat Feb 13 13:14:36 2021
@@ -30,6 +30,7 @@
 #include "zipentry_p.h"
 
 // we only use this to seed the random number generator
+#include <algorithm>
 #include <ctime>
 
 #include <QtCore/QCoreApplication>
@@ -1023,8 +1024,7 @@
 bool hasExtension(const QString& ext, const char* const* map, int max) {
     const char* const* start = &map[0];
     const char* const* end = &map[max - 1];
-    const char* const* kw = qBinaryFind(start, end, KeywordHelper(ext));
-    return kw != end;
+    return std::binary_search(start, end, KeywordHelper(ext));
 }
 }
 




More information about the scribus-commit mailing list