aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@nokia.com>2012-08-29 12:40:38 +0200
committerAlessandro Portale <alessandro.portale@nokia.com>2012-08-30 16:47:33 +0200
commit463eca4053240fe8420ad18ebecb1824a59ffebf (patch)
treeb6a39a843dedf9efe4aec38bfed3c5eab5aea368
parent1ed3538b218a51333ba1a89fdd57b907b3bf54fe (diff)
QmlDesigner.Integration: Remove integration core
This class had only one function and was rather useless. Change-Id: I99fa64881cdf29cf074e6d4173eec6ea85cc2a2a Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
-rw-r--r--src/plugins/qmldesigner/components/integration/integration.pri2
-rw-r--r--src/plugins/qmldesigner/components/integration/integrationcore.cpp95
-rw-r--r--src/plugins/qmldesigner/components/integration/integrationcore.h65
-rw-r--r--src/plugins/qmldesigner/designmodewidget.h2
-rw-r--r--src/plugins/qmldesigner/qmldesignerplugin.cpp7
-rw-r--r--src/plugins/qmldesigner/qmldesignerplugin.h8
6 files changed, 4 insertions, 175 deletions
diff --git a/src/plugins/qmldesigner/components/integration/integration.pri b/src/plugins/qmldesigner/components/integration/integration.pri
index 1548688998..66efed8971 100644
--- a/src/plugins/qmldesigner/components/integration/integration.pri
+++ b/src/plugins/qmldesigner/components/integration/integration.pri
@@ -1,7 +1,6 @@
VPATH += $$PWD
INCLUDEPATH += $$PWD
SOURCES += \
- integrationcore.cpp \
designdocumentcontroller.cpp \
designdocumentcontrollerview.cpp \
utilitypanelcontroller.cpp \
@@ -11,7 +10,6 @@ SOURCES += \
xuifiledialog.cpp
HEADERS += \
- integrationcore.h \
designdocumentcontrollerview.h \
designdocumentcontroller.h \
utilitypanelcontroller.h \
diff --git a/src/plugins/qmldesigner/components/integration/integrationcore.cpp b/src/plugins/qmldesigner/components/integration/integrationcore.cpp
deleted file mode 100644
index 825cd67948..0000000000
--- a/src/plugins/qmldesigner/components/integration/integrationcore.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "integrationcore.h"
-#include "pluginmanager.h"
-#include "itemlibraryview.h"
-#include "navigatorwidget.h"
-#include "metainfo.h"
-
-#include <QCoreApplication>
-#include <QObject>
-
-namespace QmlDesigner {
-
-class CorePrivate
-{
- public:
- CorePrivate();
- ~CorePrivate();
-
- static IntegrationCore *m_instance;
-
- PluginManager m_pluginManager;
-};
-
-CorePrivate::CorePrivate()
-{
-}
-
-CorePrivate::~CorePrivate()
-{
- MetaInfo::clearGlobal();
-}
-
-IntegrationCore *CorePrivate::m_instance = 0;
-
-/*!
- \class QmlDesigner::Core
-
- Convenience class to access the plugin manager singleton,
- and manage the lifecycle of static data (e.g. in the metatype system).
-*/
-
-IntegrationCore::IntegrationCore() :
- d(new CorePrivate)
-{
- Q_ASSERT(CorePrivate::m_instance == 0);
- CorePrivate::m_instance = this;
-}
-
-IntegrationCore::~IntegrationCore()
-{
- CorePrivate::m_instance = 0;
- delete d;
-}
-
-IntegrationCore *IntegrationCore::instance()
-{
- Q_ASSERT(CorePrivate::m_instance);
- return CorePrivate::m_instance;
-}
-
-PluginManager *IntegrationCore::pluginManager() const
-{
- return &d->m_pluginManager;
-}
-
-}
diff --git a/src/plugins/qmldesigner/components/integration/integrationcore.h b/src/plugins/qmldesigner/components/integration/integrationcore.h
deleted file mode 100644
index 14a66f0c6e..0000000000
--- a/src/plugins/qmldesigner/components/integration/integrationcore.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef QMLDESIGNERCORE_H
-#define QMLDESIGNERCORE_H
-
-#include <QObject>
-
-QT_BEGIN_NAMESPACE
-class QWidget;
-class QDialog;
-QT_END_NAMESPACE
-
-namespace QmlDesigner {
-
-class ItemLibraryWidget;
-class FormWindowManager;
-class PluginManager;
-class CorePrivate;
-
-class IntegrationCore
-{
- Q_DISABLE_COPY(IntegrationCore)
-public:
- IntegrationCore();
- ~IntegrationCore();
-
- PluginManager *pluginManager() const;
-
- static IntegrationCore *instance();
-
-private:
- CorePrivate *d;
-};
-
-} // namspace QmlDesigner
-
-#endif // QMLDESIGNERCORE_H
diff --git a/src/plugins/qmldesigner/designmodewidget.h b/src/plugins/qmldesigner/designmodewidget.h
index 8d54b0c5ff..70017b9449 100644
--- a/src/plugins/qmldesigner/designmodewidget.h
+++ b/src/plugins/qmldesigner/designmodewidget.h
@@ -36,8 +36,6 @@
#include <utils/faketooltip.h>
#include <texteditor/itexteditor.h>
-#include <integrationcore.h>
-
#include <designdocumentcontroller.h>
#include <itemlibraryview.h>
#include <navigatorwidget.h>
diff --git a/src/plugins/qmldesigner/qmldesignerplugin.cpp b/src/plugins/qmldesigner/qmldesignerplugin.cpp
index 40c5788cc6..33b8d4a9a5 100644
--- a/src/plugins/qmldesigner/qmldesignerplugin.cpp
+++ b/src/plugins/qmldesigner/qmldesignerplugin.cpp
@@ -58,8 +58,6 @@
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h>
-#include <integrationcore.h>
-
#include <QAction>
#include <QFileInfo>
@@ -80,7 +78,6 @@ bool shouldAssertInException()
}
BauhausPlugin::BauhausPlugin() :
- m_designerCore(0),
m_designMode(0),
m_isActive(false),
m_revertToSavedAction(new QAction(this)),
@@ -107,7 +104,6 @@ BauhausPlugin::BauhausPlugin() :
BauhausPlugin::~BauhausPlugin()
{
- delete m_designerCore;
Core::ICore::removeContextObject(m_context);
}
@@ -126,14 +122,13 @@ bool BauhausPlugin::initialize(const QStringList & /*arguments*/, QString *error
switchAction, QmlDesigner::Constants::SWITCH_TEXT_DESIGN, switchContext);
command->setDefaultKeySequence(QKeySequence(Qt::Key_F4));
- m_designerCore = new QmlDesigner::IntegrationCore;
m_pluginInstance = this;
const QString pluginPath = Utils::HostOsInfo::isMacHost()
? QString(QCoreApplication::applicationDirPath() + "/../PlugIns/QmlDesigner")
: QString(QCoreApplication::applicationDirPath() + "/../"
+ QLatin1String(IDE_LIBRARY_BASENAME) + "/qtcreator/qmldesigner");
- m_designerCore->pluginManager()->setPluginPaths(QStringList() << pluginPath);
+ m_pluginManager.setPluginPaths(QStringList() << pluginPath);
createDesignModeWidget();
connect(switchAction, SIGNAL(triggered()), this, SLOT(switchTextDesign()));
diff --git a/src/plugins/qmldesigner/qmldesignerplugin.h b/src/plugins/qmldesigner/qmldesignerplugin.h
index aac2138af5..789d1ab8aa 100644
--- a/src/plugins/qmldesigner/qmldesignerplugin.h
+++ b/src/plugins/qmldesigner/qmldesignerplugin.h
@@ -35,6 +35,8 @@
#include <extensionsystem/iplugin.h>
+#include <pluginmanager.h>
+
#include <QWeakPointer>
#include <QStringList>
@@ -51,10 +53,6 @@ namespace Core {
}
namespace QmlDesigner {
- class IntegrationCore;
-}
-
-namespace QmlDesigner {
namespace Internal {
class DesignModeWidget;
@@ -92,7 +90,7 @@ private:
QStringList m_mimeTypes;
DesignModeWidget *m_mainWidget;
- QmlDesigner::IntegrationCore *m_designerCore;
+ QmlDesigner::PluginManager m_pluginManager;
static BauhausPlugin *m_pluginInstance;
DesignerSettings m_settings;
DesignModeContext *m_context;