summaryrefslogtreecommitdiffstats
path: root/languages/cpp/debugger/gdbcontroller.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /languages/cpp/debugger/gdbcontroller.cpp
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/debugger/gdbcontroller.cpp')
-rw-r--r--languages/cpp/debugger/gdbcontroller.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/languages/cpp/debugger/gdbcontroller.cpp b/languages/cpp/debugger/gdbcontroller.cpp
index 3fd912ec..93424396 100644
--- a/languages/cpp/debugger/gdbcontroller.cpp
+++ b/languages/cpp/debugger/gdbcontroller.cpp
@@ -179,7 +179,7 @@ void GDBController::configure()
config_runShellScript_ = DomUtil::readEntry(dom, "/kdevdebugger/general/runShellScript").latin1();
config_runGdbScript_ = DomUtil::readEntry(dom, "/kdevdebugger/general/runGdbScript").latin1();
-// add macros for reading QStrings? or in configGdbScript?
+// add macros for reading TQStrings? or in configGdbScript?
config_forceBPSet_ = DomUtil::readBoolEntry(dom, "/kdevdebugger/general/allowforcedbpset", true);
config_dbgTerminal_ = DomUtil::readBoolEntry(dom, "/kdevdebugger/general/separatetty", false);
config_gdbPath_ = DomUtil::readEntry(dom, "/kdevdebugger/general/gdbpath");
@@ -294,7 +294,7 @@ void GDBController::queueCmd(GDBCommand *cmd, enum queue_where queue_where)
KMessageBox::information(
0,
i18n("<b>Gdb command sent when debugger is not running</b><br>"
- "The command was:<br> %1").arg(cmd->initialString()),
+ "The command was:<br> %1").tqarg(cmd->initialString()),
i18n("Internal error"), "gdb_error");
return;
}
@@ -316,11 +316,11 @@ void GDBController::queueCmd(GDBCommand *cmd, enum queue_where queue_where)
cmdList_.insert(i, cmd);
}
- kdDebug(9012) << "QUEUE: " << cmd->initialString()
+ kdDebug(9012) << "TQUEUE: " << cmd->initialString()
<< (stateReloadInProgress_ ? " (state reloading)\n" : "\n");
setStateOn(s_dbgBusy);
- emit dbgStatus("", state_);
+ emit dbgtqStatus("", state_);
raiseEvent(debugger_busy);
executeCmd();
@@ -401,7 +401,7 @@ void GDBController::executeCmd()
setStateOn(s_waitForWrite);
TQString prettyCmd = currentCmd_->cmdToSend();
- prettyCmd.replace( TQRegExp("set prompt \032.\n"), "" );
+ prettyCmd.tqreplace( TQRegExp("set prompt \032.\n"), "" );
prettyCmd = "(gdb) " + prettyCmd;
if (currentCmd_->isUserCommand())
@@ -409,7 +409,7 @@ void GDBController::executeCmd()
else
emit gdbInternalCommandStdout( prettyCmd.latin1() );
- emit dbgStatus ("", state_);
+ emit dbgtqStatus ("", state_);
}
// **************************************************************************
@@ -500,7 +500,7 @@ void GDBController::actOnProgramPauseMI(const GDBMI::ResultRecord& r)
if (reason == "exited-signalled")
{
programNoApp(i18n("Exited on signal %1")
- .arg(r["signal-name"].literal()), false);
+ .tqarg(r["signal-name"].literal()), false);
// FIXME: figure out why this variable is needed.
programHasExited_ = true;
state_reload_needed = false;
@@ -540,7 +540,7 @@ void GDBController::actOnProgramPauseMI(const GDBMI::ResultRecord& r)
// or whatever).
setStateOff(s_explicitBreakInto);
- emit dbgStatus("Application interrupted", state_);
+ emit dbgtqStatus("Application interrupted", state_);
// Will show the source line in the code
// handling non-special stop kinds, below.
}
@@ -554,7 +554,7 @@ void GDBController::actOnProgramPauseMI(const GDBMI::ResultRecord& r)
// that'll end the program.
KMessageBox::information(0,
i18n("Program received signal %1 (%2)")
- .arg(name).arg(user_name),
+ .tqarg(name).tqarg(user_name),
i18n("Received signal"));
}
}
@@ -592,7 +592,7 @@ void GDBController::reloadProgramState()
maybeAnnounceWatchpointHit();
}
- emit dbgStatus ("", state_);
+ emit dbgtqStatus ("", state_);
// We're always at frame zero when the program stops
// and we must reset the active flag
@@ -635,7 +635,7 @@ void GDBController::programNoApp(const TQString &msg, bool msgBox)
if (tty_)
tty_->readRemaining();
- // Tty is no longer usable, delete it. Without this, QSocketNotifier
+ // Tty is no longer usable, delete it. Without this, TQSocketNotifier
// will continiously bomd STTY with signals, so we need to either disable
// TQSocketNotifier, or delete STTY. The latter is simpler, since we can't
// reuse it for future debug sessions anyway.
@@ -648,7 +648,7 @@ void GDBController::programNoApp(const TQString &msg, bool msgBox)
if (msgBox)
KMessageBox::information(0, i18n("gdb message:\n")+msg,"Warning", "gdb_error");
- emit dbgStatus (msg, state_);
+ emit dbgtqStatus (msg, state_);
/* Also show message in gdb window, so that users who
prefer to look at gdb window know what's up. */
emit gdbUserCommandStdout(msg.ascii());
@@ -716,9 +716,9 @@ void GDBController::handleMiFileListExecSourceFile(const GDBMI::ResultRecord& r)
"Command was: %1\n"
"Response is: %2\n"
"Invalid response kind: \"%3\"")
- .arg(currentCmd_->rawDbgCommand())
- .arg(buf)
- .arg(r.reason),
+ .tqarg(currentCmd_->rawDbgCommand())
+ .tqarg(buf)
+ .tqarg(r.reason),
i18n("Invalid gdb reply"), "gdb_error");
#endif
}
@@ -755,7 +755,7 @@ void GDBController::maybeAnnounceWatchpointHit()
}
else if (last_stop_reason == "read-watchpoint-trigger")
{
- emit dbgStatus ("Read watchpoint triggered", state_);
+ emit dbgtqStatus ("Read watchpoint triggered", state_);
}
}
}
@@ -846,14 +846,14 @@ bool GDBController::start(const TQString& shell, const DomUtil::PairList& run_en
i18n("<b>Could not start debugger.</b>"
"<p>Could not run '%1'. "
"Make sure that the path name is specified correctly."
- ).arg(dbgProcess_->args()[0]),
+ ).tqarg(dbgProcess_->args()[0].data()),
i18n("Could not start debugger"), "gdb_error");
return false;
}
setStateOff(s_dbgNotStarted);
- emit dbgStatus ("", state_);
+ emit dbgtqStatus ("", state_);
saw_gdb_prompt_ = false;
@@ -1043,7 +1043,7 @@ void GDBController::slotStopDebugger()
gdbOutput_ = "";
setState(s_dbgNotStarted | s_appNotStarted);
- emit dbgStatus (i18n("Debugger stopped"), state_);
+ emit dbgtqStatus (i18n("Debugger stopped"), state_);
raiseEvent(debugger_exited);
}
@@ -1159,7 +1159,7 @@ void GDBController::slotRun()
" %1\n"
"<br>does not exist. Check that you have specified "
"the right application in the debugger configuration."
- ).arg(app.fileName()),
+ ).tqarg(app.fileName()),
i18n("Application does not exist"));
// FIXME: after this, KDevelop will still show that debugger
@@ -1176,7 +1176,7 @@ void GDBController::slotRun()
"<p>The application does not have the executable bit set. "
"Try rebuilding the project, or change permissions "
"manually."
- ).arg(app.fileName()),
+ ).tqarg(app.fileName()),
i18n("Could not run application"));
slotStopDebugger();
}
@@ -1324,11 +1324,11 @@ void GDBController::selectFrame(int frameNo, int threadNo)
{
if (viewedThread_ != threadNo)
queueCmd(new GDBCommand(
- TQString("-thread-select %1").arg(threadNo).ascii()));
+ TQString("-thread-select %1").tqarg(threadNo).ascii()));
}
queueCmd(new GDBCommand(
- TQString("-stack-select-frame %1").arg(frameNo).ascii()));
+ TQString("-stack-select-frame %1").tqarg(frameNo).ascii()));
// Will emit the 'thread_or_frame_changed' event.
queueCmd(new GDBCommand("-stack-info-frame",
@@ -1349,10 +1349,10 @@ void GDBController::defaultErrorHandler(const GDBMI::ResultRecord& result)
{
TQString msg = result["msg"].literal();
- if (msg.contains("No such process"))
+ if (msg.tqcontains("No such process"))
{
setState(s_appNotStarted|s_programExited);
- emit dbgStatus (i18n("Process exited"), state_);
+ emit dbgtqStatus (i18n("Process exited"), state_);
raiseEvent(program_exited);
return;
}
@@ -1433,7 +1433,7 @@ void GDBController::slotDbgStdout(KProcess *, char *buf, int buflen)
// Already parsing? then get out quick.
// VP, 2006-01-30. I'm not sure how this could happen, since
- // parsing of gdb reply should not ever execute Qt message loop. Except,
+ // parsing of gdb reply should not ever execute TQt message loop. Except,
// maybe, when we pop up a message box. But even in that case,
// it's likely we won't return to slotDbgStdout again.
if (parsing)
@@ -1447,7 +1447,7 @@ void GDBController::slotDbgStdout(KProcess *, char *buf, int buflen)
int i;
bool got_any_command = false;
// For each gdb reply. In MI mode, each reply is one string.
- while((i = holdingZone_.find('\n')) != -1)
+ while((i = holdingZone_.tqfind('\n')) != -1)
{
got_any_command = true;
@@ -1590,7 +1590,7 @@ void GDBController::slotDbgStdout(KProcess *, char *buf, int buflen)
"<p>The debugger component encountered an internal error while "
"processing a reply from gdb. Please submit a bug report."),
i18n("The exception is: %1\n"
- "The MI response is: %2").arg(e.what()).arg(reply),
+ "The MI response is: %2").tqarg(e.what()).tqarg(reply.data()),
i18n("Internal debugger error"));
destroyCurrentCommand();
@@ -1629,7 +1629,7 @@ void GDBController::commandDone()
{
kdDebug(9012) << "No more commands\n";
setStateOff(s_dbgBusy);
- emit dbgStatus("", state_);
+ emit dbgtqStatus("", state_);
raiseEvent(debugger_ready);
}
}
@@ -1650,7 +1650,7 @@ void GDBController::removeStateReloadingCommands()
GDBCommand* cmd = cmdList_.at(i);
if (stateReloadingCommands_.count(cmd))
{
- kdDebug(9012) << "UNQUEUE: " << cmd->initialString() << "\n";
+ kdDebug(9012) << "UNTQUEUE: " << cmd->initialString() << "\n";
delete cmdList_.take(i);
}
}
@@ -1688,7 +1688,7 @@ void GDBController::raiseEvent(event_t e)
void GDBController::slotDbgStderr(KProcess *proc, char *buf, int buflen)
{
// At the moment, just drop a message out and redirect
- kdDebug(9012) << "STDERR: " << TQString::fromLatin1(buf, buflen+1) << endl;
+ kdDebug(9012) << "STDERR: " << TQString::tqfromLatin1(buf, buflen+1) << endl;
slotDbgStdout(proc, buf, buflen);
}
@@ -1722,7 +1722,7 @@ void GDBController::slotDbgProcessExited(KProcess* process)
destroyCmds();
setState(s_dbgNotStarted|s_appNotStarted|s_programExited);
- emit dbgStatus (i18n("Process exited"), state_);
+ emit dbgtqStatus (i18n("Process exited"), state_);
emit gdbUserCommandStdout("(gdb) Process exited\n");
}
@@ -1743,14 +1743,14 @@ void GDBController::slotUserGDBCmd(const TQString& cmd)
// raiseEvent(program_state_changed);
}
-void GDBController::explainDebuggerStatus()
+void GDBController::explainDebuggertqStatus()
{
TQString information("%1 commands in queue\n"
"%2 commands being processed by gdb\n"
"Debugger state: %3\n");
information =
- information.arg(cmdList_.count()).arg(currentCmd_ ? 1 : 0)
- .arg(state_);
+ information.tqarg(cmdList_.count()).tqarg(currentCmd_ ? 1 : 0)
+ .tqarg(state_);
if (currentCmd_)
{
@@ -1758,8 +1758,8 @@ void GDBController::explainDebuggerStatus()
"Current command text: '%2'\n"
"Current command origianl text: '%3'\n");
- extra = extra.arg(
- typeid(*currentCmd_).name()).arg(currentCmd_->cmdToSend()).
+ extra = extra.tqarg(
+ typeid(*currentCmd_).name()).tqarg(currentCmd_->cmdToSend()).
arg(currentCmd_->initialString());
information += extra;
}