From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: 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 --- lib/kross/runner/main.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'lib/kross/runner/main.cpp') 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 #include -// Qt -#include -#include +// TQt +#include +#include // KDE #include @@ -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; } -- cgit v1.2.1