From 1c1403293485f35fd53db45aaa77a01cdd9627e7 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 28 Jun 2011 20:34:15 +0000 Subject: TQt4 port ktorrent This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktorrent@1238733 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- plugins/webinterface/php_handler.cpp | 38 ++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'plugins/webinterface/php_handler.cpp') diff --git a/plugins/webinterface/php_handler.cpp b/plugins/webinterface/php_handler.cpp index d04c3b6..852f1fd 100644 --- a/plugins/webinterface/php_handler.cpp +++ b/plugins/webinterface/php_handler.cpp @@ -33,24 +33,24 @@ using namespace bt; namespace kt { - QMap PhpHandler::scripts; + TQMap PhpHandler::scripts; - PhpHandler::PhpHandler(const QString & php_exe,PhpInterface *php) : QProcess(php_exe),php_i(php) + PhpHandler::PhpHandler(const TQString & php_exe,PhpInterface *php) : TQProcess(php_exe),php_i(php) { - connect(this,SIGNAL(readyReadStdout()),this,SLOT(onReadyReadStdout())); - connect(this,SIGNAL(processExited()),this,SLOT(onExited())); + connect(this,TQT_SIGNAL(readyReadStdout()),this,TQT_SLOT(onReadyReadStdout())); + connect(this,TQT_SIGNAL(processExited()),this,TQT_SLOT(onExited())); } PhpHandler::~PhpHandler() { } - bool PhpHandler::executeScript(const QString & path,const QMap & args) + bool PhpHandler::executeScript(const TQString & path,const TQMap & args) { - QByteArray php_s; - if (!scripts.contains(path)) + TQByteArray php_s; + if (!scripts.tqcontains(path)) { - QFile fptr(path); + TQFile fptr(path); if (!fptr.open(IO_ReadOnly)) { Out(SYS_WEB|LOG_DEBUG) << "Failed to open " << path << endl; @@ -66,32 +66,32 @@ namespace kt output.resize(0); - int firstphptag = QCString(php_s).find("globalInfo(ts); - php_i->downloadStatus(ts); + php_i->downloadtqStatus(ts); - QMap::const_iterator it; + TQMap::const_iterator it; for ( it = args.begin(); it != args.end(); ++it ) { - ts << QString("$_REQUEST['%1']=\"%2\";\n").arg(it.key()).arg(it.data()); + ts << TQString("$_REQUEST['%1']=\"%2\";\n").tqarg(it.key()).tqarg(it.data()); } ts.writeRawBytes(php_s.data() + off,php_s.size() - off); // the rest of the script ts << flush; #if 0 - QFile dinges("output.php"); + TQFile dinges("output.php"); if (dinges.open(IO_WriteOnly)) { - QTextStream out(&dinges); + TQTextStream out(&dinges); out.writeRawBytes(data.data(),data.size()); dinges.close(); } @@ -108,10 +108,10 @@ namespace kt void PhpHandler::onReadyReadStdout() { - QTextStream out(output,IO_WriteOnly|IO_Append); + TQTextStream out(output,IO_WriteOnly|IO_Append); while (canReadLineStdout()) { - QByteArray d = readStdout(); + TQByteArray d = readStdout(); out.writeRawBytes(d.data(),d.size()); } } -- cgit v1.2.3