summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElvis Angelaccio <[email protected]>2018-02-04 11:38:50 +0100
committerElvis Angelaccio <[email protected]>2018-02-04 11:38:50 +0100
commitecbab34510f6f925ec4b03e02d24b1ceff4d2744 (patch)
treef6fdd4665343fe71924f141e7cf24544008be337
parent219e40cff8e91e6cf23f9aec5d1dc2f9d7e45577 (diff)
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 <QtConcurrentRun>`.
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/global.cpp11
-rw-r--r--src/kitemviews/kfileitemmodel.cpp1
-rw-r--r--src/kitemviews/kitemlistviewaccessible.h8
-rw-r--r--src/kitemviews/private/kfileitemmodelsortalgorithm.h2
-rw-r--r--src/panels/information/filemetadataconfigurationdialog.h2
-rw-r--r--src/panels/information/informationpanelcontent.h5
-rw-r--r--src/statusbar/mountpointobserver.cpp4
-rw-r--r--src/views/tooltips/dolphinfilemetadatawidget.h2
9 files changed, 19 insertions, 17 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e1b6335..9a8302f 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 20dee00..d0e477b 100644
--- a/src/global.cpp
+++ b/src/global.cpp
@@ -17,16 +17,15 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <QApplication>
-#include <QIcon>
-
-#include <KRun>
-
#include "global.h"
#include "dolphindebug.h"
-
#include "dolphin_generalsettings.h"
+#include <KRun>
+
+#include <QApplication>
+#include <QIcon>
+
QList<QUrl> Dolphin::validateUris(const QStringList& uriList)
{
const QString currentDir = QDir::currentPath();
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp
index a5422a7..8c736cc 100644
--- a/src/kitemviews/kfileitemmodel.cpp
+++ b/src/kitemviews/kfileitemmodel.cpp
@@ -31,6 +31,7 @@
#include "private/kfileitemmodelsortalgorithm.h"
#include "private/kfileitemmodeldirlister.h"
+#include <QElapsedTimer>
#include <QMimeData>
#include <QTimer>
#include <QWidget>
diff --git a/src/kitemviews/kitemlistviewaccessible.h b/src/kitemviews/kitemlistviewaccessible.h
index 674d98e..fdc3ff1 100644
--- a/src/kitemviews/kitemlistviewaccessible.h
+++ b/src/kitemviews/kitemlistviewaccessible.h
@@ -24,10 +24,10 @@
#include "dolphin_export.h"
-#include <QtCore/qpointer.h>
-#include <qaccessible.h>
-#include <qaccessibleobject.h>
-#include <QtWidgets/qaccessiblewidget.h>
+#include <QAccessible>
+#include <QAccessibleObject>
+#include <QAccessibleWidget>
+#include <QPointer>
class KItemListView;
class KItemListContainer;
diff --git a/src/kitemviews/private/kfileitemmodelsortalgorithm.h b/src/kitemviews/private/kfileitemmodelsortalgorithm.h
index 7c090db..ff484a7 100644
--- a/src/kitemviews/private/kfileitemmodelsortalgorithm.h
+++ b/src/kitemviews/private/kfileitemmodelsortalgorithm.h
@@ -22,7 +22,7 @@
#ifndef KFILEITEMMODELSORTALGORITHM_H
#define KFILEITEMMODELSORTALGORITHM_H
-#include <QtConcurrent/QtConcurrent>
+#include <QtConcurrentRun>
#include <algorithm>
diff --git a/src/panels/information/filemetadataconfigurationdialog.h b/src/panels/information/filemetadataconfigurationdialog.h
index 8ca9ef6..912fada 100644
--- a/src/panels/information/filemetadataconfigurationdialog.h
+++ b/src/panels/information/filemetadataconfigurationdialog.h
@@ -22,7 +22,7 @@
#include <QDialog>
#include <KFileItem>
-#include "config-baloo.h"
+#include <config-baloo.h>
#ifndef HAVE_BALOO
class KFileMetaDataConfigurationWidget;
diff --git a/src/panels/information/informationpanelcontent.h b/src/panels/information/informationpanelcontent.h
index 8b143af..a6c2b56 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 <config-baloo.h>
+
#include <KFileItem>
-#include <QUrl>
+#include <QUrl>
#include <QPointer>
#include <QWidget>
diff --git a/src/statusbar/mountpointobserver.cpp b/src/statusbar/mountpointobserver.cpp
index df2a489..fa6472c 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 <KIO/FileSystemFreeSpaceJob>
-
#include "mountpointobserver.h"
#include "mountpointobservercache.h"
+#include <KIO/FileSystemFreeSpaceJob>
+
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 3017ef5..e7459b1 100644
--- a/src/views/tooltips/dolphinfilemetadatawidget.h
+++ b/src/views/tooltips/dolphinfilemetadatawidget.h
@@ -23,7 +23,7 @@
#define DOLPHINFILEMETADATAWIDGET_H
#include <QWidget>
-#include "config-baloo.h"
+#include <config-baloo.h>
class KFileItemList;
class QLabel;