| 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 | { |
no test coverage detected