From bf5d182f2a842018d282889e2f9543f8feead446 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Tue, 9 Mar 2021 11:23:58 +0100 Subject: [PATCH] fix correct % progress when importing feeds --- src/librssguard/services/gmail/gui/gmailaccountdetails.cpp | 2 +- .../services/inoreader/gui/inoreaderaccountdetails.cpp | 2 +- .../services/standard/standardfeedsimportexportmodel.cpp | 3 +-- .../services/standard/standardfeedsimportexportmodel.h | 3 --- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/librssguard/services/gmail/gui/gmailaccountdetails.cpp b/src/librssguard/services/gmail/gui/gmailaccountdetails.cpp index 6d59751ec..88d7bfa43 100644 --- a/src/librssguard/services/gmail/gui/gmailaccountdetails.cpp +++ b/src/librssguard/services/gmail/gui/gmailaccountdetails.cpp @@ -17,7 +17,7 @@ GmailAccountDetails::GmailAccountDetails(QWidget* parent) #if defined(GMAIL_OFFICIAL_SUPPORT) m_ui.m_lblInfo->setText(tr("There are some preconfigured OAuth tokens so you do not have to fill in your " "client ID/secret, but it is strongly recommended to obtain your " - "own as it preconfigured tokens have limited global usage quota. If you wash " + "own as it preconfigured tokens have limited global usage quota. If you wish " "to use preconfigured tokens, simply leave those fields empty and make sure " "to leave default value of redirect URL.")); #else diff --git a/src/librssguard/services/inoreader/gui/inoreaderaccountdetails.cpp b/src/librssguard/services/inoreader/gui/inoreaderaccountdetails.cpp index f28a39e32..4704978a7 100755 --- a/src/librssguard/services/inoreader/gui/inoreaderaccountdetails.cpp +++ b/src/librssguard/services/inoreader/gui/inoreaderaccountdetails.cpp @@ -18,7 +18,7 @@ InoreaderAccountDetails::InoreaderAccountDetails(QWidget* parent) #if defined(INOREADER_OFFICIAL_SUPPORT) m_ui.m_lblInfo->setText(tr("There are some preconfigured OAuth tokens so you do not have to fill in your " "client ID/secret, but it is strongly recommended to obtain your " - "own as it preconfigured tokens have limited global usage quota. If you wash " + "own as it preconfigured tokens have limited global usage quota. If you wish " "to use preconfigured tokens, simply leave those fields empty and make sure " "to leave default value of redirect URL.")); #else diff --git a/src/librssguard/services/standard/standardfeedsimportexportmodel.cpp b/src/librssguard/services/standard/standardfeedsimportexportmodel.cpp index a8449fcca..1e54a6968 100644 --- a/src/librssguard/services/standard/standardfeedsimportexportmodel.cpp +++ b/src/librssguard/services/standard/standardfeedsimportexportmodel.cpp @@ -174,14 +174,13 @@ void FeedsImportExportModel::importAsOPML20(const QByteArray& data, bool fetch_m QStack elements_to_process; elements_to_process.push(opml_document.documentElement().elementsByTagName(QSL("body")).at(0).toElement()); + total = opml_document.elementsByTagName("outline").size(); while (!elements_to_process.isEmpty()) { RootItem* active_model_item = model_items.pop(); QDomElement active_element = elements_to_process.pop(); int current_count = active_element.childNodes().size(); - total += current_count; - for (int i = 0; i < current_count; i++) { QDomNode child = active_element.childNodes().at(i); diff --git a/src/librssguard/services/standard/standardfeedsimportexportmodel.h b/src/librssguard/services/standard/standardfeedsimportexportmodel.h index 7968dea68..ff1244368 100644 --- a/src/librssguard/services/standard/standardfeedsimportexportmodel.h +++ b/src/librssguard/services/standard/standardfeedsimportexportmodel.h @@ -31,9 +31,6 @@ class FeedsImportExportModel : public AccountCheckSortedModel { void setMode(const Mode& mode); signals: - - // These signals are emitted when user selects some data - // to be imported/parsed into the model. void parsingStarted(); void parsingProgress(int completed, int total); void parsingFinished(int count_failed, int count_succeeded, bool parsing_error);