From ecbab34510f6f925ec4b03e02d24b1ceff4d2744 Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Sun, 4 Feb 2018 11:38:50 +0100 Subject: [PATCH] Fix all krazy #include warnings - "include own header first line" - "put config.h in angle brackets line" - "do not include QtModule/QtClass line" `QElapsedTimer` was implicitly included by kfileitemmodelsortalgorithm.h, now we need to explicitly include it in kfileitemmodel.cpp. We also need to explicitly link to `Qt5::Concurrent`, otherwise we cannot `#include `. --- src/CMakeLists.txt | 1 + src/global.cpp | 11 +++++------ src/kitemviews/kfileitemmodel.cpp | 1 + src/kitemviews/kitemlistviewaccessible.h | 8 ++++---- src/kitemviews/private/kfileitemmodelsortalgorithm.h | 2 +- .../information/filemetadataconfigurationdialog.h | 2 +- src/panels/information/informationpanelcontent.h | 7 ++++--- src/statusbar/mountpointobserver.cpp | 4 ++-- src/views/tooltips/dolphinfilemetadatawidget.h | 2 +- 9 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e1b63358dc..9a8302ff14 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -137,6 +137,7 @@ generate_export_header(dolphinprivate BASE_NAME dolphin) target_link_libraries( dolphinprivate PUBLIC dolphinvcs + Qt5::Concurrent Qt5::Gui KF5::Crash KF5::I18n diff --git a/src/global.cpp b/src/global.cpp index 20dee00fa7..d0e477bc8d 100644 --- a/src/global.cpp +++ b/src/global.cpp @@ -17,15 +17,14 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include +#include "global.h" +#include "dolphindebug.h" +#include "dolphin_generalsettings.h" #include -#include "global.h" -#include "dolphindebug.h" - -#include "dolphin_generalsettings.h" +#include +#include QList Dolphin::validateUris(const QStringList& uriList) { diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index a5422a7bf5..8c736ccfe5 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -31,6 +31,7 @@ #include "private/kfileitemmodelsortalgorithm.h" #include "private/kfileitemmodeldirlister.h" +#include #include #include #include diff --git a/src/kitemviews/kitemlistviewaccessible.h b/src/kitemviews/kitemlistviewaccessible.h index 674d98ee63..fdc3ff1a3a 100644 --- a/src/kitemviews/kitemlistviewaccessible.h +++ b/src/kitemviews/kitemlistviewaccessible.h @@ -24,10 +24,10 @@ #include "dolphin_export.h" -#include -#include -#include -#include +#include +#include +#include +#include class KItemListView; class KItemListContainer; diff --git a/src/kitemviews/private/kfileitemmodelsortalgorithm.h b/src/kitemviews/private/kfileitemmodelsortalgorithm.h index 7c090db910..ff484a7e8b 100644 --- a/src/kitemviews/private/kfileitemmodelsortalgorithm.h +++ b/src/kitemviews/private/kfileitemmodelsortalgorithm.h @@ -22,7 +22,7 @@ #ifndef KFILEITEMMODELSORTALGORITHM_H #define KFILEITEMMODELSORTALGORITHM_H -#include +#include #include diff --git a/src/panels/information/filemetadataconfigurationdialog.h b/src/panels/information/filemetadataconfigurationdialog.h index 8ca9ef6feb..912fadadc0 100644 --- a/src/panels/information/filemetadataconfigurationdialog.h +++ b/src/panels/information/filemetadataconfigurationdialog.h @@ -22,7 +22,7 @@ #include #include -#include "config-baloo.h" +#include #ifndef HAVE_BALOO class KFileMetaDataConfigurationWidget; diff --git a/src/panels/information/informationpanelcontent.h b/src/panels/information/informationpanelcontent.h index 8b143af1d6..a6c2b56228 100644 --- a/src/panels/information/informationpanelcontent.h +++ b/src/panels/information/informationpanelcontent.h @@ -20,10 +20,11 @@ #ifndef INFORMATIONPANELCONTENT_H #define INFORMATIONPANELCONTENT_H -#include "config-baloo.h" -#include -#include +#include +#include + +#include #include #include diff --git a/src/statusbar/mountpointobserver.cpp b/src/statusbar/mountpointobserver.cpp index df2a4898fd..fa6472c0a7 100644 --- a/src/statusbar/mountpointobserver.cpp +++ b/src/statusbar/mountpointobserver.cpp @@ -17,11 +17,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ -#include - #include "mountpointobserver.h" #include "mountpointobservercache.h" +#include + MountPointObserver::MountPointObserver(const QUrl& url, QObject* parent) : QObject(parent), m_url(url), diff --git a/src/views/tooltips/dolphinfilemetadatawidget.h b/src/views/tooltips/dolphinfilemetadatawidget.h index 3017ef5ced..e7459b1972 100644 --- a/src/views/tooltips/dolphinfilemetadatawidget.h +++ b/src/views/tooltips/dolphinfilemetadatawidget.h @@ -23,7 +23,7 @@ #define DOLPHINFILEMETADATAWIDGET_H #include -#include "config-baloo.h" +#include class KFileItemList; class QLabel;