Refactorings......

This commit is contained in:
Martin Rotter 2014-03-27 08:40:23 +01:00
parent 609902a6a1
commit 2399c39d1f
56 changed files with 141 additions and 137 deletions

View File

@ -137,8 +137,8 @@ endif(UNIX)
# Configure internal C++ defines.
configure_file (
${PROJECT_SOURCE_DIR}/src/core/defs.h.in
${CMAKE_CURRENT_BINARY_DIR}/src/core/defs.h
${PROJECT_SOURCE_DIR}/src/definitions/definitions.h.in
${CMAKE_CURRENT_BINARY_DIR}/src/definitions/definitions.h
)
# Define some useful DEBUG for, ehrm, debug build.
@ -272,8 +272,6 @@ set(APP_SOURCES
# GUI sources.
src/gui/formmain.cpp
src/gui/systemtrayicon.cpp
src/gui/iconthemefactory.cpp
src/gui/skinfactory.cpp
src/gui/formsettings.cpp
src/gui/formabout.cpp
src/gui/baselineedit.cpp
@ -285,7 +283,6 @@ set(APP_SOURCES
src/gui/feedsview.cpp
src/gui/messagesview.cpp
src/gui/statusbar.cpp
src/gui/iconfactory.cpp
src/gui/formstandardcategorydetails.cpp
src/gui/formstandardfeeddetails.cpp
src/gui/plaintoolbutton.cpp
@ -302,13 +299,18 @@ set(APP_SOURCES
src/dynamic-shortcuts/dynamicshortcutswidget.cpp
src/dynamic-shortcuts/dynamicshortcuts.cpp
# MISCELLANEOUS sources.
src/miscellaneous/debugging.cpp
src/miscellaneous/settings.cpp
src/miscellaneous/systemfactory.cpp
src/miscellaneous/localization.cpp
src/miscellaneous/textfactory.cpp
src/miscellaneous/databasefactory.cpp
src/miscellaneous/iconthemefactory.cpp
src/miscellaneous/skinfactory.cpp
src/miscellaneous/iconfactory.cpp
# CORE sources.
src/core/debugging.cpp
src/core/settings.cpp
src/core/systemfactory.cpp
src/core/localization.cpp
src/core/textfactory.cpp
src/core/databasefactory.cpp
src/core/messagesmodel.cpp
src/core/messagesproxymodel.cpp
src/core/feedsmodel.cpp
@ -344,8 +346,6 @@ set(APP_HEADERS
# GUI headers.
src/gui/formmain.h
src/gui/systemtrayicon.h
src/gui/iconthemefactory.h
src/gui/skinfactory.h
src/gui/formsettings.h
src/gui/formabout.h
src/gui/baselineedit.h
@ -372,11 +372,15 @@ set(APP_HEADERS
src/dynamic-shortcuts/shortcutcatcher.h
src/dynamic-shortcuts/shortcutbutton.h
# MISCELLANEOUS headers.
src/miscellaneous/settings.h
src/miscellaneous/localization.h
src/miscellaneous/systemfactory.h
src/miscellaneous/databasefactory.h
src/miscellaneous/iconthemefactory.h
src/miscellaneous/skinfactory.h
# CORE headers.
src/core/settings.h
src/core/localization.h
src/core/systemfactory.h
src/core/databasefactory.h
src/core/messagesmodel.h
src/core/messagesproxymodel.h
src/core/feedsmodel.h

View File

@ -17,13 +17,13 @@
#include "core/feedsmodel.h"
#include "core/defs.h"
#include "core/databasefactory.h"
#include "definitions/definitions.h"
#include "core/feedsmodelcategory.h"
#include "core/feedsmodelfeed.h"
#include "core/textfactory.h"
#include "gui/iconthemefactory.h"
#include "gui/iconfactory.h"
#include "miscellaneous/textfactory.h"
#include "miscellaneous/databasefactory.h"
#include "miscellaneous/iconthemefactory.h"
#include "miscellaneous/iconfactory.h"
#include <QSqlError>
#include <QSqlQuery>

View File

@ -17,12 +17,12 @@
#include "core/feedsmodelcategory.h"
#include "core/defs.h"
#include "core/databasefactory.h"
#include "core/textfactory.h"
#include "core/settings.h"
#include "gui/iconthemefactory.h"
#include "gui/iconfactory.h"
#include "definitions/definitions.h"
#include "miscellaneous/databasefactory.h"
#include "miscellaneous/textfactory.h"
#include "miscellaneous/settings.h"
#include "miscellaneous/iconthemefactory.h"
#include "miscellaneous/iconfactory.h"
#include <QVariant>
#include <QSqlQuery>

View File

@ -17,14 +17,14 @@
#include "core/feedsmodelfeed.h"
#include "core/defs.h"
#include "core/settings.h"
#include "definitions/definitions.h"
#include "core/parsingfactory.h"
#include "core/databasefactory.h"
#include "core/textfactory.h"
#include "miscellaneous/databasefactory.h"
#include "miscellaneous/textfactory.h"
#include "miscellaneous/settings.h"
#include "miscellaneous/iconfactory.h"
#include "miscellaneous/iconthemefactory.h"
#include "network-web/networkfactory.h"
#include "gui/iconfactory.h"
#include "gui/iconthemefactory.h"
#include <QSqlDatabase>
#include <QSqlQuery>

View File

@ -17,7 +17,7 @@
#include "core/feedsproxymodel.h"
#include "core/defs.h"
#include "definitions/definitions.h"
#include "core/feedsmodel.h"
#include "core/feedsmodelcategory.h"
#include "core/feedsmodelfeed.h"

View File

@ -17,10 +17,10 @@
#include "core/messagesmodel.h"
#include "core/defs.h"
#include "core/textfactory.h"
#include "core/databasefactory.h"
#include "gui/iconthemefactory.h"
#include "definitions/definitions.h"
#include "miscellaneous/textfactory.h"
#include "miscellaneous/databasefactory.h"
#include "miscellaneous/iconthemefactory.h"
#include "qtsingleapplication/qtsingleapplication.h"
#include <QSqlRecord>

View File

@ -18,7 +18,7 @@
#ifndef MESSAGESMODEL_H
#define MESSAGESMODEL_H
#include "core/defs.h"
#include "definitions/definitions.h"
#include <QSqlTableModel>
#include <QFont>

View File

@ -17,7 +17,7 @@
#include "core/parsingfactory.h"
#include "core/textfactory.h"
#include "miscellaneous/textfactory.h"
#include "network-web/webfactory.h"
#include <QDomDocument>

View File

View File

@ -17,8 +17,8 @@
#include "dynamic-shortcuts/dynamicshortcuts.h"
#include "core/defs.h"
#include "core/settings.h"
#include "definitions/definitions.h"
#include "miscellaneous/settings.h"
#include <QAction>

View File

@ -19,7 +19,7 @@
#include "dynamic-shortcuts/shortcutcatcher.h"
#include "dynamic-shortcuts/shortcutbutton.h"
#include "core/defs.h"
#include "definitions/definitions.h"
#include <QGridLayout>
#include <QAction>

View File

@ -30,7 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "dynamic-shortcuts/shortcutbutton.h"
#include "gui/plaintoolbutton.h"
#include "gui/iconthemefactory.h"
#include "miscellaneous/iconthemefactory.h"
#include <QHBoxLayout>

View File

@ -17,15 +17,15 @@
#include "gui/feedmessageviewer.h"
#include "core/settings.h"
#include "core/databasefactory.h"
#include "miscellaneous/settings.h"
#include "miscellaneous/databasefactory.h"
#include "miscellaneous/systemfactory.h"
#include "miscellaneous/iconthemefactory.h"
#include "core/messagesproxymodel.h"
#include "core/feeddownloader.h"
#include "core/feedsmodelfeed.h"
#include "core/systemfactory.h"
#include "network-web/webbrowser.h"
#include "gui/formmain.h"
#include "gui/iconthemefactory.h"
#include "gui/messagesview.h"
#include "gui/feedsview.h"
#include "gui/statusbar.h"

View File

@ -17,14 +17,14 @@
#include "gui/feedsview.h"
#include "core/defs.h"
#include "core/systemfactory.h"
#include "definitions/definitions.h"
#include "core/feedsmodelfeed.h"
#include "core/feedsmodel.h"
#include "core/feedsproxymodel.h"
#include "core/feedsmodelrootitem.h"
#include "core/feedsmodelcategory.h"
#include "core/feedsmodelfeed.h"
#include "miscellaneous/systemfactory.h"
#include "gui/formmain.h"
#include "gui/formstandardcategorydetails.h"
#include "gui/formstandardfeeddetails.h"
@ -430,7 +430,7 @@ void FeedsView::deleteSelectedItem() {
if (m_sourceModel->removeItem(m_proxyModel->mapToSource(current_index))) {
// Item WAS removed, update counts.
// TODO:_I do not need to update counts of all items here.
// TODO: I do not need to update counts of all items here.
// Updating counts of parent item (feed) should be enough.
updateCountsOfAllFeeds(true);
}

View File

@ -22,7 +22,7 @@
#include "core/messagesmodel.h"
#include "core/feedsmodel.h"
#include "core/settings.h"
#include "miscellaneous/settings.h"
class FeedsProxyModel;

View File

@ -17,8 +17,8 @@
#include "gui/formabout.h"
#include "core/textfactory.h"
#include "gui/iconthemefactory.h"
#include "miscellaneous/iconthemefactory.h"
#include "miscellaneous/textfactory.h"
#if !defined(Q_OS_WIN)
#include "gui/messagebox.h"

View File

@ -20,7 +20,7 @@
#include "ui_formabout.h"
#include "core/defs.h"
#include "definitions/definitions.h"
#include <QDialog>

View File

@ -17,23 +17,23 @@
#include "gui/formmain.h"
#include "core/defs.h"
#include "core/settings.h"
#include "core/systemfactory.h"
#include "core/databasefactory.h"
#include "definitions/definitions.h"
#include "miscellaneous/settings.h"
#include "miscellaneous/systemfactory.h"
#include "miscellaneous/databasefactory.h"
#include "miscellaneous/iconthemefactory.h"
#include "network-web/webfactory.h"
#include "network-web/webbrowser.h"
#include "gui/formabout.h"
#include "gui/formsettings.h"
#include "gui/feedsview.h"
#include "gui/messagebox.h"
#include "gui/iconthemefactory.h"
#include "gui/systemtrayicon.h"
#include "gui/tabbar.h"
#include "gui/statusbar.h"
#include "gui/feedmessageviewer.h"
#include "qtsingleapplication/qtsingleapplication.h"
#include "gui/formupdate.h"
#include "qtsingleapplication/qtsingleapplication.h"
#include <QCloseEvent>
#include <QSessionManager>

View File

@ -17,26 +17,26 @@
#include "gui/formsettings.h"
#include "core/defs.h"
#include "core/settings.h"
#include "core/databasefactory.h"
#include "core/localization.h"
#include "core/systemfactory.h"
#include "definitions/definitions.h"
#include "core/feeddownloader.h"
#include "core/feedsmodel.h"
#include "dynamic-shortcuts/dynamicshortcuts.h"
#include "miscellaneous/settings.h"
#include "miscellaneous/databasefactory.h"
#include "miscellaneous/localization.h"
#include "miscellaneous/systemfactory.h"
#include "miscellaneous/iconthemefactory.h"
#include "miscellaneous/skinfactory.h"
#include "network-web/webfactory.h"
#include "network-web/webbrowsernetworkaccessmanager.h"
#include "network-web/silentnetworkaccessmanager.h"
#include "network-web/webbrowser.h"
#include "gui/iconthemefactory.h"
#include "gui/skinfactory.h"
#include "gui/systemtrayicon.h"
#include "gui/feedmessageviewer.h"
#include "gui/feedsview.h"
#include "gui/formmain.h"
#include "gui/messagebox.h"
#include "qtsingleapplication/qtsingleapplication.h"
#include "dynamic-shortcuts/dynamicshortcuts.h"
#include <QProcess>
#include <QNetworkProxy>

View File

@ -17,11 +17,11 @@
#include "gui/formstandardcategorydetails.h"
#include "core/defs.h"
#include "definitions/definitions.h"
#include "core/feedsmodelrootitem.h"
#include "core/feedsmodelcategory.h"
#include "core/feedsmodel.h"
#include "gui/iconthemefactory.h"
#include "miscellaneous/iconthemefactory.h"
#include "gui/feedsview.h"
#include "gui/baselineedit.h"
#include "gui/messagebox.h"

View File

@ -17,14 +17,14 @@
#include "gui/formstandardfeeddetails.h"
#include "core/defs.h"
#include "core/textfactory.h"
#include "definitions/definitions.h"
#include "core/feedsmodel.h"
#include "core/feedsmodelrootitem.h"
#include "core/feedsmodelcategory.h"
#include "core/feedsmodelfeed.h"
#include "miscellaneous/textfactory.h"
#include "miscellaneous/iconthemefactory.h"
#include "network-web/networkfactory.h"
#include "gui/iconthemefactory.h"
#include "gui/baselineedit.h"
#include "gui/messagebox.h"
#include "gui/systemtrayicon.h"

View File

@ -17,11 +17,11 @@
#include "gui/formupdate.h"
#include "core/defs.h"
#include "core/systemfactory.h"
#include "definitions/definitions.h"
#include "miscellaneous/systemfactory.h"
#include "miscellaneous/iconthemefactory.h"
#include "network-web/networkfactory.h"
#include "network-web/webfactory.h"
#include "gui/iconthemefactory.h"
#include "gui/messagebox.h"
#include "gui/systemtrayicon.h"

View File

@ -23,7 +23,7 @@
#include "ui_formupdate.h"
#include "core/systemfactory.h"
#include "miscellaneous/systemfactory.h"
namespace Ui {

View File

@ -17,8 +17,8 @@
#include "gui/locationlineedit.h"
#include "core/defs.h"
#include "core/settings.h"
#include "definitions/definitions.h"
#include "miscellaneous/settings.h"
#include <QPaintEvent>
#include <QStyleOptionFrameV2>

View File

@ -17,7 +17,7 @@
#include "gui/messagebox.h"
#include "gui/iconthemefactory.h"
#include "miscellaneous/iconthemefactory.h"
#include <QDialogButtonBox>
#include <QtGlobal>

View File

@ -19,7 +19,7 @@
#include "core/messagesproxymodel.h"
#include "core/messagesmodel.h"
#include "core/settings.h"
#include "miscellaneous/settings.h"
#include "network-web/networkfactory.h"
#include "network-web/webfactory.h"
#include "gui/formmain.h"

View File

@ -17,7 +17,7 @@
#include "gui/statusbar.h"
#include "gui/iconthemefactory.h"
#include "miscellaneous/iconthemefactory.h"
#include <QToolButton>
#include <QLabel>

View File

@ -17,8 +17,8 @@
#include "gui/systemtrayicon.h"
#include "core/defs.h"
#include "core/settings.h"
#include "definitions/definitions.h"
#include "miscellaneous/settings.h"
#include "gui/formmain.h"
#include "gui/formsettings.h"
#include "qtsingleapplication/qtsingleapplication.h"

View File

@ -17,8 +17,8 @@
#include "gui/tabbar.h"
#include "core/defs.h"
#include "core/settings.h"
#include "definitions/definitions.h"
#include "miscellaneous/settings.h"
#include "gui/plaintoolbutton.h"
#include <QMouseEvent>

View File

@ -18,7 +18,7 @@
#ifndef TABBAR_H
#define TABBAR_H
#include "gui/iconthemefactory.h"
#include "miscellaneous/iconthemefactory.h"
#include <QTabBar>
#include <QVariant>

View File

@ -17,12 +17,12 @@
#include "gui/tabwidget.h"
#include "core/defs.h"
#include "core/settings.h"
#include "core/textfactory.h"
#include "definitions/definitions.h"
#include "miscellaneous/settings.h"
#include "miscellaneous/textfactory.h"
#include "network-web/webbrowser.h"
#include "miscellaneous/iconthemefactory.h"
#include "gui/tabbar.h"
#include "gui/iconthemefactory.h"
#include "gui/formmain.h"
#include "gui/feedmessageviewer.h"
#include "gui/plaintoolbutton.h"

View File

@ -18,7 +18,7 @@
#include "gui/widgetwithstatus.h"
#include "gui/plaintoolbutton.h"
#include "gui/iconthemefactory.h"
#include "miscellaneous/iconthemefactory.h"
#include <QHBoxLayout>

View File

@ -15,14 +15,14 @@
// You should have received a copy of the GNU General Public License
// along with RSS Guard. If not, see <http://www.gnu.org/licenses/>.
#include "core/defs.h"
#include "core/databasefactory.h"
#include "core/debugging.h"
#include "core/localization.h"
#include "core/settings.h"
#include "definitions/definitions.h"
#include "miscellaneous/databasefactory.h"
#include "miscellaneous/debugging.h"
#include "miscellaneous/localization.h"
#include "miscellaneous/settings.h"
#include "miscellaneous/iconthemefactory.h"
#include "miscellaneous/skinfactory.h"
#include "dynamic-shortcuts/dynamicshortcuts.h"
#include "gui/iconthemefactory.h"
#include "gui/skinfactory.h"
#include "gui/formmain.h"
#include "gui/systemtrayicon.h"
#include "gui/feedmessageviewer.h"

View File

@ -15,10 +15,10 @@
// You should have received a copy of the GNU General Public License
// along with RSS Guard. If not, see <http://www.gnu.org/licenses/>.
#include "core/databasefactory.h"
#include "miscellaneous/databasefactory.h"
#include "core/defs.h"
#include "core/settings.h"
#include "definitions/definitions.h"
#include "miscellaneous/settings.h"
#include <QApplication>
#include <QDir>

View File

@ -15,9 +15,9 @@
// You should have received a copy of the GNU General Public License
// along with RSS Guard. If not, see <http://www.gnu.org/licenses/>.
#include "core/debugging.h"
#include "miscellaneous/debugging.h"
#include "core/defs.h"
#include "definitions/definitions.h"
#include <QApplication>
#include <QDir>

View File

@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with RSS Guard. If not, see <http://www.gnu.org/licenses/>.
#include "gui/iconfactory.h"
#include "miscellaneous/iconfactory.h"
#include <QBuffer>

View File

@ -15,10 +15,10 @@
// You should have received a copy of the GNU General Public License
// along with RSS Guard. If not, see <http://www.gnu.org/licenses/>.
#include "gui/iconthemefactory.h"
#include "miscellaneous/iconthemefactory.h"
#include "core/defs.h"
#include "core/settings.h"
#include "definitions/definitions.h"
#include "miscellaneous/settings.h"
#include "qtsingleapplication/qtsingleapplication.h"
#include <QIcon>

View File

@ -18,7 +18,7 @@
#ifndef THEMEFACTORY_H
#define THEMEFACTORY_H
#include "core/defs.h"
#include "definitions/definitions.h"
#include <QString>
#include <QIcon>

View File

@ -15,10 +15,10 @@
// You should have received a copy of the GNU General Public License
// along with RSS Guard. If not, see <http://www.gnu.org/licenses/>.
#include "core/localization.h"
#include "miscellaneous/localization.h"
#include "core/defs.h"
#include "core/settings.h"
#include "definitions/definitions.h"
#include "miscellaneous/settings.h"
#include "qtsingleapplication/qtsingleapplication.h"
#include <QPointer>

View File

@ -15,9 +15,9 @@
// You should have received a copy of the GNU General Public License
// along with RSS Guard. If not, see <http://www.gnu.org/licenses/>.
#include "core/settings.h"
#include "miscellaneous/settings.h"
#include "core/defs.h"
#include "definitions/definitions.h"
#include <QApplication>
#include <QDebug>

View File

@ -15,10 +15,10 @@
// You should have received a copy of the GNU General Public License
// along with RSS Guard. If not, see <http://www.gnu.org/licenses/>.
#include "gui/skinfactory.h"
#include "miscellaneous/skinfactory.h"
#include "core/defs.h"
#include "core/settings.h"
#include "definitions/definitions.h"
#include "miscellaneous/settings.h"
#include <QApplication>
#include <QDir>

View File

@ -15,9 +15,9 @@
// You should have received a copy of the GNU General Public License
// along with RSS Guard. If not, see <http://www.gnu.org/licenses/>.
#include "core/systemfactory.h"
#include "miscellaneous/systemfactory.h"
#include "core/defs.h"
#include "definitions/definitions.h"
#include "network-web/networkfactory.h"
#if defined(Q_OS_WIN)

View File

@ -15,9 +15,9 @@
// You should have received a copy of the GNU General Public License
// along with RSS Guard. If not, see <http://www.gnu.org/licenses/>.
#include "core/textfactory.h"
#include "miscellaneous/textfactory.h"
#include "core/defs.h"
#include "definitions/definitions.h"
#include <QString>
#include <QStringList>

View File

@ -18,7 +18,7 @@
#ifndef TEXTFACTORY_H
#define TEXTFACTORY_H
#include "core/defs.h"
#include "definitions/definitions.h"
#include <QDateTime>
#include <QMap>

View File

@ -17,8 +17,8 @@
#include "network-web/basenetworkaccessmanager.h"
#include "core/defs.h"
#include "core/settings.h"
#include "definitions/definitions.h"
#include "miscellaneous/settings.h"
#include <QNetworkProxy>
#include <QNetworkReply>

View File

@ -17,8 +17,8 @@
#include "network-web/networkfactory.h"
#include "core/defs.h"
#include "core/settings.h"
#include "definitions/definitions.h"
#include "miscellaneous/settings.h"
#include "network-web/silentnetworkaccessmanager.h"
#include <QEventLoop>

View File

@ -17,13 +17,13 @@
#include "network-web/webbrowser.h"
#include "core/defs.h"
#include "definitions/definitions.h"
#include "network-web/webbrowsernetworkaccessmanager.h"
#include "network-web/webpage.h"
#include "network-web/webview.h"
#include "gui/skinfactory.h"
#include "miscellaneous/skinfactory.h"
#include "miscellaneous/iconthemefactory.h"
#include "gui/formmain.h"
#include "gui/iconthemefactory.h"
#include "gui/tabwidget.h"
#include <QVBoxLayout>

View File

@ -1,7 +1,7 @@
#include "network-web/webfactory.h"
#include "core/defs.h"
#include "core/settings.h"
#include "definitions/definitions.h"
#include "miscellaneous/settings.h"
#include <QApplication>
#include <QRegExp>

View File

@ -17,11 +17,11 @@
#include "network-web/webview.h"
#include "core/defs.h"
#include "core/settings.h"
#include "definitions/definitions.h"
#include "miscellaneous/settings.h"
#include "miscellaneous/skinfactory.h"
#include "miscellaneous/iconthemefactory.h"
#include "network-web/webpage.h"
#include "gui/skinfactory.h"
#include "gui/iconthemefactory.h"
#include <QStyleOptionFrameV3>
#include <QAction>