| 1327 | } |
| 1328 | |
| 1329 | QString 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) |