From 7498565be80c334aa7a478cea4b61ae51d424e51 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Sun, 4 Jan 2015 14:12:14 +0100 Subject: [PATCH] Fixed #53. --- CMakeLists.txt | 40 +++--- resources/nsis/NSIS.definitions.nsh.in | 2 +- resources/text/CHANGELOG | 12 ++ src/core/feeddownloader.cpp | 2 +- src/core/feeddownloader.h | 2 +- src/core/feedsimportexportmodel.cpp | 2 +- src/core/feedsimportexportmodel.h | 2 +- src/core/feedsmodel.cpp | 6 +- src/core/feedsmodel.h | 2 +- src/core/feedsmodelcategory.cpp | 18 +-- src/core/feedsmodelcategory.h | 6 +- src/core/feedsmodelfeed.cpp | 121 ++++++++++++------ src/core/feedsmodelfeed.h | 6 +- src/core/feedsmodelrecyclebin.cpp | 2 +- src/core/feedsmodelrecyclebin.h | 2 +- src/core/feedsmodelrootitem.cpp | 2 +- src/core/feedsmodelrootitem.h | 2 +- src/core/feedsproxymodel.cpp | 2 +- src/core/feedsproxymodel.h | 2 +- src/core/messagesmodel.cpp | 2 +- src/core/messagesmodel.h | 2 +- src/core/messagesproxymodel.cpp | 2 +- src/core/messagesproxymodel.h | 2 +- src/core/parsingfactory.cpp | 2 +- src/core/parsingfactory.h | 2 +- src/definitions/definitions.h.in | 2 +- src/dynamic-shortcuts/dynamicshortcuts.cpp | 2 +- src/dynamic-shortcuts/dynamicshortcuts.h | 2 +- .../dynamicshortcutswidget.cpp | 2 +- .../dynamicshortcutswidget.h | 2 +- src/gui/baselineedit.cpp | 2 +- src/gui/baselineedit.h | 2 +- src/gui/basetoolbar.cpp | 2 +- src/gui/basetoolbar.h | 2 +- src/gui/comboboxwithstatus.cpp | 2 +- src/gui/comboboxwithstatus.h | 2 +- src/gui/feedmessageviewer.cpp | 2 +- src/gui/feedmessageviewer.h | 2 +- src/gui/feedstoolbar.cpp | 2 +- src/gui/feedstoolbar.h | 2 +- src/gui/feedsview.cpp | 2 +- src/gui/feedsview.h | 2 +- src/gui/formabout.cpp | 2 +- src/gui/formabout.h | 2 +- src/gui/formbackupdatabasesettings.cpp | 2 +- src/gui/formbackupdatabasesettings.h | 2 +- src/gui/formcategorydetails.cpp | 2 +- src/gui/formcategorydetails.h | 2 +- src/gui/formfeeddetails.cpp | 2 +- src/gui/formfeeddetails.h | 2 +- src/gui/formimportexport.cpp | 2 +- src/gui/formimportexport.h | 2 +- src/gui/formmain.cpp | 2 +- src/gui/formmain.h | 2 +- src/gui/formrestoredatabasesettings.cpp | 2 +- src/gui/formrestoredatabasesettings.h | 2 +- src/gui/formsettings.cpp | 4 +- src/gui/formsettings.h | 2 +- src/gui/formsettings.ui | 32 +++-- src/gui/formupdate.cpp | 2 +- src/gui/formupdate.h | 2 +- src/gui/labelwithstatus.cpp | 2 +- src/gui/labelwithstatus.h | 2 +- src/gui/lineeditwithstatus.cpp | 2 +- src/gui/lineeditwithstatus.h | 2 +- src/gui/locationlineedit.cpp | 2 +- src/gui/locationlineedit.h | 2 +- src/gui/messagebox.cpp | 2 +- src/gui/messagebox.h | 2 +- src/gui/messagessearchlineedit.cpp | 2 +- src/gui/messagessearchlineedit.h | 2 +- src/gui/messagestoolbar.cpp | 2 +- src/gui/messagestoolbar.h | 2 +- src/gui/messagesview.cpp | 2 +- src/gui/messagesview.h | 2 +- src/gui/plaintoolbutton.cpp | 2 +- src/gui/plaintoolbutton.h | 2 +- src/gui/statusbar.cpp | 2 +- src/gui/statusbar.h | 2 +- src/gui/styleditemdelegatewithoutfocus.cpp | 2 +- src/gui/styleditemdelegatewithoutfocus.h | 2 +- src/gui/systemtrayicon.cpp | 2 +- src/gui/systemtrayicon.h | 2 +- src/gui/tabbar.cpp | 2 +- src/gui/tabbar.h | 2 +- src/gui/tabcontent.cpp | 2 +- src/gui/tabcontent.h | 2 +- src/gui/tabwidget.cpp | 2 +- src/gui/tabwidget.h | 2 +- src/gui/toolbareditor.cpp | 2 +- src/gui/toolbareditor.h | 2 +- src/gui/widgetwithstatus.cpp | 2 +- src/gui/widgetwithstatus.h | 2 +- src/main.cpp | 2 +- src/miscellaneous/application.cpp | 2 +- src/miscellaneous/application.h | 2 +- src/miscellaneous/databasefactory.cpp | 2 +- src/miscellaneous/databasefactory.h | 2 +- src/miscellaneous/debugging.cpp | 2 +- src/miscellaneous/debugging.h | 2 +- src/miscellaneous/iconfactory.cpp | 2 +- src/miscellaneous/iconfactory.h | 2 +- src/miscellaneous/iofactory.cpp | 2 +- src/miscellaneous/iofactory.h | 2 +- src/miscellaneous/localization.cpp | 2 +- src/miscellaneous/localization.h | 2 +- src/miscellaneous/settings.cpp | 5 +- src/miscellaneous/settings.h | 5 +- src/miscellaneous/skinfactory.cpp | 2 +- src/miscellaneous/skinfactory.h | 2 +- src/miscellaneous/systemfactory.cpp | 2 +- src/miscellaneous/systemfactory.h | 2 +- src/miscellaneous/textfactory.cpp | 2 +- src/miscellaneous/textfactory.h | 2 +- src/network-web/basenetworkaccessmanager.cpp | 2 +- src/network-web/basenetworkaccessmanager.h | 2 +- src/network-web/downloader.cpp | 2 +- src/network-web/downloader.h | 2 +- src/network-web/networkfactory.cpp | 2 +- src/network-web/networkfactory.h | 2 +- .../silentnetworkaccessmanager.cpp | 2 +- src/network-web/silentnetworkaccessmanager.h | 2 +- src/network-web/webbrowser.cpp | 2 +- src/network-web/webbrowser.h | 2 +- .../webbrowsernetworkaccessmanager.cpp | 2 +- .../webbrowsernetworkaccessmanager.h | 2 +- src/network-web/webpage.cpp | 2 +- src/network-web/webpage.h | 2 +- src/network-web/webview.cpp | 2 +- src/network-web/webview.h | 2 +- 130 files changed, 278 insertions(+), 215 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 58f7db7d9..47220517e 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # # This file is part of RSS Guard. # -# Copyright (C) 2011-2014 by Martin Rotter +# Copyright (C) 2011-2015 by Martin Rotter # # RSS Guard is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -71,8 +71,8 @@ project(rssguard) set(APP_NAME "RSS Guard") set(APP_LOW_NAME "rssguard") -set(APP_VERSION "2.1.0") -set(FILE_VERSION "2,1,0,0") +set(APP_VERSION "2.2.0") +set(FILE_VERSION "2,2,0,0") set(APP_AUTHOR "Martin Rotter") set(APP_URL "http://bitbucket.org/skunkos/rssguard") set(APP_URL_ISSUES "http://bitbucket.org/skunkos/rssguard/issues") @@ -221,26 +221,24 @@ add_definitions(-DQT_USE_QSTRINGBUILDER) # Force Unicode. add_definitions(-DUNICODE -D_UNICODE) -if(${USE_QT_5}) - # Check for C++ 11 features availability. - # See http://stackoverflow.com/questions/10984442/how-to-detect-c11-support-of-a-compiler-with-cmake - if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") - execute_process( - COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION - ) +# Check for C++ 11 features availability. +# See http://stackoverflow.com/questions/10984442/how-to-detect-c11-support-of-a-compiler-with-cmake +if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") + execute_process( + COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION + ) - if(NOT (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)) - message(FATAL_ERROR "[${APP_LOW_NAME}] Your C++ compiler does not support C++ 11.") - else(NOT (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)) - add_definitions(-std=c++11) - endif(NOT (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)) - - elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") - add_definitions(-std=c++11 -stdlib=libc++) - elseif(${MSVC_VERSION} VERSION_LESS 1600) + if(GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7) + add_definitions(-std=c++11) + else(GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7) message(FATAL_ERROR "[${APP_LOW_NAME}] Your C++ compiler does not support C++ 11.") - endif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") -endif(${USE_QT_5}) + endif(GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7) + +elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") + add_definitions(-std=c++11 -stdlib=libc++) +elseif(${MSVC_VERSION} VERSION_LESS 1600) + message(FATAL_ERROR "[${APP_LOW_NAME}] Your C++ compiler does not support C++ 11.") +endif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") # Setup librar ies. if(${USE_QT_5}) diff --git a/resources/nsis/NSIS.definitions.nsh.in b/resources/nsis/NSIS.definitions.nsh.in index 7f64b5274..c067619b4 100755 --- a/resources/nsis/NSIS.definitions.nsh.in +++ b/resources/nsis/NSIS.definitions.nsh.in @@ -1,6 +1,6 @@ ; This file is part of RSS Guard. ; -; Copyright (C) 2011-2014 by Martin Rotter +; Copyright (C) 2011-2015 by Martin Rotter ; ; RSS Guard is free software: you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by diff --git a/resources/text/CHANGELOG b/resources/text/CHANGELOG index 68f7f08a4..5f805b10f 100644 --- a/resources/text/CHANGELOG +++ b/resources/text/CHANGELOG @@ -1,4 +1,16 @@ +

2.2.0

+ +Fixed: +
    +
  • Fixed issue #53 - removing of duplicate messages. Feature is available globally in "Settings -> Messages".
  • +
+ +Added: +
    +
+ +

2.1.0

Fixed: diff --git a/src/core/feeddownloader.cpp b/src/core/feeddownloader.cpp index 1bd2f8afb..208bd8b02 100644 --- a/src/core/feeddownloader.cpp +++ b/src/core/feeddownloader.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/core/feeddownloader.h b/src/core/feeddownloader.h index 96ca221cf..365cb4012 100644 --- a/src/core/feeddownloader.h +++ b/src/core/feeddownloader.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/core/feedsimportexportmodel.cpp b/src/core/feedsimportexportmodel.cpp index b782a5235..f16f39f15 100644 --- a/src/core/feedsimportexportmodel.cpp +++ b/src/core/feedsimportexportmodel.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/core/feedsimportexportmodel.h b/src/core/feedsimportexportmodel.h index e5dbb11ec..41a8cdda0 100644 --- a/src/core/feedsimportexportmodel.h +++ b/src/core/feedsimportexportmodel.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/core/feedsmodel.cpp b/src/core/feedsmodel.cpp index 37cec5339..eeda8bdd5 100755 --- a/src/core/feedsmodel.cpp +++ b/src/core/feedsmodel.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -794,7 +794,7 @@ void FeedsModel::loadFromDatabase() { while (query_categories.next()) { CategoryAssignmentItem pair; pair.first = query_categories.value(CAT_DB_PARENT_ID_INDEX).toInt(); - pair.second = FeedsModelCategory::loadFromRecord(query_categories.record()); + pair.second = new FeedsModelCategory(query_categories.record()); categories << pair; } @@ -818,7 +818,7 @@ void FeedsModel::loadFromDatabase() { case FeedsModelFeed::Rss2X: { FeedAssignmentItem pair; pair.first = query_feeds.value(FDS_DB_CATEGORY_INDEX).toInt(); - pair.second = FeedsModelFeed::loadFromRecord(query_feeds.record()); + pair.second = new FeedsModelFeed(query_feeds.record()); pair.second->setType(type); feeds << pair; diff --git a/src/core/feedsmodel.h b/src/core/feedsmodel.h index 20bf20e3b..367a20203 100644 --- a/src/core/feedsmodel.h +++ b/src/core/feedsmodel.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/core/feedsmodelcategory.cpp b/src/core/feedsmodelcategory.cpp index 1bd49f014..c56d3aa2c 100755 --- a/src/core/feedsmodelcategory.cpp +++ b/src/core/feedsmodelcategory.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -141,14 +141,10 @@ bool FeedsModelCategory::removeItself() { return query_remove.exec(); } -FeedsModelCategory *FeedsModelCategory::loadFromRecord(const QSqlRecord &record) { - FeedsModelCategory *category = new FeedsModelCategory(NULL); - - category->setId(record.value(CAT_DB_ID_INDEX).toInt()); - category->setTitle(record.value(CAT_DB_TITLE_INDEX).toString()); - category->setDescription(record.value(CAT_DB_DESCRIPTION_INDEX).toString()); - category->setCreationDate(TextFactory::parseDateTime(record.value(CAT_DB_DCREATED_INDEX).value()).toLocalTime()); - category->setIcon(qApp->icons()->fromByteArray(record.value(CAT_DB_ICON_INDEX).toByteArray())); - - return category; +FeedsModelCategory::FeedsModelCategory(const QSqlRecord &record) : FeedsModelCategory() { + setId(record.value(CAT_DB_ID_INDEX).toInt()); + setTitle(record.value(CAT_DB_TITLE_INDEX).toString()); + setDescription(record.value(CAT_DB_DESCRIPTION_INDEX).toString()); + setCreationDate(TextFactory::parseDateTime(record.value(CAT_DB_DCREATED_INDEX).value()).toLocalTime()); + setIcon(qApp->icons()->fromByteArray(record.value(CAT_DB_ICON_INDEX).toByteArray())); } diff --git a/src/core/feedsmodelcategory.h b/src/core/feedsmodelcategory.h index 0b90c09b9..59a925d16 100755 --- a/src/core/feedsmodelcategory.h +++ b/src/core/feedsmodelcategory.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -36,6 +36,7 @@ class FeedsModelCategory : public FeedsModelRootItem { // Constructors and destructors explicit FeedsModelCategory(FeedsModelRootItem *parent_item = NULL); explicit FeedsModelCategory(const FeedsModelCategory &other); + explicit FeedsModelCategory(const QSqlRecord &record); virtual ~FeedsModelCategory(); // Returns the actual data representation of standard category. @@ -44,9 +45,6 @@ class FeedsModelCategory : public FeedsModelRootItem { // Removes category and all its children from persistent // database. bool removeItself(); - - // Loads particular "standard category" from given sql record. - static FeedsModelCategory *loadFromRecord(const QSqlRecord &record); }; #endif // FEEDSMODELCLASSICCATEGORY_H diff --git a/src/core/feedsmodelfeed.cpp b/src/core/feedsmodelfeed.cpp index 7bdefc144..175225911 100755 --- a/src/core/feedsmodelfeed.cpp +++ b/src/core/feedsmodelfeed.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -114,9 +114,9 @@ QString FeedsModelFeed::typeToString(FeedsModelFeed::Type type) { } void FeedsModelFeed::updateCounts(bool including_total_count, bool update_feed_statuses) { - QSqlDatabase database = qApp->database()->connection("FeedsModelFeed", - DatabaseFactory::FromSettings); + QSqlDatabase database = qApp->database()->connection("FeedsModelFeed", DatabaseFactory::FromSettings); QSqlQuery query_all(database); + query_all.setForwardOnly(true); if (including_total_count) { @@ -137,26 +137,6 @@ void FeedsModelFeed::updateCounts(bool including_total_count, bool update_feed_s } } -FeedsModelFeed *FeedsModelFeed::loadFromRecord(const QSqlRecord &record) { - FeedsModelFeed *feed = new FeedsModelFeed(); - - feed->setTitle(record.value(FDS_DB_TITLE_INDEX).toString()); - feed->setId(record.value(FDS_DB_ID_INDEX).toInt()); - feed->setDescription(record.value(FDS_DB_DESCRIPTION_INDEX).toString()); - feed->setCreationDate(TextFactory::parseDateTime(record.value(FDS_DB_DCREATED_INDEX).value()).toLocalTime()); - feed->setIcon(qApp->icons()->fromByteArray(record.value(FDS_DB_ICON_INDEX).toByteArray())); - feed->setEncoding(record.value(FDS_DB_ENCODING_INDEX).toString()); - feed->setUrl(record.value(FDS_DB_URL_INDEX).toString()); - feed->setPasswordProtected(record.value(FDS_DB_PROTECTED_INDEX).toBool()); - feed->setUsername(record.value(FDS_DB_USERNAME_INDEX).toString()); - feed->setPassword(record.value(FDS_DB_PASSWORD_INDEX).toString()); - feed->setAutoUpdateType(static_cast(record.value(FDS_DB_UPDATE_TYPE_INDEX).toInt())); - feed->setAutoUpdateInitialInterval(record.value(FDS_DB_UPDATE_INTERVAL_INDEX).toInt()); - feed->updateCounts(); - - return feed; -} - QPair FeedsModelFeed::guessFeed(const QString &url, const QString &username, const QString &password) { @@ -390,12 +370,12 @@ QVariant FeedsModelFeed::data(int column, int role) const { void FeedsModelFeed::update() { QByteArray feed_contents; int download_timeout = qApp->settings()->value(GROUP(Feeds), SETTING(Feeds::UpdateTimeout)).toInt(); - m_networkError = NetworkFactory::downloadFeedFile(url(), download_timeout, feed_contents, passwordProtected(), username(), password()).first; + m_networkError = NetworkFactory::downloadFeedFile(url(), download_timeout, feed_contents, + passwordProtected(), username(), password()).first; if (m_networkError != QNetworkReply::NoError) { qWarning("Error during fetching of new messages for feed '%s' (id %d).", qPrintable(url()), id()); m_status = NetworkError; - return; } else { @@ -440,8 +420,7 @@ void FeedsModelFeed::update() { } bool FeedsModelFeed::removeItself() { - QSqlDatabase database = qApp->database()->connection("FeedsModelFeed", - DatabaseFactory::FromSettings); + QSqlDatabase database = qApp->database()->connection("FeedsModelFeed", DatabaseFactory::FromSettings); QSqlQuery query_remove(database); query_remove.setForwardOnly(true); @@ -461,17 +440,30 @@ bool FeedsModelFeed::removeItself() { return query_remove.exec(); } +/* + * postup zpracování zpráv: + * 1. Kontrola, zda existují již v DB zprávy se stejným NAZVEM, AUTOREM, URL ze stejneho kanalu. + * a. KONEC: Pokud neexistují, pak se aktuální nová zpráva přidá do DB. + * b. Pokud existují, jde se na krok 2. + * 2. Pokud má uživatel nastaveno mazání duplicitních zpráv, pak udělej a. Jinak jdi na krok 3. + * a. Vymaž všechny zprávy, které byly nalezeny ve kroku 1. + * b. Přidej tuto novou zprávu, nastav ji status přečtena na true. + * 3. Uživatel nemá nastaveno mazani dupl zpráv. Novou zprávu přidáme do DB tehdy když zpráva + * má datum získané z kanálu a zároveň identická zpráva s takovým datumem ještě v DB není. + * */ + + void FeedsModelFeed::updateMessages(const QList &messages) { int feed_id = id(); - QSqlDatabase database = qApp->database()->connection("FeedsModelFeed", - DatabaseFactory::FromSettings); + QSqlDatabase database = qApp->database()->connection("FeedsModelFeed", DatabaseFactory::FromSettings); + bool remove_duplicates = qApp->settings()->value(GROUP(Messages), SETTING(Messages::RemoveDuplicates)).toBool(); // Prepare queries. QSqlQuery query_select(database); + QSqlQuery query_update(database); QSqlQuery query_insert(database); - // Used to check if give feed contains with message with given - // title, url and date_created. + // Used to check if given feed contains any message with given title, url and date_created. // WARNING: One feed CANNOT contain two (or more) messages with same AUTHOR AND TITLE AND URL AND DATE_CREATED. query_select.setForwardOnly(true); query_select.prepare("SELECT id, feed, date_created FROM Messages " @@ -483,6 +475,11 @@ void FeedsModelFeed::updateMessages(const QList &messages) { "(feed, title, url, author, date_created, contents) " "VALUES (:feed, :title, :url, :author, :date_created, :contents);"); + if (remove_duplicates) { + query_update.setForwardOnly(true); + query_update.prepare("UPDATE Messages SET contents = :contents WHERE id = :id;"); + } + if (!database.transaction()) { database.rollback(); qDebug("Transaction start for message downloader failed."); @@ -490,8 +487,7 @@ void FeedsModelFeed::updateMessages(const QList &messages) { } foreach (Message message, messages) { - // Check if messages contain relative URLs and if they do, - // then replace them. + // Check if messages contain relative URLs and if they do, then replace them. if (message.m_url.startsWith('/')) { QString new_message_url = url(); int last_slash = new_message_url.lastIndexOf('/'); @@ -511,19 +507,17 @@ void FeedsModelFeed::updateMessages(const QList &messages) { query_select.exec(); QList datetime_stamps; + QList ids; while (query_select.next()) { + ids << query_select.value(0).toInt(); datetime_stamps << query_select.value(2).value(); } query_select.finish(); - if (datetime_stamps.isEmpty() ||(message.m_createdFromFeed && !datetime_stamps.contains(message.m_created.toMSecsSinceEpoch()))) { - // Message is not fetched in this feed yet - // or it is. If it is, then go - // through datetime stamps of stored messages - // and check if new (not auto-generated timestamp - // is among them and add this message if it is not. + if (datetime_stamps.isEmpty()) { + // Message is not fetched in this feed yet. query_insert.bindValue(":feed", feed_id); query_insert.bindValue(":title", message.m_title); query_insert.bindValue(":url", message.m_url); @@ -536,6 +530,38 @@ void FeedsModelFeed::updateMessages(const QList &messages) { } query_insert.finish(); + + qDebug("Adding new message '%s' to DB.", qPrintable(message.m_title)); + } + else if (message.m_createdFromFeed && !datetime_stamps.contains(message.m_created.toMSecsSinceEpoch())) { + if (remove_duplicates && datetime_stamps.size() == 1) { + // Message is already in feed and new message has new unique time but user wishes to update existing + // messages and there is exactly ONE existing duplicate. + query_update.bindValue(":id", ids.at(0)); + query_update.bindValue(":contents", message.m_contents); + query_update.exec(); + query_update.finish(); + + qDebug("Updating contents of duplicate message '%s'.", qPrintable(message.m_title)); + } + else { + // Message with same title, author and url exists, but new message has new unique time and + // user does not wish to update duplicates. + query_insert.bindValue(":feed", feed_id); + query_insert.bindValue(":title", message.m_title); + query_insert.bindValue(":url", message.m_url); + query_insert.bindValue(":author", message.m_author); + query_insert.bindValue(":date_created", message.m_created.toMSecsSinceEpoch()); + query_insert.bindValue(":contents", message.m_contents); + + if (query_insert.exec() && query_insert.numRowsAffected() == 1) { + setStatus(NewMessages); + } + + query_insert.finish(); + + qDebug("Adding new duplicate (with potentially updated contents) message '%s' to DB.", qPrintable(message.m_title)); + } } } @@ -549,3 +575,20 @@ void FeedsModelFeed::updateMessages(const QList &messages) { QNetworkReply::NetworkError FeedsModelFeed::networkError() const { return m_networkError; } + + +FeedsModelFeed::FeedsModelFeed(const QSqlRecord &record) : FeedsModelFeed() { + setTitle(record.value(FDS_DB_TITLE_INDEX).toString()); + setId(record.value(FDS_DB_ID_INDEX).toInt()); + setDescription(record.value(FDS_DB_DESCRIPTION_INDEX).toString()); + setCreationDate(TextFactory::parseDateTime(record.value(FDS_DB_DCREATED_INDEX).value()).toLocalTime()); + setIcon(qApp->icons()->fromByteArray(record.value(FDS_DB_ICON_INDEX).toByteArray())); + setEncoding(record.value(FDS_DB_ENCODING_INDEX).toString()); + setUrl(record.value(FDS_DB_URL_INDEX).toString()); + setPasswordProtected(record.value(FDS_DB_PROTECTED_INDEX).toBool()); + setUsername(record.value(FDS_DB_USERNAME_INDEX).toString()); + setPassword(record.value(FDS_DB_PASSWORD_INDEX).toString()); + setAutoUpdateType(static_cast(record.value(FDS_DB_UPDATE_TYPE_INDEX).toInt())); + setAutoUpdateInitialInterval(record.value(FDS_DB_UPDATE_INTERVAL_INDEX).toInt()); + updateCounts(); +} diff --git a/src/core/feedsmodelfeed.h b/src/core/feedsmodelfeed.h index f3c5be8c4..d816aa2bc 100755 --- a/src/core/feedsmodelfeed.h +++ b/src/core/feedsmodelfeed.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -64,6 +64,7 @@ class FeedsModelFeed : public FeedsModelRootItem { // Constructors and destructors. explicit FeedsModelFeed(FeedsModelRootItem *parent_item = NULL); explicit FeedsModelFeed(const FeedsModelFeed &other); + explicit FeedsModelFeed(const QSqlRecord &record); virtual ~FeedsModelFeed(); // Returns 0, feeds have no children. @@ -171,9 +172,6 @@ class FeedsModelFeed : public FeedsModelRootItem { QNetworkReply::NetworkError networkError() const; - // Loads standard feed object from given SQL record. - static FeedsModelFeed *loadFromRecord(const QSqlRecord &record); - // Tries to guess feed hidden under given URL // and uses given credentials. // Returns pointer to guessed feed (if at least partially diff --git a/src/core/feedsmodelrecyclebin.cpp b/src/core/feedsmodelrecyclebin.cpp index c0d01bd6e..282b8c452 100644 --- a/src/core/feedsmodelrecyclebin.cpp +++ b/src/core/feedsmodelrecyclebin.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/core/feedsmodelrecyclebin.h b/src/core/feedsmodelrecyclebin.h index f29614719..490dd2149 100644 --- a/src/core/feedsmodelrecyclebin.h +++ b/src/core/feedsmodelrecyclebin.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/core/feedsmodelrootitem.cpp b/src/core/feedsmodelrootitem.cpp index d5c880117..4c3b8d795 100755 --- a/src/core/feedsmodelrootitem.cpp +++ b/src/core/feedsmodelrootitem.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/core/feedsmodelrootitem.h b/src/core/feedsmodelrootitem.h index 17b804451..cd406e652 100755 --- a/src/core/feedsmodelrootitem.h +++ b/src/core/feedsmodelrootitem.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/core/feedsproxymodel.cpp b/src/core/feedsproxymodel.cpp index 826ce6d92..047284cfc 100755 --- a/src/core/feedsproxymodel.cpp +++ b/src/core/feedsproxymodel.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/core/feedsproxymodel.h b/src/core/feedsproxymodel.h index a0aa10a4a..5df14893d 100755 --- a/src/core/feedsproxymodel.h +++ b/src/core/feedsproxymodel.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/core/messagesmodel.cpp b/src/core/messagesmodel.cpp index d47e2c570..4981d4d77 100755 --- a/src/core/messagesmodel.cpp +++ b/src/core/messagesmodel.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/core/messagesmodel.h b/src/core/messagesmodel.h index 882e5271a..2812ce5cb 100644 --- a/src/core/messagesmodel.h +++ b/src/core/messagesmodel.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/core/messagesproxymodel.cpp b/src/core/messagesproxymodel.cpp index 1f0f48ab3..8be22e8d3 100644 --- a/src/core/messagesproxymodel.cpp +++ b/src/core/messagesproxymodel.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/core/messagesproxymodel.h b/src/core/messagesproxymodel.h index 49e7ed894..35d7cef64 100644 --- a/src/core/messagesproxymodel.h +++ b/src/core/messagesproxymodel.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/core/parsingfactory.cpp b/src/core/parsingfactory.cpp index 7bd5359bc..772d47207 100755 --- a/src/core/parsingfactory.cpp +++ b/src/core/parsingfactory.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/core/parsingfactory.h b/src/core/parsingfactory.h index a8cde00a5..636806db7 100644 --- a/src/core/parsingfactory.h +++ b/src/core/parsingfactory.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/definitions/definitions.h.in b/src/definitions/definitions.h.in index 14f4b6faf..1fb447d7b 100755 --- a/src/definitions/definitions.h.in +++ b/src/definitions/definitions.h.in @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/dynamic-shortcuts/dynamicshortcuts.cpp b/src/dynamic-shortcuts/dynamicshortcuts.cpp index 007d61eb7..c9b87fafa 100755 --- a/src/dynamic-shortcuts/dynamicshortcuts.cpp +++ b/src/dynamic-shortcuts/dynamicshortcuts.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/dynamic-shortcuts/dynamicshortcuts.h b/src/dynamic-shortcuts/dynamicshortcuts.h index a20022aee..84d7a129a 100644 --- a/src/dynamic-shortcuts/dynamicshortcuts.h +++ b/src/dynamic-shortcuts/dynamicshortcuts.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/dynamic-shortcuts/dynamicshortcutswidget.cpp b/src/dynamic-shortcuts/dynamicshortcutswidget.cpp index 634cdcf3b..2391ca932 100644 --- a/src/dynamic-shortcuts/dynamicshortcutswidget.cpp +++ b/src/dynamic-shortcuts/dynamicshortcutswidget.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/dynamic-shortcuts/dynamicshortcutswidget.h b/src/dynamic-shortcuts/dynamicshortcutswidget.h index eebbcfbb4..401c38547 100644 --- a/src/dynamic-shortcuts/dynamicshortcutswidget.h +++ b/src/dynamic-shortcuts/dynamicshortcutswidget.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/baselineedit.cpp b/src/gui/baselineedit.cpp index 97db0e51e..ad42a3851 100644 --- a/src/gui/baselineedit.cpp +++ b/src/gui/baselineedit.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/baselineedit.h b/src/gui/baselineedit.h index de03175cd..312aa223c 100644 --- a/src/gui/baselineedit.h +++ b/src/gui/baselineedit.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/basetoolbar.cpp b/src/gui/basetoolbar.cpp index 3ba2522b6..4c45304a9 100644 --- a/src/gui/basetoolbar.cpp +++ b/src/gui/basetoolbar.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/basetoolbar.h b/src/gui/basetoolbar.h index 47a60e558..c42a34944 100644 --- a/src/gui/basetoolbar.h +++ b/src/gui/basetoolbar.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/comboboxwithstatus.cpp b/src/gui/comboboxwithstatus.cpp index 4855f3391..9db23bc37 100644 --- a/src/gui/comboboxwithstatus.cpp +++ b/src/gui/comboboxwithstatus.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/comboboxwithstatus.h b/src/gui/comboboxwithstatus.h index e30f67b8d..720b30078 100644 --- a/src/gui/comboboxwithstatus.h +++ b/src/gui/comboboxwithstatus.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/feedmessageviewer.cpp b/src/gui/feedmessageviewer.cpp index 4d4306cdf..b475768e2 100755 --- a/src/gui/feedmessageviewer.cpp +++ b/src/gui/feedmessageviewer.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/feedmessageviewer.h b/src/gui/feedmessageviewer.h index bbb524ba0..2edd83741 100644 --- a/src/gui/feedmessageviewer.h +++ b/src/gui/feedmessageviewer.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/feedstoolbar.cpp b/src/gui/feedstoolbar.cpp index f03c1654b..d19a6143b 100755 --- a/src/gui/feedstoolbar.cpp +++ b/src/gui/feedstoolbar.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/feedstoolbar.h b/src/gui/feedstoolbar.h index ae340685f..8cccd5f66 100644 --- a/src/gui/feedstoolbar.h +++ b/src/gui/feedstoolbar.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/feedsview.cpp b/src/gui/feedsview.cpp index 3000683d0..bb20054fd 100755 --- a/src/gui/feedsview.cpp +++ b/src/gui/feedsview.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/feedsview.h b/src/gui/feedsview.h index 7b8456ae1..9a84a68a2 100644 --- a/src/gui/feedsview.h +++ b/src/gui/feedsview.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/formabout.cpp b/src/gui/formabout.cpp index b7af8d30d..3501f265f 100755 --- a/src/gui/formabout.cpp +++ b/src/gui/formabout.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/formabout.h b/src/gui/formabout.h index 83f1d2d88..c030bdffa 100644 --- a/src/gui/formabout.h +++ b/src/gui/formabout.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/formbackupdatabasesettings.cpp b/src/gui/formbackupdatabasesettings.cpp index 7981ee4df..68ff9cd1b 100644 --- a/src/gui/formbackupdatabasesettings.cpp +++ b/src/gui/formbackupdatabasesettings.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/formbackupdatabasesettings.h b/src/gui/formbackupdatabasesettings.h index cf0254a7b..37144d0aa 100644 --- a/src/gui/formbackupdatabasesettings.h +++ b/src/gui/formbackupdatabasesettings.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/formcategorydetails.cpp b/src/gui/formcategorydetails.cpp index 54e47257e..2cd217332 100755 --- a/src/gui/formcategorydetails.cpp +++ b/src/gui/formcategorydetails.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/formcategorydetails.h b/src/gui/formcategorydetails.h index c3d5a55e9..371ec785d 100644 --- a/src/gui/formcategorydetails.h +++ b/src/gui/formcategorydetails.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/formfeeddetails.cpp b/src/gui/formfeeddetails.cpp index 3c189fa3b..86edcd08a 100755 --- a/src/gui/formfeeddetails.cpp +++ b/src/gui/formfeeddetails.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/formfeeddetails.h b/src/gui/formfeeddetails.h index 7f62fd649..1ed622a95 100644 --- a/src/gui/formfeeddetails.h +++ b/src/gui/formfeeddetails.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/formimportexport.cpp b/src/gui/formimportexport.cpp index e5fd49e4c..df16a21ca 100644 --- a/src/gui/formimportexport.cpp +++ b/src/gui/formimportexport.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/formimportexport.h b/src/gui/formimportexport.h index bb9a23eac..d3bebf653 100644 --- a/src/gui/formimportexport.h +++ b/src/gui/formimportexport.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/formmain.cpp b/src/gui/formmain.cpp index 7286d4f05..fe6a7726e 100755 --- a/src/gui/formmain.cpp +++ b/src/gui/formmain.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/formmain.h b/src/gui/formmain.h index eb728375b..39d2c62bf 100755 --- a/src/gui/formmain.h +++ b/src/gui/formmain.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/formrestoredatabasesettings.cpp b/src/gui/formrestoredatabasesettings.cpp index b2f5c1a04..669be9e63 100644 --- a/src/gui/formrestoredatabasesettings.cpp +++ b/src/gui/formrestoredatabasesettings.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/formrestoredatabasesettings.h b/src/gui/formrestoredatabasesettings.h index a5710a338..2b0cfbbb6 100644 --- a/src/gui/formrestoredatabasesettings.h +++ b/src/gui/formrestoredatabasesettings.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/formsettings.cpp b/src/gui/formsettings.cpp index aaac348f0..5b3a2240d 100755 --- a/src/gui/formsettings.cpp +++ b/src/gui/formsettings.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -191,6 +191,7 @@ void FormSettings::loadFeedsMessages() { m_ui->m_checkUpdateAllFeedsOnStartup->setChecked(settings->value(GROUP(Feeds), SETTING(Feeds::FeedsUpdateOnStartup)).toBool()); m_ui->m_cmbCountsFeedList->addItems(QStringList() << "(%unread)" << "[%unread]" << "%unread/%all" << "%unread-%all" << "[%unread|%all]"); m_ui->m_cmbCountsFeedList->setEditText(settings->value(GROUP(Feeds), SETTING(Feeds::CountFormat)).toString()); + m_ui->m_checkRemoveDuplicateMessages->setChecked(settings->value(GROUP(Messages), SETTING(Messages::RemoveDuplicates)).toBool()); initializeMessageDateFormats(); @@ -227,6 +228,7 @@ void FormSettings::saveFeedsMessages() { settings->setValue(GROUP(Messages), Messages::UseCustomDate, m_ui->m_checkMessagesDateTimeFormat->isChecked()); settings->setValue(GROUP(Messages), Messages::CustomDateFormat, m_ui->m_cmbMessagesDateTimeFormat->itemData(m_ui->m_cmbMessagesDateTimeFormat->currentIndex()).toString()); + settings->setValue(GROUP(Messages), Messages::RemoveDuplicates, m_ui->m_checkRemoveDuplicateMessages->isChecked()); qApp->mainForm()->tabWidget()->feedMessageViewer()->feedsView()->updateAutoUpdateStatus(); qApp->mainForm()->tabWidget()->feedMessageViewer()->feedsView()->sourceModel()->reloadWholeLayout(); diff --git a/src/gui/formsettings.h b/src/gui/formsettings.h index b061d74ad..2f2148791 100644 --- a/src/gui/formsettings.h +++ b/src/gui/formsettings.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/formsettings.ui b/src/gui/formsettings.ui index 5aa3427c7..1442894b8 100644 --- a/src/gui/formsettings.ui +++ b/src/gui/formsettings.ui @@ -93,7 +93,7 @@ - 0 + 6 @@ -397,8 +397,8 @@ Authors of this application are NOT responsible for lost data. 0 0 - 707 - 451 + 100 + 30 @@ -475,8 +475,8 @@ Authors of this application are NOT responsible for lost data. 0 0 - 701 - 425 + 167 + 219 @@ -1160,7 +1160,7 @@ Authors of this application are NOT responsible for lost data. - 1 + 0 @@ -1269,21 +1269,21 @@ Authors of this application are NOT responsible for lost data. QFormLayout::AllNonFixedFieldsGrow - + - Remove all read messages from all standard feeds on application exit + Remove all read messages from all feeds on application exit - + Keep message selection in the middle of the message list viewport - + Use custom date/time format (overrides format loaded from active localization) @@ -1296,9 +1296,19 @@ Authors of this application are NOT responsible for lost data. - + + + + + When new message arrives from feed and duplicate exists, then its content is updated and new message is dropped. + + + Remove duplicate messages + + + diff --git a/src/gui/formupdate.cpp b/src/gui/formupdate.cpp index d884a80ba..3b75bd966 100755 --- a/src/gui/formupdate.cpp +++ b/src/gui/formupdate.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/formupdate.h b/src/gui/formupdate.h index a8c5db3ad..eb72ffaf8 100644 --- a/src/gui/formupdate.h +++ b/src/gui/formupdate.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/labelwithstatus.cpp b/src/gui/labelwithstatus.cpp index a6053c1d1..5f15541b3 100644 --- a/src/gui/labelwithstatus.cpp +++ b/src/gui/labelwithstatus.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/labelwithstatus.h b/src/gui/labelwithstatus.h index 80a88c4e7..5f93880a1 100644 --- a/src/gui/labelwithstatus.h +++ b/src/gui/labelwithstatus.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/lineeditwithstatus.cpp b/src/gui/lineeditwithstatus.cpp index 8bf11657c..69c508852 100644 --- a/src/gui/lineeditwithstatus.cpp +++ b/src/gui/lineeditwithstatus.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/lineeditwithstatus.h b/src/gui/lineeditwithstatus.h index be31b15f4..8a23f2974 100644 --- a/src/gui/lineeditwithstatus.h +++ b/src/gui/lineeditwithstatus.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/locationlineedit.cpp b/src/gui/locationlineedit.cpp index 84185eff2..149ceadef 100644 --- a/src/gui/locationlineedit.cpp +++ b/src/gui/locationlineedit.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/locationlineedit.h b/src/gui/locationlineedit.h index 40e1e0ad7..9bb8e03aa 100644 --- a/src/gui/locationlineedit.h +++ b/src/gui/locationlineedit.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/messagebox.cpp b/src/gui/messagebox.cpp index 429696099..78e251cce 100755 --- a/src/gui/messagebox.cpp +++ b/src/gui/messagebox.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/messagebox.h b/src/gui/messagebox.h index 458879c82..63f40c5fc 100644 --- a/src/gui/messagebox.h +++ b/src/gui/messagebox.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/messagessearchlineedit.cpp b/src/gui/messagessearchlineedit.cpp index 940bb59ba..001857be7 100644 --- a/src/gui/messagessearchlineedit.cpp +++ b/src/gui/messagessearchlineedit.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/messagessearchlineedit.h b/src/gui/messagessearchlineedit.h index 6dbbcb976..14975ed61 100644 --- a/src/gui/messagessearchlineedit.h +++ b/src/gui/messagessearchlineedit.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/messagestoolbar.cpp b/src/gui/messagestoolbar.cpp index 982c1ed24..ace5097d6 100755 --- a/src/gui/messagestoolbar.cpp +++ b/src/gui/messagestoolbar.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/messagestoolbar.h b/src/gui/messagestoolbar.h index 65c74f6bc..0b38fa338 100644 --- a/src/gui/messagestoolbar.h +++ b/src/gui/messagestoolbar.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/messagesview.cpp b/src/gui/messagesview.cpp index 23b5f05c3..442cf9e18 100755 --- a/src/gui/messagesview.cpp +++ b/src/gui/messagesview.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/messagesview.h b/src/gui/messagesview.h index 2aadf4395..d8a5f44ed 100755 --- a/src/gui/messagesview.h +++ b/src/gui/messagesview.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/plaintoolbutton.cpp b/src/gui/plaintoolbutton.cpp index 4440e68b1..30a08bee8 100644 --- a/src/gui/plaintoolbutton.cpp +++ b/src/gui/plaintoolbutton.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/plaintoolbutton.h b/src/gui/plaintoolbutton.h index 100a52a12..f64c0f69c 100644 --- a/src/gui/plaintoolbutton.h +++ b/src/gui/plaintoolbutton.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/statusbar.cpp b/src/gui/statusbar.cpp index 6f6044642..7cc3464f9 100755 --- a/src/gui/statusbar.cpp +++ b/src/gui/statusbar.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/statusbar.h b/src/gui/statusbar.h index f4c89af30..e17341a03 100644 --- a/src/gui/statusbar.h +++ b/src/gui/statusbar.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/styleditemdelegatewithoutfocus.cpp b/src/gui/styleditemdelegatewithoutfocus.cpp index 603e47af5..b60c30fb1 100644 --- a/src/gui/styleditemdelegatewithoutfocus.cpp +++ b/src/gui/styleditemdelegatewithoutfocus.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/styleditemdelegatewithoutfocus.h b/src/gui/styleditemdelegatewithoutfocus.h index e4f448eb6..70aef6e17 100644 --- a/src/gui/styleditemdelegatewithoutfocus.h +++ b/src/gui/styleditemdelegatewithoutfocus.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/systemtrayicon.cpp b/src/gui/systemtrayicon.cpp index a47b3ecba..ab8f52b6e 100755 --- a/src/gui/systemtrayicon.cpp +++ b/src/gui/systemtrayicon.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/systemtrayicon.h b/src/gui/systemtrayicon.h index 5d938e361..93b5d69de 100644 --- a/src/gui/systemtrayicon.h +++ b/src/gui/systemtrayicon.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/tabbar.cpp b/src/gui/tabbar.cpp index 283c533e3..50944623d 100755 --- a/src/gui/tabbar.cpp +++ b/src/gui/tabbar.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/tabbar.h b/src/gui/tabbar.h index c2ea1e36d..2345fa500 100644 --- a/src/gui/tabbar.h +++ b/src/gui/tabbar.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/tabcontent.cpp b/src/gui/tabcontent.cpp index 2e52664ab..bac8c3121 100644 --- a/src/gui/tabcontent.cpp +++ b/src/gui/tabcontent.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/tabcontent.h b/src/gui/tabcontent.h index 3b95849ed..8cc7f5792 100644 --- a/src/gui/tabcontent.h +++ b/src/gui/tabcontent.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/tabwidget.cpp b/src/gui/tabwidget.cpp index e6b653d93..4bcc5541d 100755 --- a/src/gui/tabwidget.cpp +++ b/src/gui/tabwidget.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/tabwidget.h b/src/gui/tabwidget.h index db0f516ce..a9114569d 100644 --- a/src/gui/tabwidget.h +++ b/src/gui/tabwidget.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/toolbareditor.cpp b/src/gui/toolbareditor.cpp index 9c78c2a85..530f8f606 100755 --- a/src/gui/toolbareditor.cpp +++ b/src/gui/toolbareditor.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/toolbareditor.h b/src/gui/toolbareditor.h index 34e169ac2..a13b17aea 100644 --- a/src/gui/toolbareditor.h +++ b/src/gui/toolbareditor.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/widgetwithstatus.cpp b/src/gui/widgetwithstatus.cpp index 117689da9..f911324d3 100755 --- a/src/gui/widgetwithstatus.cpp +++ b/src/gui/widgetwithstatus.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/gui/widgetwithstatus.h b/src/gui/widgetwithstatus.h index 9fafd9a4d..5bf6b0e66 100644 --- a/src/gui/widgetwithstatus.h +++ b/src/gui/widgetwithstatus.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/main.cpp b/src/main.cpp index 779fe0169..b5130c338 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/miscellaneous/application.cpp b/src/miscellaneous/application.cpp index 3176780a1..67d308981 100755 --- a/src/miscellaneous/application.cpp +++ b/src/miscellaneous/application.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/miscellaneous/application.h b/src/miscellaneous/application.h index 3cc6786c0..294e30724 100755 --- a/src/miscellaneous/application.h +++ b/src/miscellaneous/application.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/miscellaneous/databasefactory.cpp b/src/miscellaneous/databasefactory.cpp index 498dd9465..78299d01e 100755 --- a/src/miscellaneous/databasefactory.cpp +++ b/src/miscellaneous/databasefactory.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/miscellaneous/databasefactory.h b/src/miscellaneous/databasefactory.h index 128060598..c1f29f047 100755 --- a/src/miscellaneous/databasefactory.h +++ b/src/miscellaneous/databasefactory.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/miscellaneous/debugging.cpp b/src/miscellaneous/debugging.cpp index 02b8c6679..42f3b3e74 100755 --- a/src/miscellaneous/debugging.cpp +++ b/src/miscellaneous/debugging.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/miscellaneous/debugging.h b/src/miscellaneous/debugging.h index c01130291..07805ce63 100644 --- a/src/miscellaneous/debugging.h +++ b/src/miscellaneous/debugging.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/miscellaneous/iconfactory.cpp b/src/miscellaneous/iconfactory.cpp index 33331e839..efd58b062 100755 --- a/src/miscellaneous/iconfactory.cpp +++ b/src/miscellaneous/iconfactory.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/miscellaneous/iconfactory.h b/src/miscellaneous/iconfactory.h index 9bc613533..4d8a6b326 100755 --- a/src/miscellaneous/iconfactory.h +++ b/src/miscellaneous/iconfactory.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/miscellaneous/iofactory.cpp b/src/miscellaneous/iofactory.cpp index c4c53e8c8..b6236d1a9 100755 --- a/src/miscellaneous/iofactory.cpp +++ b/src/miscellaneous/iofactory.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/miscellaneous/iofactory.h b/src/miscellaneous/iofactory.h index 7fa1b0c12..493718663 100755 --- a/src/miscellaneous/iofactory.h +++ b/src/miscellaneous/iofactory.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/miscellaneous/localization.cpp b/src/miscellaneous/localization.cpp index fb547b901..cb9a6aee0 100755 --- a/src/miscellaneous/localization.cpp +++ b/src/miscellaneous/localization.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/miscellaneous/localization.h b/src/miscellaneous/localization.h index 06f2a9e2f..3c5ddc131 100755 --- a/src/miscellaneous/localization.h +++ b/src/miscellaneous/localization.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/miscellaneous/settings.cpp b/src/miscellaneous/settings.cpp index d380ca299..889092deb 100755 --- a/src/miscellaneous/settings.cpp +++ b/src/miscellaneous/settings.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -60,6 +60,9 @@ DVALUE(bool) Messages::ClearReadOnExitDef = false; DKEY Messages::KeepCursorInCenter = "keep_cursor_center"; DVALUE(bool) Messages::KeepCursorInCenterDef = false; +DKEY Messages::RemoveDuplicates = "remove_duplicates"; +DVALUE(bool) Messages::RemoveDuplicatesDef = false; + // GUI. DKEY GUI::ID = "gui"; diff --git a/src/miscellaneous/settings.h b/src/miscellaneous/settings.h index 63b590fe5..0b042f341 100755 --- a/src/miscellaneous/settings.h +++ b/src/miscellaneous/settings.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -68,6 +68,9 @@ namespace Messages { KEY KeepCursorInCenter; VALUE(bool) KeepCursorInCenterDef; + + KEY RemoveDuplicates; + VALUE(bool) RemoveDuplicatesDef; } // GUI. diff --git a/src/miscellaneous/skinfactory.cpp b/src/miscellaneous/skinfactory.cpp index 573a86279..d48a55ef0 100755 --- a/src/miscellaneous/skinfactory.cpp +++ b/src/miscellaneous/skinfactory.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/miscellaneous/skinfactory.h b/src/miscellaneous/skinfactory.h index b01ca2e00..cfc6d5ebc 100755 --- a/src/miscellaneous/skinfactory.h +++ b/src/miscellaneous/skinfactory.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/miscellaneous/systemfactory.cpp b/src/miscellaneous/systemfactory.cpp index 77006440c..22075d063 100755 --- a/src/miscellaneous/systemfactory.cpp +++ b/src/miscellaneous/systemfactory.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/miscellaneous/systemfactory.h b/src/miscellaneous/systemfactory.h index 5405541f8..71292a376 100644 --- a/src/miscellaneous/systemfactory.h +++ b/src/miscellaneous/systemfactory.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/miscellaneous/textfactory.cpp b/src/miscellaneous/textfactory.cpp index c49671465..ca5743adb 100644 --- a/src/miscellaneous/textfactory.cpp +++ b/src/miscellaneous/textfactory.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/miscellaneous/textfactory.h b/src/miscellaneous/textfactory.h index 36e7ae85a..6458d53ae 100644 --- a/src/miscellaneous/textfactory.h +++ b/src/miscellaneous/textfactory.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/network-web/basenetworkaccessmanager.cpp b/src/network-web/basenetworkaccessmanager.cpp index 8ed1ba3af..5d5c54d30 100755 --- a/src/network-web/basenetworkaccessmanager.cpp +++ b/src/network-web/basenetworkaccessmanager.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/network-web/basenetworkaccessmanager.h b/src/network-web/basenetworkaccessmanager.h index 3c39678b0..2b170092b 100755 --- a/src/network-web/basenetworkaccessmanager.h +++ b/src/network-web/basenetworkaccessmanager.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/network-web/downloader.cpp b/src/network-web/downloader.cpp index be6ebee19..40837063a 100755 --- a/src/network-web/downloader.cpp +++ b/src/network-web/downloader.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/network-web/downloader.h b/src/network-web/downloader.h index 9982b09c2..36bcf92ed 100755 --- a/src/network-web/downloader.h +++ b/src/network-web/downloader.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/network-web/networkfactory.cpp b/src/network-web/networkfactory.cpp index 93451e8f3..bc029ff95 100755 --- a/src/network-web/networkfactory.cpp +++ b/src/network-web/networkfactory.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/network-web/networkfactory.h b/src/network-web/networkfactory.h index af5db3049..98efb97bf 100644 --- a/src/network-web/networkfactory.h +++ b/src/network-web/networkfactory.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/network-web/silentnetworkaccessmanager.cpp b/src/network-web/silentnetworkaccessmanager.cpp index 1b05c939c..e3a5f6622 100644 --- a/src/network-web/silentnetworkaccessmanager.cpp +++ b/src/network-web/silentnetworkaccessmanager.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/network-web/silentnetworkaccessmanager.h b/src/network-web/silentnetworkaccessmanager.h index f1afe91f6..3fa0ac5b8 100644 --- a/src/network-web/silentnetworkaccessmanager.h +++ b/src/network-web/silentnetworkaccessmanager.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/network-web/webbrowser.cpp b/src/network-web/webbrowser.cpp index 5571e4b09..cdca733ab 100755 --- a/src/network-web/webbrowser.cpp +++ b/src/network-web/webbrowser.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/network-web/webbrowser.h b/src/network-web/webbrowser.h index b6e992649..b9ab657c9 100755 --- a/src/network-web/webbrowser.h +++ b/src/network-web/webbrowser.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/network-web/webbrowsernetworkaccessmanager.cpp b/src/network-web/webbrowsernetworkaccessmanager.cpp index c81618fd6..bcd1344a8 100755 --- a/src/network-web/webbrowsernetworkaccessmanager.cpp +++ b/src/network-web/webbrowsernetworkaccessmanager.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/network-web/webbrowsernetworkaccessmanager.h b/src/network-web/webbrowsernetworkaccessmanager.h index 27aa9cb73..9f25390b3 100644 --- a/src/network-web/webbrowsernetworkaccessmanager.h +++ b/src/network-web/webbrowsernetworkaccessmanager.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/network-web/webpage.cpp b/src/network-web/webpage.cpp index 24334559a..54d38a330 100644 --- a/src/network-web/webpage.cpp +++ b/src/network-web/webpage.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/network-web/webpage.h b/src/network-web/webpage.h index 8963b556e..dcbc8a487 100644 --- a/src/network-web/webpage.h +++ b/src/network-web/webpage.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/network-web/webview.cpp b/src/network-web/webview.cpp index 9fb570c9b..1e054285a 100755 --- a/src/network-web/webview.cpp +++ b/src/network-web/webview.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/network-web/webview.h b/src/network-web/webview.h index a8b717c96..ffeec7a2f 100644 --- a/src/network-web/webview.h +++ b/src/network-web/webview.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2014 by Martin Rotter +// Copyright (C) 2011-2015 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by