r23495 by jghali - Fix some Qt deprecation warnings

scribus-commit scribus-commit at lists.scribus.net
Mon Mar 9 10:05:39 UTC 2020


Author: jghali
Date: Mon Mar  9 10:05:39 2020
New Revision: 23495

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

Modified:
    trunk/Scribus/scribus/canvasmode_edit.h
    trunk/Scribus/scribus/pageitem_table.cpp
    trunk/Scribus/scribus/scfonts.cpp
    trunk/Scribus/scribus/ui/latexeditor.cpp

Modified: trunk/Scribus/scribus/canvasmode_edit.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23495&path=/trunk/Scribus/scribus/canvasmode_edit.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edit.h	(original)
+++ trunk/Scribus/scribus/canvasmode_edit.h	Mon Mar  9 10:05:39 2020
@@ -18,8 +18,8 @@
 #ifndef CANVAS_MODE_EDIT_H
 #define CANVAS_MODE_EDIT_H
 
+#include <QElapsedTimer>
 #include <QObject>
-#include <QTime>
 
 #include "canvasmode.h"
 #include "fpointarray.h"
@@ -71,7 +71,7 @@
 	double SeRx, SeRy;
 	ScribusMainWindow* m_ScMW;
 	bool m_cursorVisible;
-	QTime m_blinkTime;
+	QElapsedTimer m_blinkTime;
 	QTimer* m_blinker;
 	double mRulerGuide;
 	bool m_longCursorTime;

Modified: trunk/Scribus/scribus/pageitem_table.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23495&path=/trunk/Scribus/scribus/pageitem_table.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_table.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_table.cpp	Mon Mar  9 10:05:39 2020
@@ -1009,8 +1009,8 @@
 		return TableCell(); // Outside table grid.
 
 	return cellAt(
-		qUpperBound(m_rowPositions, gridPoint.y()) - m_rowPositions.begin() - 1,
-		qUpperBound(m_columnPositions, gridPoint.x()) - m_columnPositions.begin() - 1);
+		std::upper_bound(m_rowPositions.begin(), m_rowPositions.end(), gridPoint.y()) - m_rowPositions.begin() - 1,
+		std::upper_bound(m_columnPositions.begin(), m_columnPositions.end(), gridPoint.x()) - m_columnPositions.begin() - 1);
 }
 
 void PageItem_Table::moveLeft()

Modified: trunk/Scribus/scribus/scfonts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23495&path=/trunk/Scribus/scribus/scfonts.cpp
==============================================================================
--- trunk/Scribus/scribus/scfonts.cpp	(original)
+++ trunk/Scribus/scribus/scfonts.cpp	Mon Mar  9 10:05:39 2020
@@ -162,9 +162,9 @@
 			bool symlink = fi.isSymLink();
 			if (symlink)
 			{
-				QFileInfo fi3(fi.readLink());
+				QFileInfo fi3(fi.symLinkTarget());
 				if (fi3.isRelative())
-					pathfile = pathname + fi.readLink();
+					pathfile = pathname + fi.symLinkTarget();
 				else
 					pathfile = fi3.absoluteFilePath();
 			}
@@ -1084,9 +1084,9 @@
 			bool isSymlink = fontInfo.isSymLink();
 			if (isSymlink)
 			{
-				QFileInfo symlinkInfo(fontInfo.readLink());
+				QFileInfo symlinkInfo(fontInfo.symLinkTarget());
 				if (symlinkInfo.isRelative())
-					fontPath = pathName + fontInfo.readLink();
+					fontPath = pathName + fontInfo.symLinkTarget();
 				else
 					fontPath = symlinkInfo.absoluteFilePath();
 			}
@@ -1162,9 +1162,9 @@
 				bool isSymlink = fontInfo.isSymLink();
 				if (isSymlink)
 				{
-					QFileInfo symlinkInfo(fontInfo.readLink());
+					QFileInfo symlinkInfo(fontInfo.symLinkTarget());
 					if (symlinkInfo.isRelative())
-						fontPath = pathName + fontInfo.readLink();
+						fontPath = pathName + fontInfo.symLinkTarget();
 					else
 						fontPath = symlinkInfo.absoluteFilePath();
 				}

Modified: trunk/Scribus/scribus/ui/latexeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23495&path=/trunk/Scribus/scribus/ui/latexeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/latexeditor.cpp	(original)
+++ trunk/Scribus/scribus/ui/latexeditor.cpp	Mon Mar  9 10:05:39 2020
@@ -605,7 +605,7 @@
 			else
 				item = new QListWidgetItem(*icon, "", iconList);
 			item->setData(Qt::UserRole, value);
-			item->setData(Qt::UserRole + 1, qVariantFromValue((void *) statusLabel)); //UGLY
+			item->setData(Qt::UserRole + 1, QVariant::fromValue((void *) statusLabel)); //UGLY
 			item->setToolTip(text);
 			item->setStatusTip(status);
 		} 




More information about the scribus-commit mailing list