forked from qt-creator/qt-creator
Move Welcome Page to separate plugin.
This commit is contained in:
@@ -28,7 +28,6 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "coreplugin.h"
|
||||
#include "welcomemode.h"
|
||||
#include "editmode.h"
|
||||
#include "editormanager.h"
|
||||
#include "mainwindow.h"
|
||||
@@ -42,16 +41,12 @@
|
||||
using namespace Core::Internal;
|
||||
|
||||
CorePlugin::CorePlugin() :
|
||||
m_mainWindow(new MainWindow), m_welcomeMode(0), m_editMode(0)
|
||||
m_mainWindow(new MainWindow), m_editMode(0)
|
||||
{
|
||||
}
|
||||
|
||||
CorePlugin::~CorePlugin()
|
||||
{
|
||||
if (m_welcomeMode) {
|
||||
removeObject(m_welcomeMode);
|
||||
delete m_welcomeMode;
|
||||
}
|
||||
if (m_editMode) {
|
||||
removeObject(m_editMode);
|
||||
delete m_editMode;
|
||||
@@ -68,9 +63,6 @@ bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
Q_UNUSED(arguments)
|
||||
const bool success = m_mainWindow->init(errorMessage);
|
||||
if (success) {
|
||||
m_welcomeMode = new WelcomeMode;
|
||||
addObject(m_welcomeMode);
|
||||
|
||||
EditorManager *editorManager = m_mainWindow->editorManager();
|
||||
m_editMode = new EditMode(editorManager);
|
||||
addObject(m_editMode);
|
||||
@@ -80,7 +72,6 @@ bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
|
||||
void CorePlugin::extensionsInitialized()
|
||||
{
|
||||
m_mainWindow->modeManager()->activateMode(m_welcomeMode->uniqueModeName());
|
||||
m_mainWindow->extensionsInitialized();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user