r23082 by jghali - Remove some now unnecessary "#if QT_VERSION" conditional blocks

scribus-commit scribus-commit at lists.scribus.net
Tue Jul 16 22:53:17 UTC 2019


Author: jghali
Date: Tue Jul 16 22:53:17 2019
New Revision: 23082

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23082
Log:
Remove some now unnecessary "#if QT_VERSION" conditional blocks

Modified:
    trunk/Scribus/scribus/main_nix.cpp
    trunk/Scribus/scribus/main_win32.cpp
    trunk/Scribus/scribus/margins.h
    trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
    trunk/Scribus/scribus/scribus.cpp

Modified: trunk/Scribus/scribus/main_nix.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23082&path=/trunk/Scribus/scribus/main_nix.cpp
==============================================================================
--- trunk/Scribus/scribus/main_nix.cpp	(original)
+++ trunk/Scribus/scribus/main_nix.cpp	Tue Jul 16 22:53:17 2019
@@ -65,10 +65,9 @@
 */
 int mainApp(int argc, char **argv)
 {
-	emergencyActivated=false;
-#if QT_VERSION >= 0x050600
+	emergencyActivated = false;
+
 	ScribusQApp::setAttribute(Qt::AA_EnableHighDpiScaling);
-#endif
 	ScribusQApp app(argc, argv);
 	initCrashHandler();
 	app.parseCommandLine();

Modified: trunk/Scribus/scribus/main_win32.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23082&path=/trunk/Scribus/scribus/main_win32.cpp
==============================================================================
--- trunk/Scribus/scribus/main_win32.cpp	(original)
+++ trunk/Scribus/scribus/main_win32.cpp	Tue Jul 16 22:53:17 2019
@@ -97,9 +97,8 @@
 		qInstallMessageHandler(messageHandler);
 	}
 #endif
-#if QT_VERSION >= 0x050600
+
 	ScribusQApp::setAttribute(Qt::AA_EnableHighDpiScaling);
-#endif
 	ScribusQApp app(argc, argv);
 	setPythonEnvironment(app.applicationDirPath());
 	result =  mainApp(app);

Modified: trunk/Scribus/scribus/margins.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23082&path=/trunk/Scribus/scribus/margins.h
==============================================================================
--- trunk/Scribus/scribus/margins.h	(original)
+++ trunk/Scribus/scribus/margins.h	Tue Jul 16 22:53:17 2019
@@ -18,9 +18,8 @@
 #define MARGINS_H
 
 #include <QDebug>
-#if QT_VERSION >= 0x050300
 #include <QMarginsF>
-#endif
+
 /** \brief Pagemargins and bleeds*/
 class MarginStruct
 {
@@ -54,7 +53,6 @@
 		double m_right {0.0};
 };
 
-#if QT_VERSION >= 0x050300
 class ScMargins : public QMarginsF
 {
 	public:
@@ -67,6 +65,5 @@
 			setRight(right);
 		}
 };
-#endif
 
 #endif // MARGINS_H

Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23082&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	Tue Jul 16 22:53:17 2019
@@ -171,9 +171,7 @@
 bool PdfPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
 {
 #ifdef Q_OS_OSX
-	#if QT_VERSION >= 0x050300
-		showProgress = false;
-	#endif
+	showProgress = false;
 #endif
 	bool success = false;
 	interactive = (flags & LoadSavePlugin::lfInteractive);

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23082&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Tue Jul 16 22:53:17 2019
@@ -6827,49 +6827,7 @@
 	marksManager->startup();
 	nsEditor->startup();
 	symbolPalette->startup();
-#if QT_VERSION < 0x050600
-	if (!m_prefsManager.appPrefs.uiPrefs.tabbedPalettes.isEmpty())
-	{
-		for (int a = 0; a < m_prefsManager.appPrefs.uiPrefs.tabbedPalettes.count(); a++)
-		{
-			QStringList actTab = m_prefsManager.appPrefs.uiPrefs.tabbedPalettes[a].palettes;
-			QDockWidget *container = findChild<QDockWidget *>(actTab[0]);
-			if (container)
-			{
-				for (int i = 1; i < actTab.count(); i++)
-				{
-					QDockWidget *content = findChild<QDockWidget *>(actTab[i]);
-					if (content)
-						tabifyDockWidget(container, content);
-				}
-			}
-			QList<QTabBar *> bars = findChildren<QTabBar *>(QString());
-			bool found = false;
-			for (int i = 0; i < bars.count(); ++i)
-			{
-				QTabBar *bar = bars[i];
-				for (int ii = 0; ii < bar->count(); ii++)
-				{
-					QObject *obj = (QObject*)bar->tabData(ii).toULongLong();
-					if (obj != nullptr)
-					{
-						if (obj->objectName() == container->objectName())
-						{
-							if (m_prefsManager.appPrefs.uiPrefs.tabbedPalettes[a].activeTab > -1)
-							{
-								bar->setCurrentIndex(m_prefsManager.appPrefs.uiPrefs.tabbedPalettes[a].activeTab);
-								found = true;
-								break;
-							}
-						}
-					}
-				}
-				if (found)
-					break;
-			}
-		}
-	}
-#else
+
 	if (!m_prefsManager.appPrefs.uiPrefs.tabbedPalettes.isEmpty())
 	{
 		for (int i = 0; i < m_prefsManager.appPrefs.uiPrefs.tabbedPalettes.count(); i++)
@@ -6902,7 +6860,7 @@
 			}
 		}
 	}
-#endif
+
 	move(m_prefsManager.appPrefs.uiPrefs.mainWinSettings.xPosition, m_prefsManager.appPrefs.uiPrefs.mainWinSettings.yPosition);
 	resize(m_prefsManager.appPrefs.uiPrefs.mainWinSettings.width, m_prefsManager.appPrefs.uiPrefs.mainWinSettings.height);
 




More information about the scribus-commit mailing list