diff --git a/share/qtcreator/welcomescreen/develop.qml b/share/qtcreator/welcomescreen/develop.qml index 9646da98e69df560f620ecadfb8e6c1a86ddea8a..c8f05a62688856bee157d01a8905262dd962efdf 100644 --- a/share/qtcreator/welcomescreen/develop.qml +++ b/share/qtcreator/welcomescreen/develop.qml @@ -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 { diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index 49b816b8f494e74c071fe4f380dd7b9a36c408c7..a6cba4d49938f89f02528dc98b07d2a5ed61260f 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -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 diff --git a/src/plugins/projectexplorer/projectwelcomepage.cpp b/src/plugins/projectexplorer/projectwelcomepage.cpp index 1b4acb2fcd8389e629b190f955b38cb1999df547..6f74e8b4eea34744cfc77f7fdef92951349e875b 100644 --- a/src/plugins/projectexplorer/projectwelcomepage.cpp +++ b/src/plugins/projectexplorer/projectwelcomepage.cpp @@ -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 diff --git a/src/plugins/projectexplorer/projectwelcomepage.h b/src/plugins/projectexplorer/projectwelcomepage.h index 4725d3b4da908f7ad5a31ed1facd6548c9008349..0918dbc2cfabec2739ab7ad0648085b0bfb1cbfb 100644 --- a/src/plugins/projectexplorer/projectwelcomepage.h +++ b/src/plugins/projectexplorer/projectwelcomepage.h @@ -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; diff --git a/src/plugins/welcome/welcome_dependencies.pri b/src/plugins/welcome/welcome_dependencies.pri index 301ba69b4e4f3283f7f463f9595586e0e4227bbd..7f369f6326a6ff535481cd53aaa6c99e57e4adc9 100644 --- a/src/plugins/welcome/welcome_dependencies.pri +++ b/src/plugins/welcome/welcome_dependencies.pri @@ -1,3 +1,2 @@ -include(../../plugins/projectexplorer/projectexplorer.pri) include(../../plugins/coreplugin/coreplugin.pri) include(../../libs/utils/utils.pri) diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp index b3a80ae66dbd0f47f67c0750cc1a9204b0f8e5d7..bf8fdf9e946b840d2594a3238a58087ca6c6a6a1 100644 --- a/src/plugins/welcome/welcomeplugin.cpp +++ b/src/plugins/welcome/welcomeplugin.cpp @@ -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) {