Refactoring. Move post generation file open to base class.

This commit is contained in:
Alessandro Portale
2011-02-10 22:44:01 +01:00
parent f07aec6082
commit a89bac3c3c
8 changed files with 49 additions and 45 deletions

View File

@@ -40,11 +40,6 @@
#include "qt4projectmanagerconstants.h"
#include <projectexplorer/baseprojectwizarddialog.h>
#include <projectexplorer/customwizard/customwizard.h>
#include <projectexplorer/projectexplorer.h>
#include <coreplugin/editormanager/editormanager.h>
#include <QtCore/QCoreApplication>
#include <QtGui/QIcon>
@@ -152,16 +147,9 @@ void QtQuickAppWizard::prepareGenerateFiles(const QWizard *w,
}
}
bool QtQuickAppWizard::postGenerateFilesInternal(const Core::GeneratedFiles &l,
QString *errorMessage)
QString QtQuickAppWizard::fileToOpenPostGeneration() const
{
const bool success = ProjectExplorer::CustomProjectWizard::postGenerateOpen(l, errorMessage);
const QString mainQmlFile = m_d->app->path(QtQuickApp::MainQml);
if (success && !mainQmlFile.isEmpty()) {
ProjectExplorer::ProjectExplorerPlugin::instance()->setCurrentFile(0, mainQmlFile);
Core::EditorManager::instance()->openEditor(mainQmlFile, QString(), Core::EditorManager::ModeSwitch);
}
return success;
return m_d->app->path(QtQuickApp::MainQml);
}
AbstractMobileApp *QtQuickAppWizard::app() const