MCPcopy Create free account
hub / github.com/KDE/kdevelop / waitForPrompt

Function waitForPrompt

plugins/gdb/unittests/test_gdbprinters.cpp:72–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70 waitForFinished();
71 }
72 QByteArray waitForPrompt()
73 {
74 QByteArray output;
75 while (!output.endsWith("(gdb) ")) {
76 Q_ASSERT(state() == QProcess::Running);
77 waitForReadyRead();
78 QByteArray l = readAll();
79 //qDebug() << l;
80 output.append(l);
81 }
82 output.chop(7); //remove (gdb) prompt
83 if (output.contains("Traceback") || output.contains("Exception")) {
84 qDebug() << output;
85 QTest::qFail("Unexpected Python Exception", __FILE__, __LINE__);
86 }
87 return output;
88 }
89
90 QByteArray execute(const QByteArray &cmd)
91 {

Callers 2

executeFunction · 0.85

Calls 3

endsWithMethod · 0.80
appendMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected