Commit 9fa3ba5c authored by Daniel Teske's avatar Daniel Teske
Browse files

Show a message box if opening a project fails via File/Open



Task-number: QTCREATORBUG-7447

Change-Id: I421d93ccd9e12de854bd5a0ab35158b450863fec
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 62a22e0a
......@@ -44,6 +44,8 @@
#include <coreplugin/messagemanager.h>
#include <QDebug>
#include <QMessageBox>
#include <QMainWindow>
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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment