| 28 | |
| 29 | namespace { |
| 30 | QString sourceLocationLabel(ContextMenuExtension::Location location, |
| 31 | const SourceLocation &sourceLocation) |
| 32 | { |
| 33 | switch (location) { |
| 34 | case ContextMenuExtension::GoTo: |
| 35 | return qApp->translate("GammaRay::ContextMenuExtension", |
| 36 | "Go to: %1") |
| 37 | .arg(sourceLocation.displayString()); |
| 38 | case ContextMenuExtension::ShowSource: |
| 39 | return qApp->translate("GammaRay::ContextMenuExtension", |
| 40 | "Show source: %1") |
| 41 | .arg(sourceLocation.displayString()); |
| 42 | case ContextMenuExtension::Creation: |
| 43 | return qApp->translate("GammaRay::ContextMenuExtension", |
| 44 | "Go to creation: %1") |
| 45 | .arg(sourceLocation.displayString()); |
| 46 | case ContextMenuExtension::Declaration: |
| 47 | return qApp->translate("GammaRay::ContextMenuExtension", |
| 48 | "Go to declaration: %1") |
| 49 | .arg(sourceLocation.displayString()); |
| 50 | } |
| 51 | Q_ASSERT(false); |
| 52 | return QString(); |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | ContextMenuExtension::ContextMenuExtension(const ObjectId &id) |
no test coverage detected