r24342 by jghali - Fix warning related to qGreater() deprecation

scribus-commit scribus-commit at lists.scribus.net
Tue Dec 22 00:08:25 UTC 2020


Author: jghali
Date: Tue Dec 22 00:08:24 2020
New Revision: 24342

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24342
Log:
Fix warning related to qGreater() deprecation

Modified:
    trunk/Scribus/scribus/tableborder.cpp
    trunk/Scribus/scribus/tableborder.h

Modified: trunk/Scribus/scribus/tableborder.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24342&path=/trunk/Scribus/scribus/tableborder.cpp
==============================================================================
--- trunk/Scribus/scribus/tableborder.cpp	(original)
+++ trunk/Scribus/scribus/tableborder.cpp	Tue Dec 22 00:08:24 2020
@@ -8,6 +8,8 @@
 */
 
 #include <algorithm>
+#include <functional>
+
 #include <QList>
 #include <QString>
 #include <QStringList>
@@ -61,7 +63,7 @@
 void TableBorder::addBorderLine(const TableBorderLine& borderLine)
 {
 	m_borderLines.append(borderLine);
-	std::stable_sort(m_borderLines.begin(), m_borderLines.end(), qGreater<TableBorderLine>());
+	std::stable_sort(m_borderLines.begin(), m_borderLines.end(), std::greater<TableBorderLine>());
 }
 
 void TableBorder::removeBorderLine(int index)
@@ -78,7 +80,7 @@
 		return;
 
 	m_borderLines.replace(index, borderLine);
-	std::stable_sort(m_borderLines.begin(), m_borderLines.end(), qGreater<TableBorderLine>());
+	std::stable_sort(m_borderLines.begin(), m_borderLines.end(), std::greater<TableBorderLine>());
 }
 
 QString TableBorder::asString() const

Modified: trunk/Scribus/scribus/tableborder.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24342&path=/trunk/Scribus/scribus/tableborder.h
==============================================================================
--- trunk/Scribus/scribus/tableborder.h	(original)
+++ trunk/Scribus/scribus/tableborder.h	Tue Dec 22 00:08:24 2020
@@ -65,6 +65,9 @@
 
 	/// Returns <code>true</code> if this table border line is thinner than @a other.
 	bool operator<(const TableBorderLine& other) const { return width() < other.width(); }
+
+	/// Returns <code>true</code> if this table border line is thicker than @a other.
+	bool operator>(const TableBorderLine& other) const { return width() > other.width(); }
 
 private:
 	/// The width of the table border line.




More information about the scribus-commit mailing list