debugger: refactoring, use QByteArray instead of QString when appropriate

This commit is contained in:
hjk
2010-01-05 16:51:55 +01:00
parent 84e2e8933d
commit e3712f9687
22 changed files with 497 additions and 470 deletions

View File

@@ -97,8 +97,9 @@ void CoreGdbAdapter::loadExeAndSyms()
{
// Do that first, otherwise no symbols are loaded.
QFileInfo fi(m_executable);
m_engine->postCommand(_("-file-exec-and-symbols \"%1\"")
.arg(fi.absoluteFilePath()), CB(handleFileExecAndSymbols));
QByteArray path = fi.absoluteFilePath().toLocal8Bit();
m_engine->postCommand("-file-exec-and-symbols \"" + path + '"',
CB(handleFileExecAndSymbols));
}
void CoreGdbAdapter::handleFileExecAndSymbols(const GdbResponse &response)
@@ -118,8 +119,8 @@ void CoreGdbAdapter::loadCoreFile()
{
// Quoting core name below fails in gdb 6.8-debian.
QFileInfo fi(startParameters().coreFile);
QString coreName = fi.absoluteFilePath();
m_engine->postCommand(_("target core ") + coreName, CB(handleTargetCore));
QByteArray coreName = fi.absoluteFilePath().toLocal8Bit();
m_engine->postCommand("target core " + coreName, CB(handleTargetCore));
}
void CoreGdbAdapter::handleTargetCore(const GdbResponse &response)
@@ -144,7 +145,7 @@ void CoreGdbAdapter::handleTargetCore(const GdbResponse &response)
if (QFile::exists(m_executable)) {
// Finish extra round ...
showStatusMessage(tr("Attached to core temporarily."));
m_engine->postCommand(_("detach"));
m_engine->postCommand("detach");
// ... and retry.
loadExeAndSyms();
return;