This commit is contained in:
Martin Rotter 2016-01-01 18:36:14 +01:00
parent 9f4e38f30a
commit 7bf67b0581
3 changed files with 20 additions and 9 deletions

View File

@ -1,6 +1,13 @@
3.0.1
—————
Fixed:
▪ Fixed problem with importing invalid OPML 2.0 files. (bug #145)
3.0.1
—————
Added:
▪ Background color of notifications is now changeable. (issue #134)

View File

@ -57,8 +57,8 @@ RootItem *FeedsImportExportModel::rootItem() const {
return m_rootItem;
}
void FeedsImportExportModel::setRootItem(RootItem *rootItem) {
m_rootItem = rootItem;
void FeedsImportExportModel::setRootItem(RootItem *root_item) {
m_rootItem = root_item;
}
bool FeedsImportExportModel::exportToOMPL20(QByteArray &result) {
@ -264,17 +264,21 @@ void FeedsImportExportModel::setMode(const FeedsImportExportModel::Mode &mode) {
}
void FeedsImportExportModel::checkAllItems() {
foreach (RootItem *root_child, m_rootItem->childItems()) {
if (root_child->kind() != RootItemKind::Bin) {
setData(indexForItem(root_child), Qt::Checked, Qt::CheckStateRole);
if (m_rootItem != NULL) {
foreach (RootItem *root_child, m_rootItem->childItems()) {
if (root_child->kind() != RootItemKind::Bin) {
setData(indexForItem(root_child), Qt::Checked, Qt::CheckStateRole);
}
}
}
}
void FeedsImportExportModel::uncheckAllItems() {
foreach (RootItem *root_child, m_rootItem->childItems()) {
if (root_child->kind() != RootItemKind::Bin) {
setData(indexForItem(root_child), Qt::Unchecked, Qt::CheckStateRole);
if (m_rootItem != NULL) {
foreach (RootItem *root_child, m_rootItem->childItems()) {
if (root_child->kind() != RootItemKind::Bin) {
setData(indexForItem(root_child), Qt::Unchecked, Qt::CheckStateRole);
}
}
}
}

View File

@ -55,7 +55,7 @@ class FeedsImportExportModel : public QAbstractItemModel {
// Root item manipulators.
RootItem *rootItem() const;
void setRootItem(RootItem *rootItem);
void setRootItem(RootItem *root_item);
// Exports to OPML 2.0
// NOTE: http://dev.opml.org/spec2.html