diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-04-19 22:10:12 +0300 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-04-21 20:14:58 +0300 |
commit | 511032175004959b634f12d0822b48a22f5b769e (patch) | |
tree | 0f982787d2c61a7aaa853390cd94d8f98b87c0b6 /staging/smolblok/filtermanager.cpp | |
parent | Fix some clazy warnings (diff) | |
download | smolbote-511032175004959b634f12d0822b48a22f5b769e.tar.xz |
Add plugin loading code to smolblok
Diffstat (limited to 'staging/smolblok/filtermanager.cpp')
-rw-r--r-- | staging/smolblok/filtermanager.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/staging/smolblok/filtermanager.cpp b/staging/smolblok/filtermanager.cpp deleted file mode 100644 index 05beb59..0000000 --- a/staging/smolblok/filtermanager.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "filtermanager.hpp" -#include "filterlist.h" -#include <QFile> - -Filter *FilterManager::addSubscription(const QString &filename, const QUrl &url) -{ - if(filename.isEmpty() && url.isEmpty()) { - return nullptr; - } - - QFile f(filename); - if(!f.exists()) { - // TODO download file - return nullptr; - } - - if(!f.open(QIODevice::ReadOnly | QIODevice::Text)) { - return nullptr; - } - - try { - auto *filter = new AdblockPlus::FilterList(f); - return filter; - } catch(std::exception &) { - return nullptr; - } -} |