r17118 by craig - Some fixes for use of macdeployqt by removing QPixmap initialisation before QApp inits, although bundling otherwise does not have issues

scribus-commit scribus-commit at lists.scribus.net
Thu Dec 22 22:48:30 UTC 2011


Author: craig
Date: Thu Dec 22 22:48:30 2011
New Revision: 17118

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17118
Log:
Some fixes for use of macdeployqt by removing QPixmap initialisation before QApp inits, although bundling otherwise does not have issues

Modified:
    trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp
    trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp
    trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
    trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp
    trunk/Scribus/scribus/plugins/import/ps/importpsplugin.cpp
    trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
    trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp
    trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/pconsole.h
    trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
    trunk/Scribus/scribus/scraction.cpp
    trunk/Scribus/scribus/scraction.h

Modified: trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17118&path=/trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp Thu Dec 22 22:48:30 2011
@@ -45,7 +45,7 @@
 }
 
 ImportAIPlugin::ImportAIPlugin() : LoadSavePlugin(),
-	importAction(new ScrAction(ScrAction::DLL, QPixmap(), QPixmap(), "", QKeySequence(), this))
+	importAction(new ScrAction(ScrAction::DLL, "", QKeySequence(), this))
 {
 	// Set action info in languageChange, so we only have to do it in one
 	// place. This includes registering file format support.

Modified: trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17118&path=/trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp Thu Dec 22 22:48:30 2011
@@ -40,7 +40,7 @@
 }
 
 ImportCvgPlugin::ImportCvgPlugin() : LoadSavePlugin(),
-	importAction(new ScrAction(ScrAction::DLL, QPixmap(), QPixmap(), "", QKeySequence(), this))
+	importAction(new ScrAction(ScrAction::DLL, "", QKeySequence(), this))
 {
 	// Set action info in languageChange, so we only have to do it in one
 	// place. This includes registering file format support.

Modified: trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17118&path=/trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp Thu Dec 22 22:48:30 2011
@@ -72,7 +72,7 @@
 
 OODrawImportPlugin::OODrawImportPlugin() :
 	LoadSavePlugin(),
-	importAction(new ScrAction(ScrAction::DLL, QPixmap(), QPixmap(), "", QKeySequence(), this))
+	importAction(new ScrAction(ScrAction::DLL, "", QKeySequence(), this))
 {
 	// Set action info in languageChange, so we only have to do
 	// it in one place. This includes registering file formats.

Modified: trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17118&path=/trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp Thu Dec 22 22:48:30 2011
@@ -40,7 +40,7 @@
 }
 
 ImportPctPlugin::ImportPctPlugin() : LoadSavePlugin(),
-	importAction(new ScrAction(ScrAction::DLL, QPixmap(), QPixmap(), "", QKeySequence(), this))
+	importAction(new ScrAction(ScrAction::DLL, "", QKeySequence(), this))
 {
 	// Set action info in languageChange, so we only have to do it in one
 	// place. This includes registering file format support.

Modified: trunk/Scribus/scribus/plugins/import/ps/importpsplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17118&path=/trunk/Scribus/scribus/plugins/import/ps/importpsplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/ps/importpsplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/ps/importpsplugin.cpp Thu Dec 22 22:48:30 2011
@@ -42,7 +42,7 @@
 }
 
 ImportPSPlugin::ImportPSPlugin() : LoadSavePlugin(),
-	importAction(new ScrAction(ScrAction::DLL, QPixmap(), QPixmap(), "", QKeySequence(), this))
+	importAction(new ScrAction(ScrAction::DLL, "", QKeySequence(), this))
 {
 	// Set action info in languageChange, so we only have to do it in one
 	// place. This includes registering file format support.

Modified: trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17118&path=/trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp Thu Dec 22 22:48:30 2011
@@ -70,7 +70,7 @@
 }
 
 SVGImportPlugin::SVGImportPlugin() : LoadSavePlugin(),
-	importAction(new ScrAction(ScrAction::DLL, QPixmap(), QPixmap(), "", QKeySequence(), this))
+	importAction(new ScrAction(ScrAction::DLL, "", QKeySequence(), this))
 {
 	// Set action info in languageChange, so we only have to do
 	// it in one place. This includes registering file format

Modified: trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17118&path=/trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp Thu Dec 22 22:48:30 2011
@@ -57,7 +57,7 @@
 }
 
 WMFImportPlugin::WMFImportPlugin() : LoadSavePlugin(),
-	importAction(new ScrAction(ScrAction::DLL, QPixmap(), QPixmap(), "", QKeySequence(), this))
+	importAction(new ScrAction(ScrAction::DLL, "", QKeySequence(), this))
 {
 	// Set action info in languageChange, so we only have to do
 	// it in one place. This includes registering file format

Modified: trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17118&path=/trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp Thu Dec 22 22:48:30 2011
@@ -40,7 +40,7 @@
 }
 
 ImportXfigPlugin::ImportXfigPlugin() : LoadSavePlugin(),
-	importAction(new ScrAction(ScrAction::DLL, QPixmap(), QPixmap(), "", QKeySequence(), this))
+	importAction(new ScrAction(ScrAction::DLL, "", QKeySequence(), this))
 {
 	// Set action info in languageChange, so we only have to do it in one
 	// place. This includes registering file format support.

Modified: trunk/Scribus/scribus/plugins/scriptplugin/pconsole.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17118&path=/trunk/Scribus/scribus/plugins/scriptplugin/pconsole.h
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/pconsole.h (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/pconsole.h Thu Dec 22 22:48:30 2011
@@ -15,6 +15,7 @@
 #define PCONSOLE_H
 
 #include <QLabel>
+#include <QMainWindow>
 #include <QSyntaxHighlighter>
 #include "ui_pconsole.h"
 

Modified: trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17118&path=/trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp Thu Dec 22 22:48:30 2011
@@ -97,7 +97,7 @@
 		{
 			QFileInfo fs(ds[dc]);
 			QString strippedName=fs.baseName();
-			scrScripterActions.insert(strippedName, new ScrAction( ScrAction::RecentScript, QPixmap(), QPixmap(), strippedName, QKeySequence(), this));
+			scrScripterActions.insert(strippedName, new ScrAction( ScrAction::RecentScript, strippedName, QKeySequence(), this));
 			connect( scrScripterActions[strippedName], SIGNAL(triggeredData(QString)), this, SLOT(StdScript(QString)) );
 			menuMgr->addMenuItem(scrScripterActions[strippedName], "ScribusScripts", true);
 		}
@@ -117,7 +117,7 @@
 	{
 		QString strippedName=RecentScripts[m];
 		strippedName.remove(QDir::separator());
-		scrRecentScriptActions.insert(strippedName, new ScrAction( ScrAction::RecentScript, QPixmap(), QPixmap(), RecentScripts[m], QKeySequence(), this));
+		scrRecentScriptActions.insert(strippedName, new ScrAction( ScrAction::RecentScript, RecentScripts[m], QKeySequence(), this));
 		connect( scrRecentScriptActions[strippedName], SIGNAL(triggeredData(QString)), this, SLOT(RecentScript(QString)) );
 		menuMgr->addMenuItem(scrRecentScriptActions[strippedName], "RecentScripts", true);
 	}
@@ -137,7 +137,7 @@
 			{
 				QString strippedName=SavedRecentScripts[m];
 				strippedName.remove(QDir::separator());
-				scrRecentScriptActions.insert(strippedName, new ScrAction( ScrAction::RecentScript, QPixmap(), QPixmap(), SavedRecentScripts[m], QKeySequence(), this));
+				scrRecentScriptActions.insert(strippedName, new ScrAction( ScrAction::RecentScript, SavedRecentScripts[m], QKeySequence(), this));
 				connect( scrRecentScriptActions[strippedName], SIGNAL(triggeredData(QString)), this, SLOT(RecentScript(QString)) );
 				menuMgr->addMenuItem(scrRecentScriptActions[strippedName], "RecentScripts", true);
 			}

Modified: trunk/Scribus/scribus/scraction.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17118&path=/trunk/Scribus/scribus/scraction.cpp
==============================================================================
--- trunk/Scribus/scribus/scraction.cpp (original)
+++ trunk/Scribus/scribus/scraction.cpp Thu Dec 22 22:48:30 2011
@@ -35,6 +35,51 @@
 {
 	setShortcut(accel);
 	initScrAction();
+}
+
+ScrAction::ScrAction( ActionType aType, const QString & menuText, QKeySequence accel, QObject * parent, int extraInt, double extraDouble, QString extraQString ) : QAction( menuText, parent )
+{
+	setShortcut(accel);
+	initScrAction();
+	_actionType=aType;
+	if (_actionType!=Normal)
+		connect (this, SIGNAL(triggered()), this, SLOT(triggeredToTriggeredData()));
+	switch (_actionType)
+	{
+		case DataInt:
+			_dataInt=extraInt;
+			break;
+		case DataDouble:
+			_dataDouble=extraDouble;
+			break;
+		case DataQString:
+			_dataQString=extraQString;
+			break;
+		case RecentFile:
+			_dataQString=extraQString;
+			break;
+		case RecentPaste:
+			_dataQString=extraQString;
+			break;
+		case DLL:
+			pluginID=extraInt;
+			break;
+		case Window:
+			windowID=extraInt;
+			break;
+		case RecentScript:
+			break;
+		case UnicodeChar:
+			_dataInt=extraInt;
+			_dataQString=extraQString;
+			break;
+		case Layer:
+			layerID=extraInt;
+			break;
+		case Normal:
+		default:
+			break;
+	}
 }
 
 ScrAction::ScrAction( ActionType aType, const QPixmap & icon16, const QPixmap & icon22, const QString & menuText, QKeySequence accel, QObject * parent, int extraInt, double extraDouble, QString extraQString ) : QAction( QIcon(icon16), menuText, parent )

Modified: trunk/Scribus/scribus/scraction.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17118&path=/trunk/Scribus/scribus/scraction.h
==============================================================================
--- trunk/Scribus/scribus/scraction.h (original)
+++ trunk/Scribus/scribus/scraction.h Thu Dec 22 22:48:30 2011
@@ -69,7 +69,10 @@
 		\param extraDouble extra double value
 		\param extraQString extra QString value
 	 */
-	ScrAction( ActionType mType, const QPixmap & icon16, const QPixmap & icon22,
+	ScrAction( ActionType aType,
+			   const QString &menuText, QKeySequence accel, QObject *parent,
+			   int extraInt = 0, double extraDouble = 0.0, QString extraQString = QString::null );		
+	ScrAction( ActionType aType, const QPixmap & icon16, const QPixmap & icon22,
 			   const QString &menuText, QKeySequence accel, QObject *parent,
 			   int extraInt = 0, double extraDouble = 0.0, QString extraQString = QString::null );		
 	/*!




More information about the scribus-commit mailing list