From e985f7e545f4739493965aad69bbecb136dc9346 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 16 Jun 2011 19:02:47 +0000 Subject: TQt4 port kdewebdev This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- quanta/components/debugger/gubed/gubedsettings.cpp | 2 +- quanta/components/debugger/gubed/gubedsettings.h | 1 + quanta/components/debugger/gubed/gubedsettingss.ui | 108 ++++++------ .../debugger/gubed/quantadebuggergubed.cpp | 190 ++++++++++----------- .../debugger/gubed/quantadebuggergubed.h | 7 +- 5 files changed, 155 insertions(+), 153 deletions(-) (limited to 'quanta/components/debugger/gubed') diff --git a/quanta/components/debugger/gubed/gubedsettings.cpp b/quanta/components/debugger/gubed/gubedsettings.cpp index 9464dc81..b6df9b25 100644 --- a/quanta/components/debugger/gubed/gubedsettings.cpp +++ b/quanta/components/debugger/gubed/gubedsettings.cpp @@ -22,7 +22,7 @@ GubedSettings::GubedSettings(const TQString &protocolversion) : GubedSettingsS(0, "GubedSettings", false, 0) { - textAbout->setText(textAbout->text().replace("%PROTOCOLVERSION%", protocolversion)); + textAbout->setText(textAbout->text().tqreplace("%PROTOCOLVERSION%", protocolversion)); } GubedSettings::~GubedSettings() diff --git a/quanta/components/debugger/gubed/gubedsettings.h b/quanta/components/debugger/gubed/gubedsettings.h index 73232e06..b8fef421 100644 --- a/quanta/components/debugger/gubed/gubedsettings.h +++ b/quanta/components/debugger/gubed/gubedsettings.h @@ -22,6 +22,7 @@ class GubedSettings : public GubedSettingsS { Q_OBJECT + TQ_OBJECT public slots: virtual void slotUseProxyToggle( bool useproxy); diff --git a/quanta/components/debugger/gubed/gubedsettingss.ui b/quanta/components/debugger/gubed/gubedsettingss.ui index 12125c93..7697a337 100644 --- a/quanta/components/debugger/gubed/gubedsettingss.ui +++ b/quanta/components/debugger/gubed/gubedsettingss.ui @@ -1,6 +1,6 @@ GubedSettingsS - + GubedSettingsS @@ -22,7 +22,7 @@ unnamed - + Layout1 @@ -46,14 +46,14 @@ Expanding - + 20 20 - + buttonOk @@ -70,7 +70,7 @@ true - + buttonCancel @@ -83,7 +83,7 @@ - + tabWidget2 @@ -95,7 +95,7 @@ 1 - + tab @@ -116,14 +116,14 @@ Expanding - + 21 40 - + groupBox1 @@ -134,7 +134,7 @@ unnamed - + lblDebuggerServerBasedir @@ -150,7 +150,7 @@ Server basedir: - + lblDebuggerLocalBasedir @@ -166,12 +166,12 @@ Local basedir: - + lineServerBasedir - + lineLocalBasedir @@ -181,7 +181,7 @@ - + groupBox2 @@ -192,7 +192,7 @@ unnamed - + lineServerListenPort @@ -205,7 +205,7 @@ - + lineServerPort @@ -221,7 +221,7 @@ - + lineServerHost @@ -229,7 +229,7 @@ false - + checkUseProxy @@ -237,7 +237,7 @@ - + lblDebuggerUseProxe @@ -253,7 +253,7 @@ Use proxy - + lblDebuggerServerHost @@ -269,7 +269,7 @@ Proxy host: - + lblDebuggerServerPort @@ -285,7 +285,7 @@ Proxy port: - + lblDebuggerServerListenPort @@ -303,7 +303,7 @@ - + groupBox3 @@ -314,7 +314,7 @@ unnamed - + lineStartSession @@ -336,7 +336,7 @@ %add - Document root of current script - + optAddInclude @@ -347,7 +347,7 @@ &Add include - + optStartSession @@ -362,7 +362,7 @@ - + tab @@ -373,7 +373,7 @@ unnamed - + groupBox4 @@ -384,7 +384,7 @@ unnamed - + checkBreakOnUserError @@ -400,18 +400,18 @@ User errors - + lblBreakOn Break on: - + AlignTop - + checkBreakOnUserWarning @@ -427,7 +427,7 @@ User warnings - + checkBreakOnUserNotice @@ -443,7 +443,7 @@ User notices - + checkBreakOnNotice @@ -459,7 +459,7 @@ Notices - + checkBreakOnWarning @@ -487,14 +487,14 @@ Expanding - + 21 50 - + groupBox5 @@ -505,7 +505,7 @@ unnamed - + lblDelayFast @@ -526,11 +526,11 @@ Fast - + sliderDisplayDelay - + 0 27 @@ -546,7 +546,7 @@ Below - + lblDelaySlow @@ -566,11 +566,11 @@ Slow - + AlignVCenter|AlignRight - + Pause @@ -599,25 +599,25 @@ comboDefaultExecutionState - + lblDefaultExecutionMode Default mode: - + AlignVCenter - + lblDisplayDelay Run speed: - + AlignVCenter @@ -625,7 +625,7 @@ - + TabPage @@ -636,7 +636,7 @@ unnamed - + textLabel1 @@ -652,7 +652,7 @@ <h4>Gubed PHP Debugger Plugin for Quanta +</h4> - + pixmapLabel1 @@ -670,7 +670,7 @@ false - + AlignCenter @@ -752,10 +752,10 @@ buttonOk buttonCancel - + slotUseProxyToggle( bool ) - - + + ktextbrowser.h diff --git a/quanta/components/debugger/gubed/quantadebuggergubed.cpp b/quanta/components/debugger/gubed/quantadebuggergubed.cpp index 8c2ab1b5..58f949a1 100644 --- a/quanta/components/debugger/gubed/quantadebuggergubed.cpp +++ b/quanta/components/debugger/gubed/quantadebuggergubed.cpp @@ -47,17 +47,17 @@ K_EXPORT_COMPONENT_FACTORY( quantadebuggergubed, const char QuantaDebuggerGubed::protocolversion[] = "0.0.12"; -QuantaDebuggerGubed::QuantaDebuggerGubed (TQObject *parent, const char* name, const TQStringList&) - : DebuggerClient (parent, name) +QuantaDebuggerGubed::QuantaDebuggerGubed (TQObject *tqparent, const char* name, const TQStringList&) + : DebuggerClient (tqparent, name) { // Create a socket object and set up its signals m_socket = NULL; m_server = NULL; - m_errormask = 1794; + m_errortqmask = 1794; m_defaultExecutionState = Pause; setExecutionState(m_defaultExecutionState); - emit updateStatus(DebuggerUI::NoSession); + emit updatetqStatus(DebuggerUI::NoSession); m_datalen = -1; } @@ -80,7 +80,7 @@ QuantaDebuggerGubed::~QuantaDebuggerGubed () delete m_server; m_server = NULL; } - emit updateStatus(DebuggerUI::NoSession); + emit updatetqStatus(DebuggerUI::NoSession); } // Try to make a connection to the gubed server @@ -109,7 +109,7 @@ void QuantaDebuggerGubed::startSession() debuggerInterface()->enableAction("debug_request", false); kdDebug(24002) << k_funcinfo << ", proxy:" << m_serverHost << ", " << m_serverPort.toUInt() << endl; - emit updateStatus(DebuggerUI::AwaitingConnection); + emit updatetqStatus(DebuggerUI::AwaitingConnection); } } else @@ -123,14 +123,14 @@ void QuantaDebuggerGubed::startSession() if(m_server->listen()) { - emit updateStatus(DebuggerUI::AwaitingConnection); + emit updatetqStatus(DebuggerUI::AwaitingConnection); debuggerInterface()->enableAction("debug_connect", false); debuggerInterface()->enableAction("debug_disconnect", true); debuggerInterface()->enableAction("debug_request", true); } else { - emit updateStatus(DebuggerUI::NoSession); + emit updatetqStatus(DebuggerUI::NoSession); delete m_server; m_server = NULL; debuggerInterface()->enableAction("debug_connect", true); @@ -174,7 +174,7 @@ void QuantaDebuggerGubed::endSession() debuggerInterface()->enableAction("debug_leap", false); debuggerInterface()->enableAction("debug_pause", false); - emit updateStatus(DebuggerUI::NoSession); + emit updatetqStatus(DebuggerUI::NoSession); } // Change executionstate of the script @@ -185,7 +185,7 @@ void QuantaDebuggerGubed::setExecutionState(State newstate) sendCommand("pause", (char*)0L); sendCommand("sendactiveline", (char*)0L); if(isActive()) - emit updateStatus(DebuggerUI::Paused); + emit updatetqStatus(DebuggerUI::Paused); } else if(newstate == Run) { @@ -194,7 +194,7 @@ void QuantaDebuggerGubed::setExecutionState(State newstate) sendCommand("run", (char*)0L); if(isActive()) - emit updateStatus(DebuggerUI::Running); + emit updatetqStatus(DebuggerUI::Running); } else if(newstate == Trace) { @@ -203,7 +203,7 @@ void QuantaDebuggerGubed::setExecutionState(State newstate) sendCommand("trace", (char*)0L); if(isActive()) - emit updateStatus(DebuggerUI::Tracing); + emit updatetqStatus(DebuggerUI::Tracing); } m_executionState = newstate; @@ -258,15 +258,15 @@ void QuantaDebuggerGubed::slotError(int) if(m_socket->error()) { - kdDebug(24002) << k_funcinfo << ", " << m_socket->errorString() << endl; - debuggerInterface()->showStatus(m_socket->errorString(), false); + kdDebug(24002) << k_funcinfo << ", " << m_socket->KSocketBase::errorString() << endl; + debuggerInterface()->showtqStatus(m_socket->KSocketBase::errorString(), false); } } if(m_server && m_server->error()) { kdDebug(24002) << k_funcinfo << ", " << m_server->errorString() << endl; - debuggerInterface()->showStatus(m_server->errorString(), false); + debuggerInterface()->showtqStatus(m_server->errorString(), false); } } @@ -294,7 +294,7 @@ void QuantaDebuggerGubed::slotReadyAccept() connect(m_socket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotReadyRead())); connected(); - emit updateStatus(DebuggerUI::Connected); + emit updatetqStatus(DebuggerUI::Connected); } else { @@ -307,7 +307,7 @@ void QuantaDebuggerGubed::slotReadyAccept() // Connection established void QuantaDebuggerGubed::slotConnected(const KNetwork::KResolverEntry &) { - emit updateStatus(DebuggerUI::Connected); + emit updatetqStatus(DebuggerUI::Connected); connected(); } @@ -353,7 +353,7 @@ void QuantaDebuggerGubed::slotConnectionClosed() debuggerInterface()->setActiveLine("", 0); - emit updateStatus(DebuggerUI::AwaitingConnection); + emit updatetqStatus(DebuggerUI::AwaitingConnection); m_active = false; } @@ -383,13 +383,13 @@ void QuantaDebuggerGubed::slotReadyRead() // If datalen == -1, we didnt read the command yet, otherwise were reading data. if(m_datalen == -1) { - bytes = m_buffer.find(";"); + bytes = m_buffer.tqfind(";"); if(bytes < 0) break; data = m_buffer.left(bytes); m_buffer.remove(0, bytes + 1); - bytes = data.find(":"); + bytes = data.tqfind(":"); m_command = data.left(bytes); data.remove(0, bytes + 1); m_datalen = data.toLong(); @@ -437,7 +437,7 @@ void QuantaDebuggerGubed::processCommand(const TQString& datas) else if(m_executionState == Trace) sendCommand("trace", (char*)0L); - sendCommand("seterrormask", "errormask", TQString::number(m_errormask).ascii(), (char*)0L); + sendCommand("seterrortqmask", "errortqmask", TQString::number(m_errortqmask).ascii(), (char*)0L); } // Just some status info, display on status line else if(m_command == "status") @@ -445,9 +445,9 @@ void QuantaDebuggerGubed::processCommand(const TQString& datas) long argcnt = args["args"].toLong(); TQString msg = i18n(args["message"].ascii()); // How will we get these messages throught to the translators? for(int cnt = 1; cnt <= argcnt; cnt++) - msg.replace("%" + TQString("%1").arg(cnt) + "%", args[TQString("arg%1").arg(cnt)]); + msg.tqreplace("%" + TQString("%1").tqarg(cnt) + "%", args[TQString("arg%1").tqarg(cnt)]); - debuggerInterface()->showStatus(msg, false); + debuggerInterface()->showtqStatus(msg, false); } // New current line else if(m_command == "setactiveline") @@ -462,7 +462,7 @@ void QuantaDebuggerGubed::processCommand(const TQString& datas) // Parsing failed else if(m_command == "parsefailed") { - debuggerInterface()->showStatus(i18n("Syntax or parse error in %1)").arg(args["filenme"]), true); + debuggerInterface()->showtqStatus(i18n("Syntax or parse error in %1)").tqarg(args["filenme"]), true); return; } // A debugging session is running @@ -479,11 +479,11 @@ void QuantaDebuggerGubed::processCommand(const TQString& datas) else if(m_command == "error") { // Put the line number first so double clicking will jump to the corrrect line - debuggerInterface()->showStatus(i18n("Error occurred: Line %1, Code %2 (%3) in %4").arg(args["line"]).arg(args["errnum"]).arg(args["errmsg"]).arg(args["filename"]), true); + debuggerInterface()->showtqStatus(i18n("Error occurred: Line %1, Code %2 (%3) in %4").tqarg(args["line"]).tqarg(args["errnum"]).tqarg(args["errmsg"]).tqarg(args["filename"]), true); - // Filter to get error code only and match it with out mask + // Filter to get error code only and match it with out tqmask long error = args["errnum"].toLong(); - if(m_errormask & error) + if(m_errortqmask & error) setExecutionState(Pause); else if(m_executionState == Trace) setExecutionState(Trace); @@ -492,21 +492,21 @@ void QuantaDebuggerGubed::processCommand(const TQString& datas) else setExecutionState(Pause); - emit updateStatus(DebuggerUI::HaltedOnError); + emit updatetqStatus(DebuggerUI::HaltedOnError); } // We came across a hard coded breakpoint else if(m_command == "forcebreak") { setExecutionState(Pause); - emit updateStatus(DebuggerUI::HaltedOnBreakpoint); - debuggerInterface()->showStatus(i18n("Breakpoint reached"), true); + emit updatetqStatus(DebuggerUI::HaltedOnBreakpoint); + debuggerInterface()->showtqStatus(i18n("Breakpoint reached"), true); } // A conditional breakpoint was fulfilled else if(m_command == "conditionalbreak") { setExecutionState(Pause); - emit updateStatus(DebuggerUI::HaltedOnBreakpoint); - debuggerInterface()->showStatus(i18n("Conditional breakpoint fulfilled"), true); + emit updatetqStatus(DebuggerUI::HaltedOnBreakpoint); + debuggerInterface()->showtqStatus(i18n("Conditional breakpoint fulfilled"), true); } // There is a breakpoint set in this file/line else if(m_command == "removebreakpoint") @@ -516,7 +516,7 @@ void QuantaDebuggerGubed::processCommand(const TQString& datas) // We're about to debug a file.. else if(m_command == "initialize") { - debuggerInterface()->showStatus(i18n("Established connection to %1").arg(args["filename"]), false); + debuggerInterface()->showtqStatus(i18n("Established connection to %1").tqarg(args["filename"]), false); sendCommand("sendprotocolversion", (char*)0L); debuggerInterface()->setActiveLine(mapServerPathToLocal(args["filename"]), 0); @@ -549,7 +549,7 @@ void QuantaDebuggerGubed::processCommand(const TQString& datas) // Reached en of an include else if(m_command == "end") { - //debuggerInterface()->showStatus(i18n("At end of include %1").arg(data), true); + //debuggerInterface()->showtqStatus(i18n("At end of include %1").tqarg(data), true); return; } // Check protocol version @@ -557,7 +557,7 @@ void QuantaDebuggerGubed::processCommand(const TQString& datas) { if(args["version"] != protocolversion) { - debuggerInterface()->showStatus(i18n("The script being debugged does not communicate with the correct protocol version"), true); + debuggerInterface()->showtqStatus(i18n("The script being debugged does not communicate with the correct protocol version"), true); sendCommand("die", (char*)0L); } return; @@ -603,7 +603,7 @@ bool QuantaDebuggerGubed::sendCommand(const TQString& command, StringMap args) TQString buffer = phpSerialize(args); - buffer = TQString(command + ":%1;" + buffer).arg(buffer.length()); + buffer = TQString(command + ":%1;" + buffer).tqarg(buffer.length()); m_socket->writeBlock(buffer.ascii(), buffer.length()); return true; } @@ -768,15 +768,15 @@ void QuantaDebuggerGubed::fileOpened(const TQString&) // Watch a variable void QuantaDebuggerGubed::addWatch(const TQString &variable) { - if(m_watchlist.find(variable) == m_watchlist.end()) + if(m_watchlist.tqfind(variable) == m_watchlist.end()) m_watchlist.append(variable); sendCommand("getwatch", "variable", variable.ascii(), (char*)0L); } // Remove watch void QuantaDebuggerGubed::removeWatch(DebuggerVariable *variable) { - if(m_watchlist.find(variable->name()) != m_watchlist.end()) - m_watchlist.remove(m_watchlist.find(variable->name())); + if(m_watchlist.tqfind(variable->name()) != m_watchlist.end()) + m_watchlist.remove(m_watchlist.tqfind(variable->name())); //sendCommand("unwatchvariable", var->name()); } @@ -843,9 +843,9 @@ void QuantaDebuggerGubed::readConfig(TQDomNode node) valuenode = node.namedItem("displaydelay"); m_displaydelay = valuenode.firstChild().nodeValue().toLong(); - valuenode = node.namedItem("errormask"); - m_errormask = valuenode.firstChild().nodeValue().toLong(); - kdDebug(24002) << k_funcinfo << ", m_errormask = " << m_errormask << endl; + valuenode = node.namedItem("errortqmask"); + m_errortqmask = valuenode.firstChild().nodeValue().toLong(); + kdDebug(24002) << k_funcinfo << ", m_errortqmask = " << m_errortqmask << endl; } @@ -866,11 +866,11 @@ void QuantaDebuggerGubed::showConfig(TQDomNode node) set.lineStartSession->setText(m_startsession); set.comboDefaultExecutionState->setCurrentItem((int)m_defaultExecutionState); - set.checkBreakOnNotice->setChecked(QuantaDebuggerGubed::Notice & m_errormask); - set.checkBreakOnWarning->setChecked(QuantaDebuggerGubed::Warning & m_errormask); - set.checkBreakOnUserNotice->setChecked(QuantaDebuggerGubed::User_Notice & m_errormask); - set.checkBreakOnUserWarning->setChecked(QuantaDebuggerGubed::User_Warning & m_errormask); - set.checkBreakOnUserError->setChecked(QuantaDebuggerGubed::User_Error & m_errormask); + set.checkBreakOnNotice->setChecked(QuantaDebuggerGubed::Notice & m_errortqmask); + set.checkBreakOnWarning->setChecked(QuantaDebuggerGubed::Warning & m_errortqmask); + set.checkBreakOnUserNotice->setChecked(QuantaDebuggerGubed::User_Notice & m_errortqmask); + set.checkBreakOnUserWarning->setChecked(QuantaDebuggerGubed::User_Warning & m_errortqmask); + set.checkBreakOnUserError->setChecked(QuantaDebuggerGubed::User_Error & m_errortqmask); if(set.exec() == TQDialog::Accepted ) { @@ -878,7 +878,7 @@ void QuantaDebuggerGubed::showConfig(TQDomNode node) el = node.namedItem("serverhost").toElement(); if (!el.isNull()) - el.parentNode().removeChild(el); + el.tqparentNode().removeChild(el); el = node.ownerDocument().createElement("serverhost"); node.appendChild( el ); m_serverHost = set.lineServerHost->text(); @@ -886,7 +886,7 @@ void QuantaDebuggerGubed::showConfig(TQDomNode node) el = node.namedItem("serverport").toElement(); if (!el.isNull()) - el.parentNode().removeChild(el); + el.tqparentNode().removeChild(el); el = node.ownerDocument().createElement("serverport"); node.appendChild( el ); m_serverPort = set.lineServerPort->text(); @@ -894,7 +894,7 @@ void QuantaDebuggerGubed::showConfig(TQDomNode node) el = node.namedItem("localbasedir").toElement(); if (!el.isNull()) - el.parentNode().removeChild(el); + el.tqparentNode().removeChild(el); el = node.ownerDocument().createElement("localbasedir"); node.appendChild( el ); m_localBasedir = set.lineLocalBasedir->text(); @@ -904,7 +904,7 @@ void QuantaDebuggerGubed::showConfig(TQDomNode node) el = node.namedItem("serverbasedir").toElement(); if (!el.isNull()) - el.parentNode().removeChild(el); + el.tqparentNode().removeChild(el); el = node.ownerDocument().createElement("serverbasedir"); node.appendChild( el ); m_serverBasedir = set.lineServerBasedir->text(); @@ -914,7 +914,7 @@ void QuantaDebuggerGubed::showConfig(TQDomNode node) el = node.namedItem("useproxy").toElement(); if (!el.isNull()) - el.parentNode().removeChild(el); + el.tqparentNode().removeChild(el); el = node.ownerDocument().createElement("useproxy"); node.appendChild( el ); m_useproxy = set.checkUseProxy->isChecked(); @@ -922,7 +922,7 @@ void QuantaDebuggerGubed::showConfig(TQDomNode node) el = node.namedItem("listenport").toElement(); if (!el.isNull()) - el.parentNode().removeChild(el); + el.tqparentNode().removeChild(el); el = node.ownerDocument().createElement("listenport"); node.appendChild( el ); m_listenPort = set.lineServerListenPort->text(); @@ -930,7 +930,7 @@ void QuantaDebuggerGubed::showConfig(TQDomNode node) el = node.namedItem("startsession").toElement(); if (!el.isNull()) - el.parentNode().removeChild(el); + el.tqparentNode().removeChild(el); el = node.ownerDocument().createElement("startsession"); node.appendChild( el ); m_startsession = set.lineStartSession->text(); @@ -938,7 +938,7 @@ void QuantaDebuggerGubed::showConfig(TQDomNode node) el = node.namedItem("defaultexecutionstate").toElement(); if (!el.isNull()) - el.parentNode().removeChild(el); + el.tqparentNode().removeChild(el); el = node.ownerDocument().createElement("defaultexecutionstate"); node.appendChild( el ); m_defaultExecutionState = (State)set.comboDefaultExecutionState->currentItem(); @@ -947,24 +947,24 @@ void QuantaDebuggerGubed::showConfig(TQDomNode node) el = node.namedItem("displaydelay").toElement(); if (!el.isNull()) - el.parentNode().removeChild(el); + el.tqparentNode().removeChild(el); el = node.ownerDocument().createElement("displaydelay"); node.appendChild( el ); m_displaydelay = set.sliderDisplayDelay->value(); el.appendChild( node.ownerDocument().createTextNode(TQString::number(m_displaydelay))); - el = node.namedItem("errormask").toElement(); + el = node.namedItem("errortqmask").toElement(); if (!el.isNull()) - el.parentNode().removeChild(el); - el = node.ownerDocument().createElement("errormask"); + el.tqparentNode().removeChild(el); + el = node.ownerDocument().createElement("errortqmask"); node.appendChild( el ); - m_errormask = (set.checkBreakOnNotice->isChecked() ? QuantaDebuggerGubed::Notice : 0) + m_errortqmask = (set.checkBreakOnNotice->isChecked() ? QuantaDebuggerGubed::Notice : 0) + (set.checkBreakOnWarning->isChecked() ? QuantaDebuggerGubed::Warning : 0) + (set.checkBreakOnUserNotice->isChecked() ? QuantaDebuggerGubed::User_Notice : 0) + (set.checkBreakOnUserWarning->isChecked() ? QuantaDebuggerGubed::User_Warning : 0) + (set.checkBreakOnUserError->isChecked() ? QuantaDebuggerGubed::User_Error : 0); - kdDebug(24002) << k_funcinfo << ", m_errormask = " << m_errormask << endl; - el.appendChild( node.ownerDocument().createTextNode(TQString::number(m_errormask))); + kdDebug(24002) << k_funcinfo << ", m_errortqmask = " << m_errortqmask << endl; + el.appendChild( node.ownerDocument().createTextNode(TQString::number(m_errortqmask))); } } @@ -995,7 +995,7 @@ TQString QuantaDebuggerGubed::phpSerialize(StringMap args) { StringMap::Iterator it; // a:2:{s:4:"name";s:7:"Jessica";s:3:"age";s:2:"26";s:4:"test";i:1;} - TQString ret = TQString("a:%1:{").arg(args.size()); + TQString ret = TQString("a:%1:{").tqarg(args.size()); for( it = args.begin(); it != args.end(); ++it ) { bool isNumber; @@ -1003,15 +1003,15 @@ TQString QuantaDebuggerGubed::phpSerialize(StringMap args) it.data().toInt(&isNumber); if(isNumber && !it.data().isEmpty()) ret += TQString("s:%1:\"%2\";i:%3;") - .arg(it.key().length()) - .arg(it.key()) - .arg(it.data()); + .tqarg(it.key().length()) + .tqarg(it.key()) + .tqarg(it.data()); else ret += TQString("s:%1:\"%2\";s:%3:\"%4\";") - .arg(it.key().length()) - .arg(it.key()) - .arg(it.data().length()) - .arg(it.data()); + .tqarg(it.key().length()) + .tqarg(it.key()) + .tqarg(it.data().length()) + .tqarg(it.data()); } @@ -1038,13 +1038,13 @@ StringMap QuantaDebuggerGubed::parseArgs(const TQString &args) return ca; } - cnt = args.mid(2, args.find("{") - 3).toLong(); - TQString data = args.mid(args.find("{") + 1); + cnt = args.mid(2, args.tqfind("{") - 3).toLong(); + TQString data = args.mid(args.tqfind("{") + 1); TQString tmp, func; while(cnt > 0) { - tmp = data.left(data.find("\"")); + tmp = data.left(data.tqfind("\"")); length = tmp.mid(2, tmp.length() - 3).toLong(); func = data.mid(tmp.length() + 1, length); @@ -1053,8 +1053,8 @@ StringMap QuantaDebuggerGubed::parseArgs(const TQString &args) if(data.left(1) == "i") { // Integer data - tmp = data.mid(data.find(":") + 1); - tmp = tmp.left(tmp.find(";")); + tmp = data.mid(data.tqfind(":") + 1); + tmp = tmp.left(tmp.tqfind(";")); ca[func] = tmp; data = data.mid(tmp.length() + 3); // kdDebug(24002) << k_funcinfo << "**i " << func << ": " << ca[func] << endl; @@ -1062,7 +1062,7 @@ StringMap QuantaDebuggerGubed::parseArgs(const TQString &args) else { // String data - tmp = data.left(data.find("\"")); + tmp = data.left(data.tqfind("\"")); length = tmp.mid(2, tmp.length() - 3).toLong(); ca[func] = data.mid(tmp.length() + 1, length); @@ -1098,8 +1098,8 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) if(type == "s") { // Get length of key - tempstring = str.left(str.find(':')); - str.remove(0, str.find(':') + 1); + tempstring = str.left(str.tqfind(':')); + str.remove(0, str.tqfind(':') + 1); length = tempstring.toUInt(); key = str.left(length + 1); @@ -1108,8 +1108,8 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) } else if(type == "i") { - key = str.left(str.find(';')); - str.remove(0, str.find(';') + 1); + key = str.left(str.tqfind(';')); + str.remove(0, str.tqfind(';') + 1); } @@ -1122,8 +1122,8 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) /* Example: s:4:"$row";i:6; */ - data = str.left(str.find(';')); - str.remove(0, str.find(';') + 1); + data = str.left(str.tqfind(';')); + str.remove(0, str.tqfind(';') + 1); debuggervar = debuggerInterface()->newDebuggerVariable(key, data, DebuggerVariableTypes::Integer); } @@ -1132,9 +1132,9 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) /* Example: s:8:"$boolvar";b:1; */ - data = str.left(str.find(';')); + data = str.left(str.tqfind(';')); data = (data == "0" ? i18n("False"): i18n("True")); - str.remove(0, str.find(';') + 1); + str.remove(0, str.tqfind(';') + 1); debuggervar = debuggerInterface()->newDebuggerVariable(key, data, DebuggerVariableTypes::Boolean); } else if(type == "N") @@ -1151,8 +1151,8 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) */ // Get length of string - tempstring = str.left(str.find(':')); - str.remove(0, str.find(':') + 1); + tempstring = str.left(str.tqfind(':')); + str.remove(0, str.tqfind(':') + 1); length = tempstring.toUInt(); data = str.left(length + 1); @@ -1168,8 +1168,8 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) */ // Get length of array - tempstring = str.left(str.find(':')); - str.remove(0, str.find(':') + 2); + tempstring = str.left(str.tqfind(':')); + str.remove(0, str.tqfind(':') + 2); length = tempstring.toUInt(); TQPtrList vars ; @@ -1193,13 +1193,13 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) */ // Get length of array - tempstring = str.left(str.find(':')); - str.remove(0, str.find(':') + 2); - tempstring = str.mid(str.find(':') + 1); - tempstring = tempstring.left(tempstring.find(':')); + tempstring = str.left(str.tqfind(':')); + str.remove(0, str.tqfind(':') + 2); + tempstring = str.mid(str.tqfind(':') + 1); + tempstring = tempstring.left(tempstring.tqfind(':')); length = tempstring.toUInt(); - str.remove(0, str.find('{') + 1); + str.remove(0, str.tqfind('{') + 1); TQPtrList vars ; while(length > 0) @@ -1220,8 +1220,8 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) /* Example: s:9:"$floatvar";d:12.5600000000000004973799150320701301097869873046875;" */ - data = str.left(str.find(';')); - str.remove(0, str.find(';') + 1); + data = str.left(str.tqfind(';')); + str.remove(0, str.tqfind(';') + 1); debuggervar = debuggerInterface()->newDebuggerVariable(key, data, DebuggerVariableTypes::Float); } diff --git a/quanta/components/debugger/gubed/quantadebuggergubed.h b/quanta/components/debugger/gubed/quantadebuggergubed.h index 624a8ae8..b30bbe5c 100644 --- a/quanta/components/debugger/gubed/quantadebuggergubed.h +++ b/quanta/components/debugger/gubed/quantadebuggergubed.h @@ -31,9 +31,10 @@ typedef TQMap StringMap; class QuantaDebuggerGubed : public DebuggerClient { Q_OBJECT + TQ_OBJECT public: - QuantaDebuggerGubed(TQObject *parent, const char* name, const TQStringList&); + QuantaDebuggerGubed(TQObject *tqparent, const char* name, const TQStringList&); ~QuantaDebuggerGubed(); // Execution states @@ -109,7 +110,7 @@ class QuantaDebuggerGubed : public DebuggerClient TQString m_listenPort; bool m_useproxy; State m_executionState, m_defaultExecutionState; - long m_errormask; + long m_errortqmask; long m_displaydelay; WatchList m_watchlist; @@ -147,7 +148,7 @@ class QuantaDebuggerGubed : public DebuggerClient void slotReadyAccept(); signals: - void updateStatus(DebuggerUI::DebuggerStatus); + void updatetqStatus(DebuggerUI::DebuggertqStatus); }; #endif -- cgit v1.2.1