forked from qt-creator/qt-creator
Meson: Hide plugin class definition in .cpp file
Not meant to be used outside. Change-Id: Ic9de5cd19d01e25c2d24ee3b03dd60c61fc6f205 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -33,7 +33,6 @@ add_qtc_plugin(MesonProjectManager
|
||||
mesonprojectparser.cpp
|
||||
mesonprojectparser.h
|
||||
mesonprojectplugin.cpp
|
||||
mesonprojectplugin.h
|
||||
mesonrunconfiguration.cpp
|
||||
mesonrunconfiguration.h
|
||||
mesontoolkitaspect.cpp
|
||||
|
||||
@@ -40,7 +40,6 @@ Project {
|
||||
"target.h",
|
||||
"mesonpluginconstants.h",
|
||||
"mesonprojectplugin.cpp",
|
||||
"mesonprojectplugin.h",
|
||||
"arrayoptionlineedit.cpp",
|
||||
"arrayoptionlineedit.h",
|
||||
"buildoptionsmodel.cpp",
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
// Copyright (C) 2020 Alexis Jeandet.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "mesonprojectplugin.h"
|
||||
|
||||
#include "mesonactionsmanager.h"
|
||||
#include "mesonbuildconfiguration.h"
|
||||
#include "mesonbuildsystem.h"
|
||||
@@ -12,6 +10,8 @@
|
||||
#include "toolssettingsaccessor.h"
|
||||
#include "toolssettingspage.h"
|
||||
|
||||
#include <extensionsystem/iplugin.h>
|
||||
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/projectmanager.h>
|
||||
#include <projectexplorer/runcontrol.h>
|
||||
@@ -36,18 +36,30 @@ public:
|
||||
SimpleTargetRunnerFactory m_mesonRunWorkerFactory{{m_runConfigurationFactory.runConfigurationId()}};
|
||||
};
|
||||
|
||||
MesonProjectPlugin::~MesonProjectPlugin()
|
||||
class MesonProjectPlugin final : public ExtensionSystem::IPlugin
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "MesonProjectManager.json")
|
||||
|
||||
void MesonProjectPlugin::initialize()
|
||||
{
|
||||
public:
|
||||
~MesonProjectPlugin() final
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
private:
|
||||
void initialize() final
|
||||
{
|
||||
d = new MesonProjectPluginPrivate;
|
||||
|
||||
ProjectManager::registerProjectType<MesonProject>(Constants::Project::MIMETYPE);
|
||||
FileIconProvider::registerIconOverlayForFilename(Constants::Icons::MESON, "meson.build");
|
||||
FileIconProvider::registerIconOverlayForFilename(Constants::Icons::MESON, "meson_options.txt");
|
||||
}
|
||||
}
|
||||
|
||||
class MesonProjectPluginPrivate *d = nullptr;
|
||||
};
|
||||
|
||||
} // MesonProjectManager::Internal
|
||||
|
||||
#include "mesonprojectplugin.moc"
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
// Copyright (C) 2020 Alexis Jeandet.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <extensionsystem/iplugin.h>
|
||||
|
||||
namespace MesonProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
class MesonProjectPlugin final : public ExtensionSystem::IPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "MesonProjectManager.json")
|
||||
|
||||
public:
|
||||
~MesonProjectPlugin() final;
|
||||
|
||||
private:
|
||||
void initialize() final;
|
||||
|
||||
class MesonProjectPluginPrivate *d = nullptr;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace MesonProjectManager
|
||||
Reference in New Issue
Block a user