From fa7d2457c194eec059cbd3033a7213fd2b8245b7 Mon Sep 17 00:00:00 2001 From: Radovan Zivkovic Date: Sun, 30 Mar 2014 21:02:50 +0200 Subject: Show error message when project cannot be opened. Change-Id: I72c701c0a6d4a40f17998d46e21e9dc117cf064e Reviewed-by: Tobias Hunger Reviewed-by: Leena Miettinen --- src/plugins/vcprojectmanager/vcprojectmanager.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/plugins/vcprojectmanager/vcprojectmanager.cpp b/src/plugins/vcprojectmanager/vcprojectmanager.cpp index e115c6ab40..6fe0353adf 100644 --- a/src/plugins/vcprojectmanager/vcprojectmanager.cpp +++ b/src/plugins/vcprojectmanager/vcprojectmanager.cpp @@ -68,10 +68,15 @@ ProjectExplorer::Project *VcManager::openProject(const QString &fileName, QStrin // versions supported are 2003, 2005 and 2008 VcDocConstants::DocumentVersion docVersion = Utils::getProjectVersion(canonicalFilePath); - if (docVersion != VcDocConstants::DV_UNRECOGNIZED) + if (docVersion != VcDocConstants::DV_UNRECOGNIZED) { + if (errorString) + errorString->clear(); return new VcProject(this, canonicalFilePath, docVersion); + } + + if (errorString) + *errorString = tr("Could not open project %1").arg(fileName); - qDebug() << "VcManager::openProject: Unrecognized file version"; return 0; } -- cgit v1.2.3