forked from qt-creator/qt-creator
VcsBase: Remove check for existence of ProjectExplorer
The plugin depends on the ProjectExplorer to be there, so there is no need to explicitly check for it. Change-Id: I151eb6f4613e3f55cb2376f73b44ada82b320972 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -160,12 +160,6 @@ static QFileInfoList findProjectFiles(const QDir &projectDir, QString *errorMess
|
||||
|
||||
QString BaseCheckoutWizard::openProject(const QString &path, QString *errorMessage)
|
||||
{
|
||||
ProjectExplorer::ProjectExplorerPlugin *pe = ProjectExplorer::ProjectExplorerPlugin::instance();
|
||||
if (!pe) {
|
||||
*errorMessage = tr("The Project Explorer is not available.");
|
||||
return QString();
|
||||
}
|
||||
|
||||
// Search the directory for project files
|
||||
const QDir dir(path);
|
||||
if (!dir.exists()) {
|
||||
@@ -178,7 +172,7 @@ QString BaseCheckoutWizard::openProject(const QString &path, QString *errorMessa
|
||||
return QString();
|
||||
// Open. Do not use a busy cursor here as additional wizards might pop up
|
||||
const QString projectFile = projectFiles.front().absoluteFilePath();
|
||||
if (!pe->openProject(projectFile, errorMessage))
|
||||
if (!ProjectExplorer::ProjectExplorerPlugin::instance()->openProject(projectFile, errorMessage))
|
||||
return QString();
|
||||
|
||||
return projectFile;
|
||||
|
||||
Reference in New Issue
Block a user