From 4a2d25b03b2e761e14e7fd6349bb45b52d65a534 Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Thu, 30 Apr 2020 10:53:43 +0300 Subject: [PATCH] Clean up header inclusion --- src/app/application.cpp | 6 +++--- src/gui/addnewtorrentdialog.cpp | 2 +- src/gui/log/loglistview.cpp | 2 +- src/gui/mainwindow.cpp | 11 ++++++----- src/gui/powermanagement/powermanagement.pri | 2 -- src/gui/properties/peerlistwidget.cpp | 2 +- src/gui/properties/properties.pri | 2 -- src/gui/properties/propertieswidget.cpp | 15 +++++++-------- src/gui/properties/propertieswidget.ui | 2 +- src/gui/properties/proptabbar.cpp | 2 +- src/gui/properties/trackerlistwidget.cpp | 4 ++-- src/gui/properties/trackersadditiondialog.cpp | 2 +- src/gui/qtnotify/qtnotify.pri | 3 --- src/gui/rss/automatedrssdownloader.cpp | 6 +++--- src/gui/rss/automatedrssdownloader.ui | 2 +- src/gui/rss/feedlistwidget.cpp | 2 +- src/gui/rss/rsswidget.cpp | 6 +++--- src/gui/search/pluginselectdialog.cpp | 6 +++--- src/gui/search/pluginsourcedialog.cpp | 2 +- src/gui/search/searchjobwidget.cpp | 8 ++++---- src/gui/search/searchwidget.cpp | 4 ++-- src/gui/search/searchwidget.ui | 2 +- 22 files changed, 43 insertions(+), 50 deletions(-) diff --git a/src/app/application.cpp b/src/app/application.cpp index 16d8ea421..71dcca1b6 100644 --- a/src/app/application.cpp +++ b/src/app/application.cpp @@ -85,11 +85,11 @@ #include "filelogger.h" #ifndef DISABLE_GUI -#include "addnewtorrentdialog.h" +#include "gui/addnewtorrentdialog.h" #include "gui/uithememanager.h" #include "gui/utils.h" -#include "mainwindow.h" -#include "shutdownconfirmdialog.h" +#include "gui/mainwindow.h" +#include "gui/shutdownconfirmdialog.h" #endif // DISABLE_GUI #ifndef DISABLE_WEBUI diff --git a/src/gui/addnewtorrentdialog.cpp b/src/gui/addnewtorrentdialog.cpp index 9380703c5..b57458baf 100644 --- a/src/gui/addnewtorrentdialog.cpp +++ b/src/gui/addnewtorrentdialog.cpp @@ -51,7 +51,7 @@ #include "base/utils/misc.h" #include "base/utils/string.h" #include "autoexpandabledialog.h" -#include "proplistdelegate.h" +#include "properties/proplistdelegate.h" #include "raisedmessagebox.h" #include "torrentcontentfiltermodel.h" #include "torrentcontentmodel.h" diff --git a/src/gui/log/loglistview.cpp b/src/gui/log/loglistview.cpp index f17559e62..249334283 100644 --- a/src/gui/log/loglistview.cpp +++ b/src/gui/log/loglistview.cpp @@ -37,8 +37,8 @@ #include #include +#include "gui/uithememanager.h" #include "logmodel.h" -#include "uithememanager.h" namespace { diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index f29867daf..ac6daf6cd 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -51,7 +51,7 @@ #endif #if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)) && defined(QT_DBUS_LIB) #include -#include "notifications.h" +#include "qtnotify/notifications.h" #endif #include "base/bittorrent/session.h" @@ -77,16 +77,17 @@ #include "hidabletabwidget.h" #include "lineedit.h" #include "optionsdialog.h" -#include "peerlistwidget.h" -#include "powermanagement.h" -#include "propertieswidget.h" +#include "powermanagement/powermanagement.h" +#include "properties/peerlistwidget.h" +#include "properties/propertieswidget.h" +#include "properties/trackerlistwidget.h" #include "rss/rsswidget.h" #include "search/searchwidget.h" #include "speedlimitdialog.h" #include "statsdialog.h" #include "statusbar.h" #include "torrentcreatordialog.h" -#include "trackerlistwidget.h" + #include "transferlistfilterswidget.h" #include "transferlistmodel.h" #include "transferlistwidget.h" diff --git a/src/gui/powermanagement/powermanagement.pri b/src/gui/powermanagement/powermanagement.pri index d5834d935..288e7d66d 100644 --- a/src/gui/powermanagement/powermanagement.pri +++ b/src/gui/powermanagement/powermanagement.pri @@ -1,5 +1,3 @@ -INCLUDEPATH += $$PWD - HEADERS += $$PWD/powermanagement.h SOURCES += $$PWD/powermanagement.cpp diff --git a/src/gui/properties/peerlistwidget.cpp b/src/gui/properties/peerlistwidget.cpp index 4b3107d66..3a51a29d8 100644 --- a/src/gui/properties/peerlistwidget.cpp +++ b/src/gui/properties/peerlistwidget.cpp @@ -52,11 +52,11 @@ #include "base/net/geoipmanager.h" #include "base/net/reverseresolution.h" #include "base/preferences.h" +#include "gui/uithememanager.h" #include "peerlistdelegate.h" #include "peerlistsortmodel.h" #include "peersadditiondialog.h" #include "propertieswidget.h" -#include "uithememanager.h" struct PeerEndpoint { diff --git a/src/gui/properties/properties.pri b/src/gui/properties/properties.pri index ac565e6ed..7670b5e33 100644 --- a/src/gui/properties/properties.pri +++ b/src/gui/properties/properties.pri @@ -1,5 +1,3 @@ -INCLUDEPATH += $$PWD - FORMS += \ $$PWD/peersadditiondialog.ui \ $$PWD/propertieswidget.ui \ diff --git a/src/gui/properties/propertieswidget.cpp b/src/gui/properties/propertieswidget.cpp index e4e89680f..9a16aa258 100644 --- a/src/gui/properties/propertieswidget.cpp +++ b/src/gui/properties/propertieswidget.cpp @@ -51,21 +51,20 @@ #include "base/utils/fs.h" #include "base/utils/misc.h" #include "base/utils/string.h" -#include "autoexpandabledialog.h" +#include "gui/autoexpandabledialog.h" +#include "gui/lineedit.h" +#include "gui/raisedmessagebox.h" +#include "gui/torrentcontentfiltermodel.h" +#include "gui/torrentcontentmodel.h" +#include "gui/uithememanager.h" +#include "gui/utils.h" #include "downloadedpiecesbar.h" -#include "lineedit.h" #include "peerlistwidget.h" #include "pieceavailabilitybar.h" #include "proplistdelegate.h" #include "proptabbar.h" -#include "raisedmessagebox.h" #include "speedwidget.h" -#include "torrentcontentfiltermodel.h" -#include "torrentcontentmodel.h" #include "trackerlistwidget.h" -#include "uithememanager.h" -#include "utils.h" - #include "ui_propertieswidget.h" #ifdef Q_OS_MACOS diff --git a/src/gui/properties/propertieswidget.ui b/src/gui/properties/propertieswidget.ui index 4f8d46e4f..4638e6a73 100644 --- a/src/gui/properties/propertieswidget.ui +++ b/src/gui/properties/propertieswidget.ui @@ -1111,7 +1111,7 @@ TorrentContentTreeView QTreeView -
torrentcontenttreeview.h
+
gui/torrentcontenttreeview.h
diff --git a/src/gui/properties/proptabbar.cpp b/src/gui/properties/proptabbar.cpp index 78babd1d7..c34319493 100644 --- a/src/gui/properties/proptabbar.cpp +++ b/src/gui/properties/proptabbar.cpp @@ -34,7 +34,7 @@ #include #include "base/global.h" -#include "uithememanager.h" +#include "gui/uithememanager.h" PropTabBar::PropTabBar(QWidget *parent) : QHBoxLayout(parent) diff --git a/src/gui/properties/trackerlistwidget.cpp b/src/gui/properties/trackerlistwidget.cpp index 706c0a06e..3a4d57e8b 100644 --- a/src/gui/properties/trackerlistwidget.cpp +++ b/src/gui/properties/trackerlistwidget.cpp @@ -49,10 +49,10 @@ #include "base/bittorrent/trackerentry.h" #include "base/global.h" #include "base/preferences.h" -#include "autoexpandabledialog.h" +#include "gui/autoexpandabledialog.h" +#include "gui/uithememanager.h" #include "propertieswidget.h" #include "trackersadditiondialog.h" -#include "uithememanager.h" #define NB_STICKY_ITEM 3 diff --git a/src/gui/properties/trackersadditiondialog.cpp b/src/gui/properties/trackersadditiondialog.cpp index 92e00d1fc..33c3e1e38 100644 --- a/src/gui/properties/trackersadditiondialog.cpp +++ b/src/gui/properties/trackersadditiondialog.cpp @@ -36,8 +36,8 @@ #include "base/bittorrent/trackerentry.h" #include "base/global.h" #include "base/net/downloadmanager.h" +#include "gui/uithememanager.h" #include "ui_trackersadditiondialog.h" -#include "uithememanager.h" TrackersAdditionDialog::TrackersAdditionDialog(QWidget *parent, BitTorrent::TorrentHandle *const torrent) : QDialog(parent) diff --git a/src/gui/qtnotify/qtnotify.pri b/src/gui/qtnotify/qtnotify.pri index 84d288a4a..c0b99829c 100644 --- a/src/gui/qtnotify/qtnotify.pri +++ b/src/gui/qtnotify/qtnotify.pri @@ -1,5 +1,2 @@ -INCLUDEPATH += $$PWD - HEADERS += $$PWD/notifications.h - SOURCES += $$PWD/notifications.cpp diff --git a/src/gui/rss/automatedrssdownloader.cpp b/src/gui/rss/automatedrssdownloader.cpp index 77feb34e0..846e2c85f 100644 --- a/src/gui/rss/automatedrssdownloader.cpp +++ b/src/gui/rss/automatedrssdownloader.cpp @@ -49,10 +49,10 @@ #include "base/rss/rss_session.h" #include "base/utils/fs.h" #include "base/utils/string.h" -#include "autoexpandabledialog.h" +#include "gui/autoexpandabledialog.h" +#include "gui/uithememanager.h" +#include "gui/utils.h" #include "ui_automatedrssdownloader.h" -#include "uithememanager.h" -#include "utils.h" const QString EXT_JSON {QStringLiteral(".json")}; const QString EXT_LEGACY {QStringLiteral(".rssrules")}; diff --git a/src/gui/rss/automatedrssdownloader.ui b/src/gui/rss/automatedrssdownloader.ui index 1b8a929c1..6d9277d7e 100644 --- a/src/gui/rss/automatedrssdownloader.ui +++ b/src/gui/rss/automatedrssdownloader.ui @@ -454,7 +454,7 @@ Supports the formats: S01E01, 1x1, 2017.01.01 and 01.01.2017 (Date formats also FileSystemPathLineEdit QWidget -
fspathedit.h
+
gui/fspathedit.h
diff --git a/src/gui/rss/feedlistwidget.cpp b/src/gui/rss/feedlistwidget.cpp index a1749d332..537bafca8 100644 --- a/src/gui/rss/feedlistwidget.cpp +++ b/src/gui/rss/feedlistwidget.cpp @@ -38,7 +38,7 @@ #include "base/rss/rss_feed.h" #include "base/rss/rss_folder.h" #include "base/rss/rss_session.h" -#include "uithememanager.h" +#include "gui/uithememanager.h" FeedListWidget::FeedListWidget(QWidget *parent) : QTreeWidget(parent) diff --git a/src/gui/rss/rsswidget.cpp b/src/gui/rss/rsswidget.cpp index 45267a381..288ad2009 100644 --- a/src/gui/rss/rsswidget.cpp +++ b/src/gui/rss/rsswidget.cpp @@ -47,13 +47,13 @@ #include "base/rss/rss_feed.h" #include "base/rss/rss_folder.h" #include "base/rss/rss_session.h" -#include "addnewtorrentdialog.h" +#include "gui/addnewtorrentdialog.h" +#include "gui/autoexpandabledialog.h" +#include "gui/uithememanager.h" #include "articlelistwidget.h" -#include "autoexpandabledialog.h" #include "automatedrssdownloader.h" #include "feedlistwidget.h" #include "ui_rsswidget.h" -#include "uithememanager.h" RSSWidget::RSSWidget(QWidget *parent) : QWidget(parent) diff --git a/src/gui/search/pluginselectdialog.cpp b/src/gui/search/pluginselectdialog.cpp index f8c2a16d8..4af236c44 100644 --- a/src/gui/search/pluginselectdialog.cpp +++ b/src/gui/search/pluginselectdialog.cpp @@ -42,12 +42,12 @@ #include "base/global.h" #include "base/net/downloadmanager.h" #include "base/utils/fs.h" -#include "autoexpandabledialog.h" +#include "gui/autoexpandabledialog.h" +#include "gui/uithememanager.h" +#include "gui/utils.h" #include "pluginsourcedialog.h" #include "searchwidget.h" #include "ui_pluginselectdialog.h" -#include "uithememanager.h" -#include "utils.h" enum PluginColumns { diff --git a/src/gui/search/pluginsourcedialog.cpp b/src/gui/search/pluginsourcedialog.cpp index 0921bd8ee..89148ddb8 100644 --- a/src/gui/search/pluginsourcedialog.cpp +++ b/src/gui/search/pluginsourcedialog.cpp @@ -28,8 +28,8 @@ #include "pluginsourcedialog.h" +#include "gui/utils.h" #include "ui_pluginsourcedialog.h" -#include "utils.h" PluginSourceDialog::PluginSourceDialog(QWidget *parent) : QDialog(parent) diff --git a/src/gui/search/searchjobwidget.cpp b/src/gui/search/searchjobwidget.cpp index ebd97c766..ca0707ebe 100644 --- a/src/gui/search/searchjobwidget.cpp +++ b/src/gui/search/searchjobwidget.cpp @@ -47,13 +47,13 @@ #include "base/search/searchpluginmanager.h" #include "base/settingvalue.h" #include "base/utils/misc.h" -#include "addnewtorrentdialog.h" -#include "lineedit.h" +#include "gui/addnewtorrentdialog.h" +#include "gui/lineedit.h" +#include "gui/uithememanager.h" +#include "gui/utils.h" #include "searchlistdelegate.h" #include "searchsortmodel.h" #include "ui_searchjobwidget.h" -#include "uithememanager.h" -#include "utils.h" SearchJobWidget::SearchJobWidget(SearchHandler *searchHandler, QWidget *parent) : QWidget(parent) diff --git a/src/gui/search/searchwidget.cpp b/src/gui/search/searchwidget.cpp index f00296543..af12f85cf 100644 --- a/src/gui/search/searchwidget.cpp +++ b/src/gui/search/searchwidget.cpp @@ -46,11 +46,11 @@ #include "base/search/searchhandler.h" #include "base/search/searchpluginmanager.h" #include "base/utils/foreignapps.h" -#include "mainwindow.h" +#include "gui/mainwindow.h" +#include "gui/uithememanager.h" #include "pluginselectdialog.h" #include "searchjobwidget.h" #include "ui_searchwidget.h" -#include "uithememanager.h" #define SEARCHHISTORY_MAXSIZE 50 #define URL_COLUMN 5 diff --git a/src/gui/search/searchwidget.ui b/src/gui/search/searchwidget.ui index 51029f8f6..109632f43 100644 --- a/src/gui/search/searchwidget.ui +++ b/src/gui/search/searchwidget.ui @@ -141,7 +141,7 @@ Click the "Search plugins..." button at the bottom right of the window LineEdit QLineEdit -
lineedit.h
+
gui/lineedit.h