mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-01 02:48:05 +01:00
fix some gmail problems
This commit is contained in:
parent
ddf5475b5f
commit
10bf16a3b2
@ -22,7 +22,7 @@ CREATE TABLE Categories (
|
||||
parent_id INTEGER NOT NULL CHECK (parent_id >= -1), /* Root categories contain -1 here. */
|
||||
title TEXT NOT NULL CHECK (title != ''),
|
||||
description TEXT,
|
||||
date_created INTEGER NOT NULL CHECK (date_created >= 0),
|
||||
date_created INTEGER,
|
||||
icon BLOB,
|
||||
account_id INTEGER NOT NULL,
|
||||
custom_id TEXT,
|
||||
@ -34,7 +34,7 @@ CREATE TABLE Feeds (
|
||||
id INTEGER PRIMARY KEY,
|
||||
title TEXT NOT NULL CHECK (title != ''),
|
||||
description TEXT,
|
||||
date_created INTEGER NOT NULL CHECK (date_created >= 0),
|
||||
date_created INTEGER,
|
||||
icon BLOB,
|
||||
category INTEGER NOT NULL CHECK (category >= -1), /* Root feeds contain -1 here. */
|
||||
source TEXT,
|
||||
|
@ -1744,6 +1744,8 @@ void DatabaseQueries::createOverwriteFeed(const QSqlDatabase& db, Feed* feed, in
|
||||
q.bindValue(QSL(":custom_data"), serialized_custom_data);
|
||||
|
||||
if (!q.exec()) {
|
||||
auto xx = q.lastError().text();
|
||||
|
||||
throw ApplicationException(q.lastError().text());
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "core/messagefilter.h"
|
||||
#include "definitions/typedefs.h"
|
||||
#include "miscellaneous/application.h"
|
||||
#include "miscellaneous/iconfactory.h"
|
||||
#include "miscellaneous/textfactory.h"
|
||||
#include "services/abstract/category.h"
|
||||
#include "services/abstract/label.h"
|
||||
@ -217,7 +218,22 @@ Assignment DatabaseQueries::getCategories(const QSqlDatabase& db, int account_id
|
||||
AssignmentItem pair;
|
||||
|
||||
pair.first = query_categories.value(CAT_DB_PARENT_ID_INDEX).toInt();
|
||||
pair.second = new T(query_categories.record());
|
||||
pair.second = new T();
|
||||
|
||||
auto* cat = static_cast<Category*>(pair.second);
|
||||
|
||||
cat->setId(query_categories.value(CAT_DB_ID_INDEX).toInt());
|
||||
cat->setCustomId(query_categories.value(CAT_DB_CUSTOM_ID_INDEX).toString());
|
||||
|
||||
if (cat->customId().isEmpty()) {
|
||||
cat->setCustomId(QString::number(cat->id()));
|
||||
}
|
||||
|
||||
cat->setTitle(query_categories.value(CAT_DB_TITLE_INDEX).toString());
|
||||
cat->setDescription(query_categories.value(CAT_DB_DESCRIPTION_INDEX).toString());
|
||||
cat->setCreationDate(TextFactory::parseDateTime(query_categories.value(CAT_DB_DCREATED_INDEX).value<qint64>()).toLocalTime());
|
||||
cat->setIcon(qApp->icons()->fromByteArray(query_categories.value(CAT_DB_ICON_INDEX).toByteArray()));
|
||||
|
||||
categories << pair;
|
||||
}
|
||||
|
||||
@ -257,7 +273,27 @@ Assignment DatabaseQueries::getFeeds(const QSqlDatabase& db,
|
||||
|
||||
pair.first = query.value(FDS_DB_CATEGORY_INDEX).toInt();
|
||||
|
||||
Feed* feed = new T(query.record());
|
||||
Feed* feed = new T();
|
||||
|
||||
// Load common data.
|
||||
feed->setTitle(query.value(FDS_DB_TITLE_INDEX).toString());
|
||||
feed->setId(query.value(FDS_DB_ID_INDEX).toInt());
|
||||
feed->setSource(query.value(FDS_DB_SOURCE_INDEX).toString());
|
||||
feed->setCustomId(query.value(FDS_DB_CUSTOM_ID_INDEX).toString());
|
||||
|
||||
if (feed->customId().isEmpty()) {
|
||||
feed->setCustomId(QString::number(feed->id()));
|
||||
}
|
||||
|
||||
feed->setDescription(QString::fromUtf8(query.value(FDS_DB_DESCRIPTION_INDEX).toByteArray()));
|
||||
feed->setCreationDate(TextFactory::parseDateTime(query.value(FDS_DB_DCREATED_INDEX).value<qint64>()).toLocalTime());
|
||||
feed->setIcon(qApp->icons()->fromByteArray(query.value(FDS_DB_ICON_INDEX).toByteArray()));
|
||||
feed->setAutoUpdateType(static_cast<Feed::AutoUpdateType>(query.value(FDS_DB_UPDATE_TYPE_INDEX).toInt()));
|
||||
feed->setAutoUpdateInitialInterval(query.value(FDS_DB_UPDATE_INTERVAL_INDEX).toInt());
|
||||
|
||||
qDebugNN << LOGSEC_CORE
|
||||
<< "Custom ID of feed when loading from DB is"
|
||||
<< QUOTE_W_SPACE_DOT(feed->customId());
|
||||
|
||||
// Load custom data.
|
||||
feed->setCustomDatabaseData(deserializeCustomData(query.value(QSL("custom_data")).toString()));
|
||||
|
@ -18,22 +18,6 @@ Category::Category(const Category& other) : RootItem(other) {
|
||||
setKind(RootItem::Kind::Category);
|
||||
}
|
||||
|
||||
Category::Category(const QSqlRecord& record) : Category(nullptr) {
|
||||
setId(record.value(CAT_DB_ID_INDEX).toInt());
|
||||
setCustomId(record.value(CAT_DB_CUSTOM_ID_INDEX).toString());
|
||||
|
||||
if (customId().isEmpty()) {
|
||||
setCustomId(QString::number(id()));
|
||||
}
|
||||
|
||||
setTitle(record.value(CAT_DB_TITLE_INDEX).toString());
|
||||
setDescription(record.value(CAT_DB_DESCRIPTION_INDEX).toString());
|
||||
setCreationDate(TextFactory::parseDateTime(record.value(CAT_DB_DCREATED_INDEX).value<qint64>()).toLocalTime());
|
||||
setIcon(qApp->icons()->fromByteArray(record.value(CAT_DB_ICON_INDEX).toByteArray()));
|
||||
}
|
||||
|
||||
Category::~Category() = default;
|
||||
|
||||
void Category::updateCounts(bool including_total_count) {
|
||||
QList<Feed*> feeds;
|
||||
|
||||
@ -52,7 +36,6 @@ void Category::updateCounts(bool including_total_count) {
|
||||
|
||||
QSqlDatabase database = qApp->database()->connection(metaObject()->className());
|
||||
bool ok;
|
||||
|
||||
QMap<QString, QPair<int, int>> counts = DatabaseQueries::getMessageCountsForCategory(database,
|
||||
customId(),
|
||||
getParentServiceRoot()->accountId(),
|
||||
|
@ -11,8 +11,6 @@ class Category : public RootItem {
|
||||
public:
|
||||
explicit Category(RootItem* parent = nullptr);
|
||||
explicit Category(const Category& other);
|
||||
explicit Category(const QSqlRecord& record);
|
||||
virtual ~Category();
|
||||
|
||||
void updateCounts(bool including_total_count);
|
||||
bool cleanMessages(bool clean_read_only);
|
||||
|
@ -25,27 +25,6 @@ Feed::Feed(RootItem* parent)
|
||||
setKind(RootItem::Kind::Feed);
|
||||
}
|
||||
|
||||
Feed::Feed(const QSqlRecord& record) : Feed(nullptr) {
|
||||
setTitle(record.value(FDS_DB_TITLE_INDEX).toString());
|
||||
setId(record.value(FDS_DB_ID_INDEX).toInt());
|
||||
setSource(record.value(FDS_DB_SOURCE_INDEX).toString());
|
||||
setCustomId(record.value(FDS_DB_CUSTOM_ID_INDEX).toString());
|
||||
|
||||
if (customId().isEmpty()) {
|
||||
setCustomId(QString::number(id()));
|
||||
}
|
||||
|
||||
setDescription(QString::fromUtf8(record.value(FDS_DB_DESCRIPTION_INDEX).toByteArray()));
|
||||
setCreationDate(TextFactory::parseDateTime(record.value(FDS_DB_DCREATED_INDEX).value<qint64>()).toLocalTime());
|
||||
setIcon(qApp->icons()->fromByteArray(record.value(FDS_DB_ICON_INDEX).toByteArray()));
|
||||
setAutoUpdateType(static_cast<Feed::AutoUpdateType>(record.value(FDS_DB_UPDATE_TYPE_INDEX).toInt()));
|
||||
setAutoUpdateInitialInterval(record.value(FDS_DB_UPDATE_INTERVAL_INDEX).toInt());
|
||||
|
||||
qDebugNN << LOGSEC_CORE
|
||||
<< "Custom ID of feed when loading from DB is"
|
||||
<< QUOTE_W_SPACE_DOT(customId());
|
||||
}
|
||||
|
||||
Feed::Feed(const Feed& other) : RootItem(other) {
|
||||
setKind(RootItem::Kind::Feed);
|
||||
|
||||
@ -59,8 +38,6 @@ Feed::Feed(const Feed& other) : RootItem(other) {
|
||||
setMessageFilters(other.messageFilters());
|
||||
}
|
||||
|
||||
Feed::~Feed() = default;
|
||||
|
||||
QList<Message> Feed::undeletedMessages() const {
|
||||
QSqlDatabase database = qApp->database()->connection(metaObject()->className());
|
||||
|
||||
|
@ -38,9 +38,7 @@ class Feed : public RootItem {
|
||||
|
||||
// Constructors.
|
||||
explicit Feed(RootItem* parent = nullptr);
|
||||
explicit Feed(const QSqlRecord& record);
|
||||
explicit Feed(const Feed& other);
|
||||
virtual ~Feed();
|
||||
|
||||
virtual QList<Message> undeletedMessages() const;
|
||||
virtual QString additionalTooltip() const;
|
||||
|
@ -10,8 +10,6 @@
|
||||
|
||||
FeedlyFeed::FeedlyFeed(RootItem* parent) : Feed(parent) {}
|
||||
|
||||
FeedlyFeed::FeedlyFeed(const QSqlRecord& record) : Feed(record) {}
|
||||
|
||||
FeedlyServiceRoot* FeedlyFeed::serviceRoot() const {
|
||||
return qobject_cast<FeedlyServiceRoot*>(getParentServiceRoot());
|
||||
}
|
||||
|
@ -10,10 +10,10 @@ class FeedlyServiceRoot;
|
||||
class FeedlyFeed : public Feed {
|
||||
public:
|
||||
explicit FeedlyFeed(RootItem* parent = nullptr);
|
||||
explicit FeedlyFeed(const QSqlRecord& record);
|
||||
|
||||
FeedlyServiceRoot* serviceRoot() const;
|
||||
QList<Message> obtainNewMessages(bool* error_during_obtaining);
|
||||
|
||||
virtual QList<Message> obtainNewMessages(bool* error_during_obtaining);
|
||||
};
|
||||
|
||||
#endif // FEEDLYFEED_H
|
||||
|
@ -125,12 +125,7 @@ void FeedlyAccountDetails::performTest(const QNetworkProxy& custom_proxy) {
|
||||
m_oauth->logout(false);
|
||||
|
||||
if (m_ui.m_txtDeveloperAccessToken->lineEdit()->text().simplified().isEmpty()) {
|
||||
if (m_oauth->login()) {
|
||||
m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Ok,
|
||||
tr("You are already logged in."),
|
||||
tr("Access granted."));
|
||||
}
|
||||
|
||||
m_oauth->login();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
@ -16,22 +16,6 @@ GmailFeed::GmailFeed(const QString& title, const QString& custom_id, const QIcon
|
||||
setIcon(icon);
|
||||
}
|
||||
|
||||
GmailFeed::GmailFeed(const QSqlRecord& record) : Feed(record) {
|
||||
// Fixup icons to make them trully dynamic.
|
||||
if (customId() == QSL(GMAIL_SYSTEM_LABEL_SENT)) {
|
||||
setIcon(qApp->icons()->fromTheme(QSL("mail-sent")));
|
||||
}
|
||||
else if (customId() == QSL(GMAIL_SYSTEM_LABEL_DRAFT)) {
|
||||
setIcon(qApp->icons()->fromTheme(QSL("gtk-edit")));
|
||||
}
|
||||
else if (customId() == QSL(GMAIL_SYSTEM_LABEL_SPAM)) {
|
||||
setIcon(qApp->icons()->fromTheme(QSL("mail-mark-junk")));
|
||||
}
|
||||
else if (customId() == QSL(GMAIL_SYSTEM_LABEL_INBOX)) {
|
||||
setIcon(qApp->icons()->fromTheme(QSL("mail-inbox")));
|
||||
}
|
||||
}
|
||||
|
||||
GmailServiceRoot* GmailFeed::serviceRoot() const {
|
||||
return qobject_cast<GmailServiceRoot*>(getParentServiceRoot());
|
||||
}
|
||||
|
@ -11,10 +11,10 @@ class GmailFeed : public Feed {
|
||||
public:
|
||||
explicit GmailFeed(RootItem* parent = nullptr);
|
||||
explicit GmailFeed(const QString& title, const QString& custom_id, const QIcon& icon, RootItem* parent = nullptr);
|
||||
explicit GmailFeed(const QSqlRecord& record);
|
||||
|
||||
GmailServiceRoot* serviceRoot() const;
|
||||
QList<Message> obtainNewMessages(bool* error_during_obtaining);
|
||||
|
||||
virtual QList<Message> obtainNewMessages(bool* error_during_obtaining);
|
||||
};
|
||||
|
||||
#endif // GMAILFEED_H
|
||||
|
@ -36,11 +36,9 @@ class GmailNetworkFactory : public QObject {
|
||||
int batchSize() const;
|
||||
void setBatchSize(int batch_size);
|
||||
|
||||
// Sends e-mail, returns its ID.
|
||||
// API methods.
|
||||
QString sendEmail(Mimesis::Message msg, const QNetworkProxy& custom_proxy, Message* reply_to_message = nullptr);
|
||||
|
||||
Downloader* downloadAttachment(const QString& msg_id, const QString& attachment_id, const QNetworkProxy& custom_proxy);
|
||||
|
||||
QList<Message> messages(const QString& stream_id, Feed::Status& error, const QNetworkProxy& custom_proxy);
|
||||
QNetworkReply::NetworkError markMessagesRead(RootItem::ReadStatus status,
|
||||
QStringList custom_ids,
|
||||
|
@ -43,12 +43,6 @@ void FormEditGmailAccount::apply() {
|
||||
void FormEditGmailAccount::loadAccountData() {
|
||||
FormAccountDetails::loadAccountData();
|
||||
|
||||
if (!m_creatingNew) {
|
||||
// Disable "Cancel" button because all changes made to
|
||||
// existing account are always saved anyway.
|
||||
m_ui.m_buttonBox->button(QDialogButtonBox::StandardButton::Cancel)->setVisible(false);
|
||||
}
|
||||
|
||||
m_details->m_oauth = account<GmailServiceRoot>()->network()->oauth();
|
||||
m_details->hookNetwork();
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include "network-web/oauth2service.h"
|
||||
#include "network-web/webfactory.h"
|
||||
#include "services/gmail/definitions.h"
|
||||
#include "services/gmail/gmailnetworkfactory.h"
|
||||
|
||||
GmailAccountDetails::GmailAccountDetails(QWidget* parent)
|
||||
: QWidget(parent), m_oauth(nullptr) {
|
||||
@ -62,11 +61,7 @@ void GmailAccountDetails::testSetup() {
|
||||
m_oauth->setClientSecret(m_ui.m_txtAppKey->lineEdit()->text());
|
||||
m_oauth->setRedirectUrl(m_ui.m_txtRedirectUrl->lineEdit()->text());
|
||||
|
||||
if (m_oauth->login()) {
|
||||
m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Ok,
|
||||
tr("You are already logged in."),
|
||||
tr("Access granted."));
|
||||
}
|
||||
m_oauth->login();
|
||||
}
|
||||
|
||||
void GmailAccountDetails::checkUsername(const QString& username) {
|
||||
|
@ -9,8 +9,6 @@
|
||||
|
||||
GreaderFeed::GreaderFeed(RootItem* parent) : Feed(parent) {}
|
||||
|
||||
GreaderFeed::GreaderFeed(const QSqlRecord& record) : Feed(record) {}
|
||||
|
||||
GreaderServiceRoot* GreaderFeed::serviceRoot() const {
|
||||
return qobject_cast<GreaderServiceRoot*>(getParentServiceRoot());
|
||||
}
|
||||
|
@ -10,10 +10,10 @@ class GreaderServiceRoot;
|
||||
class GreaderFeed : public Feed {
|
||||
public:
|
||||
explicit GreaderFeed(RootItem* parent = nullptr);
|
||||
explicit GreaderFeed(const QSqlRecord& record);
|
||||
|
||||
GreaderServiceRoot* serviceRoot() const;
|
||||
QList<Message> obtainNewMessages(bool* error_during_obtaining);
|
||||
|
||||
virtual QList<Message> obtainNewMessages(bool* error_during_obtaining);
|
||||
};
|
||||
|
||||
#endif // GREADERFEED_H
|
||||
|
@ -25,12 +25,6 @@ FormEditInoreaderAccount::FormEditInoreaderAccount(QWidget* parent)
|
||||
void FormEditInoreaderAccount::apply() {
|
||||
FormAccountDetails::apply();
|
||||
|
||||
if (!m_creatingNew) {
|
||||
// Disable "Cancel" button because all changes made to
|
||||
// existing account are always saved anyway.
|
||||
m_ui.m_buttonBox->button(QDialogButtonBox::StandardButton::Cancel)->setVisible(false);
|
||||
}
|
||||
|
||||
account<InoreaderServiceRoot>()->network()->oauth()->logout(false);
|
||||
account<InoreaderServiceRoot>()->network()->oauth()->setClientId(m_details->m_ui.m_txtAppId->lineEdit()->text());
|
||||
account<InoreaderServiceRoot>()->network()->oauth()->setClientSecret(m_details->m_ui.m_txtAppKey->lineEdit()->text());
|
||||
@ -51,12 +45,6 @@ void FormEditInoreaderAccount::apply() {
|
||||
void FormEditInoreaderAccount::loadAccountData() {
|
||||
FormAccountDetails::loadAccountData();
|
||||
|
||||
if (!m_creatingNew) {
|
||||
// Disable "Cancel" button because all changes made to
|
||||
// existing account are always saved anyway.
|
||||
m_ui.m_buttonBox->button(QDialogButtonBox::StandardButton::Cancel)->setVisible(false);
|
||||
}
|
||||
|
||||
m_details->m_oauth = account<InoreaderServiceRoot>()->network()->oauth();
|
||||
m_details->hookNetwork();
|
||||
|
||||
|
@ -62,11 +62,7 @@ void InoreaderAccountDetails::testSetup() {
|
||||
m_oauth->setClientSecret(m_ui.m_txtAppKey->lineEdit()->text());
|
||||
m_oauth->setRedirectUrl(m_ui.m_txtRedirectUrl->lineEdit()->text());
|
||||
|
||||
if (m_oauth->login()) {
|
||||
m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Ok,
|
||||
tr("You are already logged in."),
|
||||
tr("Access granted."));
|
||||
}
|
||||
m_oauth->login();
|
||||
}
|
||||
|
||||
void InoreaderAccountDetails::checkUsername(const QString& username) {
|
||||
|
@ -9,8 +9,6 @@
|
||||
|
||||
InoreaderFeed::InoreaderFeed(RootItem* parent) : Feed(parent) {}
|
||||
|
||||
InoreaderFeed::InoreaderFeed(const QSqlRecord& record) : Feed(record) {}
|
||||
|
||||
InoreaderServiceRoot* InoreaderFeed::serviceRoot() const {
|
||||
return qobject_cast<InoreaderServiceRoot*>(getParentServiceRoot());
|
||||
}
|
||||
|
@ -10,10 +10,10 @@ class InoreaderServiceRoot;
|
||||
class InoreaderFeed : public Feed {
|
||||
public:
|
||||
explicit InoreaderFeed(RootItem* parent = nullptr);
|
||||
explicit InoreaderFeed(const QSqlRecord& record);
|
||||
|
||||
InoreaderServiceRoot* serviceRoot() const;
|
||||
QList<Message> obtainNewMessages(bool* error_during_obtaining);
|
||||
|
||||
virtual QList<Message> obtainNewMessages(bool* error_during_obtaining);
|
||||
};
|
||||
|
||||
#endif // INOREADERFEED_H
|
||||
|
@ -11,10 +11,6 @@
|
||||
|
||||
OwnCloudFeed::OwnCloudFeed(RootItem* parent) : Feed(parent) {}
|
||||
|
||||
OwnCloudFeed::OwnCloudFeed(const QSqlRecord& record) : Feed(record) {}
|
||||
|
||||
OwnCloudFeed::~OwnCloudFeed() = default;
|
||||
|
||||
bool OwnCloudFeed::canBeDeleted() const {
|
||||
return true;
|
||||
}
|
||||
|
@ -12,16 +12,14 @@ class OwnCloudFeed : public Feed {
|
||||
|
||||
public:
|
||||
explicit OwnCloudFeed(RootItem* parent = nullptr);
|
||||
explicit OwnCloudFeed(const QSqlRecord& record);
|
||||
virtual ~OwnCloudFeed();
|
||||
|
||||
bool canBeDeleted() const;
|
||||
bool deleteViaGui();
|
||||
virtual bool canBeDeleted() const;
|
||||
virtual bool deleteViaGui();
|
||||
virtual QList<Message> obtainNewMessages(bool* error_during_obtaining);
|
||||
|
||||
private:
|
||||
bool removeItself();
|
||||
|
||||
OwnCloudServiceRoot* serviceRoot() const;
|
||||
QList<Message> obtainNewMessages(bool* error_during_obtaining);
|
||||
};
|
||||
|
||||
#endif // OWNCLOUDFEED_H
|
||||
|
@ -85,5 +85,3 @@ bool StandardCategory::removeItself() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
StandardCategory::StandardCategory(const QSqlRecord& record) : Category(record) {}
|
||||
|
@ -15,8 +15,6 @@ class StandardCategory : public Category {
|
||||
public:
|
||||
explicit StandardCategory(RootItem* parent_item = nullptr);
|
||||
explicit StandardCategory(const StandardCategory& other) = default;
|
||||
explicit StandardCategory(const QSqlRecord& record);
|
||||
virtual ~StandardCategory() = default;
|
||||
|
||||
StandardServiceRoot* serviceRoot() const;
|
||||
|
||||
|
@ -59,14 +59,6 @@ StandardFeed::StandardFeed(const StandardFeed& other)
|
||||
m_password = other.password();
|
||||
}
|
||||
|
||||
StandardFeed::StandardFeed(const QSqlRecord& record) : Feed(record) {
|
||||
m_networkError = QNetworkReply::NetworkError::NoError;
|
||||
}
|
||||
|
||||
StandardFeed::~StandardFeed() {
|
||||
qDebugNN << LOGSEC_CORE << "Destroying StandardFeed instance.";
|
||||
}
|
||||
|
||||
QList<QAction*> StandardFeed::contextMenuFeedsList() {
|
||||
return serviceRoot()->getContextMenuForFeed(this);
|
||||
}
|
||||
|
@ -11,7 +11,6 @@
|
||||
#include <QNetworkProxy>
|
||||
#include <QNetworkReply>
|
||||
#include <QPair>
|
||||
#include <QSqlRecord>
|
||||
|
||||
class StandardServiceRoot;
|
||||
|
||||
@ -39,8 +38,6 @@ class StandardFeed : public Feed {
|
||||
|
||||
explicit StandardFeed(RootItem* parent_item = nullptr);
|
||||
explicit StandardFeed(const StandardFeed& other);
|
||||
explicit StandardFeed(const QSqlRecord& record);
|
||||
virtual ~StandardFeed();
|
||||
|
||||
QList<QAction*> contextMenuFeedsList();
|
||||
QString additionalTooltip() const;
|
||||
|
@ -15,10 +15,6 @@
|
||||
|
||||
TtRssFeed::TtRssFeed(RootItem* parent) : Feed(parent) {}
|
||||
|
||||
TtRssFeed::TtRssFeed(const QSqlRecord& record) : Feed(record) {}
|
||||
|
||||
TtRssFeed::~TtRssFeed() = default;
|
||||
|
||||
TtRssServiceRoot* TtRssFeed::serviceRoot() const {
|
||||
return qobject_cast<TtRssServiceRoot*>(getParentServiceRoot());
|
||||
}
|
||||
|
@ -5,8 +5,6 @@
|
||||
|
||||
#include "services/abstract/feed.h"
|
||||
|
||||
#include <QSqlRecord>
|
||||
|
||||
class TtRssServiceRoot;
|
||||
|
||||
class TtRssFeed : public Feed {
|
||||
@ -14,17 +12,15 @@ class TtRssFeed : public Feed {
|
||||
|
||||
public:
|
||||
explicit TtRssFeed(RootItem* parent = nullptr);
|
||||
explicit TtRssFeed(const QSqlRecord& record);
|
||||
virtual ~TtRssFeed();
|
||||
|
||||
TtRssServiceRoot* serviceRoot() const;
|
||||
|
||||
bool canBeDeleted() const;
|
||||
bool deleteViaGui();
|
||||
virtual bool canBeDeleted() const;
|
||||
virtual bool deleteViaGui();
|
||||
virtual QList<Message> obtainNewMessages(bool* error_during_obtaining);
|
||||
|
||||
private:
|
||||
bool removeItself();
|
||||
|
||||
QList<Message> obtainNewMessages(bool* error_during_obtaining);
|
||||
};
|
||||
|
||||
#endif // TTRSSFEED_H
|
||||
|
Loading…
Reference in New Issue
Block a user