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

Method actionTextFor

plugins/contextbrowser/contextbrowser.cpp:1329–1341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1327}
1328
1329QString ContextBrowserPlugin::actionTextFor(int historyIndex) const
1330{
1331 const HistoryEntry& entry = m_history.at(historyIndex);
1332 QString actionText = entry.context.data() ? entry.context.data()->scopeIdentifier(true).toString() : QString();
1333 if (actionText.isEmpty())
1334 actionText = entry.alternativeString;
1335 if (actionText.isEmpty())
1336 actionText = QStringLiteral("<unnamed>");
1337 actionText += QLatin1String(" @ ");
1338 QString fileName = entry.absoluteCursorPosition.document.toUrl().fileName();
1339 actionText += QStringLiteral("%1:%2").arg(fileName).arg(entry.absoluteCursorPosition.line() + 1);
1340 return actionText;
1341}
1342
1343/*
1344 inline QDebug operator<<(QDebug debug, const ContextBrowserPlugin::HistoryEntry &he)

Callers

nothing calls this directly

Calls 9

scopeIdentifierMethod · 0.80
QStringClass · 0.50
atMethod · 0.45
dataMethod · 0.45
toStringMethod · 0.45
isEmptyMethod · 0.45
fileNameMethod · 0.45
toUrlMethod · 0.45
lineMethod · 0.45

Tested by

no test coverage detected