From 35bae07ddd7bfd3e485f4438e6a965549df93014 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Wed, 13 Jan 2016 09:57:05 +0100 Subject: [PATCH] Another const refactoring. --- README.md | 15 +++- src/core/feeddownloader.cpp | 2 +- src/core/feeddownloader.h | 2 +- src/core/feedsmodel.cpp | 10 +-- src/core/feedsmodel.h | 4 +- src/core/feedsproxymodel.cpp | 6 +- src/core/feedsproxymodel.h | 8 +-- src/core/message.cpp | 2 +- src/core/message.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/dynamic-shortcuts/shortcutbutton.cpp | 2 +- src/dynamic-shortcuts/shortcutbutton.h | 2 +- src/dynamic-shortcuts/shortcutcatcher.cpp | 2 +- src/dynamic-shortcuts/shortcutcatcher.h | 2 +- src/exceptions/applicationexception.cpp | 2 +- src/exceptions/applicationexception.h | 2 +- src/exceptions/ioexception.cpp | 2 +- src/exceptions/ioexception.h | 2 +- src/gui/baselineedit.cpp | 2 +- src/gui/baselineedit.h | 2 +- src/gui/basetoolbar.cpp | 4 +- src/gui/basetoolbar.h | 4 +- src/gui/colorlabel.cpp | 20 +++++- src/gui/colorlabel.h | 17 +++++ src/gui/comboboxwithstatus.cpp | 4 +- src/gui/comboboxwithstatus.h | 3 +- src/gui/dialogs/formabout.cpp | 2 +- src/gui/dialogs/formabout.h | 2 +- src/gui/dialogs/formaddaccount.cpp | 2 +- src/gui/dialogs/formaddaccount.h | 2 +- .../dialogs/formbackupdatabasesettings.cpp | 2 +- src/gui/dialogs/formbackupdatabasesettings.h | 2 +- src/gui/dialogs/formdatabasecleanup.cpp | 2 +- src/gui/dialogs/formdatabasecleanup.h | 2 +- src/gui/dialogs/formmain.cpp | 5 +- src/gui/dialogs/formmain.h | 2 +- .../dialogs/formrestoredatabasesettings.cpp | 2 +- src/gui/dialogs/formrestoredatabasesettings.h | 2 +- src/gui/dialogs/formsettings.cpp | 2 +- src/gui/dialogs/formsettings.h | 2 +- src/gui/dialogs/formupdate.cpp | 2 +- src/gui/dialogs/formupdate.h | 2 +- src/gui/discoverfeedsbutton.cpp | 8 +-- src/gui/discoverfeedsbutton.h | 4 +- src/gui/edittableview.cpp | 22 +++--- src/gui/edittableview.h | 7 +- src/gui/feedmessageviewer.cpp | 39 +++++----- src/gui/feedmessageviewer.h | 12 ++-- src/gui/feedstoolbar.cpp | 2 +- src/gui/feedstoolbar.h | 2 +- src/gui/feedsview.cpp | 38 +++++----- src/gui/feedsview.h | 7 +- src/gui/labelwithstatus.cpp | 2 +- src/gui/labelwithstatus.h | 2 +- src/gui/lineeditwithstatus.cpp | 4 +- src/gui/lineeditwithstatus.h | 2 +- src/gui/locationlineedit.cpp | 2 +- src/gui/locationlineedit.h | 2 +- src/gui/messagebox.cpp | 7 +- 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 | 72 ++++++++++--------- src/gui/messagesview.h | 6 +- src/gui/notifications/notification.cpp | 2 +- src/gui/notifications/notification.h | 4 +- src/gui/plaintoolbutton.cpp | 4 +- src/gui/plaintoolbutton.h | 2 +- src/gui/squeezelabel.cpp | 2 +- src/gui/squeezelabel.h | 2 +- src/gui/statusbar.cpp | 2 +- src/gui/statusbar.h | 2 +- src/gui/styleditemdelegatewithoutfocus.cpp | 5 +- src/gui/styleditemdelegatewithoutfocus.h | 4 +- src/gui/systemtrayicon.cpp | 6 +- src/gui/systemtrayicon.h | 2 +- src/gui/tabbar.cpp | 20 +++--- src/gui/tabbar.h | 8 +-- src/gui/tabcontent.cpp | 2 +- src/gui/tabcontent.h | 4 +- src/gui/tabwidget.cpp | 33 ++++----- src/gui/tabwidget.h | 5 +- src/gui/toolbareditor.cpp | 13 ++-- src/gui/toolbareditor.h | 8 +-- 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/autosaver.cpp | 2 +- src/miscellaneous/autosaver.h | 2 +- src/miscellaneous/databasecleaner.cpp | 2 +- src/miscellaneous/databasecleaner.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/mutex.cpp | 2 +- src/miscellaneous/mutex.h | 2 +- src/miscellaneous/settings.cpp | 2 +- src/miscellaneous/settings.h | 2 +- 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/adblock/adblockdialog.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/downloadmanager.cpp | 4 +- src/network-web/downloadmanager.h | 4 +- src/network-web/googlesuggest.cpp | 2 +- src/network-web/googlesuggest.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 | 10 +-- .../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 +- src/services/abstract/category.cpp | 2 +- src/services/abstract/category.h | 2 +- src/services/abstract/feed.cpp | 2 +- src/services/abstract/feed.h | 2 +- src/services/abstract/recyclebin.cpp | 2 +- src/services/abstract/recyclebin.h | 2 +- src/services/abstract/rootitem.cpp | 10 +-- src/services/abstract/rootitem.h | 6 +- src/services/abstract/serviceentrypoint.cpp | 2 +- src/services/abstract/serviceentrypoint.h | 2 +- src/services/abstract/serviceroot.cpp | 2 +- src/services/abstract/serviceroot.h | 2 +- .../gui/formstandardcategorydetails.cpp | 2 +- .../gui/formstandardcategorydetails.h | 2 +- .../standard/gui/formstandardfeeddetails.cpp | 2 +- .../standard/gui/formstandardfeeddetails.h | 2 +- .../standard/gui/formstandardimportexport.cpp | 2 +- .../standard/gui/formstandardimportexport.h | 2 +- src/services/standard/standardcategory.cpp | 2 +- src/services/standard/standardcategory.h | 2 +- src/services/standard/standardfeed.cpp | 2 +- src/services/standard/standardfeed.h | 2 +- .../standardfeedsimportexportmodel.cpp | 2 +- .../standard/standardfeedsimportexportmodel.h | 2 +- src/services/standard/standardrecyclebin.cpp | 2 +- src/services/standard/standardrecyclebin.h | 2 +- .../standard/standardserviceentrypoint.cpp | 6 +- .../standard/standardserviceentrypoint.h | 2 +- src/services/standard/standardserviceroot.cpp | 2 +- src/services/standard/standardserviceroot.h | 2 +- src/services/tt-rss/gui/formeditaccount.cpp | 2 +- src/services/tt-rss/gui/formeditaccount.h | 2 +- src/services/tt-rss/gui/formeditfeed.cpp | 2 +- src/services/tt-rss/gui/formeditfeed.h | 2 +- .../tt-rss/network/ttrssnetworkfactory.cpp | 2 +- .../tt-rss/network/ttrssnetworkfactory.h | 2 +- src/services/tt-rss/ttrsscategory.cpp | 2 +- src/services/tt-rss/ttrsscategory.h | 2 +- src/services/tt-rss/ttrssfeed.cpp | 2 +- src/services/tt-rss/ttrssfeed.h | 2 +- src/services/tt-rss/ttrssrecyclebin.cpp | 2 +- src/services/tt-rss/ttrssrecyclebin.h | 2 +- .../tt-rss/ttrssserviceentrypoint.cpp | 2 +- src/services/tt-rss/ttrssserviceentrypoint.h | 2 +- src/services/tt-rss/ttrssserviceroot.cpp | 2 +- src/services/tt-rss/ttrssserviceroot.h | 2 +- 192 files changed, 412 insertions(+), 368 deletions(-) mode change 100644 => 100755 src/core/parsingfactory.h mode change 100644 => 100755 src/dynamic-shortcuts/dynamicshortcuts.h mode change 100644 => 100755 src/dynamic-shortcuts/dynamicshortcutswidget.h mode change 100644 => 100755 src/dynamic-shortcuts/shortcutbutton.cpp mode change 100644 => 100755 src/dynamic-shortcuts/shortcutbutton.h mode change 100644 => 100755 src/dynamic-shortcuts/shortcutcatcher.h mode change 100644 => 100755 src/exceptions/applicationexception.cpp mode change 100644 => 100755 src/exceptions/applicationexception.h mode change 100644 => 100755 src/exceptions/ioexception.cpp mode change 100644 => 100755 src/gui/basetoolbar.h mode change 100644 => 100755 src/gui/comboboxwithstatus.cpp mode change 100644 => 100755 src/gui/comboboxwithstatus.h mode change 100644 => 100755 src/gui/edittableview.cpp mode change 100644 => 100755 src/gui/edittableview.h mode change 100644 => 100755 src/gui/feedstoolbar.h mode change 100644 => 100755 src/gui/labelwithstatus.h mode change 100644 => 100755 src/gui/lineeditwithstatus.cpp mode change 100644 => 100755 src/gui/lineeditwithstatus.h mode change 100644 => 100755 src/gui/messagessearchlineedit.cpp mode change 100644 => 100755 src/gui/messagessearchlineedit.h mode change 100644 => 100755 src/gui/plaintoolbutton.cpp mode change 100644 => 100755 src/gui/plaintoolbutton.h mode change 100644 => 100755 src/gui/squeezelabel.cpp mode change 100644 => 100755 src/gui/squeezelabel.h mode change 100644 => 100755 src/gui/styleditemdelegatewithoutfocus.cpp mode change 100644 => 100755 src/gui/styleditemdelegatewithoutfocus.h mode change 100644 => 100755 src/gui/tabbar.h mode change 100644 => 100755 src/gui/tabcontent.cpp mode change 100644 => 100755 src/gui/tabcontent.h mode change 100644 => 100755 src/gui/toolbareditor.h mode change 100644 => 100755 src/miscellaneous/autosaver.h mode change 100644 => 100755 src/miscellaneous/mutex.cpp mode change 100644 => 100755 src/miscellaneous/mutex.h mode change 100644 => 100755 src/miscellaneous/textfactory.h mode change 100644 => 100755 src/network-web/silentnetworkaccessmanager.h mode change 100644 => 100755 src/network-web/webview.h diff --git a/README.md b/README.md index bc6df4d21..e600609c3 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,18 @@ Welcome to RSS Guard website. You can find here basic information. RSS Guard is simple and easy-to-use RSS/ATOM feed aggregator developed using Qt framework which supports online feed synchronization. +Core features are: + +* **support for online feed synchronization via plugins**, + * Tiny Tiny RSS (from RSS Guard 3.0.0). +* multiplatformity, +* multiple data backend support, + * SQLite (in-memory DBs too), + * MySQL. +* Adblock. + +See below for more information about features and other RSS Guard aspects. + - - - Contacts -------- @@ -54,8 +66,8 @@ Downloads * Archlinux AUR packages - [stable-qt5](https://aur.archlinux.org/packages/rssguard/). ![RSS Guard is 100% clean.](http://www.softpedia.com/_img/softpedia_100_free.png) -- - - +- - - Features -------- RSS Guard is simple (yet powerful) feed reader. It is able to fetch the most known feed formats, including RSS/RDF and ATOM. RSS Guard is developed on top of the [Qt library](http://qt-project.org/) and it supports these operating systems: @@ -121,7 +133,6 @@ RSS Guard is written in C++. It is pretty fast even with tons of messages loaded * no ads, no hidden costs. - - - - Philosophy ---------- RSS Guard tends to be independent software. It's free, it's open-source. RSS Guard accepts donations but only to SUPPORT its development. \ No newline at end of file diff --git a/src/core/feeddownloader.cpp b/src/core/feeddownloader.cpp index e1ebb0e96..673d290b4 100755 --- a/src/core/feeddownloader.cpp +++ b/src/core/feeddownloader.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 316c51075..2c673d3a1 100755 --- a/src/core/feeddownloader.h +++ b/src/core/feeddownloader.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 ba24a3c60..a7b791370 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -575,13 +575,13 @@ RootItem *FeedsModel::itemForIndex(const QModelIndex &index) const { } } -QModelIndex FeedsModel::indexForItem(RootItem *item) const { +QModelIndex FeedsModel::indexForItem(const RootItem *item) const { if (item == NULL || item->kind() == RootItemKind::Root) { // Root item lies on invalid index. return QModelIndex(); } - QStack chain; + QStack chain; while (item->kind() != RootItemKind::Root) { chain.push(item); @@ -593,8 +593,8 @@ QModelIndex FeedsModel::indexForItem(RootItem *item) const { // We go through the stack and create our target index. while (!chain.isEmpty()) { - RootItem *parent_item = chain.pop(); - target_index = index(parent_item->parent()->childItems().indexOf(parent_item), 0, target_index); + const RootItem *parent_item = chain.pop(); + target_index = index(parent_item->parent()->childItems().indexOf(const_cast(parent_item)), 0, target_index); } return target_index; diff --git a/src/core/feedsmodel.h b/src/core/feedsmodel.h index ca7a31922..169eede84 100755 --- a/src/core/feedsmodel.h +++ b/src/core/feedsmodel.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -121,7 +121,7 @@ class FeedsModel : public QAbstractItemModel { // NOTE: This goes through all available indexes and // checks their bound items manually, there is no // other way to to this. - QModelIndex indexForItem(RootItem *item) const; + QModelIndex indexForItem(const RootItem *item) const; // Determines if any feed has any new messages. bool hasAnyFeedNewMessages() const; diff --git a/src/core/feedsproxymodel.cpp b/src/core/feedsproxymodel.cpp index 92858722c..80e9976db 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -212,11 +212,11 @@ bool FeedsProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source } } -RootItem *FeedsProxyModel::selectedItem() const { +const RootItem *FeedsProxyModel::selectedItem() const { return m_selectedItem; } -void FeedsProxyModel::setSelectedItem(RootItem *selected_item) { +void FeedsProxyModel::setSelectedItem(const RootItem *selected_item) { m_selectedItem = selected_item; } diff --git a/src/core/feedsproxymodel.h b/src/core/feedsproxymodel.h index 03543ec32..1e0f00996 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -47,8 +47,8 @@ class FeedsProxyModel : public QSortFilterProxyModel { bool showUnreadOnly() const; void setShowUnreadOnly(bool show_unread_only); - RootItem *selectedItem() const; - void setSelectedItem(RootItem *selected_item); + const RootItem *selectedItem() const; + void setSelectedItem(const RootItem *selected_item); public slots: void invalidateReadFeedsFilter(bool set_new_value = false, bool show_unread_only = false); @@ -63,7 +63,7 @@ class FeedsProxyModel : public QSortFilterProxyModel { // Source model pointer. FeedsModel *m_sourceModel; - RootItem *m_selectedItem; + const RootItem *m_selectedItem; bool m_showUnreadOnly; }; diff --git a/src/core/message.cpp b/src/core/message.cpp index 111348826..4f60f002c 100755 --- a/src/core/message.cpp +++ b/src/core/message.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/message.h b/src/core/message.h index 3c001c29b..f216ba6b4 100755 --- a/src/core/message.h +++ b/src/core/message.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 32a9311b8..a7a06fa75 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 9a77938c7..243b6ad68 100755 --- a/src/core/messagesmodel.h +++ b/src/core/messagesmodel.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 605e99f32..0c29440c0 100755 --- a/src/core/messagesproxymodel.cpp +++ b/src/core/messagesproxymodel.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 9daf9b846..3c7769f09 100755 --- a/src/core/messagesproxymodel.h +++ b/src/core/messagesproxymodel.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 0cdf85104..ee67a1dd9 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 old mode 100644 new mode 100755 index 636806db7..9071abd73 --- a/src/core/parsingfactory.h +++ b/src/core/parsingfactory.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 3852bc89c..6714c2812 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 a23a95f58..2f10bb794 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 old mode 100644 new mode 100755 index 84d7a129a..a68fae5d2 --- 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 03ab42fcd..9d2f199a5 100755 --- 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 old mode 100644 new mode 100755 index f396cb1fd..1f3db4358 --- 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/shortcutbutton.cpp b/src/dynamic-shortcuts/shortcutbutton.cpp old mode 100644 new mode 100755 index a95a6fe71..b8fc5c13b --- a/src/dynamic-shortcuts/shortcutbutton.cpp +++ b/src/dynamic-shortcuts/shortcutbutton.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/shortcutbutton.h b/src/dynamic-shortcuts/shortcutbutton.h old mode 100644 new mode 100755 index 6a459feee..8777f2c24 --- a/src/dynamic-shortcuts/shortcutbutton.h +++ b/src/dynamic-shortcuts/shortcutbutton.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/shortcutcatcher.cpp b/src/dynamic-shortcuts/shortcutcatcher.cpp index dd9b52800..0696a3fd3 100755 --- a/src/dynamic-shortcuts/shortcutcatcher.cpp +++ b/src/dynamic-shortcuts/shortcutcatcher.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/shortcutcatcher.h b/src/dynamic-shortcuts/shortcutcatcher.h old mode 100644 new mode 100755 index fb9d0998f..9968f8533 --- a/src/dynamic-shortcuts/shortcutcatcher.h +++ b/src/dynamic-shortcuts/shortcutcatcher.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/exceptions/applicationexception.cpp b/src/exceptions/applicationexception.cpp old mode 100644 new mode 100755 index 86587cd38..8f3dc9511 --- a/src/exceptions/applicationexception.cpp +++ b/src/exceptions/applicationexception.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/exceptions/applicationexception.h b/src/exceptions/applicationexception.h old mode 100644 new mode 100755 index 85ddc9be1..3acba4b33 --- a/src/exceptions/applicationexception.h +++ b/src/exceptions/applicationexception.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/exceptions/ioexception.cpp b/src/exceptions/ioexception.cpp old mode 100644 new mode 100755 index 6276838da..15709cc59 --- a/src/exceptions/ioexception.cpp +++ b/src/exceptions/ioexception.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/exceptions/ioexception.h b/src/exceptions/ioexception.h index 5efc3fe11..994958c06 100755 --- a/src/exceptions/ioexception.h +++ b/src/exceptions/ioexception.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 76f7a65f5..0a8d26a6f 100755 --- a/src/gui/baselineedit.cpp +++ b/src/gui/baselineedit.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 743369508..ddeaaa119 100755 --- a/src/gui/baselineedit.h +++ b/src/gui/baselineedit.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 1f3ee0866..8af2e323f 100755 --- a/src/gui/basetoolbar.cpp +++ b/src/gui/basetoolbar.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -35,7 +35,7 @@ BaseToolBar::~BaseToolBar() { qDebug("Destroying BaseToolBar instance."); } -QAction *BaseToolBar::findMatchingAction(const QString &action, const QList actions) { +QAction *BaseToolBar::findMatchingAction(const QString &action, const QList actions) const { foreach (QAction *act, actions) { if (act->objectName() == action) { return act; diff --git a/src/gui/basetoolbar.h b/src/gui/basetoolbar.h old mode 100644 new mode 100755 index e897a8059..542b11026 --- a/src/gui/basetoolbar.h +++ b/src/gui/basetoolbar.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -44,7 +44,7 @@ class BaseToolBar : public QToolBar { virtual void loadChangeableActions() = 0; protected: - QAction *findMatchingAction(const QString &action, const QList actions); + QAction *findMatchingAction(const QString &action, const QList actions) const; }; #endif // TOOLBAR_H diff --git a/src/gui/colorlabel.cpp b/src/gui/colorlabel.cpp index 407471e04..9b5d35447 100755 --- a/src/gui/colorlabel.cpp +++ b/src/gui/colorlabel.cpp @@ -1,3 +1,20 @@ +// This file is part of RSS Guard. +// +// Copyright (C) 2011-2016 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 +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// RSS Guard is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with RSS Guard. If not, see . + #include "gui/colorlabel.h" #include @@ -22,6 +39,5 @@ void ColorLabel::setColor(const QColor &color) { } void ColorLabel::paintEvent(QPaintEvent *event) { - QPainter painter(this); - painter.fillRect(event->rect(), m_color); + QPainter(this).fillRect(event->rect(), m_color); } diff --git a/src/gui/colorlabel.h b/src/gui/colorlabel.h index 7574ca66d..75a0429d3 100755 --- a/src/gui/colorlabel.h +++ b/src/gui/colorlabel.h @@ -1,3 +1,20 @@ +// This file is part of RSS Guard. +// +// Copyright (C) 2011-2016 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 +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// RSS Guard is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with RSS Guard. If not, see . + #ifndef COLORLABEL_H #define COLORLABEL_H diff --git a/src/gui/comboboxwithstatus.cpp b/src/gui/comboboxwithstatus.cpp old mode 100644 new mode 100755 index 9db23bc37..5c133aa66 --- a/src/gui/comboboxwithstatus.cpp +++ b/src/gui/comboboxwithstatus.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -27,7 +27,7 @@ ComboBoxWithStatus::ComboBoxWithStatus(QWidget *parent) m_wdgInput = new QComboBox(this); // Set correct size for the tool button. - int txt_input_height = m_wdgInput->sizeHint().height(); + const int txt_input_height = m_wdgInput->sizeHint().height(); m_btnStatus->setFixedSize(txt_input_height, txt_input_height); // Compose the layout. diff --git a/src/gui/comboboxwithstatus.h b/src/gui/comboboxwithstatus.h old mode 100644 new mode 100755 index 720b30078..56a3cb1da --- a/src/gui/comboboxwithstatus.h +++ b/src/gui/comboboxwithstatus.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -22,6 +22,7 @@ #include + class ComboBoxWithStatus : public WidgetWithStatus { Q_OBJECT diff --git a/src/gui/dialogs/formabout.cpp b/src/gui/dialogs/formabout.cpp index 4e6666254..211a67fdf 100755 --- a/src/gui/dialogs/formabout.cpp +++ b/src/gui/dialogs/formabout.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/dialogs/formabout.h b/src/gui/dialogs/formabout.h index 493c47863..b573838b4 100755 --- a/src/gui/dialogs/formabout.h +++ b/src/gui/dialogs/formabout.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/dialogs/formaddaccount.cpp b/src/gui/dialogs/formaddaccount.cpp index 4a37e7fcc..4fd20d511 100755 --- a/src/gui/dialogs/formaddaccount.cpp +++ b/src/gui/dialogs/formaddaccount.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/dialogs/formaddaccount.h b/src/gui/dialogs/formaddaccount.h index 59ec97ac3..6ff15f1e9 100755 --- a/src/gui/dialogs/formaddaccount.h +++ b/src/gui/dialogs/formaddaccount.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/dialogs/formbackupdatabasesettings.cpp b/src/gui/dialogs/formbackupdatabasesettings.cpp index ef80a503a..65df8951f 100755 --- a/src/gui/dialogs/formbackupdatabasesettings.cpp +++ b/src/gui/dialogs/formbackupdatabasesettings.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/dialogs/formbackupdatabasesettings.h b/src/gui/dialogs/formbackupdatabasesettings.h index 522742e68..2b6a3f8a2 100755 --- a/src/gui/dialogs/formbackupdatabasesettings.h +++ b/src/gui/dialogs/formbackupdatabasesettings.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/dialogs/formdatabasecleanup.cpp b/src/gui/dialogs/formdatabasecleanup.cpp index b0a203503..8564f8ee1 100755 --- a/src/gui/dialogs/formdatabasecleanup.cpp +++ b/src/gui/dialogs/formdatabasecleanup.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/dialogs/formdatabasecleanup.h b/src/gui/dialogs/formdatabasecleanup.h index b37982129..daad5c82c 100755 --- a/src/gui/dialogs/formdatabasecleanup.h +++ b/src/gui/dialogs/formdatabasecleanup.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/dialogs/formmain.cpp b/src/gui/dialogs/formmain.cpp index 859decced..6545b3294 100755 --- a/src/gui/dialogs/formmain.cpp +++ b/src/gui/dialogs/formmain.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -222,6 +222,9 @@ void FormMain::updateAddItemMenu() { m_ui->m_menuAddItem->addAction(m_ui->m_actionAddCategoryIntoSelectedAccount); m_ui->m_menuAddItem->addAction(m_ui->m_actionAddFeedIntoSelectedAccount); } + else { + m_ui->m_menuAddItem->addAction(m_ui->m_actionNoActions); + } } void FormMain::updateRecycleBinMenu() { diff --git a/src/gui/dialogs/formmain.h b/src/gui/dialogs/formmain.h index 3f8c5117a..2bdfda3fa 100755 --- a/src/gui/dialogs/formmain.h +++ b/src/gui/dialogs/formmain.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/dialogs/formrestoredatabasesettings.cpp b/src/gui/dialogs/formrestoredatabasesettings.cpp index 781ec4735..43bc8a3d6 100755 --- a/src/gui/dialogs/formrestoredatabasesettings.cpp +++ b/src/gui/dialogs/formrestoredatabasesettings.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/dialogs/formrestoredatabasesettings.h b/src/gui/dialogs/formrestoredatabasesettings.h index 633b148f1..88bc8f3f4 100755 --- a/src/gui/dialogs/formrestoredatabasesettings.h +++ b/src/gui/dialogs/formrestoredatabasesettings.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/dialogs/formsettings.cpp b/src/gui/dialogs/formsettings.cpp index c3971a41a..3dfddd10f 100755 --- a/src/gui/dialogs/formsettings.cpp +++ b/src/gui/dialogs/formsettings.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/dialogs/formsettings.h b/src/gui/dialogs/formsettings.h index a774e500f..5cf478f49 100755 --- a/src/gui/dialogs/formsettings.h +++ b/src/gui/dialogs/formsettings.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/dialogs/formupdate.cpp b/src/gui/dialogs/formupdate.cpp index 7c5e6f66d..ea2046ece 100755 --- a/src/gui/dialogs/formupdate.cpp +++ b/src/gui/dialogs/formupdate.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/dialogs/formupdate.h b/src/gui/dialogs/formupdate.h index d37fe4819..fd35e3ffd 100755 --- a/src/gui/dialogs/formupdate.h +++ b/src/gui/dialogs/formupdate.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/discoverfeedsbutton.cpp b/src/gui/discoverfeedsbutton.cpp index f0508f5bc..aaeaa3a72 100755 --- a/src/gui/discoverfeedsbutton.cpp +++ b/src/gui/discoverfeedsbutton.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -59,8 +59,8 @@ void DiscoverFeedsButton::setFeedAddresses(const QStringList &addresses) { m_addresses = addresses; } -void DiscoverFeedsButton::linkTriggered(QAction *action) { - QString url = action->property("url").toString(); +void DiscoverFeedsButton::linkTriggered(const QAction *action) { + const QString url = action->property("url").toString(); ServiceRoot *root = static_cast(action->property("root").value()); if (root->supportsFeedAdding()) { @@ -77,7 +77,7 @@ void DiscoverFeedsButton::linkTriggered(QAction *action) { void DiscoverFeedsButton::fillMenu() { menu()->clear(); - foreach (ServiceRoot *root, qApp->mainForm()->tabWidget()->feedMessageViewer()->feedsView()->sourceModel()->serviceRoots()) { + foreach (const ServiceRoot *root, qApp->mainForm()->tabWidget()->feedMessageViewer()->feedsView()->sourceModel()->serviceRoots()) { QMenu *root_menu = menu()->addMenu(root->icon(), root->title()); foreach (const QString &url, m_addresses) { diff --git a/src/gui/discoverfeedsbutton.h b/src/gui/discoverfeedsbutton.h index ee738e5ff..8975cc6ad 100755 --- a/src/gui/discoverfeedsbutton.h +++ b/src/gui/discoverfeedsbutton.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -35,7 +35,7 @@ class DiscoverFeedsButton : public QToolButton { private slots: // User chose any of addresses. - void linkTriggered(QAction *action); + void linkTriggered(const QAction *action); void fillMenu(); private: diff --git a/src/gui/edittableview.cpp b/src/gui/edittableview.cpp old mode 100644 new mode 100755 index a31f85d23..9f3b6fcc5 --- a/src/gui/edittableview.cpp +++ b/src/gui/edittableview.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -38,27 +38,27 @@ void EditTableView::removeSelected() { return; } - QModelIndexList selectedRows = selectionModel()->selectedRows(); + const QModelIndexList selected_rows = selectionModel()->selectedRows(); - if (selectedRows.isEmpty()) { + if (selected_rows.isEmpty()) { return; } - int newSelectedRow = selectedRows.at(0).row(); + const int new_selected_row = selected_rows.at(0).row(); - for (int i = selectedRows.count() - 1; i >= 0; i--) { - QModelIndex idx = selectedRows.at(i); + for (int i = selected_rows.count() - 1; i >= 0; i--) { + QModelIndex idx = selected_rows.at(i); model()->removeRow(idx.row(), rootIndex()); } - QModelIndex newSelectedIndex = model()->index(newSelectedRow, 0, rootIndex()); + QModelIndex new_selected_index = model()->index(new_selected_row, 0, rootIndex()); - if (!newSelectedIndex.isValid()) { - newSelectedIndex = model()->index(newSelectedRow - 1, 0, rootIndex()); + if (!new_selected_index.isValid()) { + new_selected_index = model()->index(new_selected_row - 1, 0, rootIndex()); } - selectionModel()->select(newSelectedIndex, QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows); - setCurrentIndex(newSelectedIndex); + selectionModel()->select(new_selected_index, QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows); + setCurrentIndex(new_selected_index); } void EditTableView::removeAll() { diff --git a/src/gui/edittableview.h b/src/gui/edittableview.h old mode 100644 new mode 100755 index 5a0293304..366fbade3 --- a/src/gui/edittableview.h +++ b/src/gui/edittableview.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -27,11 +27,12 @@ class EditTableView : public QTableView { public: explicit EditTableView(QWidget *parent = 0); - void keyPressEvent(QKeyEvent *event); - public slots: void removeSelected(); void removeAll(); + + private: + void keyPressEvent(QKeyEvent *event); }; #endif // EDITTABLEVIEW_H diff --git a/src/gui/feedmessageviewer.cpp b/src/gui/feedmessageviewer.cpp index 2ca41b107..3ca490594 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -100,8 +100,8 @@ void FeedMessageViewer::saveSize() { } void FeedMessageViewer::loadSize() { - Settings *settings = qApp->settings(); - int default_msg_section_size = m_messagesView->header()->defaultSectionSize(); + const Settings *settings = qApp->settings(); + const int default_msg_section_size = m_messagesView->header()->defaultSectionSize(); // Restore offsets of splitters. m_feedSplitter->restoreState(QByteArray::fromBase64(settings->value(GROUP(GUI), SETTING(GUI::SplitterFeeds)).toString().toLocal8Bit())); @@ -117,7 +117,7 @@ void FeedMessageViewer::loadSize() { } void FeedMessageViewer::loadMessageViewerFonts() { - Settings *settings = qApp->settings(); + const Settings *settings = qApp->settings(); QWebSettings *view_settings = m_messagesBrowser->view()->settings(); view_settings->setFontFamily(QWebSettings::StandardFont, settings->value(GROUP(Messages), @@ -163,7 +163,7 @@ void FeedMessageViewer::switchFeedComponentVisibility() { } void FeedMessageViewer::toggleShowOnlyUnreadFeeds() { - QAction *origin = qobject_cast(sender()); + const QAction *origin = qobject_cast(sender()); if (origin == NULL) { m_feedsView->model()->invalidateReadFeedsFilter(true, false); @@ -174,10 +174,10 @@ void FeedMessageViewer::toggleShowOnlyUnreadFeeds() { } void FeedMessageViewer::updateMessageButtonsAvailability() { - bool one_message_selected = m_messagesView->selectionModel()->selectedRows().size() == 1; - bool atleast_one_message_selected = !m_messagesView->selectionModel()->selectedRows().isEmpty(); - bool bin_loaded = m_messagesView->sourceModel()->loadedItem() != NULL && m_messagesView->sourceModel()->loadedItem()->kind() == RootItemKind::Bin; - FormMain *form_main = qApp->mainForm(); + const bool one_message_selected = m_messagesView->selectionModel()->selectedRows().size() == 1; + const bool atleast_one_message_selected = !m_messagesView->selectionModel()->selectedRows().isEmpty(); + const bool bin_loaded = m_messagesView->sourceModel()->loadedItem() != NULL && m_messagesView->sourceModel()->loadedItem()->kind() == RootItemKind::Bin; + const FormMain *form_main = qApp->mainForm(); form_main->m_ui->m_actionDeleteSelectedMessages->setEnabled(atleast_one_message_selected); form_main->m_ui->m_actionRestoreSelectedMessages->setEnabled(atleast_one_message_selected && bin_loaded); @@ -191,13 +191,13 @@ void FeedMessageViewer::updateMessageButtonsAvailability() { } void FeedMessageViewer::updateFeedButtonsAvailability() { - bool critical_action_running = qApp->feedUpdateLock()->isLocked(); - RootItem *selected_item = feedsView()->selectedItem(); - bool anything_selected = selected_item != NULL; - bool feed_selected = anything_selected && selected_item->kind() == RootItemKind::Feed; - bool category_selected = anything_selected && selected_item->kind() == RootItemKind::Category; - bool service_selected = anything_selected && selected_item->kind() == RootItemKind::ServiceRoot; - FormMain *form_main = qApp->mainForm(); + const bool critical_action_running = qApp->feedUpdateLock()->isLocked(); + const RootItem *selected_item = feedsView()->selectedItem(); + const bool anything_selected = selected_item != NULL; + const bool feed_selected = anything_selected && selected_item->kind() == RootItemKind::Feed; + const bool category_selected = anything_selected && selected_item->kind() == RootItemKind::Category; + const bool service_selected = anything_selected && selected_item->kind() == RootItemKind::ServiceRoot; + const FormMain *form_main = qApp->mainForm(); form_main->m_ui->m_actionBackupDatabaseSettings->setEnabled(!critical_action_running); form_main->m_ui->m_actionCleanupDatabase->setEnabled(!critical_action_running); @@ -221,7 +221,7 @@ void FeedMessageViewer::updateFeedButtonsAvailability() { } void FeedMessageViewer::createConnections() { - FormMain *form_main = qApp->mainForm(); + const FormMain *form_main = qApp->mainForm(); // Filtering & searching. connect(m_toolBarMessages, SIGNAL(messageSearchPatternChanged(QString)), m_messagesView, SLOT(searchMessages(QString))); @@ -406,11 +406,10 @@ void FeedMessageViewer::initializeViews() { void FeedMessageViewer::showDbCleanupAssistant() { if (qApp->feedUpdateLock()->tryLock()) { - QPointer form_pointer = new FormDatabaseCleanup(this); + QScopedPointer form_pointer(new FormDatabaseCleanup(this)); form_pointer.data()->setCleaner(m_feedsView->sourceModel()->databaseCleaner()); form_pointer.data()->exec(); - delete form_pointer.data(); qApp->feedUpdateLock()->unlock(); m_messagesView->reloadSelections(false); @@ -424,7 +423,7 @@ void FeedMessageViewer::showDbCleanupAssistant() { } void FeedMessageViewer::refreshVisualProperties() { - Qt::ToolButtonStyle button_style = static_cast(qApp->settings()->value(GROUP(GUI), + const Qt::ToolButtonStyle button_style = static_cast(qApp->settings()->value(GROUP(GUI), SETTING(GUI::ToolbarStyle)).toInt()); m_toolBarFeeds->setToolButtonStyle(button_style); diff --git a/src/gui/feedmessageviewer.h b/src/gui/feedmessageviewer.h index 83b07baa1..f6a4034fb 100755 --- a/src/gui/feedmessageviewer.h +++ b/src/gui/feedmessageviewer.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -43,24 +43,24 @@ class FeedMessageViewer : public TabContent { virtual ~FeedMessageViewer(); // WebBrowser getter from TabContent interface. - inline WebBrowser *webBrowser() { + inline WebBrowser *webBrowser() const { return m_messagesBrowser; } // FeedsView getter. - inline FeedsView *feedsView() { + inline FeedsView *feedsView() const { return m_feedsView; } - inline MessagesView *messagesView() { + inline MessagesView *messagesView() const { return m_messagesView; } - inline MessagesToolBar *messagesToolBar() { + inline MessagesToolBar *messagesToolBar() const { return m_toolBarMessages; } - inline FeedsToolBar *feedsToolBar() { + inline FeedsToolBar *feedsToolBar() const { return m_toolBarFeeds; } diff --git a/src/gui/feedstoolbar.cpp b/src/gui/feedstoolbar.cpp index 084e2a3d5..9f5ce59ba 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 old mode 100644 new mode 100755 index 04b5ef557..87fb8c266 --- a/src/gui/feedstoolbar.h +++ b/src/gui/feedstoolbar.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 ee99f148d..075ea5336 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -75,7 +75,7 @@ void FeedsView::setSortingEnabled(bool enable) { } QList FeedsView::selectedFeeds() const { - QModelIndex current_index = currentIndex(); + const QModelIndex current_index = currentIndex(); if (current_index.isValid()) { return m_sourceModel->feedsForIndex(m_proxyModel->mapToSource(current_index)); @@ -85,12 +85,8 @@ QList FeedsView::selectedFeeds() const { } } -QList FeedsView::allFeeds() const { - return m_sourceModel->allFeeds(); -} - RootItem *FeedsView::selectedItem() const { - QModelIndexList selected_rows = selectionModel()->selectedRows(); + const QModelIndexList selected_rows = selectionModel()->selectedRows(); if (selected_rows.isEmpty()) { return NULL; @@ -114,7 +110,7 @@ void FeedsView::saveExpandStates(RootItem *item) { QList items = item->getSubTree(RootItemKind::Category | RootItemKind::ServiceRoot); // Iterate all categories and save their expand statuses. - foreach (RootItem *item, items) { + foreach (const RootItem *item, items) { const QString setting_name = item->hashCode(); settings->setValue(GROUP(CategoriesExpandStates), @@ -124,13 +120,13 @@ void FeedsView::saveExpandStates(RootItem *item) { } void FeedsView::loadAllExpandStates() { - Settings *settings = qApp->settings(); + const Settings *settings = qApp->settings(); QList expandable_items; expandable_items.append(sourceModel()->rootItem()->getSubTree(RootItemKind::Category | RootItemKind::ServiceRoot)); // Iterate all categories and save their expand statuses. - foreach (RootItem *item, expandable_items) { + foreach (const RootItem *item, expandable_items) { const QString setting_name = item->hashCode(); setExpanded(model()->mapFromSource(sourceModel()->indexForItem(item)), @@ -142,7 +138,7 @@ void FeedsView::loadAllExpandStates() { } void FeedsView::addFeedIntoSelectedAccount() { - RootItem *selected = selectedItem(); + const RootItem *selected = selectedItem(); if (selected != NULL) { ServiceRoot *root = selected->getParentServiceRoot(); @@ -160,7 +156,7 @@ void FeedsView::addFeedIntoSelectedAccount() { } void FeedsView::addCategoryIntoSelectedAccount() { - RootItem *selected = selectedItem(); + const RootItem *selected = selectedItem(); if (selected != NULL) { ServiceRoot *root = selected->getParentServiceRoot(); @@ -246,9 +242,7 @@ void FeedsView::deleteSelectedItem() { return; } - QModelIndex current_index = currentIndex(); - - if (!current_index.isValid()) { + if (!currentIndex().isValid()) { // Changes are done, unlock the update master lock and exit. qApp->feedUpdateLock()->unlock(); return; @@ -313,7 +307,7 @@ void FeedsView::markAllItemsRead() { } void FeedsView::openSelectedItemsInNewspaperMode() { - QList messages = m_sourceModel->messagesForItem(selectedItem()); + const QList messages = m_sourceModel->messagesForItem(selectedItem()); if (!messages.isEmpty()) { emit openMessagesInNewspaperView(messages); @@ -322,7 +316,7 @@ void FeedsView::openSelectedItemsInNewspaperMode() { } void FeedsView::selectNextItem() { - QModelIndex index_next = moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier); + const QModelIndex index_next = moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier); if (index_next.isValid()) { setCurrentIndex(index_next); @@ -331,7 +325,7 @@ void FeedsView::selectNextItem() { } void FeedsView::selectPreviousItem() { - QModelIndex index_previous = moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier); + const QModelIndex index_previous = moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier); if (index_previous.isValid()) { setCurrentIndex(index_previous); @@ -474,10 +468,10 @@ void FeedsView::keyPressEvent(QKeyEvent *event) { } void FeedsView::contextMenuEvent(QContextMenuEvent *event) { - QModelIndex clicked_index = indexAt(event->pos()); + const QModelIndex clicked_index = indexAt(event->pos()); if (clicked_index.isValid()) { - QModelIndex mapped_index = model()->mapToSource(clicked_index); + const QModelIndex mapped_index = model()->mapToSource(clicked_index); RootItem *clicked_item = sourceModel()->itemForIndex(mapped_index); if (clicked_item->kind() == RootItemKind::Category) { @@ -504,7 +498,7 @@ void FeedsView::saveSortState(int column, Qt::SortOrder order) { } void FeedsView::validateItemAfterDragDrop(const QModelIndex &source_index) { - QModelIndex mapped = m_proxyModel->mapFromSource(source_index); + const QModelIndex mapped = m_proxyModel->mapFromSource(source_index); if (mapped.isValid()) { expand(mapped); @@ -513,7 +507,7 @@ void FeedsView::validateItemAfterDragDrop(const QModelIndex &source_index) { } void FeedsView::onItemExpandRequested(const QList &items, bool exp) { - foreach (RootItem *item, items) { + foreach (const RootItem *item, items) { QModelIndex source_index = m_sourceModel->indexForItem(item); QModelIndex proxy_index = m_proxyModel->mapFromSource(source_index); diff --git a/src/gui/feedsview.h b/src/gui/feedsview.h index 7b93763ea..efefccf6b 100755 --- a/src/gui/feedsview.h +++ b/src/gui/feedsview.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -38,11 +38,11 @@ class FeedsView : public QTreeView { virtual ~FeedsView(); // Fundamental accessors. - inline FeedsProxyModel *model() { + inline FeedsProxyModel *model() const { return m_proxyModel; } - inline FeedsModel *sourceModel() { + inline FeedsModel *sourceModel() const { return m_sourceModel; } @@ -51,7 +51,6 @@ class FeedsView : public QTreeView { // Returns list of selected/all feeds. // NOTE: This is recursive method which returns all descendants. QList selectedFeeds() const; - QList allFeeds() const; // Returns pointers to selected feed/category if they are really // selected. diff --git a/src/gui/labelwithstatus.cpp b/src/gui/labelwithstatus.cpp index 5f15541b3..8505e9da2 100755 --- a/src/gui/labelwithstatus.cpp +++ b/src/gui/labelwithstatus.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 old mode 100644 new mode 100755 index 110c9ffd3..cd90e7aa7 --- a/src/gui/labelwithstatus.h +++ b/src/gui/labelwithstatus.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 old mode 100644 new mode 100755 index fb95183a4..6fb98bf18 --- a/src/gui/lineeditwithstatus.cpp +++ b/src/gui/lineeditwithstatus.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -30,7 +30,7 @@ LineEditWithStatus::LineEditWithStatus(QWidget *parent) setFocusProxy(m_wdgInput); // Set correct size for the tool button. - int txt_input_height = m_wdgInput->sizeHint().height(); + const int txt_input_height = m_wdgInput->sizeHint().height(); m_btnStatus->setFixedSize(txt_input_height, txt_input_height); // Compose the layout. diff --git a/src/gui/lineeditwithstatus.h b/src/gui/lineeditwithstatus.h old mode 100644 new mode 100755 index 8a23f2974..889aa7646 --- a/src/gui/lineeditwithstatus.h +++ b/src/gui/lineeditwithstatus.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 8d5a3d163..134c78379 100755 --- a/src/gui/locationlineedit.cpp +++ b/src/gui/locationlineedit.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 57b24c7ac..7fbe4ae8f 100755 --- a/src/gui/locationlineedit.h +++ b/src/gui/locationlineedit.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 bd3a7f558..eef3b1a8c 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -35,9 +35,8 @@ MessageBox::~MessageBox() { void MessageBox::setIcon(QMessageBox::Icon icon) { // Determine correct status icon size. - int icon_size = qApp->style()->pixelMetric(QStyle::PM_MessageBoxIconSize, - 0, - this); + const int icon_size = qApp->style()->pixelMetric(QStyle::PM_MessageBoxIconSize, 0, this); + // Setup status icon. setIconPixmap(iconForStatus(icon).pixmap(icon_size, icon_size)); } diff --git a/src/gui/messagebox.h b/src/gui/messagebox.h index aea709589..e1e610ca3 100755 --- a/src/gui/messagebox.h +++ b/src/gui/messagebox.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 old mode 100644 new mode 100755 index 001857be7..279af85c9 --- a/src/gui/messagessearchlineedit.cpp +++ b/src/gui/messagessearchlineedit.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 old mode 100644 new mode 100755 index 14975ed61..f925cbaa3 --- a/src/gui/messagessearchlineedit.h +++ b/src/gui/messagessearchlineedit.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 c907a5682..6433df9ab 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 e1f33d559..3007f86dc 100755 --- a/src/gui/messagestoolbar.h +++ b/src/gui/messagestoolbar.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 1058325b9..1299fc0f5 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -74,9 +74,9 @@ void MessagesView::keyboardSearch(const QString &search) { void MessagesView::reloadSelections(bool mark_current_index_read) { QModelIndex current_index = selectionModel()->currentIndex(); - QModelIndex mapped_current_index = m_proxyModel->mapToSource(current_index); + const QModelIndex mapped_current_index = m_proxyModel->mapToSource(current_index); QModelIndexList selected_indexes = selectionModel()->selectedRows(); - QModelIndexList mapped_indexes = m_proxyModel->mapListToSource(selected_indexes); + const QModelIndexList mapped_indexes = m_proxyModel->mapListToSource(selected_indexes); // Reload the model now. m_sourceModel->fetchAllData(); @@ -134,7 +134,7 @@ void MessagesView::keyPressEvent(QKeyEvent *event) { } void MessagesView::contextMenuEvent(QContextMenuEvent *event) { - QModelIndex clicked_index = indexAt(event->pos()); + const QModelIndex clicked_index = indexAt(event->pos()); if (!clicked_index.isValid()) { qDebug("Context menu for MessagesView will not be shown because user clicked on invalid item."); @@ -175,10 +175,10 @@ void MessagesView::mousePressEvent(QMouseEvent *event) { case Qt::LeftButton: { // Make sure that message importance is switched when user // clicks the "important" column. - QModelIndex clicked_index = indexAt(event->pos()); + const QModelIndex clicked_index = indexAt(event->pos()); if (clicked_index.isValid()) { - QModelIndex mapped_index = m_proxyModel->mapToSource(clicked_index); + const QModelIndex mapped_index = m_proxyModel->mapToSource(clicked_index); if (mapped_index.column() == MSG_DB_IMPORTANT_INDEX) { m_sourceModel->switchMessageImportance(mapped_index.row()); @@ -200,9 +200,9 @@ void MessagesView::mousePressEvent(QMouseEvent *event) { } void MessagesView::selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) { - QModelIndexList selected_rows = selectionModel()->selectedRows(); - QModelIndex current_index = currentIndex(); - QModelIndex mapped_current_index = m_proxyModel->mapToSource(current_index); + const QModelIndexList selected_rows = selectionModel()->selectedRows(); + const QModelIndex current_index = currentIndex(); + const QModelIndex mapped_current_index = m_proxyModel->mapToSource(current_index); qDebug("Current row changed - row [%d,%d] source [%d, %d].", current_index.row(), current_index.column(), @@ -231,8 +231,8 @@ void MessagesView::selectionChanged(const QItemSelection &selected, const QItemS void MessagesView::loadItem(RootItem *item) { m_sourceModel->loadMessages(item); - int col = qApp->settings()->value(GROUP(GUI), SETTING(GUI::DefaultSortColumnMessages)).toInt(); - Qt::SortOrder ord = static_cast(qApp->settings()->value(GROUP(GUI), SETTING(GUI::DefaultSortOrderMessages)).toInt()); + const int col = qApp->settings()->value(GROUP(GUI), SETTING(GUI::DefaultSortColumnMessages)).toInt(); + const Qt::SortOrder ord = static_cast(qApp->settings()->value(GROUP(GUI), SETTING(GUI::DefaultSortOrderMessages)).toInt()); sortByColumn(col, ord); @@ -247,7 +247,7 @@ void MessagesView::loadItem(RootItem *item) { void MessagesView::openSelectedSourceMessagesExternally() { foreach (const QModelIndex &index, selectionModel()->selectedRows()) { - QString link = m_sourceModel->messageAt(m_proxyModel->mapToSource(index).row()).m_url; + const QString link = m_sourceModel->messageAt(m_proxyModel->mapToSource(index).row()).m_url; if (!WebFactory::instance()->openUrlInExternalBrowser(link)) { qApp->showGuiMessage(tr("Problem with starting external web browser"), @@ -265,7 +265,7 @@ void MessagesView::openSelectedSourceMessagesExternally() { void MessagesView::openSelectedSourceMessagesInternally() { foreach (const QModelIndex &index, selectionModel()->selectedRows()) { - Message message = m_sourceModel->messageAt(m_proxyModel->mapToSource(index).row()); + const Message message = m_sourceModel->messageAt(m_proxyModel->mapToSource(index).row()); if (message.m_url.isEmpty()) { MessageBox::show(this, @@ -308,7 +308,7 @@ void MessagesView::openSelectedMessagesInternally() { void MessagesView::sendSelectedMessageViaEmail() { if (selectionModel()->selectedRows().size() == 1) { - Message message = m_sourceModel->messageAt(m_proxyModel->mapToSource(selectionModel()->selectedRows().at(0)).row()); + const Message message = m_sourceModel->messageAt(m_proxyModel->mapToSource(selectionModel()->selectedRows().at(0)).row()); if (!WebFactory::instance()->sendMessageViaEmail(message)) { MessageBox::show(this, @@ -334,9 +334,9 @@ void MessagesView::setSelectedMessagesReadStatus(RootItem::ReadStatus read) { return; } - QModelIndex mapped_current_index = m_proxyModel->mapToSource(current_index); + const QModelIndex mapped_current_index = m_proxyModel->mapToSource(current_index); QModelIndexList selected_indexes = selectionModel()->selectedRows(); - QModelIndexList mapped_indexes = m_proxyModel->mapListToSource(selected_indexes); + const QModelIndexList mapped_indexes = m_proxyModel->mapListToSource(selected_indexes); m_sourceModel->setBatchMessagesRead(mapped_indexes, read); sortByColumn(header()->sortIndicatorSection(), header()->sortIndicatorOrder()); @@ -357,23 +357,24 @@ void MessagesView::setSelectedMessagesReadStatus(RootItem::ReadStatus read) { } void MessagesView::deleteSelectedMessages() { - QModelIndex current_index = selectionModel()->currentIndex(); + const QModelIndex current_index = selectionModel()->currentIndex(); if (!current_index.isValid()) { return; } - QModelIndexList selected_indexes = selectionModel()->selectedRows(); - QModelIndexList mapped_indexes = m_proxyModel->mapListToSource(selected_indexes); + const QModelIndexList selected_indexes = selectionModel()->selectedRows(); + const QModelIndexList mapped_indexes = m_proxyModel->mapListToSource(selected_indexes); m_sourceModel->setBatchMessagesDeleted(mapped_indexes); sortByColumn(header()->sortIndicatorSection(), header()->sortIndicatorOrder()); - int row_count = m_sourceModel->rowCount(); + const int row_count = m_sourceModel->rowCount(); + if (row_count > 0) { - QModelIndex last_item = current_index.row() < row_count ? - m_proxyModel->index(current_index.row(), MSG_DB_TITLE_INDEX) : - m_proxyModel->index(row_count - 1, MSG_DB_TITLE_INDEX); + const QModelIndex last_item = current_index.row() < row_count ? + m_proxyModel->index(current_index.row(), MSG_DB_TITLE_INDEX) : + m_proxyModel->index(row_count - 1, MSG_DB_TITLE_INDEX); setCurrentIndex(last_item); scrollTo(last_item); @@ -385,23 +386,24 @@ void MessagesView::deleteSelectedMessages() { } void MessagesView::restoreSelectedMessages() { - QModelIndex current_index = selectionModel()->currentIndex(); + const QModelIndex current_index = selectionModel()->currentIndex(); if (!current_index.isValid()) { return; } - QModelIndexList selected_indexes = selectionModel()->selectedRows(); - QModelIndexList mapped_indexes = m_proxyModel->mapListToSource(selected_indexes); + const QModelIndexList selected_indexes = selectionModel()->selectedRows(); + const QModelIndexList mapped_indexes = m_proxyModel->mapListToSource(selected_indexes); m_sourceModel->setBatchMessagesRestored(mapped_indexes); sortByColumn(header()->sortIndicatorSection(), header()->sortIndicatorOrder()); int row_count = m_sourceModel->rowCount(); + if (row_count > 0) { - QModelIndex last_item = current_index.row() < row_count ? - m_proxyModel->index(current_index.row(), MSG_DB_TITLE_INDEX) : - m_proxyModel->index(row_count - 1, MSG_DB_TITLE_INDEX); + const QModelIndex last_item = current_index.row() < row_count ? + m_proxyModel->index(current_index.row(), MSG_DB_TITLE_INDEX) : + m_proxyModel->index(row_count - 1, MSG_DB_TITLE_INDEX); setCurrentIndex(last_item); scrollTo(last_item); @@ -419,9 +421,9 @@ void MessagesView::switchSelectedMessagesImportance() { return; } - QModelIndex mapped_current_index = m_proxyModel->mapToSource(current_index); + const QModelIndex mapped_current_index = m_proxyModel->mapToSource(current_index); QModelIndexList selected_indexes = selectionModel()->selectedRows(); - QModelIndexList mapped_indexes = m_proxyModel->mapListToSource(selected_indexes); + const QModelIndexList mapped_indexes = m_proxyModel->mapListToSource(selected_indexes); m_sourceModel->switchBatchMessageImportance(mapped_indexes); sortByColumn(header()->sortIndicatorSection(), header()->sortIndicatorOrder()); @@ -450,7 +452,7 @@ void MessagesView::reselectIndexes(const QModelIndexList &indexes) { } void MessagesView::selectNextItem() { - QModelIndex index_next = moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier); + const QModelIndex index_next = moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier); if (index_next.isValid()) { setCurrentIndex(index_next); @@ -460,7 +462,7 @@ void MessagesView::selectNextItem() { } void MessagesView::selectPreviousItem() { - QModelIndex index_previous = moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier); + const QModelIndex index_previous = moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier); if (index_previous.isValid()) { setCurrentIndex(index_previous); @@ -472,7 +474,7 @@ void MessagesView::selectPreviousItem() { void MessagesView::selectNextUnreadItem() { // FIXME: Use this to solve #112. - QModelIndexList selected_rows = selectionModel()->selectedRows(); + const QModelIndexList selected_rows = selectionModel()->selectedRows(); int active_row; if (!selected_rows.isEmpty()) { @@ -483,7 +485,7 @@ void MessagesView::selectNextUnreadItem() { active_row = 0; } - QModelIndex next_unread = m_proxyModel->getNextPreviousUnreadItemIndex(active_row); + const QModelIndex next_unread = m_proxyModel->getNextPreviousUnreadItemIndex(active_row); if (next_unread.isValid()) { // We found unread message, mark it. diff --git a/src/gui/messagesview.h b/src/gui/messagesview.h index 991a24d58..134d3c224 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -39,11 +39,11 @@ class MessagesView : public QTreeView { void setSortingEnabled(bool enable); // Model accessors. - inline MessagesProxyModel *model() { + inline MessagesProxyModel *model() const { return m_proxyModel; } - inline MessagesModel *sourceModel() { + inline MessagesModel *sourceModel() const { return m_sourceModel; } diff --git a/src/gui/notifications/notification.cpp b/src/gui/notifications/notification.cpp index d0bba9461..6552b8ab3 100755 --- a/src/gui/notifications/notification.cpp +++ b/src/gui/notifications/notification.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/notifications/notification.h b/src/gui/notifications/notification.h index f0de72d7c..8e849afe6 100755 --- a/src/gui/notifications/notification.h +++ b/src/gui/notifications/notification.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -86,7 +86,7 @@ class Notification : public QWidget { int m_widgetMargin; int m_timerId; - QObject *m_clickTarget; + const QObject *m_clickTarget; const char *m_clickSlot; #if defined(Q_OS_LINUX) diff --git a/src/gui/plaintoolbutton.cpp b/src/gui/plaintoolbutton.cpp old mode 100644 new mode 100755 index 1c9f72125..f110b8778 --- a/src/gui/plaintoolbutton.cpp +++ b/src/gui/plaintoolbutton.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -39,7 +39,6 @@ void PlainToolButton::paintEvent(QPaintEvent *e) { // Set padding. rect.adjust(m_padding, m_padding, -m_padding, -m_padding); - // Paint the icon. if (underMouse() || isChecked()) { p.setOpacity(0.7); @@ -61,4 +60,3 @@ void PlainToolButton::setChecked(bool checked) { QToolButton::setChecked(checked); repaint(); } - diff --git a/src/gui/plaintoolbutton.h b/src/gui/plaintoolbutton.h old mode 100644 new mode 100755 index 48d7a33a6..43db5d90d --- a/src/gui/plaintoolbutton.h +++ b/src/gui/plaintoolbutton.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/squeezelabel.cpp b/src/gui/squeezelabel.cpp old mode 100644 new mode 100755 index 7316a6534..fce43de30 --- a/src/gui/squeezelabel.cpp +++ b/src/gui/squeezelabel.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/squeezelabel.h b/src/gui/squeezelabel.h old mode 100644 new mode 100755 index bc3fcce8c..1c6e18802 --- a/src/gui/squeezelabel.h +++ b/src/gui/squeezelabel.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 44c63a373..d4c34ad99 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 cf5103895..74996ac65 100755 --- a/src/gui/statusbar.h +++ b/src/gui/statusbar.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 old mode 100644 new mode 100755 index b60c30fb1..7b53dd2a4 --- a/src/gui/styleditemdelegatewithoutfocus.cpp +++ b/src/gui/styleditemdelegatewithoutfocus.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -24,7 +24,8 @@ StyledItemDelegateWithoutFocus::StyledItemDelegateWithoutFocus(QObject *parent) StyledItemDelegateWithoutFocus::~StyledItemDelegateWithoutFocus() { } -void StyledItemDelegateWithoutFocus::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const { +void StyledItemDelegateWithoutFocus::paint(QPainter *painter, const QStyleOptionViewItem &option, + const QModelIndex &index) const { QStyleOptionViewItemV4 itemOption(option); if (itemOption.state & QStyle::State_HasFocus) { diff --git a/src/gui/styleditemdelegatewithoutfocus.h b/src/gui/styleditemdelegatewithoutfocus.h old mode 100644 new mode 100755 index 70aef6e17..d2d55d51d --- a/src/gui/styleditemdelegatewithoutfocus.h +++ b/src/gui/styleditemdelegatewithoutfocus.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -28,7 +28,7 @@ class StyledItemDelegateWithoutFocus : public QStyledItemDelegate { explicit StyledItemDelegateWithoutFocus(QObject *parent = 0); virtual ~StyledItemDelegateWithoutFocus(); - void paint(QPainter* painter, const QStyleOptionViewItem & option, const QModelIndex &index) const; + void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; }; diff --git a/src/gui/systemtrayicon.cpp b/src/gui/systemtrayicon.cpp index 514f061c4..70967e459 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -41,6 +41,7 @@ bool TrayIconMenu::event(QEvent *event) { tr("Close opened modal dialogs first."), QSystemTrayIcon::Warning, qApp->mainForm(), true); } + return QMenu::event(event); } #endif @@ -75,6 +76,7 @@ void SystemTrayIcon::onActivated(const QSystemTrayIcon::ActivationReason &reason case SystemTrayIcon::DoubleClick: case SystemTrayIcon::MiddleClick: static_cast(parent())->switchVisibility(); + break; default: break; @@ -153,8 +155,8 @@ void SystemTrayIcon::setNumber(int number, bool any_new_message) { tray_painter.setFont(m_font); tray_painter.drawText(QRect(0, 0, 128, 128), Qt::AlignVCenter | Qt::AlignCenter, QString::number(number)); } - tray_painter.end(); + tray_painter.end(); QSystemTrayIcon::setIcon(QIcon(background)); } } diff --git a/src/gui/systemtrayicon.h b/src/gui/systemtrayicon.h index f1339c564..f6f9f1b03 100755 --- a/src/gui/systemtrayicon.h +++ b/src/gui/systemtrayicon.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 3fc545295..d205cbcb9 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -47,7 +47,7 @@ void TabBar::setTabType(int index, const TabBar::TabType &type) { close_button->setFixedSize(iconSize()); // Close underlying tab when button is clicked. - connect(close_button, SIGNAL(clicked()),this, SLOT(closeTabViaButton())); + connect(close_button, SIGNAL(clicked()), this, SLOT(closeTabViaButton())); setTabButton(index, QTabBar::RightSide, close_button); break; } @@ -63,10 +63,10 @@ void TabBar::setTabType(int index, const TabBar::TabType &type) { } void TabBar::closeTabViaButton() { - QAbstractButton *close_button = qobject_cast(sender()); - QTabBar::ButtonPosition button_position = static_cast(style()->styleHint(QStyle::SH_TabBar_CloseButtonPosition, - 0, - this)); + const QAbstractButton *close_button = qobject_cast(sender()); + const QTabBar::ButtonPosition button_position = static_cast(style()->styleHint(QStyle::SH_TabBar_CloseButtonPosition, + 0, + this)); if (close_button != NULL) { // Find index of tab for this close button. @@ -81,8 +81,8 @@ void TabBar::closeTabViaButton() { } void TabBar::wheelEvent(QWheelEvent *event) { - int current_index = currentIndex(); - int number_of_tabs = count(); + const int current_index = currentIndex(); + const int number_of_tabs = count(); // Make sure rotating works. if (number_of_tabs > 1) { @@ -104,7 +104,7 @@ void TabBar::wheelEvent(QWheelEvent *event) { void TabBar::mousePressEvent(QMouseEvent *event) { QTabBar::mousePressEvent(event); - int tab_index = tabAt(event->pos()); + const int tab_index = tabAt(event->pos()); // Check if user clicked on some tab or on empty space. if (tab_index >= 0) { @@ -123,7 +123,7 @@ void TabBar::mousePressEvent(QMouseEvent *event) { void TabBar::mouseDoubleClickEvent(QMouseEvent *event) { QTabBar::mouseDoubleClickEvent(event); - int tab_index = tabAt(event->pos()); + const int tab_index = tabAt(event->pos()); // Check if user clicked on some tab or on empty space. if (tab_index >= 0) { diff --git a/src/gui/tabbar.h b/src/gui/tabbar.h old mode 100644 new mode 100755 index f36b8c13b..9d81918eb --- a/src/gui/tabbar.h +++ b/src/gui/tabbar.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -42,15 +42,15 @@ class TabBar : public QTabBar { // Getter/setter for tab type. void setTabType(int index, const TabBar::TabType &type); - inline TabBar::TabType tabType(int index) { + inline TabBar::TabType tabType(int index) const { return static_cast(tabData(index).value()); } - protected slots: + private slots: // Called when user selects to close tab via close button. void closeTabViaButton(); - protected: + private: // Reimplementations. void mouseDoubleClickEvent(QMouseEvent *event); void mousePressEvent(QMouseEvent *event); diff --git a/src/gui/tabcontent.cpp b/src/gui/tabcontent.cpp old mode 100644 new mode 100755 index bac8c3121..27e4bb329 --- a/src/gui/tabcontent.cpp +++ b/src/gui/tabcontent.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 old mode 100644 new mode 100755 index 8cc7f5792..06a3af685 --- a/src/gui/tabcontent.h +++ b/src/gui/tabcontent.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -45,7 +45,7 @@ class TabContent : public QWidget { // Obtains instance contained in this TabContent or nullptr. // This can be used for obtaining the menu from the instance and so on. - virtual WebBrowser *webBrowser() = 0; + virtual WebBrowser *webBrowser() const = 0; protected: int m_index; diff --git a/src/gui/tabwidget.cpp b/src/gui/tabwidget.cpp index 2c0831e54..af2503719 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -77,7 +77,7 @@ void TabWidget::openMainMenu() { } QPoint button_position = m_btnMainMenu->pos(); - QSize target_size = m_btnMainMenu->size() / 2.0; + const QSize target_size = m_btnMainMenu->size() / 2.0; button_position.setX(button_position.x() + target_size.width()); button_position.setY(button_position.y() + target_size.height()); @@ -87,7 +87,7 @@ void TabWidget::openMainMenu() { void TabWidget::showDownloadManager() { for (int i = 0; i < count(); i++) { - if (QString(widget(i)->metaObject()->className()) == "DownloadManager") { + if (widget(i)->metaObject()->className() == QSL("DownloadManager")) { setCurrentIndex(i); return; } @@ -100,7 +100,7 @@ void TabWidget::showDownloadManager() { } void TabWidget::checkTabBarVisibility() { - bool should_be_visible = count() > 1 || !qApp->settings()->value(GROUP(GUI), SETTING(GUI::HideTabBarIfOnlyOneTab)).toBool(); + const bool should_be_visible = count() > 1 || !qApp->settings()->value(GROUP(GUI), SETTING(GUI::HideTabBarIfOnlyOneTab)).toBool(); if (should_be_visible) { setCornerWidget(m_btnMainMenu, Qt::TopLeftCorner); @@ -124,7 +124,7 @@ void TabWidget::tabInserted(int index) { QTabWidget::tabInserted(index); checkTabBarVisibility(); - int count_of_tabs = count(); + const int count_of_tabs = count(); if (index < count_of_tabs - 1 && count_of_tabs > 1) { // New tab was inserted and the tab is not the last one. @@ -136,7 +136,7 @@ void TabWidget::tabRemoved(int index) { QTabWidget::tabRemoved(index); checkTabBarVisibility(); - int count_of_tabs = count(); + const int count_of_tabs = count(); if (index < count_of_tabs && count_of_tabs > 1) { // Some tab was removed and the tab was not the last one. @@ -153,10 +153,10 @@ void TabWidget::createConnections() { void TabWidget::initializeTabs() { // Create widget for "Feeds" page and add it. m_feedMessageViewer = new FeedMessageViewer(this); - int index_of_browser = addTab(static_cast(m_feedMessageViewer), - QIcon(), - tr("Feeds"), - TabBar::FeedReader); + const int index_of_browser = addTab(static_cast(m_feedMessageViewer), + QIcon(), + tr("Feeds"), + TabBar::FeedReader); setTabToolTip(index_of_browser, tr("Browse your feeds and messages")); } @@ -170,7 +170,8 @@ void TabWidget::setupIcons() { } // Other indexes probably contain WebBrowsers. else { - WebBrowser *active_browser = widget(index)->webBrowser(); + const WebBrowser *active_browser = widget(index)->webBrowser(); + if (active_browser != NULL && active_browser->icon().isNull()) { // We found WebBrowser instance of this tab page, which // has no suitable icon, load a new one from the icon theme. @@ -242,35 +243,35 @@ void TabWidget::removeTab(int index, bool clear_from_memory) { } int TabWidget::addTab(TabContent *widget, const QIcon &icon, const QString &label, const TabBar::TabType &type) { - int index = QTabWidget::addTab(widget, icon, label); + const int index = QTabWidget::addTab(widget, icon, label); tabBar()->setTabType(index, type); return index; } int TabWidget::addTab(TabContent *widget, const QString &label, const TabBar::TabType &type) { - int index = QTabWidget::addTab(widget, label); + const int index = QTabWidget::addTab(widget, label); tabBar()->setTabType(index, type); return index; } int TabWidget::insertTab(int index, QWidget *widget, const QIcon &icon, const QString &label, const TabBar::TabType &type) { - int tab_index = QTabWidget::insertTab(index, widget, icon, label); + const int tab_index = QTabWidget::insertTab(index, widget, icon, label); tabBar()->setTabType(tab_index, type); return tab_index; } int TabWidget::insertTab(int index, QWidget *widget, const QString &label, const TabBar::TabType &type) { - int tab_index = QTabWidget::insertTab(index, widget, label); + const int tab_index = QTabWidget::insertTab(index, widget, label); tabBar()->setTabType(tab_index, type); return tab_index; } int TabWidget::addBrowserWithMessages(const QList &messages) { - int new_index = addBrowser(false, true); + const int new_index = addBrowser(false, true); WebBrowser *browser = static_cast(widget(new_index)); browser->setNavigationBarVisible(false); diff --git a/src/gui/tabwidget.h b/src/gui/tabwidget.h index c39616720..9411b1257 100755 --- a/src/gui/tabwidget.h +++ b/src/gui/tabwidget.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -50,7 +50,7 @@ class TabWidget : public QTabWidget { void removeTab(int index, bool clear_from_memory); // Returns tab bar. - inline TabBar *tabBar() { + inline TabBar *tabBar() const { return static_cast(QTabWidget::tabBar()); } @@ -105,6 +105,7 @@ class TabWidget : public QTabWidget { // Opens main menu. void openMainMenu(); + // Displays download manager. void showDownloadManager(); // Closes all "closable" tabs except the active tab. diff --git a/src/gui/toolbareditor.cpp b/src/gui/toolbareditor.cpp index fb7fed257..c6d31a47a 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -46,7 +46,6 @@ ToolBarEditor::ToolBarEditor(QWidget *parent) } ToolBarEditor::~ToolBarEditor() { - delete m_ui; } void ToolBarEditor::loadFromToolBar(BaseToolBar *tool_bar) { @@ -55,7 +54,7 @@ void ToolBarEditor::loadFromToolBar(BaseToolBar *tool_bar) { QList activated_actions = m_toolBar->changeableActions(); QList available_actions = m_toolBar->availableActions(); - foreach (QAction *action, activated_actions) { + foreach (const QAction *action, activated_actions) { QListWidgetItem *action_item = new QListWidgetItem(action->icon(), action->text().replace('&', ""), m_ui->m_listActivatedActions); if (action->isSeparator()) { @@ -115,7 +114,7 @@ void ToolBarEditor::saveToolBar() { bool ToolBarEditor::eventFilter(QObject *object, QEvent *event) { if (object == m_ui->m_listActivatedActions) { if (event->type() == QEvent::KeyPress) { - QKeyEvent *key_event = static_cast(event); + const QKeyEvent *key_event = static_cast(event); if (key_event->key() == Qt::Key_Delete) { deleteSelectedAction(); @@ -146,7 +145,7 @@ void ToolBarEditor::updateActionsAvailability() { } void ToolBarEditor::insertSpacer() { - int current_row = m_ui->m_listActivatedActions->currentRow(); + const int current_row = m_ui->m_listActivatedActions->currentRow(); QListWidgetItem *item = new QListWidgetItem(tr("Toolbar spacer")); item->setIcon(qApp->icons()->fromTheme(QSL("view-spacer"))); @@ -157,7 +156,7 @@ void ToolBarEditor::insertSpacer() { } void ToolBarEditor::insertSeparator() { - int current_row = m_ui->m_listActivatedActions->currentRow(); + const int current_row = m_ui->m_listActivatedActions->currentRow(); QListWidgetItem *item = new QListWidgetItem(tr("Separator")); item->setData(Qt::UserRole, SEPARATOR_ACTION_NAME); @@ -212,7 +211,7 @@ void ToolBarEditor::deleteSelectedAction() { if (items.size() == 1) { QListWidgetItem *selected_item = items.at(0); - QString data_item = selected_item->data(Qt::UserRole).toString(); + const QString data_item = selected_item->data(Qt::UserRole).toString(); if (data_item == SEPARATOR_ACTION_NAME || data_item == SPACER_ACTION_NAME) { m_ui->m_listActivatedActions->takeItem(m_ui->m_listActivatedActions->row(selected_item)); diff --git a/src/gui/toolbareditor.h b/src/gui/toolbareditor.h old mode 100644 new mode 100755 index 16a2e6f82..ff400f73b --- a/src/gui/toolbareditor.h +++ b/src/gui/toolbareditor.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -41,11 +41,11 @@ class ToolBarEditor : public QWidget { void loadFromToolBar(BaseToolBar *tool_bar); void saveToolBar(); - inline QListWidget *activeItemsWidget() { + inline QListWidget *activeItemsWidget() const { return m_ui->m_listActivatedActions; } - inline QListWidget *availableItemsWidget() { + inline QListWidget *availableItemsWidget() const { return m_ui->m_listAvailableActions; } @@ -67,7 +67,7 @@ class ToolBarEditor : public QWidget { void deleteAllActions(); private: - Ui::ToolBarEditor *m_ui; + QScopedPointer m_ui; BaseToolBar *m_toolBar; }; diff --git a/src/gui/widgetwithstatus.cpp b/src/gui/widgetwithstatus.cpp index 257f2c9a3..ef7b3ed69 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 4afd3b487..d21cc7e2c 100755 --- a/src/gui/widgetwithstatus.h +++ b/src/gui/widgetwithstatus.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 0651433c0..4d28793b1 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 f2356a3a2..7a6195f4d 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 7899cec46..bf6d88b08 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/autosaver.cpp b/src/miscellaneous/autosaver.cpp index 6029d0f35..78d1c7762 100755 --- a/src/miscellaneous/autosaver.cpp +++ b/src/miscellaneous/autosaver.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/autosaver.h b/src/miscellaneous/autosaver.h old mode 100644 new mode 100755 index 176e096c8..4df4589ad --- a/src/miscellaneous/autosaver.h +++ b/src/miscellaneous/autosaver.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/databasecleaner.cpp b/src/miscellaneous/databasecleaner.cpp index 379ac8bdd..f8db77b80 100755 --- a/src/miscellaneous/databasecleaner.cpp +++ b/src/miscellaneous/databasecleaner.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/databasecleaner.h b/src/miscellaneous/databasecleaner.h index 6673f9a2c..780eb47ee 100755 --- a/src/miscellaneous/databasecleaner.h +++ b/src/miscellaneous/databasecleaner.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 c60962a73..6442efbf3 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 1fee92613..fe2bcdbe8 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 d7d58249f..9ea8e0ba4 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 76ee9e1a4..396329423 100755 --- a/src/miscellaneous/debugging.h +++ b/src/miscellaneous/debugging.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 5bcf2ac8f..718cb1f68 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 c550c977e..bdad7582b 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 b9e952d03..00790571e 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 c80c6539b..b00dd23b4 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 387d74739..46cd670fc 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 3c5ddc131..9c1e64c8a 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/mutex.cpp b/src/miscellaneous/mutex.cpp old mode 100644 new mode 100755 index ecd4a8871..590ee855c --- a/src/miscellaneous/mutex.cpp +++ b/src/miscellaneous/mutex.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/mutex.h b/src/miscellaneous/mutex.h old mode 100644 new mode 100755 index 3c3c3eff2..7ec0b3e39 --- a/src/miscellaneous/mutex.h +++ b/src/miscellaneous/mutex.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 0ecbb3839..bd89d1fd4 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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.h b/src/miscellaneous/settings.h index 3c5a37a7f..e3247c6c4 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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.cpp b/src/miscellaneous/skinfactory.cpp index 7a7192850..acb22e82a 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 d8aa2929c..9968d41c6 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 2e3f741d2..a0affe5ee 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 59917f0e1..4edb22c3e 100755 --- a/src/miscellaneous/systemfactory.h +++ b/src/miscellaneous/systemfactory.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 939ad1641..4c9ebe2cd 100755 --- a/src/miscellaneous/textfactory.cpp +++ b/src/miscellaneous/textfactory.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 old mode 100644 new mode 100755 index ac43064bc..5b021f762 --- a/src/miscellaneous/textfactory.h +++ b/src/miscellaneous/textfactory.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/adblock/adblockdialog.h b/src/network-web/adblock/adblockdialog.h index 020e5e427..b21d51945 100755 --- a/src/network-web/adblock/adblockdialog.h +++ b/src/network-web/adblock/adblockdialog.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 by Martin Rotter // Copyright (C) 2010-2014 by David Rosca // // RSS Guard is free software: you can redistribute it and/or modify diff --git a/src/network-web/basenetworkaccessmanager.cpp b/src/network-web/basenetworkaccessmanager.cpp index 2e45daa09..cf3e8cd4b 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 21ab4846f..f17d9416f 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 66e5a04ea..a6b764474 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 c803c27ea..9761f6b01 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/downloadmanager.cpp b/src/network-web/downloadmanager.cpp index ab039fe63..1bacf0351 100755 --- a/src/network-web/downloadmanager.cpp +++ b/src/network-web/downloadmanager.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -832,6 +832,6 @@ QMimeData *DownloadModel::mimeData(const QModelIndexList &indexes) const { return mimeData; } -WebBrowser *DownloadManager::webBrowser() { +WebBrowser *DownloadManager::webBrowser() const { return NULL; } diff --git a/src/network-web/downloadmanager.h b/src/network-web/downloadmanager.h index b479b1d14..e5687feee 100755 --- a/src/network-web/downloadmanager.h +++ b/src/network-web/downloadmanager.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -108,7 +108,7 @@ class DownloadManager : public TabContent { explicit DownloadManager(QWidget *parent = 0); virtual ~DownloadManager(); - WebBrowser *webBrowser(); + WebBrowser *webBrowser() const; QNetworkAccessManager *networkManager() const; int totalDownloads() const; diff --git a/src/network-web/googlesuggest.cpp b/src/network-web/googlesuggest.cpp index df5ab989d..4725c59ee 100755 --- a/src/network-web/googlesuggest.cpp +++ b/src/network-web/googlesuggest.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/googlesuggest.h b/src/network-web/googlesuggest.h index cd63de156..078600785 100755 --- a/src/network-web/googlesuggest.h +++ b/src/network-web/googlesuggest.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 35d2463fc..116c7f9b1 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 d14e8d7d5..2b47f2dfd 100755 --- 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 5b2e5755c..d19e75918 100755 --- 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 old mode 100644 new mode 100755 index 660fb9462..69ea1964d --- 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 61ef0fb6b..c37cbf850 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 6fcc6b5f1..6d3c143f8 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -52,11 +52,11 @@ class WebBrowser : public TabContent { void setupIcons(); // Returns icon associated with currently loaded website. - inline QIcon icon() { + inline QIcon icon() const { return m_webView->icon(); } - inline WebView *view() { + inline WebView *view() const { return m_webView; } @@ -67,8 +67,8 @@ class WebBrowser : public TabContent { // Returns this instance. // NOTE: This is needed due to TabContent interface. - inline WebBrowser *webBrowser() { - return this; + inline WebBrowser *webBrowser() const { + return const_cast(this); } // Returns global menu for this web browser. diff --git a/src/network-web/webbrowsernetworkaccessmanager.cpp b/src/network-web/webbrowsernetworkaccessmanager.cpp index b8e433c24..011c03949 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 06e99e40d..331a6ca37 100755 --- 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 701835a79..db8c7a0de 100755 --- 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 dda86afa4..a09282930 100755 --- 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 7ef8f36a5..ab46cdc48 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 old mode 100644 new mode 100755 index 3766531d3..1313b94c0 --- 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-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/abstract/category.cpp b/src/services/abstract/category.cpp index 097c9bc56..e3ad1296a 100755 --- a/src/services/abstract/category.cpp +++ b/src/services/abstract/category.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/abstract/category.h b/src/services/abstract/category.h index ea339831a..0e43c2edf 100755 --- a/src/services/abstract/category.h +++ b/src/services/abstract/category.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/abstract/feed.cpp b/src/services/abstract/feed.cpp index e3cb409d9..a85efa7e2 100755 --- a/src/services/abstract/feed.cpp +++ b/src/services/abstract/feed.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/abstract/feed.h b/src/services/abstract/feed.h index 46a903915..2acc06b14 100755 --- a/src/services/abstract/feed.h +++ b/src/services/abstract/feed.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/abstract/recyclebin.cpp b/src/services/abstract/recyclebin.cpp index 9cfdbce4b..ebbffece8 100755 --- a/src/services/abstract/recyclebin.cpp +++ b/src/services/abstract/recyclebin.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/abstract/recyclebin.h b/src/services/abstract/recyclebin.h index a7d26278f..6e66ca48a 100755 --- a/src/services/abstract/recyclebin.h +++ b/src/services/abstract/recyclebin.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/abstract/rootitem.cpp b/src/services/abstract/rootitem.cpp index d7c17b797..7f2fa156b 100755 --- a/src/services/abstract/rootitem.cpp +++ b/src/services/abstract/rootitem.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -340,8 +340,8 @@ QList RootItem::getSubTreeFeeds() const { return children; } -ServiceRoot *RootItem::getParentServiceRoot() { - RootItem *working_parent = this; +ServiceRoot *RootItem::getParentServiceRoot() const { + const RootItem *working_parent = this; while (working_parent->kind() != RootItemKind::Root) { if (working_parent->kind() == RootItemKind::ServiceRoot) { @@ -367,8 +367,8 @@ Feed *RootItem::toFeed() { return static_cast(this); } -ServiceRoot *RootItem::toServiceRoot() { - return static_cast(this); +ServiceRoot *RootItem::toServiceRoot() const { + return static_cast(const_cast(this)); } int RootItem::countOfUnreadMessages() const { diff --git a/src/services/abstract/rootitem.h b/src/services/abstract/rootitem.h index 602aee3c1..8e9a5c4ad 100755 --- a/src/services/abstract/rootitem.h +++ b/src/services/abstract/rootitem.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -185,7 +185,7 @@ class RootItem : public QObject { QList getSubTreeFeeds() const; // Returns the service root node which is direct or indirect parent of current item. - ServiceRoot *getParentServiceRoot(); + ServiceRoot *getParentServiceRoot() const; inline RootItemKind::Kind kind() const { return m_kind; @@ -257,7 +257,7 @@ class RootItem : public QObject { // Converters Category *toCategory(); Feed *toFeed(); - ServiceRoot *toServiceRoot(); + ServiceRoot *toServiceRoot() const; private: void setupFonts(); diff --git a/src/services/abstract/serviceentrypoint.cpp b/src/services/abstract/serviceentrypoint.cpp index d32c3297c..412143655 100755 --- a/src/services/abstract/serviceentrypoint.cpp +++ b/src/services/abstract/serviceentrypoint.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/abstract/serviceentrypoint.h b/src/services/abstract/serviceentrypoint.h index 7b2730195..716280dda 100755 --- a/src/services/abstract/serviceentrypoint.h +++ b/src/services/abstract/serviceentrypoint.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/abstract/serviceroot.cpp b/src/services/abstract/serviceroot.cpp index d3f2d1019..279c814db 100755 --- a/src/services/abstract/serviceroot.cpp +++ b/src/services/abstract/serviceroot.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/abstract/serviceroot.h b/src/services/abstract/serviceroot.h index c03b67ae9..d2fcb9cd9 100755 --- a/src/services/abstract/serviceroot.h +++ b/src/services/abstract/serviceroot.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/standard/gui/formstandardcategorydetails.cpp b/src/services/standard/gui/formstandardcategorydetails.cpp index 32eb73760..23781e081 100755 --- a/src/services/standard/gui/formstandardcategorydetails.cpp +++ b/src/services/standard/gui/formstandardcategorydetails.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/standard/gui/formstandardcategorydetails.h b/src/services/standard/gui/formstandardcategorydetails.h index 8ee09b891..c64237c70 100755 --- a/src/services/standard/gui/formstandardcategorydetails.h +++ b/src/services/standard/gui/formstandardcategorydetails.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/standard/gui/formstandardfeeddetails.cpp b/src/services/standard/gui/formstandardfeeddetails.cpp index 410a94bc1..61cad31be 100755 --- a/src/services/standard/gui/formstandardfeeddetails.cpp +++ b/src/services/standard/gui/formstandardfeeddetails.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/standard/gui/formstandardfeeddetails.h b/src/services/standard/gui/formstandardfeeddetails.h index d53a534d0..cd99ee962 100755 --- a/src/services/standard/gui/formstandardfeeddetails.h +++ b/src/services/standard/gui/formstandardfeeddetails.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/standard/gui/formstandardimportexport.cpp b/src/services/standard/gui/formstandardimportexport.cpp index 275e3fe48..3cc5ec433 100755 --- a/src/services/standard/gui/formstandardimportexport.cpp +++ b/src/services/standard/gui/formstandardimportexport.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/standard/gui/formstandardimportexport.h b/src/services/standard/gui/formstandardimportexport.h index 209c20800..1fc643d14 100755 --- a/src/services/standard/gui/formstandardimportexport.h +++ b/src/services/standard/gui/formstandardimportexport.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/standard/standardcategory.cpp b/src/services/standard/standardcategory.cpp index d00baa51a..74d79acb1 100755 --- a/src/services/standard/standardcategory.cpp +++ b/src/services/standard/standardcategory.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/standard/standardcategory.h b/src/services/standard/standardcategory.h index 7a90fd1f1..f5213be1f 100755 --- a/src/services/standard/standardcategory.h +++ b/src/services/standard/standardcategory.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/standard/standardfeed.cpp b/src/services/standard/standardfeed.cpp index 297ce3480..d783a2616 100755 --- a/src/services/standard/standardfeed.cpp +++ b/src/services/standard/standardfeed.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/standard/standardfeed.h b/src/services/standard/standardfeed.h index 303c66916..7e62e07f3 100755 --- a/src/services/standard/standardfeed.h +++ b/src/services/standard/standardfeed.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/standard/standardfeedsimportexportmodel.cpp b/src/services/standard/standardfeedsimportexportmodel.cpp index fb57a9d90..eeee96ec5 100755 --- a/src/services/standard/standardfeedsimportexportmodel.cpp +++ b/src/services/standard/standardfeedsimportexportmodel.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/standard/standardfeedsimportexportmodel.h b/src/services/standard/standardfeedsimportexportmodel.h index 5341c8aa2..ee9d6eaae 100755 --- a/src/services/standard/standardfeedsimportexportmodel.h +++ b/src/services/standard/standardfeedsimportexportmodel.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/standard/standardrecyclebin.cpp b/src/services/standard/standardrecyclebin.cpp index f99ecb06a..7e341dda1 100755 --- a/src/services/standard/standardrecyclebin.cpp +++ b/src/services/standard/standardrecyclebin.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/standard/standardrecyclebin.h b/src/services/standard/standardrecyclebin.h index 5dbba31a4..11179c73b 100755 --- a/src/services/standard/standardrecyclebin.h +++ b/src/services/standard/standardrecyclebin.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/standard/standardserviceentrypoint.cpp b/src/services/standard/standardserviceentrypoint.cpp index 4bce26bb4..219da2c2f 100755 --- a/src/services/standard/standardserviceentrypoint.cpp +++ b/src/services/standard/standardserviceentrypoint.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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 @@ -77,7 +77,7 @@ ServiceRoot *StandardServiceEntryPoint::createNewRoot() { if (query.exec()) { StandardServiceRoot *root = new StandardServiceRoot(); - root->setId(id_to_assign); + root->setId(NO_PARENT_CATEGORY); root->setAccountId(id_to_assign); return root; } @@ -99,7 +99,7 @@ QList StandardServiceEntryPoint::initializeSubtree() const { if (query.exec()) { while (query.next()) { StandardServiceRoot *root = new StandardServiceRoot(); - root->setId(query.value(0).toInt()); + root->setId(NO_PARENT_CATEGORY); root->setAccountId(query.value(0).toInt()); roots.append(root); } diff --git a/src/services/standard/standardserviceentrypoint.h b/src/services/standard/standardserviceentrypoint.h index 0101bc113..df8b00770 100755 --- a/src/services/standard/standardserviceentrypoint.h +++ b/src/services/standard/standardserviceentrypoint.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/standard/standardserviceroot.cpp b/src/services/standard/standardserviceroot.cpp index 7687cbd04..8c34bcb3a 100755 --- a/src/services/standard/standardserviceroot.cpp +++ b/src/services/standard/standardserviceroot.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/standard/standardserviceroot.h b/src/services/standard/standardserviceroot.h index 092a32f7a..4f1692481 100755 --- a/src/services/standard/standardserviceroot.h +++ b/src/services/standard/standardserviceroot.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/tt-rss/gui/formeditaccount.cpp b/src/services/tt-rss/gui/formeditaccount.cpp index 87931d22f..62281815d 100755 --- a/src/services/tt-rss/gui/formeditaccount.cpp +++ b/src/services/tt-rss/gui/formeditaccount.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/tt-rss/gui/formeditaccount.h b/src/services/tt-rss/gui/formeditaccount.h index 4b9c57381..f5c75ac35 100755 --- a/src/services/tt-rss/gui/formeditaccount.h +++ b/src/services/tt-rss/gui/formeditaccount.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/tt-rss/gui/formeditfeed.cpp b/src/services/tt-rss/gui/formeditfeed.cpp index de7c0436e..0673b1bd8 100755 --- a/src/services/tt-rss/gui/formeditfeed.cpp +++ b/src/services/tt-rss/gui/formeditfeed.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/tt-rss/gui/formeditfeed.h b/src/services/tt-rss/gui/formeditfeed.h index be49d2277..4818cda58 100755 --- a/src/services/tt-rss/gui/formeditfeed.h +++ b/src/services/tt-rss/gui/formeditfeed.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/tt-rss/network/ttrssnetworkfactory.cpp b/src/services/tt-rss/network/ttrssnetworkfactory.cpp index 40f87ffab..a48d7a542 100755 --- a/src/services/tt-rss/network/ttrssnetworkfactory.cpp +++ b/src/services/tt-rss/network/ttrssnetworkfactory.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/tt-rss/network/ttrssnetworkfactory.h b/src/services/tt-rss/network/ttrssnetworkfactory.h index d1d01fc05..4727fa722 100755 --- a/src/services/tt-rss/network/ttrssnetworkfactory.h +++ b/src/services/tt-rss/network/ttrssnetworkfactory.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/tt-rss/ttrsscategory.cpp b/src/services/tt-rss/ttrsscategory.cpp index 4f3ed91b1..5e5f8be3d 100755 --- a/src/services/tt-rss/ttrsscategory.cpp +++ b/src/services/tt-rss/ttrsscategory.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/tt-rss/ttrsscategory.h b/src/services/tt-rss/ttrsscategory.h index 7b40cdd04..5535e3cd6 100755 --- a/src/services/tt-rss/ttrsscategory.h +++ b/src/services/tt-rss/ttrsscategory.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/tt-rss/ttrssfeed.cpp b/src/services/tt-rss/ttrssfeed.cpp index 0933f0020..fb4075e9e 100755 --- a/src/services/tt-rss/ttrssfeed.cpp +++ b/src/services/tt-rss/ttrssfeed.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/tt-rss/ttrssfeed.h b/src/services/tt-rss/ttrssfeed.h index 53e635d09..a28d964a8 100755 --- a/src/services/tt-rss/ttrssfeed.h +++ b/src/services/tt-rss/ttrssfeed.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/tt-rss/ttrssrecyclebin.cpp b/src/services/tt-rss/ttrssrecyclebin.cpp index 0b807b570..7491f1476 100755 --- a/src/services/tt-rss/ttrssrecyclebin.cpp +++ b/src/services/tt-rss/ttrssrecyclebin.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/tt-rss/ttrssrecyclebin.h b/src/services/tt-rss/ttrssrecyclebin.h index a013aae74..fd648c8c0 100755 --- a/src/services/tt-rss/ttrssrecyclebin.h +++ b/src/services/tt-rss/ttrssrecyclebin.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/tt-rss/ttrssserviceentrypoint.cpp b/src/services/tt-rss/ttrssserviceentrypoint.cpp index ea33376ff..29e03754c 100755 --- a/src/services/tt-rss/ttrssserviceentrypoint.cpp +++ b/src/services/tt-rss/ttrssserviceentrypoint.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/tt-rss/ttrssserviceentrypoint.h b/src/services/tt-rss/ttrssserviceentrypoint.h index b858c92bd..c14839651 100755 --- a/src/services/tt-rss/ttrssserviceentrypoint.h +++ b/src/services/tt-rss/ttrssserviceentrypoint.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/tt-rss/ttrssserviceroot.cpp b/src/services/tt-rss/ttrssserviceroot.cpp index c607abfb0..e412dc85c 100755 --- a/src/services/tt-rss/ttrssserviceroot.cpp +++ b/src/services/tt-rss/ttrssserviceroot.cpp @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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/services/tt-rss/ttrssserviceroot.h b/src/services/tt-rss/ttrssserviceroot.h index 7f232f772..82d5564f8 100755 --- a/src/services/tt-rss/ttrssserviceroot.h +++ b/src/services/tt-rss/ttrssserviceroot.h @@ -1,6 +1,6 @@ // This file is part of RSS Guard. // -// Copyright (C) 2011-2015 by Martin Rotter +// Copyright (C) 2011-2016 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