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

Function getSource

plugins/debuggercommon/miframestackmodel.cpp:30–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30QPair<QString, int> getSource(const Value &frame)
31{
32 QPair<QString, int> ret(QString(), -1);
33 if (frame.hasField(QStringLiteral("fullname")))
34 ret=qMakePair(frame[QStringLiteral("fullname")].literal(), frame[QStringLiteral("line")].toInt()-1);
35 else if (frame.hasField(QStringLiteral("file")))
36 ret=qMakePair(frame[QStringLiteral("file")].literal(), frame[QStringLiteral("line")].toInt()-1);
37 else if (frame.hasField(QStringLiteral("from")))
38 ret.first=frame[QStringLiteral("from")].literal();
39
40 return ret;
41}
42
43MIFrameStackModel::MIFrameStackModel(MIDebugSession * session)
44 : FrameStackModel(session)

Callers 1

handleMethod · 0.85

Calls 4

hasFieldMethod · 0.80
literalMethod · 0.80
toIntMethod · 0.80
QStringClass · 0.50

Tested by

no test coverage detected