forked from qt-creator/qt-creator
QmlProjectPlugin: Clean up
- Remove unneeded use of global object pool - Remove a few unneeded includes and declarations - Un-export class, it's not used from the outside Change-Id: Iddfcf74b754c936a8adb23c2caa6f7eef6d0e654 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -26,7 +26,6 @@
|
|||||||
#include "qmlprojectplugin.h"
|
#include "qmlprojectplugin.h"
|
||||||
#include "qmlproject.h"
|
#include "qmlproject.h"
|
||||||
#include "qmlprojectrunconfigurationfactory.h"
|
#include "qmlprojectrunconfigurationfactory.h"
|
||||||
#include "fileformat/qmlprojectfileformat.h"
|
|
||||||
|
|
||||||
#include <coreplugin/fileiconprovider.h>
|
#include <coreplugin/fileiconprovider.h>
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
@@ -35,18 +34,10 @@
|
|||||||
|
|
||||||
#include <qmljstools/qmljstoolsconstants.h>
|
#include <qmljstools/qmljstoolsconstants.h>
|
||||||
|
|
||||||
#include <QtPlugin>
|
|
||||||
|
|
||||||
#include <QApplication>
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QPushButton>
|
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
|
|
||||||
namespace QmlProjectManager {
|
namespace QmlProjectManager {
|
||||||
|
namespace Internal {
|
||||||
QmlProjectPlugin::QmlProjectPlugin()
|
|
||||||
{ }
|
|
||||||
|
|
||||||
QmlProjectPlugin::~QmlProjectPlugin()
|
QmlProjectPlugin::~QmlProjectPlugin()
|
||||||
{
|
{
|
||||||
@@ -56,15 +47,12 @@ bool QmlProjectPlugin::initialize(const QStringList &, QString *errorMessage)
|
|||||||
{
|
{
|
||||||
Q_UNUSED(errorMessage)
|
Q_UNUSED(errorMessage)
|
||||||
|
|
||||||
addAutoReleasedObject(new Internal::QmlProjectRunConfigurationFactory);
|
new Internal::QmlProjectRunConfigurationFactory(this);
|
||||||
|
|
||||||
ProjectManager::registerProjectType<QmlProject>(QmlJSTools::Constants::QMLPROJECT_MIMETYPE);
|
ProjectManager::registerProjectType<QmlProject>(QmlJSTools::Constants::QMLPROJECT_MIMETYPE);
|
||||||
Core::FileIconProvider::registerIconOverlayForSuffix(":/qmlproject/images/qmlproject.png", "qmlproject");
|
Core::FileIconProvider::registerIconOverlayForSuffix(":/qmlproject/images/qmlproject.png", "qmlproject");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlProjectPlugin::extensionsInitialized()
|
} // namespace Internal
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace QmlProjectManager
|
} // namespace QmlProjectManager
|
||||||
|
@@ -25,23 +25,24 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "qmlprojectmanager_global.h"
|
|
||||||
|
|
||||||
#include <extensionsystem/iplugin.h>
|
#include <extensionsystem/iplugin.h>
|
||||||
|
|
||||||
namespace QmlProjectManager {
|
namespace QmlProjectManager {
|
||||||
|
namespace Internal {
|
||||||
|
|
||||||
class QMLPROJECTMANAGER_EXPORT QmlProjectPlugin: public ExtensionSystem::IPlugin
|
class QmlProjectPlugin: public ExtensionSystem::IPlugin
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "QmlProjectManager.json")
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "QmlProjectManager.json")
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QmlProjectPlugin();
|
QmlProjectPlugin() = default;
|
||||||
~QmlProjectPlugin();
|
~QmlProjectPlugin() final;
|
||||||
|
|
||||||
virtual bool initialize(const QStringList &arguments, QString *errorString);
|
private:
|
||||||
virtual void extensionsInitialized();
|
bool initialize(const QStringList &arguments, QString *errorString) final;
|
||||||
|
void extensionsInitialized() final {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace Internal
|
||||||
} // namespace QmlProject
|
} // namespace QmlProject
|
||||||
|
Reference in New Issue
Block a user