| 1192 | } |
| 1193 | |
| 1194 | QString ProjectController::prettyFileName(const QUrl& url, FormattingOptions format) const |
| 1195 | { |
| 1196 | IProject* project = Core::self()->projectController()->findProjectForUrl(url); |
| 1197 | if(project && project->path() == Path(url)) |
| 1198 | { |
| 1199 | if (format == FormatHtml) { |
| 1200 | return QLatin1String("<i>") + project->name() + QLatin1String("</i>"); |
| 1201 | } else { |
| 1202 | return project->name(); |
| 1203 | } |
| 1204 | } |
| 1205 | |
| 1206 | QString prefixText = prettyFilePath( url, format ); |
| 1207 | if (format == FormatHtml) { |
| 1208 | return prefixText + QLatin1String("<b>") + url.fileName() + QLatin1String("</b>"); |
| 1209 | } else { |
| 1210 | return prefixText + url.fileName(); |
| 1211 | } |
| 1212 | } |
| 1213 | |
| 1214 | ContextMenuExtension ProjectController::contextMenuExtension(Context* ctx, QWidget* parent) |
| 1215 | { |
no test coverage detected