forked from qt-creator/qt-creator
QmlJSPlugin: reorganize setup
Pimpl, remove use of global object pool, cosmetics, ... Change-Id: I9e1415b07d7ff8e95db0998c87ce7d75ca638a8e Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This commit is contained in:
@@ -25,48 +25,24 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <coreplugin/id.h>
|
||||
#include <extensionsystem/iplugin.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QFileInfo;
|
||||
class QDir;
|
||||
class QAction;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace QmlJSTools {
|
||||
|
||||
class QmlJSToolsSettings;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class ModelManager;
|
||||
|
||||
class QmlJSToolsPlugin : public ExtensionSystem::IPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "QmlJSTools.json")
|
||||
|
||||
public:
|
||||
static QmlJSToolsPlugin *instance() { return m_instance; }
|
||||
|
||||
QmlJSToolsPlugin();
|
||||
~QmlJSToolsPlugin();
|
||||
|
||||
bool initialize(const QStringList &arguments, QString *errorMessage);
|
||||
void extensionsInitialized();
|
||||
ShutdownFlag aboutToShutdown();
|
||||
ModelManager *modelManager() { return m_modelManager; }
|
||||
~QmlJSToolsPlugin() final;
|
||||
|
||||
private:
|
||||
void onTaskStarted(Core::Id type);
|
||||
void onAllTasksFinished(Core::Id type);
|
||||
bool initialize(const QStringList &arguments, QString *errorMessage) final;
|
||||
void extensionsInitialized() final;
|
||||
|
||||
ModelManager *m_modelManager;
|
||||
QmlJSToolsSettings *m_settings;
|
||||
QAction *m_resetCodeModelAction;
|
||||
|
||||
static QmlJSToolsPlugin *m_instance;
|
||||
class QmlJSToolsPluginPrivate *d = nullptr;
|
||||
|
||||
#ifdef WITH_TESTS
|
||||
private slots:
|
||||
|
||||
Reference in New Issue
Block a user