r25024 by jghali - More deprecated calls replacement

scribus-commit scribus-commit at lists.scribus.net
Sat Mar 12 17:59:31 UTC 2022


Author: jghali
Date: Sat Mar 12 17:59:31 2022
New Revision: 25024

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=25024
Log:
More deprecated calls replacement

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

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25024&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp	(original)
+++ trunk/Scribus/scribus/scribusview.cpp	Sat Mar 12 17:59:31 2022
@@ -567,7 +567,7 @@
 	ScriXmlDoc ss;
 	if (ss.readElemHeader(text, fromFile, &gx, &gy, &gw, &gh))
 	{
-		FPoint dragPosDoc = m_canvas->globalToCanvas(widget()->mapToGlobal(e->pos()));
+		FPoint dragPosDoc = m_canvas->globalToCanvas(widget()->mapToGlobal(e->position()));
 		dragX = dragPosDoc.x();
 		dragY = dragPosDoc.y();
 		dragW = gw;
@@ -594,9 +594,9 @@
 		if (DraggedGroup)
 		{
 			//			double gx, gy, gw, gh;
-			FPoint dragPosDoc = m_canvas->globalToCanvas(widget()->mapToGlobal(e->pos()));
-			dragX = dragPosDoc.x(); //e->pos().x() / m_canvas->scale();
-			dragY = dragPosDoc.y(); //e->pos().y() / m_canvas->scale();
+			FPoint dragPosDoc = m_canvas->globalToCanvas(widget()->mapToGlobal(e->position()));
+			dragX = dragPosDoc.x();
+			dragY = dragPosDoc.y();
 			//			getDragRectScreen(&gx, &gy, &gw, &gh);
 			//			QPoint evP = viewport()->mapToGlobal(e->pos());
 			//			evP -= QPoint(contentsX(), contentsY());
@@ -662,7 +662,7 @@
 	m_canvas->resetRenderMode();
 	e->accept();
 	
-	FPoint dropPosDoc = m_canvas->globalToCanvas(widget()->mapToGlobal(e->pos()));
+	FPoint dropPosDoc = m_canvas->globalToCanvas(widget()->mapToGlobal(e->position()));
 	QPointF dropPosDocQ(dropPosDoc.x(), dropPosDoc.y());
 
 	//Loop through all items and see which one(s) were under the drop point on the current layer

Modified: trunk/Scribus/scribus/scribusview.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25024&path=/trunk/Scribus/scribus/scribusview.h
==============================================================================
--- trunk/Scribus/scribus/scribusview.h	(original)
+++ trunk/Scribus/scribus/scribusview.h	Sat Mar 12 17:59:31 2022
@@ -123,11 +123,11 @@
 	void stopGesture();
 	
   /** Vergroesserungseingabefeld */
-	RulerMover *rulerMover; //Widget between the two rulers for dragging the ruler origin
-	Hruler *horizRuler;
-	Vruler *vertRuler;
-	ClockWidget *clockLabel;
-	QPushButton *endEditButton;
+	RulerMover *rulerMover { nullptr }; //Widget between the two rulers for dragging the ruler origin
+	Hruler *horizRuler{ nullptr };
+	Vruler *vertRuler{ nullptr };
+	ClockWidget *clockLabel{ nullptr };
+	QPushButton *endEditButton{ nullptr };
   /** Dokument zu dem die Seite gehoert */
 	ScribusDoc * const m_doc;
 	Canvas * const m_canvas;
@@ -136,7 +136,7 @@
 	QMap<int, CanvasMode*> modeInstances;
 	ApplicationPrefs * const Prefs;
 	UndoManager * const undoManager;
-	ScribusMainWindow* m_ScMW;
+	ScribusMainWindow* m_ScMW{ nullptr };
 	double OldScale {0.0};
 	double dragX {0.0};
 	double dragY {0.0};




More information about the scribus-commit mailing list