Commit 9b688d0a authored by Eike Ziller's avatar Eike Ziller

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: default avatarTobias Hunger <tobias.hunger@digia.com>
parent ac11a9dc
......@@ -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 {
......
......@@ -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
......
......@@ -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
......@@ -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;
......
include(../../plugins/projectexplorer/projectexplorer.pri)
include(../../plugins/coreplugin/coreplugin.pri)
include(../../libs/utils/utils.pri)
......@@ -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)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment