forked from qt-creator/qt-creator
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>
This commit is contained in:
committed by
Alessandro Portale
parent
1ed3538b21
commit
463eca4053
@@ -1,7 +1,6 @@
|
|||||||
VPATH += $$PWD
|
VPATH += $$PWD
|
||||||
INCLUDEPATH += $$PWD
|
INCLUDEPATH += $$PWD
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
integrationcore.cpp \
|
|
||||||
designdocumentcontroller.cpp \
|
designdocumentcontroller.cpp \
|
||||||
designdocumentcontrollerview.cpp \
|
designdocumentcontrollerview.cpp \
|
||||||
utilitypanelcontroller.cpp \
|
utilitypanelcontroller.cpp \
|
||||||
@@ -11,7 +10,6 @@ SOURCES += \
|
|||||||
xuifiledialog.cpp
|
xuifiledialog.cpp
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
integrationcore.h \
|
|
||||||
designdocumentcontrollerview.h \
|
designdocumentcontrollerview.h \
|
||||||
designdocumentcontroller.h \
|
designdocumentcontroller.h \
|
||||||
utilitypanelcontroller.h \
|
utilitypanelcontroller.h \
|
||||||
|
@@ -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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -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
|
|
@@ -36,8 +36,6 @@
|
|||||||
#include <utils/faketooltip.h>
|
#include <utils/faketooltip.h>
|
||||||
#include <texteditor/itexteditor.h>
|
#include <texteditor/itexteditor.h>
|
||||||
|
|
||||||
#include <integrationcore.h>
|
|
||||||
|
|
||||||
#include <designdocumentcontroller.h>
|
#include <designdocumentcontroller.h>
|
||||||
#include <itemlibraryview.h>
|
#include <itemlibraryview.h>
|
||||||
#include <navigatorwidget.h>
|
#include <navigatorwidget.h>
|
||||||
|
@@ -58,8 +58,6 @@
|
|||||||
#include <utils/hostosinfo.h>
|
#include <utils/hostosinfo.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
#include <integrationcore.h>
|
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
|
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
@@ -80,7 +78,6 @@ bool shouldAssertInException()
|
|||||||
}
|
}
|
||||||
|
|
||||||
BauhausPlugin::BauhausPlugin() :
|
BauhausPlugin::BauhausPlugin() :
|
||||||
m_designerCore(0),
|
|
||||||
m_designMode(0),
|
m_designMode(0),
|
||||||
m_isActive(false),
|
m_isActive(false),
|
||||||
m_revertToSavedAction(new QAction(this)),
|
m_revertToSavedAction(new QAction(this)),
|
||||||
@@ -107,7 +104,6 @@ BauhausPlugin::BauhausPlugin() :
|
|||||||
|
|
||||||
BauhausPlugin::~BauhausPlugin()
|
BauhausPlugin::~BauhausPlugin()
|
||||||
{
|
{
|
||||||
delete m_designerCore;
|
|
||||||
Core::ICore::removeContextObject(m_context);
|
Core::ICore::removeContextObject(m_context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,14 +122,13 @@ bool BauhausPlugin::initialize(const QStringList & /*arguments*/, QString *error
|
|||||||
switchAction, QmlDesigner::Constants::SWITCH_TEXT_DESIGN, switchContext);
|
switchAction, QmlDesigner::Constants::SWITCH_TEXT_DESIGN, switchContext);
|
||||||
command->setDefaultKeySequence(QKeySequence(Qt::Key_F4));
|
command->setDefaultKeySequence(QKeySequence(Qt::Key_F4));
|
||||||
|
|
||||||
m_designerCore = new QmlDesigner::IntegrationCore;
|
|
||||||
m_pluginInstance = this;
|
m_pluginInstance = this;
|
||||||
|
|
||||||
const QString pluginPath = Utils::HostOsInfo::isMacHost()
|
const QString pluginPath = Utils::HostOsInfo::isMacHost()
|
||||||
? QString(QCoreApplication::applicationDirPath() + "/../PlugIns/QmlDesigner")
|
? QString(QCoreApplication::applicationDirPath() + "/../PlugIns/QmlDesigner")
|
||||||
: QString(QCoreApplication::applicationDirPath() + "/../"
|
: QString(QCoreApplication::applicationDirPath() + "/../"
|
||||||
+ QLatin1String(IDE_LIBRARY_BASENAME) + "/qtcreator/qmldesigner");
|
+ QLatin1String(IDE_LIBRARY_BASENAME) + "/qtcreator/qmldesigner");
|
||||||
m_designerCore->pluginManager()->setPluginPaths(QStringList() << pluginPath);
|
m_pluginManager.setPluginPaths(QStringList() << pluginPath);
|
||||||
|
|
||||||
createDesignModeWidget();
|
createDesignModeWidget();
|
||||||
connect(switchAction, SIGNAL(triggered()), this, SLOT(switchTextDesign()));
|
connect(switchAction, SIGNAL(triggered()), this, SLOT(switchTextDesign()));
|
||||||
|
@@ -35,6 +35,8 @@
|
|||||||
|
|
||||||
#include <extensionsystem/iplugin.h>
|
#include <extensionsystem/iplugin.h>
|
||||||
|
|
||||||
|
#include <pluginmanager.h>
|
||||||
|
|
||||||
#include <QWeakPointer>
|
#include <QWeakPointer>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
@@ -50,10 +52,6 @@ namespace Core {
|
|||||||
class EditorManager;
|
class EditorManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace QmlDesigner {
|
|
||||||
class IntegrationCore;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
@@ -92,7 +90,7 @@ private:
|
|||||||
QStringList m_mimeTypes;
|
QStringList m_mimeTypes;
|
||||||
DesignModeWidget *m_mainWidget;
|
DesignModeWidget *m_mainWidget;
|
||||||
|
|
||||||
QmlDesigner::IntegrationCore *m_designerCore;
|
QmlDesigner::PluginManager m_pluginManager;
|
||||||
static BauhausPlugin *m_pluginInstance;
|
static BauhausPlugin *m_pluginInstance;
|
||||||
DesignerSettings m_settings;
|
DesignerSettings m_settings;
|
||||||
DesignModeContext *m_context;
|
DesignModeContext *m_context;
|
||||||
|
Reference in New Issue
Block a user