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

Method prettyFileName

kdevplatform/shell/projectcontroller.cpp:1194–1212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1192}
1193
1194QString 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
1214ContextMenuExtension ProjectController::contextMenuExtension(Context* ctx, QWidget* parent)
1215{

Callers 15

dataMethod · 0.45
displayUrlFunction · 0.45
updateCaptionMethod · 0.45
TopContextUsesWidgetMethod · 0.45
updateReadyMethod · 0.45
finishReviewMethod · 0.45
updateStateMethod · 0.45
prettyPathNameFunction · 0.45
resetMethod · 0.45
updateStateMethod · 0.45
htmlDescriptionMethod · 0.45
prettyPathNameFunction · 0.45

Calls 6

findProjectForUrlMethod · 0.80
projectControllerMethod · 0.80
PathClass · 0.70
pathMethod · 0.45
nameMethod · 0.45
fileNameMethod · 0.45

Tested by

no test coverage detected