Save
This commit is contained in:
parent
db98dc5beb
commit
b36e84bc8c
@ -174,6 +174,7 @@
|
||||
|
||||
#define QUOTE_W_SPACE_DOT(x) " '" << (x) << "'."
|
||||
#define QUOTE_W_SPACE(x) " '" << (x) << "' "
|
||||
#define QUOTE_NO_SPACE(x) "'" << (x) << "'"
|
||||
|
||||
#ifndef QSL
|
||||
|
||||
|
@ -15,8 +15,8 @@ FormEditInoreaderAccount::FormEditInoreaderAccount(QWidget* parent)
|
||||
m_ui.setupUi(this);
|
||||
|
||||
GuiUtilities::applyDialogProperties(*this, qApp->icons()->miscIcon(QSL("inoreader")));
|
||||
|
||||
GuiUtilities::setLabelAsNotice(*m_ui.m_lblInfo, true);
|
||||
|
||||
m_ui.m_lblInfo->setText(tr("Specified redirect URL must start with \"http://localhost\" and "
|
||||
"must be configured in your OAuth \"application\".\n\n"
|
||||
"It is highly recommended to create your own \"Application ID\"."));
|
||||
|
@ -71,8 +71,6 @@ void InoreaderNetworkFactory::setUsername(const QString& username) {
|
||||
m_username = username;
|
||||
}
|
||||
|
||||
// NOTE: oauth: https://developers.google.com/oauthplayground/#step3&scopes=read%20write&auth_code=497815bc3362aba9ad60c5ae3e01811fe2da4bb5&refresh_token=bacb9c36f82ba92667282d6175bb857a091e7f0c&access_token_field=094f92bc7aedbd27fbebc3efc9172b258be8944a&url=https%3A%2F%2Fwww.inoreader.com%2Freader%2Fapi%2F0%2Fsubscription%2Flist&content_type=application%2Fjson&http_method=GET&useDefaultOauthCred=unchecked&oauthEndpointSelect=Custom&oauthAuthEndpointValue=https%3A%2F%2Fwww.inoreader.com%2Foauth2%2Fauth%3Fstate%3Dtest&oauthTokenEndpointValue=https%3A%2F%2Fwww.inoreader.com%2Foauth2%2Ftoken&oauthClientId=1000000595&expires_in=3599&oauthClientSecret=_6pYUZgtNLWwSaB9pC1YOz6p4zwu3haL&access_token_issue_date=1506198338&for_access_token=094f92bc7aedbd27fbebc3efc9172b258be8944a&includeCredentials=checked&accessTokenType=bearer&autoRefreshToken=unchecked&accessType=offline&prompt=consent&response_type=code
|
||||
|
||||
RootItem* InoreaderNetworkFactory::feedsCategories(bool obtain_icons) {
|
||||
Downloader downloader;
|
||||
QEventLoop loop;
|
||||
@ -114,7 +112,10 @@ QList<Message> InoreaderNetworkFactory::messages(const QString& stream_id, Feed:
|
||||
QString bearer = m_oauth2->bearer().toLocal8Bit();
|
||||
|
||||
if (bearer.isEmpty()) {
|
||||
qCritical("Cannot download messages for '%s', bearer is empty.", qPrintable(stream_id));
|
||||
qCriticalNN << LOGSEC_INOREADER
|
||||
<< "Cannot download messages for"
|
||||
<< QUOTE_NO_SPACE(stream_id)
|
||||
<< ", bearer is empty.";
|
||||
error = Feed::Status::AuthError;
|
||||
return QList<Message>();
|
||||
}
|
||||
@ -128,7 +129,11 @@ QList<Message> InoreaderNetworkFactory::messages(const QString& stream_id, Feed:
|
||||
loop.exec();
|
||||
|
||||
if (downloader.lastOutputError() != QNetworkReply::NetworkError::NoError) {
|
||||
qCritical("Cannot download messages for '%s', network error: %d.", qPrintable(stream_id), int(downloader.lastOutputError()));
|
||||
qCriticalNN << LOGSEC_INOREADER
|
||||
<< "Cannot download messages for "
|
||||
<< QUOTE_NO_SPACE(stream_id)
|
||||
<< ", network error:"
|
||||
<< QUOTE_W_SPACE_DOT(downloader.lastOutputError());
|
||||
error = Feed::Status::NetworkError;
|
||||
return QList<Message>();
|
||||
}
|
||||
|
@ -29,7 +29,9 @@ void FormOwnCloudFeedDetails::apply() {
|
||||
if (m_ui->m_txtTitle->lineEdit()->text() != m_editableFeed->title()) {
|
||||
if (!qobject_cast<OwnCloudServiceRoot*>(m_serviceRoot)->network()->renameFeed(m_ui->m_txtTitle->lineEdit()->text(),
|
||||
m_editableFeed->customId())) {
|
||||
qWarning("Nextcloud: Problem with feed renaming ID '%s'.", qPrintable(m_editableFeed->customId()));
|
||||
qCriticalNN << LOGSEC_NEXTCLOUD
|
||||
<< "Nextcloud: Problem with feed renaming ID:"
|
||||
<< QUOTE_W_SPACE_DOT(m_editableFeed->customId());
|
||||
}
|
||||
else {
|
||||
renamed = true;
|
||||
|
@ -98,7 +98,9 @@ OwnCloudUserResponse OwnCloudNetworkFactory::userInfo() {
|
||||
OwnCloudUserResponse user_response(QString::fromUtf8(result_raw));
|
||||
|
||||
if (network_reply.first != QNetworkReply::NoError) {
|
||||
qWarning("Nextcloud: Obtaining user info failed with error %d.", network_reply.first);
|
||||
qCriticalNN << LOGSEC_NEXTCLOUD
|
||||
<< "Obtaining user info failed with error"
|
||||
<< QUOTE_W_SPACE_DOT(network_reply.first);
|
||||
}
|
||||
|
||||
m_lastError = network_reply.first;
|
||||
@ -120,10 +122,13 @@ OwnCloudStatusResponse OwnCloudNetworkFactory::status() {
|
||||
headers);
|
||||
OwnCloudStatusResponse status_response(QString::fromUtf8(result_raw));
|
||||
|
||||
qDebugNN << "Raw status data is:" << result_raw;
|
||||
qDebugNN << LOGSEC_NEXTCLOUD
|
||||
<< "Raw status data is:" << QUOTE_W_SPACE_DOT(result_raw);
|
||||
|
||||
if (network_reply.first != QNetworkReply::NoError) {
|
||||
qWarning("Nextcloud: Obtaining status info failed with error %d.", network_reply.first);
|
||||
qCriticalNN << LOGSEC_NEXTCLOUD
|
||||
<< "Obtaining status info failed with error"
|
||||
<< QUOTE_W_SPACE_DOT(network_reply.first);
|
||||
}
|
||||
|
||||
m_lastError = network_reply.first;
|
||||
@ -145,7 +150,9 @@ OwnCloudGetFeedsCategoriesResponse OwnCloudNetworkFactory::feedsCategories() {
|
||||
headers);
|
||||
|
||||
if (network_reply.first != QNetworkReply::NoError) {
|
||||
qWarning("Nextcloud: Obtaining of categories failed with error %d.", network_reply.first);
|
||||
qCriticalNN << LOGSEC_NEXTCLOUD
|
||||
<< "Obtaining of categories failed with error"
|
||||
<< QUOTE_W_SPACE_DOT(network_reply.first);
|
||||
m_lastError = network_reply.first;
|
||||
return OwnCloudGetFeedsCategoriesResponse();
|
||||
}
|
||||
@ -161,7 +168,9 @@ OwnCloudGetFeedsCategoriesResponse OwnCloudNetworkFactory::feedsCategories() {
|
||||
headers);
|
||||
|
||||
if (network_reply.first != QNetworkReply::NoError) {
|
||||
qWarning("Nextcloud: Obtaining of feeds failed with error %d.", network_reply.first);
|
||||
qCriticalNN << LOGSEC_NEXTCLOUD
|
||||
<< "Obtaining of feeds failed with error"
|
||||
<< QUOTE_W_SPACE_DOT(network_reply.first);
|
||||
m_lastError = network_reply.first;
|
||||
return OwnCloudGetFeedsCategoriesResponse();
|
||||
}
|
||||
@ -189,7 +198,9 @@ bool OwnCloudNetworkFactory::deleteFeed(const QString& feed_id) {
|
||||
m_lastError = network_reply.first;
|
||||
|
||||
if (network_reply.first != QNetworkReply::NoError) {
|
||||
qWarning("Nextcloud: Obtaining of categories failed with error %d.", network_reply.first);
|
||||
qCriticalNN << LOGSEC_NEXTCLOUD
|
||||
<< "Obtaining of categories failed with error"
|
||||
<< QUOTE_W_SPACE_DOT(network_reply.first);
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
@ -220,7 +231,9 @@ bool OwnCloudNetworkFactory::createFeed(const QString& url, int parent_id) {
|
||||
m_lastError = network_reply.first;
|
||||
|
||||
if (network_reply.first != QNetworkReply::NoError) {
|
||||
qWarning("Nextcloud: Creating of category failed with error %d.", network_reply.first);
|
||||
qCriticalNN << LOGSEC_NEXTCLOUD
|
||||
<< "Creating of category failed with error"
|
||||
<< QUOTE_W_SPACE_DOT(network_reply.first);
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
@ -251,7 +264,9 @@ bool OwnCloudNetworkFactory::renameFeed(const QString& new_name, const QString&
|
||||
m_lastError = network_reply.first;
|
||||
|
||||
if (network_reply.first != QNetworkReply::NoError) {
|
||||
qWarning("Nextcloud: Renaming of feed failed with error %d.", network_reply.first);
|
||||
qCriticalNN << LOGSEC_NEXTCLOUD
|
||||
<< "Renaming of feed failed with error"
|
||||
<< QUOTE_W_SPACE_DOT(network_reply.first);
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
@ -283,7 +298,9 @@ OwnCloudGetMessagesResponse OwnCloudNetworkFactory::getMessages(int feed_id) {
|
||||
OwnCloudGetMessagesResponse msgs_response(QString::fromUtf8(result_raw));
|
||||
|
||||
if (network_reply.first != QNetworkReply::NoError) {
|
||||
qWarning("Nextcloud: Obtaining messages failed with error %d.", network_reply.first);
|
||||
qCriticalNN << LOGSEC_NEXTCLOUD
|
||||
<< "Obtaining messages failed with error"
|
||||
<< QUOTE_W_SPACE_DOT(network_reply.first);
|
||||
}
|
||||
|
||||
m_lastError = network_reply.first;
|
||||
@ -320,7 +337,9 @@ QNetworkReply::NetworkError OwnCloudNetworkFactory::triggerFeedUpdate(int feed_i
|
||||
headers);
|
||||
|
||||
if (network_reply.first != QNetworkReply::NoError) {
|
||||
qWarning("Nextcloud: Feeds update failed with error %d.", network_reply.first);
|
||||
qCriticalNN << LOGSEC_NEXTCLOUD
|
||||
<< "Feeds update failed with error"
|
||||
<< QUOTE_W_SPACE_DOT(network_reply.first);
|
||||
}
|
||||
|
||||
return (m_lastError = network_reply.first);
|
||||
@ -588,8 +607,10 @@ RootItem* OwnCloudGetFeedsCategoriesResponse::feedsCategories(bool obtain_icons)
|
||||
if (feed->title().isEmpty()) {
|
||||
if (feed->url().isEmpty()) {
|
||||
// We cannot add feed which has no title and no url to RSS Guard!!!
|
||||
qCritical("Skipping feed with custom ID '%s' from adding to RSS Guard because it has no title and url.",
|
||||
qPrintable(feed->customId()));
|
||||
qCriticalNN << LOGSEC_NEXTCLOUD
|
||||
<< "Skipping feed with custom ID"
|
||||
<< QUOTE_W_SPACE(feed->customId())
|
||||
<< "from adding to RSS Guard because it has no title and url.";
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
@ -598,7 +619,9 @@ RootItem* OwnCloudGetFeedsCategoriesResponse::feedsCategories(bool obtain_icons)
|
||||
}
|
||||
|
||||
cats.value(QString::number(item["folderId"].toInt()))->appendChild(feed);
|
||||
qDebug("Custom ID of next fetched processed Nextcloud feed is '%s'.", qPrintable(feed->customId()));
|
||||
qDebugNN << LOGSEC_NEXTCLOUD
|
||||
<< "Custom ID of next fetched processed feed is"
|
||||
<< QUOTE_W_SPACE_DOT(feed->customId());
|
||||
}
|
||||
|
||||
return parent;
|
||||
|
@ -21,10 +21,10 @@ bool OwnCloudFeed::canBeEdited() const {
|
||||
}
|
||||
|
||||
bool OwnCloudFeed::editViaGui() {
|
||||
QPointer<FormOwnCloudFeedDetails> form_pointer = new FormOwnCloudFeedDetails(serviceRoot(), qApp->mainFormWidget());
|
||||
QScopedPointer<FormOwnCloudFeedDetails> form_pointer(new FormOwnCloudFeedDetails(serviceRoot(),
|
||||
qApp->mainFormWidget()));
|
||||
|
||||
form_pointer.data()->addEditFeed(this, nullptr);
|
||||
delete form_pointer.data();
|
||||
form_pointer->addEditFeed(this, nullptr);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -35,8 +35,8 @@ QString OwnCloudServiceEntryPoint::code() const {
|
||||
}
|
||||
|
||||
QString OwnCloudServiceEntryPoint::description() const {
|
||||
return QObject::tr("The News app is an RSS/Atom feed aggregator. It is part of Nextcloud suite. This plugin implements %1 API.")
|
||||
.arg(OWNCLOUD_API_VERSION);
|
||||
return QObject::tr("The News app is an RSS/Atom feed aggregator. "
|
||||
"It is part of Nextcloud suite. This plugin implements %1 API.").arg(OWNCLOUD_API_VERSION);
|
||||
}
|
||||
|
||||
QString OwnCloudServiceEntryPoint::author() const {
|
||||
|
@ -40,7 +40,7 @@ bool OwnCloudServiceRoot::canBeDeleted() const {
|
||||
bool OwnCloudServiceRoot::editViaGui() {
|
||||
QScopedPointer<FormEditOwnCloudAccount> form_pointer(new FormEditOwnCloudAccount(qApp->mainFormWidget()));
|
||||
|
||||
form_pointer.data()->execForEdit(this);
|
||||
form_pointer->execForEdit(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -170,7 +170,7 @@ void OwnCloudServiceRoot::addNewFeed(const QString& url) {
|
||||
|
||||
QScopedPointer<FormOwnCloudFeedDetails> form_pointer(new FormOwnCloudFeedDetails(this, qApp->mainFormWidget()));
|
||||
|
||||
form_pointer.data()->addEditFeed(nullptr, this, url);
|
||||
form_pointer->addEditFeed(nullptr, this, url);
|
||||
qApp->feedUpdateLock()->unlock();
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,10 @@ Message AtomParser::extractMessage(const QDomElement& msg_element, QDateTime cur
|
||||
|
||||
if (attribute == QSL("enclosure")) {
|
||||
new_message.m_enclosures.append(Enclosure(link.attribute(QSL("href")), link.attribute(QSL("type"))));
|
||||
qDebug("Found enclosure '%s' for the message.", qPrintable(new_message.m_enclosures.last().m_url));
|
||||
qDebugNN << LOGSEC_CORE
|
||||
<< "Found enclosure"
|
||||
<< QUOTE_W_SPACE(new_message.m_enclosures.last().m_url)
|
||||
<< "for the message.";
|
||||
}
|
||||
else if (attribute.isEmpty() || attribute == QSL("alternate")) {
|
||||
last_link_alternate = link.attribute(QSL("href"));
|
||||
|
@ -16,7 +16,6 @@ FeedParser::~FeedParser() = default;
|
||||
|
||||
QList<Message> FeedParser::messages() {
|
||||
QString feed_author = feedAuthor();
|
||||
|
||||
QList<Message> messages;
|
||||
QDateTime current_time = QDateTime::currentDateTime();
|
||||
|
||||
@ -38,7 +37,9 @@ QList<Message> FeedParser::messages() {
|
||||
messages.append(new_message);
|
||||
}
|
||||
catch (const ApplicationException& ex) {
|
||||
qDebug() << ex.message();
|
||||
qDebugNN << LOGSEC_CORE
|
||||
<< "Problem when extracting message: "
|
||||
<< ex.message();
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,7 +48,6 @@ QList<Message> FeedParser::messages() {
|
||||
|
||||
QList<Enclosure> FeedParser::mrssGetEnclosures(const QDomElement& msg_element) const {
|
||||
QList<Enclosure> enclosures;
|
||||
|
||||
auto content_list = msg_element.elementsByTagNameNS(m_mrssNamespace, "content");
|
||||
|
||||
for (int i = 0; i < content_list.size(); i++) {
|
||||
@ -84,8 +84,8 @@ QStringList FeedParser::textsFromPath(const QDomElement& element, const QString&
|
||||
const QString& xml_path, bool only_first) const {
|
||||
QStringList paths = xml_path.split('/');
|
||||
QStringList result;
|
||||
|
||||
QList<QDomElement> current_elements;
|
||||
|
||||
current_elements.append(element);
|
||||
|
||||
while (!paths.isEmpty()) {
|
||||
|
@ -34,7 +34,7 @@ FormStandardCategoryDetails::FormStandardCategoryDetails(StandardServiceRoot* se
|
||||
}
|
||||
|
||||
FormStandardCategoryDetails::~FormStandardCategoryDetails() {
|
||||
qDebug("Destroying FormCategoryDetails instance.");
|
||||
qDebugNN << LOGSEC_GUI << "Destroying FormCategoryDetails instance.";
|
||||
}
|
||||
|
||||
void FormStandardCategoryDetails::createConnections() {
|
||||
|
@ -103,6 +103,7 @@ void FormStandardImportExport::onParsingStarted() {
|
||||
void FormStandardImportExport::onParsingFinished(int count_failed, int count_succeeded, bool parsing_error) {
|
||||
Q_UNUSED(count_failed)
|
||||
Q_UNUSED(count_succeeded)
|
||||
|
||||
m_ui->m_progressBar->setVisible(false);
|
||||
m_ui->m_progressBar->setValue(0);
|
||||
m_model->checkAllItems();
|
||||
|
@ -58,7 +58,10 @@ Message RssParser::extractMessage(const QDomElement& msg_element, QDateTime curr
|
||||
|
||||
if (!elem_enclosure.isEmpty()) {
|
||||
new_message.m_enclosures.append(Enclosure(elem_enclosure, elem_enclosure_type));
|
||||
qDebug("Found enclosure '%s' for the message.", qPrintable(elem_enclosure));
|
||||
qDebugNN << LOGSEC_CORE
|
||||
<< "Found enclosure"
|
||||
<< QUOTE_W_SPACE(elem_enclosure)
|
||||
<< "for the message.";
|
||||
}
|
||||
else {
|
||||
new_message.m_enclosures.append(mrssGetEnclosures(msg_element));
|
||||
|
@ -48,7 +48,7 @@ StandardFeed::StandardFeed(const StandardFeed& other)
|
||||
}
|
||||
|
||||
StandardFeed::~StandardFeed() {
|
||||
qDebug("Destroying Feed instance.");
|
||||
qDebugNN << LOGSEC_CORE << "Destroying Feed instance.";
|
||||
}
|
||||
|
||||
QList<QAction*> StandardFeed::contextMenuFeedsList() {
|
||||
@ -197,11 +197,10 @@ QPair<StandardFeed*, QNetworkReply::NetworkError> StandardFeed::guessFeed(const
|
||||
&error_msg,
|
||||
&error_line,
|
||||
&error_column)) {
|
||||
qDebug("XML of feed '%s' is not valid and cannot be loaded. Error: '%s' "
|
||||
"(line %d, column %d).",
|
||||
qPrintable(url),
|
||||
qPrintable(error_msg),
|
||||
error_line, error_column);
|
||||
qDebugNN << LOGSEC_CORE
|
||||
<< "XML of feed" << QUOTE_W_SPACE(url) << "is not valid and cannot be loaded. "
|
||||
<< "Error:" << QUOTE_W_SPACE(error_msg) << "(line " << error_line
|
||||
<< ", column " << error_column << ").";
|
||||
result.second = QNetworkReply::UnknownContentError;
|
||||
|
||||
// XML is invalid, exit.
|
||||
@ -337,7 +336,8 @@ bool StandardFeed::editItself(StandardFeed* new_feed_data) {
|
||||
new_feed_data->autoUpdateType(), new_feed_data->autoUpdateInitialInterval(),
|
||||
new_feed_data->type())) {
|
||||
// Persistent storage update failed, no way to continue now.
|
||||
qWarning("Self-editing of standard feed failed.");
|
||||
qWarningNN << LOGSEC_CORE
|
||||
<< "Self-editing of standard feed failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -414,7 +414,11 @@ QList<Message> StandardFeed::obtainNewMessages(bool* error_during_obtaining) {
|
||||
headers).first;
|
||||
|
||||
if (m_networkError != QNetworkReply::NoError) {
|
||||
qWarning("Error during fetching of new messages for feed '%s' (id %d).", qPrintable(url()), id());
|
||||
qWarningNN << LOGSEC_CORE
|
||||
<< "Error"
|
||||
<< QUOTE_W_SPACE(m_networkError)
|
||||
<< "during fetching of new messages for feed"
|
||||
<< QUOTE_W_SPACE_DOT(url());
|
||||
setStatus(Status::NetworkError);
|
||||
*error_during_obtaining = true;
|
||||
return QList<Message>();
|
||||
|
@ -228,7 +228,8 @@ void FeedsImportExportModel::importAsOPML20(const QByteArray& data, bool fetch_m
|
||||
QIcon category_icon = qApp->icons()->fromByteArray(child_element.attribute(QSL("rssguard:icon")).toLocal8Bit());
|
||||
|
||||
if (category_title.isEmpty()) {
|
||||
qWarning("Given OMPL file provided category without valid text attribute. Using fallback name.");
|
||||
qWarningNN << LOGSEC_CORE
|
||||
<< "Given OMPL file provided category without valid text attribute. Using fallback name.";
|
||||
category_title = child_element.attribute(QSL("title"));
|
||||
|
||||
if (category_title.isEmpty()) {
|
||||
@ -311,7 +312,7 @@ void FeedsImportExportModel::importAsTxtURLPerLine(const QByteArray& data, bool
|
||||
qApp->processEvents();
|
||||
}
|
||||
else {
|
||||
qWarning("Detected empty URL when parsing input TXT [one URL per line] data.");
|
||||
qWarningNN << LOGSEC_CORE << "Detected empty URL when parsing input TXT [one URL per line] data.";
|
||||
failed++;
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ void StandardServiceRoot::start(bool freshly_activated) {
|
||||
}
|
||||
|
||||
void StandardServiceRoot::stop() {
|
||||
qDebug("Stopping StandardServiceRoot instance.");
|
||||
qDebugNN << LOGSEC_CORE << "Stopping StandardServiceRoot instance.";
|
||||
}
|
||||
|
||||
QString StandardServiceRoot::code() const {
|
||||
|
@ -67,7 +67,8 @@ QNetworkReply::NetworkError TtRssNetworkFactory::lastError() const {
|
||||
|
||||
TtRssLoginResponse TtRssNetworkFactory::login() {
|
||||
if (!m_sessionId.isEmpty()) {
|
||||
qDebug("TT-RSS: Session ID is not empty before login, logging out first.");
|
||||
qWarningNN << LOGSEC_TTRSS
|
||||
<< "Session ID is not empty before login, logging out first.";
|
||||
logout();
|
||||
}
|
||||
|
||||
@ -98,7 +99,9 @@ TtRssLoginResponse TtRssNetworkFactory::login() {
|
||||
m_lastLoginTime = QDateTime::currentDateTime();
|
||||
}
|
||||
else {
|
||||
qWarning("TT-RSS: Login failed with error %d.", network_reply.first);
|
||||
qWarningNN << LOGSEC_TTRSS
|
||||
<< "Login failed with error:"
|
||||
<< QUOTE_W_SPACE_DOT(network_reply.first);
|
||||
}
|
||||
|
||||
m_lastError = network_reply.first;
|
||||
@ -132,13 +135,16 @@ TtRssResponse TtRssNetworkFactory::logout() {
|
||||
m_sessionId.clear();
|
||||
}
|
||||
else {
|
||||
qWarning("TT-RSS: Logout failed with error %d.", network_reply.first);
|
||||
qWarningNN << LOGSEC_TTRSS
|
||||
<< "Logout failed with error:"
|
||||
<< QUOTE_W_SPACE_DOT(network_reply.first);
|
||||
}
|
||||
|
||||
return TtRssResponse(QString::fromUtf8(result_raw));
|
||||
}
|
||||
else {
|
||||
qWarning("TT-RSS: Cannot logout because session ID is empty.");
|
||||
qWarningNN << LOGSEC_TTRSS
|
||||
<< "Cannot logout because session ID is empty.";
|
||||
m_lastError = QNetworkReply::NoError;
|
||||
return TtRssResponse();
|
||||
}
|
||||
@ -176,7 +182,9 @@ TtRssGetFeedsCategoriesResponse TtRssNetworkFactory::getFeedsCategories() {
|
||||
}
|
||||
|
||||
if (network_reply.first != QNetworkReply::NoError) {
|
||||
qWarning("TT-RSS: getFeedTree failed with error %d.", network_reply.first);
|
||||
qWarningNN << LOGSEC_TTRSS
|
||||
<< "getFeedTree failed with error:"
|
||||
<< QUOTE_W_SPACE_DOT(network_reply.first);
|
||||
}
|
||||
|
||||
m_lastError = network_reply.first;
|
||||
@ -226,7 +234,9 @@ TtRssGetHeadlinesResponse TtRssNetworkFactory::getHeadlines(int feed_id, int lim
|
||||
//IOFactory::writeFile("aaa", result_raw);
|
||||
|
||||
if (network_reply.first != QNetworkReply::NoError) {
|
||||
qWarning("TT-RSS: getHeadlines failed with error %d.", network_reply.first);
|
||||
qWarningNN << LOGSEC_TTRSS
|
||||
<< "getHeadlines failed with error:"
|
||||
<< QUOTE_W_SPACE_DOT(network_reply.first);
|
||||
}
|
||||
|
||||
m_lastError = network_reply.first;
|
||||
|
Loading…
x
Reference in New Issue
Block a user