fix correct % progress when importing feeds
This commit is contained in:
parent
0154cd5ef4
commit
bf5d182f2a
@ -17,7 +17,7 @@ GmailAccountDetails::GmailAccountDetails(QWidget* parent)
|
|||||||
#if defined(GMAIL_OFFICIAL_SUPPORT)
|
#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 "
|
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 "
|
"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 use preconfigured tokens, simply leave those fields empty and make sure "
|
||||||
"to leave default value of redirect URL."));
|
"to leave default value of redirect URL."));
|
||||||
#else
|
#else
|
||||||
|
@ -18,7 +18,7 @@ InoreaderAccountDetails::InoreaderAccountDetails(QWidget* parent)
|
|||||||
#if defined(INOREADER_OFFICIAL_SUPPORT)
|
#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 "
|
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 "
|
"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 use preconfigured tokens, simply leave those fields empty and make sure "
|
||||||
"to leave default value of redirect URL."));
|
"to leave default value of redirect URL."));
|
||||||
#else
|
#else
|
||||||
|
@ -174,14 +174,13 @@ void FeedsImportExportModel::importAsOPML20(const QByteArray& data, bool fetch_m
|
|||||||
QStack<QDomElement> elements_to_process;
|
QStack<QDomElement> elements_to_process;
|
||||||
|
|
||||||
elements_to_process.push(opml_document.documentElement().elementsByTagName(QSL("body")).at(0).toElement());
|
elements_to_process.push(opml_document.documentElement().elementsByTagName(QSL("body")).at(0).toElement());
|
||||||
|
total = opml_document.elementsByTagName("outline").size();
|
||||||
|
|
||||||
while (!elements_to_process.isEmpty()) {
|
while (!elements_to_process.isEmpty()) {
|
||||||
RootItem* active_model_item = model_items.pop();
|
RootItem* active_model_item = model_items.pop();
|
||||||
QDomElement active_element = elements_to_process.pop();
|
QDomElement active_element = elements_to_process.pop();
|
||||||
int current_count = active_element.childNodes().size();
|
int current_count = active_element.childNodes().size();
|
||||||
|
|
||||||
total += current_count;
|
|
||||||
|
|
||||||
for (int i = 0; i < current_count; i++) {
|
for (int i = 0; i < current_count; i++) {
|
||||||
QDomNode child = active_element.childNodes().at(i);
|
QDomNode child = active_element.childNodes().at(i);
|
||||||
|
|
||||||
|
@ -31,9 +31,6 @@ class FeedsImportExportModel : public AccountCheckSortedModel {
|
|||||||
void setMode(const Mode& mode);
|
void setMode(const Mode& mode);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
// These signals are emitted when user selects some data
|
|
||||||
// to be imported/parsed into the model.
|
|
||||||
void parsingStarted();
|
void parsingStarted();
|
||||||
void parsingProgress(int completed, int total);
|
void parsingProgress(int completed, int total);
|
||||||
void parsingFinished(int count_failed, int count_succeeded, bool parsing_error);
|
void parsingFinished(int count_failed, int count_succeeded, bool parsing_error);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user