Remove dependency of welcome plugin to project explorer.

The project explorer calls from welcome plugin were only used by the
project explorer provided welcome page anyhow.

Change-Id: I9fc0c6a2013c5b822a42efd13a9aa779e9d6f1a4
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Eike Ziller
2013-03-25 11:24:00 +01:00
parent ac11a9dce4
commit 9b688d0ac7
6 changed files with 21 additions and 18 deletions

View File

@@ -145,7 +145,7 @@ Rectangle {
x: 51
y: 45
text: qsTr("Open Project")
onClicked: welcomeMode.openProject();
onClicked: projectWelcomePage.openProject();
}
LinkedText {
@@ -153,7 +153,7 @@ Rectangle {
x: 51
y: 13
text: qsTr("Create Project")
onClicked: welcomeMode.newProject();
onClicked: projectWelcomePage.newProject();
}
Image {

View File

@@ -94,7 +94,6 @@ plugin_updateinfo.depends = plugin_coreplugin
plugin_welcome.subdir = welcome
plugin_welcome.depends = plugin_coreplugin
plugin_welcome.depends += plugin_projectexplorer
plugin_find.subdir = find
plugin_find.depends += plugin_coreplugin

View File

@@ -38,6 +38,8 @@
#include <QFileInfo>
#include <QDir>
#include <coreplugin/icore.h>
#include <coreplugin/dialogs/iwizard.h>
#include <projectexplorer/session.h>
#include <projectexplorer/projectexplorer.h>
#include <sessiondialog.h>
@@ -245,5 +247,16 @@ void ProjectWelcomePage::reloadWelcomeScreenData()
m_projectModel->resetProjects();
}
void ProjectWelcomePage::newProject()
{
Core::ICore::showNewItemDialog(tr("New Project"),
Core::IWizard::wizardsOfKind(Core::IWizard::ProjectWizard));
}
void ProjectWelcomePage::openProject()
{
ProjectExplorerPlugin::instance()->openOpenProjectDialog();
}
} // namespace Internal
} // namespace ProjectExplorer

View File

@@ -102,10 +102,15 @@ public:
void reloadWelcomeScreenData();
public slots:
void newProject();
void openProject();
signals:
void requestProject(const QString &project);
void requestSession(const QString &session);
void manageSessions();
private:
SessionModel *m_sessionModel;
ProjectModel *m_projectModel;

View File

@@ -1,3 +1,2 @@
include(../../plugins/projectexplorer/projectexplorer.pri)
include(../../plugins/coreplugin/coreplugin.pri)
include(../../libs/utils/utils.pri)

View File

@@ -104,10 +104,8 @@ public:
Q_SCRIPTABLE QString platform() const;
bool eventFilter(QObject *, QEvent *);
public slots:
void newProject();
void openProject();
public slots:
void setActivePlugin(int pos)
{
if (m_activePlugin != pos) {
@@ -327,17 +325,6 @@ void WelcomeMode::welcomePluginAdded(QObject *obj)
}
}
void WelcomeMode::newProject()
{
Core::ICore::showNewItemDialog(tr("New Project"),
Core::IWizard::wizardsOfKind(Core::IWizard::ProjectWizard));
}
void WelcomeMode::openProject()
{
ProjectExplorer::ProjectExplorerPlugin::instance()->openOpenProjectDialog();
}
WelcomePlugin::WelcomePlugin()
: m_welcomeMode(0)
{