forked from qt-creator/qt-creator
Show error message when project cannot be opened.
Change-Id: I72c701c0a6d4a40f17998d46e21e9dc117cf064e Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
This commit is contained in:
@@ -68,10 +68,15 @@ ProjectExplorer::Project *VcManager::openProject(const QString &fileName, QStrin
|
|||||||
// versions supported are 2003, 2005 and 2008
|
// versions supported are 2003, 2005 and 2008
|
||||||
VcDocConstants::DocumentVersion docVersion = Utils::getProjectVersion(canonicalFilePath);
|
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);
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user