diff options
Diffstat (limited to 'lib/kross/main/scriptaction.cpp')
-rw-r--r-- | lib/kross/main/scriptaction.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/lib/kross/main/scriptaction.cpp b/lib/kross/main/scriptaction.cpp index 06ee9dd7..b658a0b1 100644 --- a/lib/kross/main/scriptaction.cpp +++ b/lib/kross/main/scriptaction.cpp @@ -20,10 +20,10 @@ #include "scriptaction.h" #include "manager.h" -#include <qstylesheet.h> -#include <qdir.h> -#include <qfile.h> -#include <qfileinfo.h> +#include <tqstylesheet.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqfileinfo.h> #include <kurl.h> #include <kstandarddirs.h> #include <kmimetype.h> @@ -42,7 +42,7 @@ namespace Kross { namespace Api { * to a scriptfile the packagepath will be the directory * the scriptfile is located in. */ - QString packagepath; + TQString packagepath; /** * List of logs this \a ScriptAction has. Initialization, @@ -51,7 +51,7 @@ namespace Kross { namespace Api { * more detailed visual information to the user what * our \a ScriptAction did so far. */ - QStringList logs; + TQStringList logs; /** * The versionnumber this \a ScriptAction has. We are using @@ -66,13 +66,13 @@ namespace Kross { namespace Api { * The description used to provide a way to the user to describe * the \a ScriptAction with a longer string. */ - QString description; + TQString description; /** * List of \a ScriptActionCollection instances this \a ScriptAction * is attached to. */ - QValueList<ScriptActionCollection*> collections; + TQValueList<ScriptActionCollection*> collections; /** * Constructor. @@ -82,7 +82,7 @@ namespace Kross { namespace Api { }} -ScriptAction::ScriptAction(const QString& file) +ScriptAction::ScriptAction(const TQString& file) : KAction(0, file.latin1()) , Kross::Api::ScriptContainer(file) , d( new ScriptActionPrivate() ) // initialize d-pointer class @@ -101,18 +101,18 @@ ScriptAction::ScriptAction(const QString& file) setEnabled(false); } -ScriptAction::ScriptAction(const QString& scriptconfigfile, const QDomElement& element) +ScriptAction::ScriptAction(const TQString& scriptconfigfile, const TQDomElement& element) : KAction() , Kross::Api::ScriptContainer() , d( new ScriptActionPrivate() ) // initialize d-pointer class { - QString name = element.attribute("name"); - QString text = element.attribute("text"); - QString description = element.attribute("description"); - QString file = element.attribute("file"); - QString icon = element.attribute("icon"); + TQString name = element.attribute("name"); + TQString text = element.attribute("text"); + TQString description = element.attribute("description"); + TQString file = element.attribute("file"); + TQString icon = element.attribute("icon"); - QString version = element.attribute("version"); + TQString version = element.attribute("version"); bool ok; int v = version.toInt(&ok); if(ok) d->version = v; @@ -130,7 +130,7 @@ ScriptAction::ScriptAction(const QString& scriptconfigfile, const QDomElement& e //d->scriptcontainer = Manager::scriptManager()->getScriptContainer(name); - QString interpreter = element.attribute("interpreter"); + TQString interpreter = element.attribute("interpreter"); if(interpreter.isNull()) setEnabled(false); else @@ -143,18 +143,18 @@ ScriptAction::ScriptAction(const QString& scriptconfigfile, const QDomElement& e ScriptContainer::setName(name); } else { - QDir dir = QFileInfo(scriptconfigfile).dir(true); + TQDir dir = TQFileInfo(scriptconfigfile).dir(true); d->packagepath = dir.absPath(); - QFileInfo fi(dir, file); + TQFileInfo fi(dir, file); file = fi.absFilePath(); setEnabled(fi.exists()); setFile(file); if(icon.isNull()) icon = KMimeType::iconForURL( KURL(file) ); if(description.isEmpty()) - description = QString("%1<br>%2").arg(text.isEmpty() ? name : text).arg(file); + description = TQString("%1<br>%2").tqarg(text.isEmpty() ? name : text).tqarg(file); else - description += QString("<br>%1").arg(file); + description += TQString("<br>%1").tqarg(file); ScriptContainer::setName(file); } @@ -164,7 +164,7 @@ ScriptAction::ScriptAction(const QString& scriptconfigfile, const QDomElement& e KAction::setIcon(icon); // connect signal - connect(this, SIGNAL(activated()), this, SLOT(activate())); + connect(this, TQT_SIGNAL(activated()), this, TQT_SLOT(activate())); } ScriptAction::~ScriptAction() @@ -178,30 +178,30 @@ int ScriptAction::version() const return d->version; } -const QString ScriptAction::getDescription() const +const TQString ScriptAction::getDescription() const { return d->description; } -void ScriptAction::setDescription(const QString& description) +void ScriptAction::setDescription(const TQString& description) { d->description = description; setToolTip( description ); setWhatsThis( description ); } -void ScriptAction::setInterpreterName(const QString& name) +void ScriptAction::setInterpreterName(const TQString& name) { setEnabled( Manager::scriptManager()->hasInterpreterInfo(name) ); Kross::Api::ScriptContainer::setInterpreterName(name); } -const QString ScriptAction::getPackagePath() const +const TQString ScriptAction::getPackagePath() const { return d->packagepath; } -const QStringList& ScriptAction::getLogs() const +const TQStringList& ScriptAction::getLogs() const { return d->logs; } @@ -218,7 +218,7 @@ void ScriptAction::detach(ScriptActionCollection* collection) void ScriptAction::detachAll() { - for(QValueList<ScriptActionCollection*>::Iterator it = d->collections.begin(); it != d->collections.end(); ++it) + for(TQValueList<ScriptActionCollection*>::Iterator it = d->collections.begin(); it != d->collections.end(); ++it) (*it)->detach( this ); } @@ -227,11 +227,11 @@ void ScriptAction::activate() emit activated(this); Kross::Api::ScriptContainer::execute(); if( Kross::Api::ScriptContainer::hadException() ) { - QString errormessage = Kross::Api::ScriptContainer::getException()->getError(); - QString tracedetails = Kross::Api::ScriptContainer::getException()->getTrace(); - d->logs << QString("<b>%1</b><br>%2") - .arg( QStyleSheet::escape(errormessage) ) - .arg( QStyleSheet::escape(tracedetails) ); + TQString errormessage = Kross::Api::ScriptContainer::getException()->getError(); + TQString tracedetails = Kross::Api::ScriptContainer::getException()->getTrace(); + d->logs << TQString("<b>%1</b><br>%2") + .tqarg( TQStyleSheet::escape(errormessage) ) + .tqarg( TQStyleSheet::escape(tracedetails) ); emit failed(errormessage, tracedetails); } else { |