diff options
Diffstat (limited to 'src/plugins/pluginloader.h')
-rw-r--r-- | src/plugins/pluginloader.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/plugins/pluginloader.h b/src/plugins/pluginloader.h new file mode 100644 index 00000000..f764da9f --- /dev/null +++ b/src/plugins/pluginloader.h @@ -0,0 +1,25 @@ +/* ============================================================ + * The rekonq project + * ============================================================ + * SPDX-License-Identifier: GPL-3.0-only + * Copyright (C) 2022 aqua <aqua@iserlohn-fortress.net> + * ============================================================ + * Description: rekonq plugin loader + * ============================================================ */ + +#pragma once + +#include "rplugininterface.hpp" +#include <QPluginLoader> + +class PluginLoader : public QPluginLoader { + +public: + explicit PluginLoader(const QString &path, QObject *parent = nullptr); + [[nodiscard]] bool hasScheme(const QString &scheme) { return m_schemes.contains(scheme); } + + [[nodiscard]] RekonqPluginInterface *interface() { return qobject_cast<RekonqPluginInterface *>(instance()); } + +private: + QStringList m_schemes; +}; |