Apply clang-format to Lts/Common and DTC/enum headers
- Formatted all CodeGen module files (9 files) - Formatted LtsAppDescriptor module files - Formatted LtsAppManager/AppChooser files - Applied clang-format to all DTC and enum headers across modules - Removed coordTransTests from CommonUnitTestsPlaceholder (moved to tests/) Cosmetic changes only, no functional modifications. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
848 files changed
+89305
-100020
No files matched your search
Executable → Regular
+41
-46
@@ -1,25 +1,24 @@
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#define PLUGIN_LOADER_VERSION 3
|
||||
|
||||
#include <qglobal.h>
|
||||
#include <functional>
|
||||
#include <QMap>
|
||||
#include <QPair>
|
||||
#include <functional>
|
||||
#include <qglobal.h>
|
||||
|
||||
#ifndef LTSPLUGINLOADER_EXPORT
|
||||
# ifdef BUILD_STATIC_LIBRARIES
|
||||
# define LTSPLUGINLOADER_EXPORT
|
||||
# else
|
||||
# if defined(MAKE_LTSPLUGINLOADER_LIB)
|
||||
# define LTSPLUGINLOADER_EXPORT Q_DECL_EXPORT
|
||||
# else
|
||||
# define LTSPLUGINLOADER_EXPORT Q_DECL_IMPORT
|
||||
# endif
|
||||
# endif
|
||||
#ifdef BUILD_STATIC_LIBRARIES
|
||||
#define LTSPLUGINLOADER_EXPORT
|
||||
#else
|
||||
#if defined(MAKE_LTSPLUGINLOADER_LIB)
|
||||
#define LTSPLUGINLOADER_EXPORT Q_DECL_EXPORT
|
||||
#else
|
||||
#define LTSPLUGINLOADER_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
class QObject;
|
||||
@@ -33,53 +32,49 @@ struct AppDescription;
|
||||
namespace LtsPluginManager
|
||||
{
|
||||
|
||||
enum class PluginType
|
||||
{
|
||||
UNKNOWN = 0,
|
||||
DATA,
|
||||
GUI,
|
||||
TOPIC_TYPE,
|
||||
PROJECT,
|
||||
STYLE,
|
||||
SPECIAL,
|
||||
enum class PluginType {
|
||||
UNKNOWN = 0,
|
||||
DATA,
|
||||
GUI,
|
||||
TOPIC_TYPE,
|
||||
PROJECT,
|
||||
STYLE,
|
||||
SPECIAL,
|
||||
};
|
||||
|
||||
|
||||
struct PluginInstance
|
||||
struct PluginInstance
|
||||
{
|
||||
QString pluginName;
|
||||
QString fullFileName;
|
||||
QString fileName;
|
||||
QObject *plugin = nullptr;
|
||||
QPluginLoader *pluginLoader = nullptr;
|
||||
QString pluginName;
|
||||
QString fullFileName;
|
||||
QString fileName;
|
||||
QObject* plugin = nullptr;
|
||||
QPluginLoader* pluginLoader = nullptr;
|
||||
};
|
||||
|
||||
|
||||
class LTSPLUGINLOADER_EXPORT LtsPluginLoader
|
||||
{
|
||||
public:
|
||||
static LtsPluginLoader *getInstance();
|
||||
public:
|
||||
static LtsPluginLoader* getInstance();
|
||||
|
||||
void unloadAllPlugins();
|
||||
void unloadAllPlugins();
|
||||
|
||||
void checkPlugins(const QVector<LtsAppDescriptor::AppDescription> &appVector,
|
||||
QStringList &errors );
|
||||
void checkPlugins(const QVector<LtsAppDescriptor::AppDescription>& appVector, QStringList& errors);
|
||||
|
||||
bool loadPlugins(PluginType requestedPluginType,
|
||||
const std::function<bool(const PluginInstance &pluginInstance)> &loadPlugin,
|
||||
const QStringList &requiredPlugins = QStringList(),
|
||||
const QString &specialTopicTypeFilter = QString(),
|
||||
const QStringList &optionalPlugins = QStringList());
|
||||
bool loadPlugins(PluginType requestedPluginType,
|
||||
const std::function<bool(const PluginInstance& pluginInstance)>& loadPlugin,
|
||||
const QStringList& requiredPlugins = QStringList(),
|
||||
const QString& specialTopicTypeFilter = QString(),
|
||||
const QStringList& optionalPlugins = QStringList());
|
||||
|
||||
typedef QPair<PluginType, QString> PluginKey;
|
||||
typedef QPair<PluginType, QString> PluginKey;
|
||||
|
||||
private:
|
||||
friend struct LtsPluginLoaderHandler;
|
||||
private:
|
||||
friend struct LtsPluginLoaderHandler;
|
||||
|
||||
LtsPluginLoader() = default;
|
||||
~LtsPluginLoader();
|
||||
LtsPluginLoader() = default;
|
||||
~LtsPluginLoader();
|
||||
|
||||
QMap<PluginKey, PluginInstance> m_loadedPlugins;
|
||||
QMap<PluginKey, PluginInstance> m_loadedPlugins;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace LtsPluginManager
|
||||
Reference in new issue
Block a user