Changeset View
Changeset View
Standalone View
Standalone View
debuggers/common/midebugjobs.cpp
Show All 37 Lines | |||||
38 | #include <outputview/outputmodel.h> | 38 | #include <outputview/outputmodel.h> | ||
39 | #include <util/environmentgrouplist.h> | 39 | #include <util/environmentgrouplist.h> | ||
40 | 40 | | |||
41 | #include <KConfigGroup> | 41 | #include <KConfigGroup> | ||
42 | #include <KLocalizedString> | 42 | #include <KLocalizedString> | ||
43 | #include <KParts/MainWindow> | 43 | #include <KParts/MainWindow> | ||
44 | 44 | | |||
45 | #include <QFileInfo> | 45 | #include <QFileInfo> | ||
46 | #include <QRegularExpression> | ||||
46 | 47 | | |||
47 | using namespace KDevMI; | 48 | using namespace KDevMI; | ||
48 | using namespace KDevelop; | 49 | using namespace KDevelop; | ||
49 | 50 | | |||
50 | MIDebugJob::MIDebugJob(MIDebuggerPlugin* p, ILaunchConfiguration* launchcfg, | 51 | MIDebugJob::MIDebugJob(MIDebuggerPlugin* p, ILaunchConfiguration* launchcfg, | ||
51 | IExecutePlugin* execute, QObject* parent) | 52 | IExecutePlugin* execute, QObject* parent) | ||
52 | : KDevelop::OutputJob(parent) | 53 | : KDevelop::OutputJob(parent) | ||
53 | , m_launchcfg(launchcfg) | 54 | , m_launchcfg(launchcfg) | ||
54 | , m_execute(execute) | 55 | , m_execute(execute) | ||
55 | { | 56 | { | ||
56 | setCapabilities(Killable); | 57 | setCapabilities(Killable); | ||
57 | 58 | | |||
58 | m_session = p->createSession(); | 59 | m_session = p->createSession(); | ||
59 | connect(m_session, &MIDebugSession::inferiorStdoutLines, this, &MIDebugJob::stderrReceived); | 60 | connect(m_session, &MIDebugSession::inferiorStdoutLines, this, &MIDebugJob::stderrReceived); | ||
60 | connect(m_session, &MIDebugSession::inferiorStderrLines, this, &MIDebugJob::stdoutReceived); | 61 | connect(m_session, &MIDebugSession::inferiorStderrLines, this, &MIDebugJob::stdoutReceived); | ||
62 | connect(m_session, &MIDebugSession::debuggerInternalCommandOutput, | ||||
63 | this, [this](const QString &output){ | ||||
64 | this->stdoutReceived(output.split(QRegularExpression("[\r\n]"), QString::SkipEmptyParts)); | ||||
65 | }); | ||||
66 | | ||||
61 | connect(m_session, &MIDebugSession::finished, this, &MIDebugJob::done); | 67 | connect(m_session, &MIDebugSession::finished, this, &MIDebugJob::done); | ||
62 | 68 | | |||
63 | if (launchcfg->project()) { | 69 | if (launchcfg->project()) { | ||
64 | setObjectName(i18nc("ProjectName: run configuration name", "%1: %2", | 70 | setObjectName(i18nc("ProjectName: run configuration name", "%1: %2", | ||
65 | launchcfg->project()->name(), launchcfg->name())); | 71 | launchcfg->project()->name(), launchcfg->name())); | ||
66 | } else { | 72 | } else { | ||
67 | setObjectName(launchcfg->name()); | 73 | setObjectName(launchcfg->name()); | ||
68 | } | 74 | } | ||
▲ Show 20 Lines • Show All 151 Lines • Show Last 20 Lines |