Removed some comments.
This commit is contained in:
parent
d0154ca859
commit
5e20d3dd22
5 changed files with 2 additions and 59 deletions
|
@ -81,6 +81,7 @@ void MessagesView::createConnections() {
|
|||
}
|
||||
|
||||
void MessagesView::keyboardSearch(const QString& search) {
|
||||
|
||||
// WARNING: This is quite hacky way how to force selection of next item even
|
||||
// with extended selection enabled.
|
||||
setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
|
@ -316,8 +317,6 @@ void MessagesView::loadItem(RootItem* item) {
|
|||
|
||||
// Messages are loaded, make sure that previously
|
||||
// active message is not shown in browser.
|
||||
// BUG: Qt 5 is probably bugged here. Selections
|
||||
// should be cleared automatically when SQL model is reset.
|
||||
emit currentMessageRemoved();
|
||||
}
|
||||
|
||||
|
|
|
@ -113,7 +113,6 @@ void SystemTrayIcon::setNumber(int number, bool any_new_message) {
|
|||
QPixmap background(m_plainPixmap);
|
||||
QPainter tray_painter;
|
||||
|
||||
// FIXME: Here draw different background instead of different color of number.
|
||||
tray_painter.begin(&background);
|
||||
tray_painter.setPen(Qt::black);
|
||||
tray_painter.setRenderHint(QPainter::SmoothPixmapTransform, true);
|
||||
|
|
|
@ -67,8 +67,6 @@ void AdBlockManager::setEnabled(bool enabled) {
|
|||
qApp->settings()->setValue(GROUP(AdBlock), AdBlock::AdBlockEnabled, m_enabled);
|
||||
load();
|
||||
|
||||
// TODO: Reload user stylesheet.
|
||||
// mApp->reloadUserStyleSheet();
|
||||
QMutexLocker locker(&m_mutex);
|
||||
|
||||
if (m_enabled) {
|
||||
|
@ -189,9 +187,7 @@ AdBlockSubscription* AdBlockManager::addSubscription(const QString& title, const
|
|||
subscription->loadSubscription(m_disabledRules);
|
||||
m_subscriptions.insert(m_subscriptions.count() - 1, subscription);
|
||||
|
||||
// TODO: Reload user stylesheet.
|
||||
// connect(subscription, SIGNAL(subscriptionUpdated()), mApp, SLOT(reloadUserStyleSheet()));
|
||||
connect(subscription, SIGNAL(subscriptionChanged()), this, SLOT(updateMatcher()));
|
||||
connect(subscription, &AdBlockSubscription::subscriptionChanged, this, &AdBlockManager::updateMatcher);
|
||||
return subscription;
|
||||
}
|
||||
|
||||
|
@ -285,9 +281,6 @@ void AdBlockManager::load() {
|
|||
// Load all subscriptions.
|
||||
foreach (AdBlockSubscription* subscription, m_subscriptions) {
|
||||
subscription->loadSubscription(m_disabledRules);
|
||||
|
||||
// TODO: Reload user stylesheet.
|
||||
// connect(subscription, SIGNAL(subscriptionUpdated()), mApp, SLOT(reloadUserStyleSheet()));
|
||||
connect(subscription, SIGNAL(subscriptionChanged()), this, SLOT(updateMatcher()));
|
||||
}
|
||||
|
||||
|
|
|
@ -208,10 +208,6 @@ const AdBlockRule* AdBlockSubscription::enableRule(int offset) {
|
|||
AdBlockManager::instance()->removeDisabledRule(rule->filter());
|
||||
emit subscriptionChanged();
|
||||
|
||||
if (rule->isCssRule()) {
|
||||
// TODO: Reload user stylesheet.
|
||||
}
|
||||
|
||||
return rule;
|
||||
}
|
||||
else {
|
||||
|
@ -230,10 +226,6 @@ const AdBlockRule* AdBlockSubscription::disableRule(int offset) {
|
|||
AdBlockManager::instance()->addDisabledRule(rule->filter());
|
||||
emit subscriptionChanged();
|
||||
|
||||
if (rule->isCssRule()) {
|
||||
// TODO: Reload user stylesheet.
|
||||
}
|
||||
|
||||
return rule;
|
||||
}
|
||||
|
||||
|
@ -365,10 +357,6 @@ int AdBlockCustomList::addRule(AdBlockRule* rule) {
|
|||
m_rules.append(rule);
|
||||
emit subscriptionChanged();
|
||||
|
||||
if (rule->isCssRule()) {
|
||||
// TODO: Reload user stylesheet.
|
||||
}
|
||||
|
||||
return m_rules.count() - 1;
|
||||
}
|
||||
|
||||
|
@ -383,10 +371,6 @@ bool AdBlockCustomList::removeRule(int offset) {
|
|||
m_rules.remove(offset);
|
||||
emit subscriptionChanged();
|
||||
|
||||
if (rule->isCssRule()) {
|
||||
// TODO: Reload user stylesheet.
|
||||
}
|
||||
|
||||
AdBlockManager::instance()->removeDisabledRule(filter);
|
||||
delete rule;
|
||||
return true;
|
||||
|
@ -402,10 +386,6 @@ const AdBlockRule* AdBlockCustomList::replaceRule(AdBlockRule* rule, int offset)
|
|||
m_rules[offset] = rule;
|
||||
emit subscriptionChanged();
|
||||
|
||||
if (rule->isCssRule() || oldRule->isCssRule()) {
|
||||
// TODO: Reload user stylesheet.
|
||||
}
|
||||
|
||||
delete oldRule;
|
||||
return m_rules[offset];
|
||||
}
|
||||
|
|
|
@ -72,34 +72,6 @@ void GmailNetworkFactory::setUsername(const QString& username) {
|
|||
m_username = username;
|
||||
}
|
||||
|
||||
/*
|
||||
RootItem* GmailNetworkFactory::feedsCategories() {
|
||||
Downloader downloader;
|
||||
QEventLoop loop;
|
||||
QString bearer = m_oauth2->bearer().toLocal8Bit();
|
||||
|
||||
if (bearer.isEmpty()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
downloader.appendRawHeader(QString(HTTP_HEADERS_AUTHORIZATION).toLocal8Bit(), bearer.toLocal8Bit());
|
||||
|
||||
// We need to quit event loop when the download finishes.
|
||||
connect(&downloader, &Downloader::completed, &loop, &QEventLoop::quit);
|
||||
|
||||
// TODO: dodělat
|
||||
downloader.manipulateData(GMAIL_API_LABELS_LIST, QNetworkAccessManager::Operation::GetOperation);
|
||||
loop.exec();
|
||||
|
||||
if (downloader.lastOutputError() != QNetworkReply::NetworkError::NoError) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QString category_data = downloader.lastOutputData();
|
||||
|
||||
return decodeFeedCategoriesData(category_data);
|
||||
}*/
|
||||
|
||||
Downloader* GmailNetworkFactory::downloadAttachment(const QString& attachment_id) {
|
||||
Downloader* downloader = new Downloader();
|
||||
QString bearer = m_oauth2->bearer().toLocal8Bit();
|
||||
|
|
Loading…
Add table
Reference in a new issue