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

Method projectNameUsed

kdevplatform/shell/project.cpp:300–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298 }
299
300 bool projectNameUsed(const KConfigGroup& projectGroup)
301 {
302 // helper method for open()
303 name = projectGroup.readEntry( "Name", projectFile.lastPathSegment() );
304 progress->projectName = name;
305 if( Core::self()->projectController()->isProjectNameUsed( name ) )
306 {
307 const QString messageText =
308 i18n("Could not load %1, a project with the same name '%2' is already open.", projectFile.pathOrUrl(), name);
309 auto* message = new Sublime::Message(messageText, Sublime::Message::Error);
310 ICore::self()->uiController()->postMessage(message);
311
312 qCWarning(SHELL) << "Trying to open a project with a name that is already used by another open project";
313 return true;
314 }
315 return false;
316 }
317
318 IProjectFileManager* fetchFileManager(const KConfigGroup& projectGroup)
319 {

Callers 1

openMethod · 0.80

Calls 7

readEntryMethod · 0.80
lastPathSegmentMethod · 0.80
isProjectNameUsedMethod · 0.80
projectControllerMethod · 0.80
pathOrUrlMethod · 0.80
uiControllerMethod · 0.80
postMessageMethod · 0.45

Tested by

no test coverage detected