r24846 by craig - Qt6: Build fixes

scribus-commit scribus-commit at lists.scribus.net
Sat Jan 29 23:38:33 UTC 2022


Author: craig
Date: Sat Jan 29 23:38:33 2022
New Revision: 24846

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24846
Log:
Qt6: Build fixes

Modified:
    trunk/Scribus/scribus/canvas.cpp
    trunk/Scribus/scribus/canvas.h
    trunk/Scribus/scribus/canvasgesture_linemove.cpp
    trunk/Scribus/scribus/palettes/cxfdocument.h
    trunk/Scribus/scribus/scribusview.cpp
    trunk/Scribus/scribus/ui/gradientpreview.cpp
    trunk/Scribus/scribus/ui/gradientpreview.h
    trunk/Scribus/scribus/ui/hruler.h
    trunk/Scribus/scribus/util.cpp

Modified: trunk/Scribus/scribus/canvas.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24846&path=/trunk/Scribus/scribus/canvas.cpp
==============================================================================
--- trunk/Scribus/scribus/canvas.cpp	(original)
+++ trunk/Scribus/scribus/canvas.cpp	Sat Jan 29 23:38:33 2022
@@ -215,14 +215,10 @@
 	return localToCanvas(p - (mapToParent(QPoint(0, 0)) + parentWidget()->mapToGlobal(QPoint(0, 0))));
 }
 
-
-/*
 FPoint Canvas::globalToCanvas(QPointF p) const
 {
 	return localToCanvas(p - mapToGlobal(QPoint(0, 0)));
 }
-*/
-
 
 QRectF Canvas::globalToCanvas(QRect p) const
 {

Modified: trunk/Scribus/scribus/canvas.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24846&path=/trunk/Scribus/scribus/canvas.h
==============================================================================
--- trunk/Scribus/scribus/canvas.h	(original)
+++ trunk/Scribus/scribus/canvas.h	Sat Jan 29 23:38:33 2022
@@ -154,7 +154,7 @@
 	FPoint localToCanvas(QPoint p) const;
 //	FPoint localToCanvas(QPointF p) const;
 	FPoint globalToCanvas(QPoint p) const;
-//	FPoint globalToCanvas(QPointF p) const;
+	FPoint globalToCanvas(QPointF p) const;
 	QRectF globalToCanvas(QRect p) const;
 //	QRectF globalToCanvas(QRectF p) const;
 	bool hitsCanvasPoint(QPoint globalPoint, const FPoint& canvasPoint) const;
@@ -190,13 +190,13 @@
 	bool isPreviewMode() const { return m_viewMode.previewMode || m_viewMode.viewAsPreview; }
 	bool usePreviewVisual() const { return m_viewMode.viewAsPreview && m_viewMode.previewVisual != 0; }
 	int previewVisual() const { return m_viewMode.previewVisual; }
-	void setPreviewVisual(int mode);
-	
-	void DrawMasterItems(ScPainter *painter, ScPage *page, ScLayer& layer, QRect clip);
-	//notesFramesPass determine if notes frames are drawn or not
-	void DrawPageItems(ScPainter *painter, ScLayer& layer, QRect clip, bool notesFramesPass);
-	void paintEvent ( QPaintEvent * p ) override;
-	void displayXYHUD(QPoint m);
+	void setPreviewVisual(int mode);
+	
+	void DrawMasterItems(ScPainter *painter, ScPage *page, ScLayer& layer, QRect clip);
+	//notesFramesPass determine if notes frames are drawn or not
+	void DrawPageItems(ScPainter *painter, ScLayer& layer, QRect clip, bool notesFramesPass);
+	void paintEvent ( QPaintEvent * p ) override;
+	void displayXYHUD(QPoint m);
 	void displayCorrectedXYHUD(QPoint m, double x, double y);
 	void displayCorrectedSingleHUD(QPoint m, double val, bool isX);
 	void displayXYHUD(QPoint m, double x, double y);

Modified: trunk/Scribus/scribus/canvasgesture_linemove.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24846&path=/trunk/Scribus/scribus/canvasgesture_linemove.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_linemove.cpp	(original)
+++ trunk/Scribus/scribus/canvasgesture_linemove.cpp	Sat Jan 29 23:38:33 2022
@@ -131,7 +131,7 @@
 	PageItem_Line* line = m_doc->m_Selection->count() == 1 ? m_doc->m_Selection->itemAt(0)->asLine() : nullptr;
 	if (line)
 	{
-		bool hitsOrigin = m_canvas->hitsCanvasPoint(m->globalPos(), line->xyPos());
+		bool hitsOrigin = m_canvas->hitsCanvasPoint(m->globalPosition(), line->xyPos());
 		prepare(line, hitsOrigin);
 		// now we also know the line's endpoint:
 		bool hitsEnd = m_canvas->hitsCanvasPoint(m->globalPos(), endPoint());
@@ -139,7 +139,7 @@
 	}
 	else
 	{
-		FPoint point = m_canvas->globalToCanvas(m->globalPos());
+		FPoint point = m_canvas->globalToCanvas(m->globalPosition());
 		setStartPoint(QPointF(point.x(), point.y()));
 		setEndPoint(QPointF(point.x(), point.y()));
 		m_haveLineItem = false;
@@ -167,7 +167,7 @@
 		double angle = rotation();
 		if (angle > 0)
 			angle = 360 - angle;
-		m_canvas->displaySizeHUD(m->globalPos(), length(), fabs(angle), true);
+		m_canvas->displaySizeHUD(m->globalPosition(), length(), fabs(angle), true);
 	}
 	m->accept();
 	m_canvas->repaint();
@@ -218,7 +218,7 @@
 
 void LineMove::adjustBounds(QMouseEvent *m, bool updateCanvas)
 {
-	FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
+	FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
 	bool constrainRatio = ((m->modifiers() & Qt::ControlModifier) != Qt::NoModifier);
 
 	double newX = mousePointDoc.x();

Modified: trunk/Scribus/scribus/palettes/cxfdocument.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24846&path=/trunk/Scribus/scribus/palettes/cxfdocument.h
==============================================================================
--- trunk/Scribus/scribus/palettes/cxfdocument.h	(original)
+++ trunk/Scribus/scribus/palettes/cxfdocument.h	Sat Jan 29 23:38:33 2022
@@ -8,7 +8,7 @@
 #ifndef CXFDOCUMENT_H
 #define CXFDOCUMENT_H
 
-#include <QDomDocument>
+#include <QDomElement>
 #include <QList>
 #include <QMap>
 #include <QString>

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24846&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp	(original)
+++ trunk/Scribus/scribus/scribusview.cpp	Sat Jan 29 23:38:33 2022
@@ -3203,14 +3203,14 @@
 {
 	if (w->modifiers() == Qt::ControlModifier)
 	{
-		FPoint mp = m_canvas->globalToCanvas(w->globalPos());
-		w->delta() > 0 ? slotZoomIn(mp.x(), mp.y() , true) : slotZoomOut(mp.x(), mp.y(), true);
+		FPoint mp = m_canvas->globalToCanvas(w->globalPosition());
+		w->pixelDelta().x() > 0 ? slotZoomIn(mp.x(), mp.y() , true) : slotZoomOut(mp.x(), mp.y(), true);
 	}
 	else
 	{
 		int dX = 0, dY = 0;
-		int moveBy = (w->delta() < 0) ? Prefs->uiPrefs.wheelJump : -Prefs->uiPrefs.wheelJump;
-		if ((w->orientation() != Qt::Vertical) || ( w->modifiers() == Qt::ShiftModifier ))
+		int moveBy = (w->pixelDelta().x() < 0) ? Prefs->uiPrefs.wheelJump : -Prefs->uiPrefs.wheelJump;
+		if ((w->angleDelta().y()==0) || ( w->modifiers() == Qt::ShiftModifier ))
 			dX = moveBy;
 		else
 			dY = moveBy;

Modified: trunk/Scribus/scribus/ui/gradientpreview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24846&path=/trunk/Scribus/scribus/ui/gradientpreview.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/gradientpreview.cpp	(original)
+++ trunk/Scribus/scribus/ui/gradientpreview.cpp	Sat Jan 29 23:38:33 2022
@@ -301,7 +301,7 @@
 	}
 }
 
-void GradientPreview::enterEvent(QEvent*)
+void GradientPreview::enterEvent(QEnterEvent *)
 {
 	outside = false;
 }

Modified: trunk/Scribus/scribus/ui/gradientpreview.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24846&path=/trunk/Scribus/scribus/ui/gradientpreview.h
==============================================================================
--- trunk/Scribus/scribus/ui/gradientpreview.h	(original)
+++ trunk/Scribus/scribus/ui/gradientpreview.h	Sat Jan 29 23:38:33 2022
@@ -26,6 +26,7 @@
 
 #include <QList>
 #include <QFrame>
+#include <QEnterEvent>
 #include <QPaintEvent>
 #include <QMouseEvent>
 #include <QKeyEvent>
@@ -50,7 +51,7 @@
 	void mouseReleaseEvent(QMouseEvent *);
 	void mouseMoveEvent(QMouseEvent *m);
 	void leaveEvent(QEvent*);
-	void enterEvent(QEvent*);
+	void enterEvent(QEnterEvent*);
 	void updateDisplay();
 	void setActColor(const QColor& c, const QString& n, int s);
 	void setActTrans(double t);

Modified: trunk/Scribus/scribus/ui/hruler.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24846&path=/trunk/Scribus/scribus/ui/hruler.h
==============================================================================
--- trunk/Scribus/scribus/ui/hruler.h	(original)
+++ trunk/Scribus/scribus/ui/hruler.h	Sat Jan 29 23:38:33 2022
@@ -29,15 +29,16 @@
 #include "scribusapi.h"
 #include "styles/paragraphstyle.h"
 
+#include <QEnterEvent>
+#include <QMouseEvent>
+#include <QPaintEvent>
+
 class PageItem;
-
-class QPaintEvent;
-class QMouseEvent;
 class PrefsManager;
 class RulerGesture;
-class ScribusView;
 class ScribusDoc;
 class ScribusMainWindow;
+class ScribusView;
 
 /** \brief Horizontal ruler
 \author Franz Schmid
@@ -82,7 +83,7 @@
 	virtual void mousePressEvent(QMouseEvent *m);
 	virtual void mouseReleaseEvent(QMouseEvent *);
 	virtual void mouseMoveEvent(QMouseEvent *m);
-	virtual void enterEvent(QEvent *m);
+	virtual void enterEvent(QEnterEvent *m);
 	virtual void leaveEvent(QEvent *m);
 
 	void drawMarks(QPainter& p);

Modified: trunk/Scribus/scribus/util.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24846&path=/trunk/Scribus/scribus/util.cpp
==============================================================================
--- trunk/Scribus/scribus/util.cpp	(original)
+++ trunk/Scribus/scribus/util.cpp	Sat Jan 29 23:38:33 2022
@@ -27,7 +27,6 @@
 #include <qglobal.h>
 #include <QApplication>
 #include <QCryptographicHash>
-#include <QDomElement>
 #include <QMessageBox>
 #include <QProcess>
 #include <QSignalBlocker>




More information about the scribus-commit mailing list