From: Elvis Angelaccio Date: Sun, 4 Feb 2018 10:38:50 +0000 (+0100) Subject: Fix all krazy #include warnings X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/ecbab34510f6f925ec4b03e02d24b1ceff4d2744 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 `. --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e1b63358d..9a8302ff1 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 20dee00fa..d0e477bc8 100644 --- a/src/global.cpp +++ b/src/global.cpp @@ -17,16 +17,15 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include - -#include - #include "global.h" #include "dolphindebug.h" - #include "dolphin_generalsettings.h" +#include + +#include +#include + QList Dolphin::validateUris(const QStringList& uriList) { const QString currentDir = QDir::currentPath(); diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index a5422a7bf..8c736ccfe 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 674d98ee6..fdc3ff1a3 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 7c090db91..ff484a7e8 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 8ca9ef6fe..912fadadc 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 8b143af1d..a6c2b5622 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 diff --git a/src/statusbar/mountpointobserver.cpp b/src/statusbar/mountpointobserver.cpp index df2a4898f..fa6472c0a 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 3017ef5ce..e7459b197 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;