diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kross/runner/main.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/kross/runner/main.cpp')
-rw-r--r-- | lib/kross/runner/main.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/kross/runner/main.cpp b/lib/kross/runner/main.cpp index 89a35278..570e2610 100644 --- a/lib/kross/runner/main.cpp +++ b/lib/kross/runner/main.cpp @@ -21,9 +21,9 @@ #include <string> #include <iostream> -// Qt -#include <qstring.h> -#include <qfile.h> +// TQt +#include <tqstring.h> +#include <tqfile.h> // KDE #include <kinstance.h> @@ -47,10 +47,10 @@ KApplication* app = 0; -int runScriptFile(const QString& scriptfile) +int runScriptFile(const TQString& scriptfile) { // Read the scriptfile - QFile f(QFile::encodeName(scriptfile)); + TQFile f(TQFile::encodeName(scriptfile)); if(! f.exists()) { std::cerr << "No such scriptfile: " << scriptfile.latin1() << std::endl; return ERROR_NOSUCHFILE; @@ -59,7 +59,7 @@ int runScriptFile(const QString& scriptfile) std::cerr << "Failed to open scriptfile: " << scriptfile.latin1() << std::endl; return ERROR_OPENFAILED; } - QString scriptcode = f.readAll(); + TQString scriptcode = f.readAll(); f.close(); // Determinate the matching interpreter @@ -80,15 +80,15 @@ int runScriptFile(const QString& scriptfile) scriptcontainer->execute(); if(scriptcontainer->hadException()) { // We had an exception. - QString errormessage = scriptcontainer->getException()->getError(); - QString tracedetails = scriptcontainer->getException()->getTrace(); - std::cerr << QString("%2\n%1").arg(tracedetails).arg(errormessage).latin1() << std::endl; + TQString errormessage = scriptcontainer->getException()->getError(); + TQString tracedetails = scriptcontainer->getException()->getTrace(); + std::cerr << TQString("%2\n%1").tqarg(tracedetails).tqarg(errormessage).latin1() << std::endl; return ERROR_EXCEPTION; } } catch(Kross::Api::Exception::Ptr e) { // Normaly that shouldn't be the case... - std::cerr << QString("EXCEPTION %1").arg(e->toString()).latin1() << std::endl; + std::cerr << TQString("EXCEPTION %1").tqarg(e->toString()).latin1() << std::endl; return ERROR_UNHALDEDEXCEPTION; } return ERROR_OK; @@ -128,12 +128,12 @@ int main(int argc, char **argv) // Create KApplication instance. app = new KApplication( /* allowStyles */ true, /* GUIenabled */ true ); - //QString interpretername = args->getOption("interpreter"); - //QString scriptfilename = args->getOption("scriptfile"); + //TQString interpretername = args->getOption("interpreter"); + //TQString scriptfilename = args->getOption("scriptfile"); // Each argument is a scriptfile to open for(int i = 0; i < args->count(); i++) { - result = runScriptFile(QFile::decodeName(args->arg(i))); + result = runScriptFile(TQFile::decodeName(args->arg(i))); if(result != ERROR_OK) break; } |