diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 0f95462d54217e1af8ba52f13ad4ac73142a8fe8..8200a58b30d10b7b0ade82d7e68150e611675f40 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -1385,8 +1385,10 @@ QList<Project *> ProjectExplorerPlugin::openProjects(const QStringList &fileName } if (const MimeType mt = MimeDatabase::findByFile(QFileInfo(fileName))) { + bool foundProjectManager = false; foreach (IProjectManager *manager, projectManagers) { if (manager->mimeType() == mt.type()) { + foundProjectManager = true; QString tmp; if (Project *pro = manager->openProject(filePath, &tmp)) { if (pro->restoreSettings()) { @@ -1397,6 +1399,8 @@ QList<Project *> ProjectExplorerPlugin::openProjects(const QStringList &fileName setCurrentNode(pro->rootProjectNode()); openedPro += pro; } else { + appendError(errorString, tr("Failed opening project '%1': Settings could not be restored") + .arg(QDir::toNativeSeparators(fileName))); delete pro; } } @@ -1405,6 +1409,14 @@ QList<Project *> ProjectExplorerPlugin::openProjects(const QStringList &fileName break; } } + if (!foundProjectManager) { + appendError(errorString, tr("Failed opening project '%1': No plugin can open project type '%2'.") + .arg(QDir::toNativeSeparators(fileName)) + .arg((mt.type()))); + } + } else { + appendError(errorString, tr("Failed opening project '%1': Unknown project type.") + .arg(QDir::toNativeSeparators(fileName))); } SessionManager::reportProjectLoadingProgress(); }