r23961 by craig - Various code clean up, replace older versions of Q_OS_ for Mac by

scribus-commit scribus-commit at lists.scribus.net
Wed Jul 29 22:32:14 UTC 2020


Author: craig
Date: Wed Jul 29 22:32:14 2020
New Revision: 23961

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23961
Log:
Various code clean up, replace older versions of Q_OS_ for Mac by
Q_OS_MACOS

Modified:
    trunk/Scribus/scribus/mesh.cpp
    trunk/Scribus/scribus/mesh.h
    trunk/Scribus/scribus/pageitem.h
    trunk/Scribus/scribus/plugins/fontpreview/fontpreview.cpp
    trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
    trunk/Scribus/scribus/plugins/import/ps/importps.cpp
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/styleoptions.h
    trunk/Scribus/scribus/ui/inspage.cpp
    trunk/Scribus/scribus/util_os.cpp

Modified: trunk/Scribus/scribus/mesh.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23961&path=/trunk/Scribus/scribus/mesh.cpp
==============================================================================
--- trunk/Scribus/scribus/mesh.cpp	(original)
+++ trunk/Scribus/scribus/mesh.cpp	Wed Jul 29 22:32:14 2020
@@ -23,12 +23,6 @@
 
 #include "mesh.h"
 #include "fpointarray.h"
-
-MeshPoint::MeshPoint()
-{
-	shade = 100;
-	transparency = 1.0;
-}
 
 void MeshPoint::moveRel(double dx, double dy)
 {
@@ -81,9 +75,15 @@
 
 bool MeshPoint::operator ==(const MeshPoint& p)
 {
-	return ((gridPoint == p.gridPoint) && (controlTop == p.controlTop) && (controlBottom == p.controlBottom)
-			&& (controlLeft == p.controlLeft) && (controlRight == p.controlRight) &&
-			(controlColor == p.controlColor) && (color == p.color) && (colorName == p.colorName) &&
-			(transparency == p.transparency) && (shade == p.shade));
+	return ((gridPoint == p.gridPoint) &&
+			(controlTop == p.controlTop) &&
+			(controlBottom == p.controlBottom) &&
+			(controlLeft == p.controlLeft) &&
+			(controlRight == p.controlRight) &&
+			(controlColor == p.controlColor) &&
+			(color == p.color) &&
+			(colorName == p.colorName) &&
+			(transparency == p.transparency) &&
+			(shade == p.shade));
 }
 

Modified: trunk/Scribus/scribus/mesh.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23961&path=/trunk/Scribus/scribus/mesh.h
==============================================================================
--- trunk/Scribus/scribus/mesh.h	(original)
+++ trunk/Scribus/scribus/mesh.h	Wed Jul 29 22:32:14 2020
@@ -32,23 +32,23 @@
 
 class SCRIBUS_API MeshPoint
 {
-public:
-	MeshPoint();
-	void moveRel(double dx, double dy);
-	void moveAbs(double x, double y);
-	void transform(const QTransform& t);
-	void resetTo(const FPoint& p);
-	bool operator ==(const MeshPoint& p);
-	FPoint gridPoint;
-	FPoint controlTop;
-	FPoint controlBottom;
-	FPoint controlLeft;
-	FPoint controlRight;
-	FPoint controlColor;
-	double transparency;
-	int shade;
-	QString colorName;
-	QColor color;
+	public:
+		MeshPoint() {};
+		void moveRel(double dx, double dy);
+		void moveAbs(double x, double y);
+		void transform(const QTransform& t);
+		void resetTo(const FPoint& p);
+		bool operator ==(const MeshPoint& p);
+		FPoint gridPoint;
+		FPoint controlTop;
+		FPoint controlBottom;
+		FPoint controlLeft;
+		FPoint controlRight;
+		FPoint controlColor;
+		double transparency {1.0};
+		int shade {100};
+		QString colorName;
+		QColor color;
 };
 
 struct meshGradientPatch

Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23961&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h	(original)
+++ trunk/Scribus/scribus/pageitem.h	Wed Jul 29 22:32:14 2020
@@ -34,6 +34,7 @@
 #include <QPointF>
 #include <QRect>
 #include <QRectF>
+#include <QString>
 #include <QVector>
 #include <QTemporaryFile>
 
@@ -182,7 +183,7 @@
 		Arc				= 14,
 		Spiral			= 15,
 		Table			= 16,
-		NoteFrame       = 17,
+		NoteFrame		= 17,
 		Multiple		= 99
 	};
 

Modified: trunk/Scribus/scribus/plugins/fontpreview/fontpreview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23961&path=/trunk/Scribus/scribus/plugins/fontpreview/fontpreview.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fontpreview/fontpreview.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fontpreview/fontpreview.cpp	Wed Jul 29 22:32:14 2020
@@ -19,7 +19,7 @@
 
 
 FontPreview::FontPreview(const QString& fontName, QWidget* parent, ScribusDoc* doc)
-	: QDialog(parent, nullptr)
+	: QDialog(parent, Qt::WindowFlags())
 {
 	setupUi(this);
 	setModal(true);

Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23961&path=/trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp	Wed Jul 29 22:32:14 2020
@@ -155,7 +155,7 @@
 
 bool PdfPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
 {
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
 	showProgress = false;
 #endif
 	bool success = false;

Modified: trunk/Scribus/scribus/plugins/import/ps/importps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23961&path=/trunk/Scribus/scribus/plugins/import/ps/importps.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/ps/importps.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/ps/importps.cpp	Wed Jul 29 22:32:14 2020
@@ -64,7 +64,7 @@
 
 bool EPSPlug::import(QString fName, const TransactionSettings &trSettings, int flags, bool showProgress)
 {
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
 	#if QT_VERSION >= 0x050300
 		showProgress = false;
 	#endif
@@ -278,7 +278,7 @@
 				ScElemMimeData* md = new ScElemMimeData();
 				md->setScribusElem(ss->WriteElem(m_Doc, tmpSel));
 				delete ss;
-/*#ifndef Q_WS_MAC*/
+/*#ifndef Q_OS_MACOS */
 // see #2196
 				m_Doc->itemSelection_DeleteItem(tmpSel);
 /*#else

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23961&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Wed Jul 29 22:32:14 2020
@@ -8663,7 +8663,7 @@
 	if (currItem->imageIsAvailable)
 	{
 		bool startFailed=false;
-	#ifdef Q_OS_OSX
+	#ifdef Q_OS_MACOS
 		QString osxcmd(imageEditorExecutable);
 		if (osxcmd.endsWith(".app"))
 			osxcmd.prepend("open -a \"");

Modified: trunk/Scribus/scribus/styleoptions.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23961&path=/trunk/Scribus/scribus/styleoptions.h
==============================================================================
--- trunk/Scribus/scribus/styleoptions.h	(original)
+++ trunk/Scribus/scribus/styleoptions.h	Wed Jul 29 22:32:14 2020
@@ -16,7 +16,7 @@
 #ifndef STYLEOPTIONS_H
 #define STYLEOPTIONS_H
 
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
 #define AQUA_EXTRA 20
 #else
 #define AQUA_EXTRA 0

Modified: trunk/Scribus/scribus/ui/inspage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23961&path=/trunk/Scribus/scribus/ui/inspage.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/inspage.cpp	(original)
+++ trunk/Scribus/scribus/ui/inspage.cpp	Wed Jul 29 22:32:14 2020
@@ -24,7 +24,7 @@
 #include "util.h"
 
 InsPage::InsPage( QWidget* parent, ScribusDoc* currentDoc, int currentPage, int maxPages)
-	: QDialog( parent, nullptr )
+	: QDialog( parent, Qt::WindowFlags() )
 {
 	m_doc = currentDoc;
 

Modified: trunk/Scribus/scribus/util_os.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23961&path=/trunk/Scribus/scribus/util_os.cpp
==============================================================================
--- trunk/Scribus/scribus/util_os.cpp	(original)
+++ trunk/Scribus/scribus/util_os.cpp	Wed Jul 29 22:32:14 2020
@@ -24,7 +24,7 @@
 
 bool os_is_osx()
 {
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
 	return true;
 #else
 	return false;




More information about the scribus-commit mailing list