From aa7e8fe1a90fbba289aec9b59a872170a0c593c2 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Thu, 23 Apr 2020 17:47:39 +0300 Subject: move subprojects/plugin_hostlist to plugins/smolblok_hostlist --- subprojects/plugin_hostlist/plugin/plugin.cpp | 32 ---------------------- subprojects/plugin_hostlist/plugin/plugin.h | 28 ------------------- .../plugin/smolblokHostlistPlugin.json | 4 --- 3 files changed, 64 deletions(-) delete mode 100644 subprojects/plugin_hostlist/plugin/plugin.cpp delete mode 100644 subprojects/plugin_hostlist/plugin/plugin.h delete mode 100644 subprojects/plugin_hostlist/plugin/smolblokHostlistPlugin.json (limited to 'subprojects/plugin_hostlist/plugin') diff --git a/subprojects/plugin_hostlist/plugin/plugin.cpp b/subprojects/plugin_hostlist/plugin/plugin.cpp deleted file mode 100644 index 28a7706..0000000 --- a/subprojects/plugin_hostlist/plugin/plugin.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This file is part of smolbote. It's copyrighted by the contributors recorded - * in the version control history of the file, available from its original - * location: https://library.iserlohn-fortress.net/aqua/smolbote.git - * - * SPDX-License-Identifier: GPL-3.0 - */ - -#include "plugin.h" -#include "filterlist.h" - -FilterList* HostlistFilterPlugin::load(QIODevice &from) const -{ - if(!from.isOpen()) - return nullptr; - - auto *list = new Hostlist::Filterlist; - return list; -} - -bool HostlistFilterPlugin::parse(FilterList *list, QIODevice &from) const -{ - if(list == nullptr || !from.isOpen()) { - return false; - } - auto *l = dynamic_cast(list); - if(l == nullptr) { - return false; - } - return l->load(from); -} - diff --git a/subprojects/plugin_hostlist/plugin/plugin.h b/subprojects/plugin_hostlist/plugin/plugin.h deleted file mode 100644 index 53b5d36..0000000 --- a/subprojects/plugin_hostlist/plugin/plugin.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This file is part of smolbote. It's copyrighted by the contributors recorded - * in the version control history of the file, available from its original - * location: https://library.iserlohn-fortress.net/aqua/smolbote.git - * - * SPDX-License-Identifier: GPL-3.0 - */ - -#ifndef SMOLBLOK_FILTER_PLUGIN_H -#define SMOLBLOK_FILTER_PLUGIN_H - -#include - -class HostlistFilterPlugin : public QObject, public FilterPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID FilterPluginIid FILE "smolblokHostlistPlugin.json") - Q_INTERFACES(FilterPlugin) - -public: - ~HostlistFilterPlugin() = default; - - FilterList *load(QIODevice &from) const override; - bool parse(FilterList *list, QIODevice &from) const override; -}; - -#endif // SMOLBLOK_FILTER_PLUGIN_H - diff --git a/subprojects/plugin_hostlist/plugin/smolblokHostlistPlugin.json b/subprojects/plugin_hostlist/plugin/smolblokHostlistPlugin.json deleted file mode 100644 index aa53cdd..0000000 --- a/subprojects/plugin_hostlist/plugin/smolblokHostlistPlugin.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "smolblok Hostlist filter plugin", - "author": "Aqua " -} -- cgit v1.2.1