Now, impor feature merges existing content.
This commit is contained in:
parent
f044032f63
commit
418511bdc8
@ -16,7 +16,7 @@ Fixed:
|
|||||||
Added:
|
Added:
|
||||||
<ul>
|
<ul>
|
||||||
<li>Added NSIS-based "portable" installer for Windows and restructured update process.</li>
|
<li>Added NSIS-based "portable" installer for Windows and restructured update process.</li>
|
||||||
<li>Added experimental support for exporting feeds to OPML 2.0.</li>
|
<li>Added experimental support for exporting and importing feeds to/from OPML 2.0.</li>
|
||||||
<li>Feeds now change their color to red if their network status reports error - feed is not reachable or was moved or is unavailable due to other errors.</li>
|
<li>Feeds now change their color to red if their network status reports error - feed is not reachable or was moved or is unavailable due to other errors.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -1,21 +1,31 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<releases>
|
<releases>
|
||||||
<release version="1.9.9.9" type="feature">
|
<release version="2.0.0.0" type="feature">
|
||||||
<url platform="x86" os="Windows">https://bitbucket.org/skunkos/rssguard/downloads/rssguard-2.0.0.0-win32-test.exe</url>
|
<url platform="x86" os="Windows">https://bitbucket.org/skunkos/rssguard/downloads/rssguard-2.0.0.0-win32.exe</url>
|
||||||
<changes>
|
<changes>
|
||||||
<![CDATA[<body>
|
<![CDATA[<body>
|
||||||
Fixed:
|
Fixed:
|
||||||
<ul>
|
<ul>
|
||||||
<li>Improved behavior of updater.</li>
|
<li>Improved behavior of updater. Switched to NSIS installers.</li>
|
||||||
|
<li>Adjusted OS/2 icon handling.</li>
|
||||||
|
<li>Toolbars tweaked.</li>
|
||||||
|
<li>Source code huge refactorings.</li>
|
||||||
|
<li>Flag icons are now separated into their own directory.</li>
|
||||||
|
<li>File downloaders are now thinner.</li>
|
||||||
|
<li>GUI tweaked.</li>
|
||||||
|
<li>Database connections are only used when really needed.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
Added:
|
Added:
|
||||||
<ul>
|
<ul>
|
||||||
<li>Added NSIS-based "portable" installer for Windows and restructured update process.</li>
|
<li>Added NSIS-based "portable" installer for Windows and restructured update process.</li>
|
||||||
|
<li>Added experimental support for exporting and importing feeds to/from OPML 2.0.</li>
|
||||||
|
<li>Feeds now change their color to red if their network status reports error - feed is not reachable or was moved or is unavailable due to other errors.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
Changed:
|
Changed:
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>Added newly-compiled SQL libraries - MariaDB, Postgre SQL.</li>
|
||||||
<li>Updated bundled OpenSSL libraries for Windows portable version.</li>
|
<li>Updated bundled OpenSSL libraries for Windows portable version.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</body>]]>
|
</body>]]>
|
||||||
|
@ -564,10 +564,21 @@ bool FeedsModel::mergeModel(FeedsImportExportModel *model, QString &output_messa
|
|||||||
original_parents.push(new_category);
|
original_parents.push(new_category);
|
||||||
new_parents.push(source_category);
|
new_parents.push(source_category);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
// Add category failed, but this can mean that the same category (with same title)
|
||||||
|
// already exists. If such a category exists in current parent, then find it and
|
||||||
|
// add descendants to it.
|
||||||
|
FeedsModelRootItem *existing_category = target_parent->child(FeedsModelRootItem::Category, new_category->title());
|
||||||
|
|
||||||
|
if (existing_category != NULL) {
|
||||||
|
original_parents.push(existing_category);
|
||||||
|
new_parents.push(source_category);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
some_feed_category_error = true;
|
some_feed_category_error = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (source_item->kind() == FeedsModelRootItem::Feed) {
|
else if (source_item->kind() == FeedsModelRootItem::Feed) {
|
||||||
FeedsModelFeed *source_feed = static_cast<FeedsModelFeed*>(source_item);
|
FeedsModelFeed *source_feed = static_cast<FeedsModelFeed*>(source_item);
|
||||||
FeedsModelFeed *new_feed = new FeedsModelFeed(*source_feed);
|
FeedsModelFeed *new_feed = new FeedsModelFeed(*source_feed);
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
#include "core/feedsmodelrootitem.h"
|
#include "core/feedsmodelrootitem.h"
|
||||||
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
|
#include "core/feedsmodelcategory.h"
|
||||||
|
#include "core/feedsmodelfeed.h"
|
||||||
|
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
|
|
||||||
@ -78,6 +80,19 @@ bool FeedsModelRootItem::removeChild(FeedsModelRootItem *child) {
|
|||||||
return m_childItems.removeOne(child);
|
return m_childItems.removeOne(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FeedsModelRootItem *FeedsModelRootItem::child(FeedsModelRootItem::Kind kind_of_child, const QString &identifier) {
|
||||||
|
foreach (FeedsModelRootItem *child, childItems()) {
|
||||||
|
if (child->kind() == kind_of_child) {
|
||||||
|
if (kind_of_child == Category && static_cast<FeedsModelCategory*>(child)->title() == identifier ||
|
||||||
|
kind_of_child == Feed && static_cast<FeedsModelFeed*>(child)->url() == identifier) {
|
||||||
|
return child;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
int FeedsModelRootItem::countOfUnreadMessages() const {
|
int FeedsModelRootItem::countOfUnreadMessages() const {
|
||||||
int total_count = 0;
|
int total_count = 0;
|
||||||
|
|
||||||
|
@ -53,6 +53,8 @@ class FeedsModelRootItem {
|
|||||||
return m_childItems.value(row);
|
return m_childItems.value(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual FeedsModelRootItem *child(FeedsModelRootItem::Kind kind_of_child, const QString &identifier);
|
||||||
|
|
||||||
inline virtual int childCount() const {
|
inline virtual int childCount() const {
|
||||||
return m_childItems.size();
|
return m_childItems.size();
|
||||||
}
|
}
|
||||||
|
@ -240,16 +240,14 @@ void FormCategoryDetails::loadCategories(const QList<FeedsModelCategory*> catego
|
|||||||
QVariant::fromValue((void*) root_item));
|
QVariant::fromValue((void*) root_item));
|
||||||
|
|
||||||
foreach (FeedsModelCategory *category, categories) {
|
foreach (FeedsModelCategory *category, categories) {
|
||||||
if (input_category != NULL && (category == input_category ||
|
if (input_category != NULL && (category == input_category || category->isChildOf(input_category))) {
|
||||||
category->isChildOf(input_category))) {
|
|
||||||
// This category cannot be selected as the new
|
// This category cannot be selected as the new
|
||||||
// parent for currently edited category, so
|
// parent for currently edited category, so
|
||||||
// don't add it.
|
// don't add it.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_ui->m_cmbParentCategory->addItem(category->data(FDS_MODEL_TITLE_INDEX,
|
m_ui->m_cmbParentCategory->addItem(category->data(FDS_MODEL_TITLE_INDEX, Qt::DecorationRole).value<QIcon>(),
|
||||||
Qt::DecorationRole).value<QIcon>(),
|
|
||||||
category->title(),
|
category->title(),
|
||||||
QVariant::fromValue((void*) category));
|
QVariant::fromValue((void*) category));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user