Debugger: Enable mouse input/output navigation in LLDB log window

Change-Id: Idee41c6c2769397d6eee3ab74de4afbb94111e25
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
hjk
2013-06-20 09:31:15 +02:00
parent c3649f53bf
commit d42544e037
2 changed files with 11 additions and 5 deletions

View File

@@ -826,7 +826,8 @@ void LldbEngine::readLldbStandardError()
void LldbEngine::readLldbStandardOutput()
{
QByteArray out = m_lldbProc.readAllStandardOutput();
showMessage(_("Lldb stdout: " + out));
//showMessage(_("Lldb stdout: " + out));
showMessage(_(out), LogDebug);
m_inbuffer.append(out);
while (true) {
int pos = m_inbuffer.indexOf("@\n");

View File

@@ -306,13 +306,18 @@ public slots:
{
QString needle = QString::number(i) + QLatin1Char('^');
QString needle2 = QLatin1Char('>') + needle;
QString needle3 = QString::fromLatin1("dtoken(\"%1\")@").arg(i);
QTextCursor cursor(document());
do {
cursor = document()->find(needle, cursor);
if (cursor.isNull())
break; // Not found.
QTextCursor newCursor = document()->find(needle, cursor);
if (newCursor.isNull()) {
newCursor = document()->find(needle3, cursor);
if (newCursor.isNull())
break; // Not found.
}
cursor = newCursor;
const QString line = cursor.block().text();
if (line.startsWith(needle) || line.startsWith(needle2)) {
if (line.startsWith(needle) || line.startsWith(needle2) || line.startsWith(needle3)) {
setFocus();
setTextCursor(cursor);
ensureCursorVisible();