diff --git a/src/plugins/projectexplorer/pluginfilefactory.cpp b/src/plugins/projectexplorer/pluginfilefactory.cpp index ed72de44a8b..c1555dfe03c 100644 --- a/src/plugins/projectexplorer/pluginfilefactory.cpp +++ b/src/plugins/projectexplorer/pluginfilefactory.cpp @@ -44,6 +44,8 @@ #include #include +#include +#include using namespace ProjectExplorer; using namespace ProjectExplorer::Internal; @@ -78,7 +80,10 @@ QString ProjectFileFactory::displayName() const Core::IDocument *ProjectFileFactory::open(const QString &fileName) { ProjectExplorerPlugin *pe = ProjectExplorerPlugin::instance(); - pe->openProject(fileName, 0); + QString errorMessage; + pe->openProject(fileName, &errorMessage); + if (!errorMessage.isEmpty()) + QMessageBox::critical(Core::ICore::mainWindow(), tr("Failed to open project"), errorMessage); return 0; }