diff options
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; - } -} |