mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-23 06:07:39 +01:00
Removed obsolete TODOs.
This commit is contained in:
parent
ed4c293a3b
commit
2204e8b753
@ -128,7 +128,6 @@ void SystemTrayIcon::setNumber(int number, bool any_unread_message) {
|
||||
QPainter tray_painter;
|
||||
|
||||
// TODO: Here draw different background instead of different color of number.
|
||||
|
||||
tray_painter.begin(&background);
|
||||
tray_painter.setPen(any_unread_message ? Qt::blue : Qt::black);
|
||||
tray_painter.setRenderHint(QPainter::SmoothPixmapTransform, true);
|
||||
|
@ -68,9 +68,6 @@ void AdBlockManager::setEnabled(bool enabled) {
|
||||
|
||||
// Load subscriptions and other data.
|
||||
load();
|
||||
|
||||
// TODO
|
||||
//mainApp->reloadUserStyleBrowser();
|
||||
}
|
||||
|
||||
QList<AdBlockSubscription*> AdBlockManager::subscriptions() const {
|
||||
@ -146,8 +143,6 @@ AdBlockSubscription *AdBlockManager::addSubscription(const QString &title, const
|
||||
// This expects that there is at least "Custom rules" subscription available in
|
||||
// active subscriptions.
|
||||
m_subscriptions.insert(m_subscriptions.size() - 1, subscription);
|
||||
|
||||
// TODO: přidáno, asi pořeší pár bugů
|
||||
m_matcher->update();
|
||||
|
||||
return subscription;
|
||||
@ -161,10 +156,7 @@ bool AdBlockManager::removeSubscription(AdBlockSubscription *subscription) {
|
||||
QFile::remove(subscription->filePath());
|
||||
m_subscriptions.removeOne(subscription);
|
||||
delete subscription;
|
||||
|
||||
// TODO: přidáno, asi pořeší pár bugů
|
||||
m_matcher->update();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -192,7 +184,6 @@ QString AdBlockManager::baseSubscriptionDirectory() {
|
||||
}
|
||||
|
||||
directory += QDir::separator() + ADBLOCK_BASE_DIRECTORY_NAME;
|
||||
|
||||
return QDir::toNativeSeparators(directory);
|
||||
}
|
||||
|
||||
@ -211,7 +202,6 @@ void AdBlockManager::load() {
|
||||
m_enabled = settings->value(GROUP(AdBlock), SETTING(AdBlock::Enabled)).toBool();
|
||||
m_useLimitedEasyList = settings->value(GROUP(AdBlock), SETTING(AdBlock::UseLimitedEasyList)).toBool();
|
||||
m_disabledRules = settings->value(GROUP(AdBlock), SETTING(AdBlock::DisabledRules)).toStringList();
|
||||
//QDateTime last_update = settings->value(GROUP(AdBlock), SETTING(AdBlock::LastUpdated)).toDateTime();
|
||||
|
||||
if (!m_enabled) {
|
||||
// We loaded settings, but Adblock should be disabled. Do not continue to save memory.
|
||||
@ -263,8 +253,6 @@ void AdBlockManager::load() {
|
||||
foreach (AdBlockSubscription *subscription, m_subscriptions) {
|
||||
subscription->loadSubscription(m_disabledRules);
|
||||
|
||||
// TODO
|
||||
//connect(subscription, SIGNAL(subscriptionUpdated()), mainApp, SLOT(reloadUserStyleBrowser()));
|
||||
connect(subscription, SIGNAL(subscriptionChanged()), m_matcher, SLOT(update()));
|
||||
}
|
||||
|
||||
@ -283,19 +271,16 @@ void AdBlockManager::updateAllSubscriptions() {
|
||||
}
|
||||
|
||||
void AdBlockManager::save() {
|
||||
if (!m_loaded) {
|
||||
// There is nothing to save, because these is nothing loaded.
|
||||
return;
|
||||
}
|
||||
if (m_loaded) {
|
||||
foreach (AdBlockSubscription *subscription, m_subscriptions) {
|
||||
subscription->saveSubscription();
|
||||
}
|
||||
|
||||
foreach (AdBlockSubscription *subscription, m_subscriptions) {
|
||||
subscription->saveSubscription();
|
||||
Settings *settings = qApp->settings();
|
||||
settings->setValue(GROUP(AdBlock), AdBlock::Enabled, m_enabled);
|
||||
settings->setValue(GROUP(AdBlock), AdBlock::UseLimitedEasyList, m_useLimitedEasyList);
|
||||
settings->setValue(GROUP(AdBlock), AdBlock::DisabledRules, m_disabledRules);
|
||||
}
|
||||
|
||||
Settings *settings = qApp->settings();
|
||||
settings->setValue(GROUP(AdBlock), AdBlock::Enabled, m_enabled);
|
||||
settings->setValue(GROUP(AdBlock), AdBlock::UseLimitedEasyList, m_useLimitedEasyList);
|
||||
settings->setValue(GROUP(AdBlock), AdBlock::DisabledRules, m_disabledRules);
|
||||
}
|
||||
|
||||
bool AdBlockManager::isEnabled() const {
|
||||
|
@ -241,11 +241,6 @@ const AdBlockRule *AdBlockSubscription::enableRule(int offset) {
|
||||
|
||||
emit subscriptionChanged();
|
||||
|
||||
// TODO
|
||||
/*
|
||||
if (rule->isCssRule())
|
||||
mainApp->reloadUserStyleBrowser();
|
||||
*/
|
||||
return rule;
|
||||
}
|
||||
|
||||
@ -260,12 +255,6 @@ const AdBlockRule *AdBlockSubscription::disableRule(int offset) {
|
||||
|
||||
emit subscriptionChanged();
|
||||
|
||||
// TODO
|
||||
/*
|
||||
if (rule->isCssRule())
|
||||
mainApp->reloadUserStyleBrowser();
|
||||
*/
|
||||
|
||||
return rule;
|
||||
}
|
||||
|
||||
@ -361,11 +350,6 @@ int AdBlockCustomList::addRule(AdBlockRule *rule) {
|
||||
m_rules.append(rule);
|
||||
emit subscriptionChanged();
|
||||
|
||||
// TODO
|
||||
/*
|
||||
if (rule->isCssRule())
|
||||
mainApp->reloadUserStyleBrowser();
|
||||
*/
|
||||
return m_rules.size() - 1;
|
||||
}
|
||||
|
||||
@ -379,11 +363,6 @@ bool AdBlockCustomList::removeRule(int offset) {
|
||||
|
||||
m_rules.remove(offset);
|
||||
emit subscriptionChanged();
|
||||
// TODO
|
||||
/*
|
||||
if (rule->isCssRule())
|
||||
mainApp->reloadUserStyleBrowser();
|
||||
*/
|
||||
|
||||
AdBlockManager::instance()->removeDisabledRule(filter);
|
||||
delete rule;
|
||||
@ -399,12 +378,6 @@ const AdBlockRule *AdBlockCustomList::replaceRule(AdBlockRule *rule, int offset)
|
||||
m_rules[offset] = rule;
|
||||
emit subscriptionChanged();
|
||||
|
||||
// TODO
|
||||
/*
|
||||
if (rule->isCssRule() || oldRule->isCssRule())
|
||||
mainApp->reloadUserStyleBrowser();
|
||||
*/
|
||||
|
||||
delete oldRule;
|
||||
return m_rules[offset];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user