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.cpp
|
||||||
mesonprojectparser.h
|
mesonprojectparser.h
|
||||||
mesonprojectplugin.cpp
|
mesonprojectplugin.cpp
|
||||||
mesonprojectplugin.h
|
|
||||||
mesonrunconfiguration.cpp
|
mesonrunconfiguration.cpp
|
||||||
mesonrunconfiguration.h
|
mesonrunconfiguration.h
|
||||||
mesontoolkitaspect.cpp
|
mesontoolkitaspect.cpp
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ Project {
|
|||||||
"target.h",
|
"target.h",
|
||||||
"mesonpluginconstants.h",
|
"mesonpluginconstants.h",
|
||||||
"mesonprojectplugin.cpp",
|
"mesonprojectplugin.cpp",
|
||||||
"mesonprojectplugin.h",
|
|
||||||
"arrayoptionlineedit.cpp",
|
"arrayoptionlineedit.cpp",
|
||||||
"arrayoptionlineedit.h",
|
"arrayoptionlineedit.h",
|
||||||
"buildoptionsmodel.cpp",
|
"buildoptionsmodel.cpp",
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
// Copyright (C) 2020 Alexis Jeandet.
|
// Copyright (C) 2020 Alexis Jeandet.
|
||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||||
|
|
||||||
#include "mesonprojectplugin.h"
|
|
||||||
|
|
||||||
#include "mesonactionsmanager.h"
|
#include "mesonactionsmanager.h"
|
||||||
#include "mesonbuildconfiguration.h"
|
#include "mesonbuildconfiguration.h"
|
||||||
#include "mesonbuildsystem.h"
|
#include "mesonbuildsystem.h"
|
||||||
@@ -12,6 +10,8 @@
|
|||||||
#include "toolssettingsaccessor.h"
|
#include "toolssettingsaccessor.h"
|
||||||
#include "toolssettingspage.h"
|
#include "toolssettingspage.h"
|
||||||
|
|
||||||
|
#include <extensionsystem/iplugin.h>
|
||||||
|
|
||||||
#include <projectexplorer/projectexplorerconstants.h>
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
#include <projectexplorer/projectmanager.h>
|
#include <projectexplorer/projectmanager.h>
|
||||||
#include <projectexplorer/runcontrol.h>
|
#include <projectexplorer/runcontrol.h>
|
||||||
@@ -36,18 +36,30 @@ public:
|
|||||||
SimpleTargetRunnerFactory m_mesonRunWorkerFactory{{m_runConfigurationFactory.runConfigurationId()}};
|
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;
|
d = new MesonProjectPluginPrivate;
|
||||||
|
|
||||||
ProjectManager::registerProjectType<MesonProject>(Constants::Project::MIMETYPE);
|
ProjectManager::registerProjectType<MesonProject>(Constants::Project::MIMETYPE);
|
||||||
FileIconProvider::registerIconOverlayForFilename(Constants::Icons::MESON, "meson.build");
|
FileIconProvider::registerIconOverlayForFilename(Constants::Icons::MESON, "meson.build");
|
||||||
FileIconProvider::registerIconOverlayForFilename(Constants::Icons::MESON, "meson_options.txt");
|
FileIconProvider::registerIconOverlayForFilename(Constants::Icons::MESON, "meson_options.txt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class MesonProjectPluginPrivate *d = nullptr;
|
||||||
|
};
|
||||||
|
|
||||||
} // MesonProjectManager::Internal
|
} // 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