r17117 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:15 UTC 2011


Author: craig
Date: Thu Dec 22 22:48:15 2011
New Revision: 17117

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

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

Modified: branches/Version135/Scribus/scribus/plugins/import/ai/importaiplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17117&path=/branches/Version135/Scribus/scribus/plugins/import/ai/importaiplugin.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/plugins/import/ai/importaiplugin.cpp (original)
+++ branches/Version135/Scribus/scribus/plugins/import/ai/importaiplugin.cpp Thu Dec 22 22:48:15 2011
@@ -39,7 +39,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: branches/Version135/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17117&path=/branches/Version135/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp (original)
+++ branches/Version135/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp Thu Dec 22 22:48:15 2011
@@ -39,7 +39,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: branches/Version135/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17117&path=/branches/Version135/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp (original)
+++ branches/Version135/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp Thu Dec 22 22:48:15 2011
@@ -70,7 +70,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: branches/Version135/Scribus/scribus/plugins/import/pct/importpctplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17117&path=/branches/Version135/Scribus/scribus/plugins/import/pct/importpctplugin.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/plugins/import/pct/importpctplugin.cpp (original)
+++ branches/Version135/Scribus/scribus/plugins/import/pct/importpctplugin.cpp Thu Dec 22 22:48:15 2011
@@ -39,7 +39,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: branches/Version135/Scribus/scribus/plugins/import/ps/importpsplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17117&path=/branches/Version135/Scribus/scribus/plugins/import/ps/importpsplugin.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/plugins/import/ps/importpsplugin.cpp (original)
+++ branches/Version135/Scribus/scribus/plugins/import/ps/importpsplugin.cpp Thu Dec 22 22:48:15 2011
@@ -38,7 +38,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: branches/Version135/Scribus/scribus/plugins/import/svg/svgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17117&path=/branches/Version135/Scribus/scribus/plugins/import/svg/svgplugin.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/plugins/import/svg/svgplugin.cpp (original)
+++ branches/Version135/Scribus/scribus/plugins/import/svg/svgplugin.cpp Thu Dec 22 22:48:15 2011
@@ -69,7 +69,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: branches/Version135/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17117&path=/branches/Version135/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp (original)
+++ branches/Version135/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp Thu Dec 22 22:48:15 2011
@@ -56,7 +56,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: branches/Version135/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17117&path=/branches/Version135/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp (original)
+++ branches/Version135/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp Thu Dec 22 22:48:15 2011
@@ -39,7 +39,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: branches/Version135/Scribus/scribus/plugins/scriptplugin/pconsole.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17117&path=/branches/Version135/Scribus/scribus/plugins/scriptplugin/pconsole.h
==============================================================================
--- branches/Version135/Scribus/scribus/plugins/scriptplugin/pconsole.h (original)
+++ branches/Version135/Scribus/scribus/plugins/scriptplugin/pconsole.h Thu Dec 22 22:48:15 2011
@@ -15,6 +15,7 @@
 #define PCONSOLE_H
 
 #include <QLabel>
+#include <QMainWindow>
 #include <QSyntaxHighlighter>
 #include "ui_pconsole.h"
 

Modified: branches/Version135/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17117&path=/branches/Version135/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp (original)
+++ branches/Version135/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp Thu Dec 22 22:48:15 2011
@@ -96,7 +96,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");
 		}
@@ -116,7 +116,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");
 	}
@@ -136,7 +136,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");
 			}

Modified: branches/Version135/Scribus/scribus/scraction.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17117&path=/branches/Version135/Scribus/scribus/scraction.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/scraction.cpp (original)
+++ branches/Version135/Scribus/scribus/scraction.cpp Thu Dec 22 22:48:15 2011
@@ -33,6 +33,52 @@
 {
 	setShortcut(accel);
 	initScrAction();
+}
+
+ScrAction::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: branches/Version135/Scribus/scribus/scraction.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17117&path=/branches/Version135/Scribus/scribus/scraction.h
==============================================================================
--- branches/Version135/Scribus/scribus/scraction.h (original)
+++ branches/Version135/Scribus/scribus/scraction.h Thu Dec 22 22:48:15 2011
@@ -69,9 +69,12 @@
 		\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 );		
+			   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 );
 	/*!
 		\author Craig Bradney
 		\date Jan 2005




More information about the scribus-commit mailing list