diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-01-27 17:14:49 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-01-27 17:14:49 +0100 |
commit | ed7430d2352b3f87991f68fbc0acfe4dbae39b56 (patch) | |
tree | bd6d9d0c3c0f6e66131f581bed978c49febada7f /src/forms | |
parent | Blocker UI (diff) | |
download | smolbote-ed7430d2352b3f87991f68fbc0acfe4dbae39b56.tar.xz |
URL blocking whitelist
Diffstat (limited to 'src/forms')
-rw-r--r-- | src/forms/blockerdialog.cpp | 21 | ||||
-rw-r--r-- | src/forms/blockerdialog.h | 3 |
2 files changed, 15 insertions, 9 deletions
diff --git a/src/forms/blockerdialog.cpp b/src/forms/blockerdialog.cpp index f755af6..ee6bdfc 100644 --- a/src/forms/blockerdialog.cpp +++ b/src/forms/blockerdialog.cpp @@ -11,21 +11,26 @@ BlockerDialog::BlockerDialog(QWidget *parent) : Settings settings; ui->setupUi(this); - subscription = new BlockerSubscription(this); + m_subscription = new BlockerSubscription(this); QString sublocation = settings.value("blocker/subscription").toString(); if(!sublocation.isEmpty()) { - subscription->loadFromFile(sublocation); + m_subscription->loadFromFile(sublocation); } - ui->title->setText(subscription->title()); - ui->homepage->setText(subscription->homepage()); - ui->license->setText(subscription->license()); - ui->version->setText(subscription->version()); - ui->lastModified->setText(subscription->lastModified().toString()); - ui->expires->setText(subscription->expires().toString()); + ui->title->setText(m_subscription->title()); + ui->homepage->setText(m_subscription->homepage()); + ui->license->setText(m_subscription->license()); + ui->version->setText(m_subscription->version()); + ui->lastModified->setText(m_subscription->lastModified().toString()); + ui->expires->setText(m_subscription->expires().toString()); } BlockerDialog::~BlockerDialog() { delete ui; } + +BlockerSubscription* BlockerDialog::subscription() +{ + return m_subscription; +} diff --git a/src/forms/blockerdialog.h b/src/forms/blockerdialog.h index 0c8e8ba..59dce0a 100644 --- a/src/forms/blockerdialog.h +++ b/src/forms/blockerdialog.h @@ -15,10 +15,11 @@ class BlockerDialog : public QDialog public: explicit BlockerDialog(QWidget *parent = 0); ~BlockerDialog(); + BlockerSubscription *subscription(); private: Ui::UrlInterceptorDialog *ui; - BlockerSubscription *subscription; + BlockerSubscription *m_subscription; }; #endif // URLINTERCEPTORDIALOG_H |