Commit 72d17382 authored by Christian Kandeler's avatar Christian Kandeler

Remove superfluous include paths from project files.

A lot of our build system files specify unneeded include
paths. These roughly fall into the following categories:
    a) Paths that are already set in more general files
       such as qtcreator.pri.
    b) Paths that serve no purpose at all, possibly
       left over from earlier versions of the project.
    c) Paths that act as workarounds for wrong include
       statements of the form '#include "xyz.h"', where
       xyz.h is not in the same directory as the including
      file.
This patch removes such path specifications and fixes the offending
include statements from case c).
Tested on Linux, Windows and OSX with qmake and qbs.

Change-Id: I039a8449f8a65df0d616b4c08081145c18ae4b15
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@digia.com>
parent 7c4d0d3b
......@@ -13,11 +13,8 @@ Application {
return ["-Wl,-s"]
}
cpp.includePaths: [
"..",
"../libs",
"../shared/qtsingleapplication",
"../shared/qtlockedfile",
buildDirectory
]
Depends { name: "app_version_header" }
......
......@@ -27,7 +27,6 @@
**
****************************************************************************/
#include "qtsingleapplication.h"
#include "../tools/qtcreatorcrashhandler/crashhandlersetup.h"
#include <app/app_version.h>
......@@ -35,6 +34,7 @@
#include <extensionsystem/pluginerroroverview.h>
#include <extensionsystem/pluginmanager.h>
#include <extensionsystem/pluginspec.h>
#include <qtsingleapplication.h>
#include <QDebug>
#include <QDir>
......
DEPENDPATH += $$PWD
INCLUDEPATH += $$PWD
HEADERS += \
$$PWD/cppassert.h \
$$PWD/CPlusPlus.h \
......
......@@ -19,11 +19,11 @@ DynamicLibrary {
cpp.rpaths: qbs.targetOS.contains("osx")
? ["@loader_path/..", "@executable_path/.."]
: ["$ORIGIN", "$ORIGIN/.."]
cpp.includePaths: [ ".", ".." ]
cpp.includePaths: [path]
Export {
Depends { name: "cpp" }
cpp.includePaths: [ "." ]
cpp.includePaths: [path]
}
Group {
......
......@@ -4,8 +4,6 @@ contains(CONFIG, dll) {
DEFINES += LANGUAGEUTILS_BUILD_STATIC_LIB
}
INCLUDEPATH += $$PWD/..
HEADERS += \
$$PWD/languageutils_global.h \
$$PWD/fakemetaobject.h \
......
......@@ -4,7 +4,6 @@ import "../QtcLibrary.qbs" as QtcLibrary
QtcLibrary {
name: "LanguageUtils"
cpp.includePaths: base.concat("../3rdparty/cplusplus")
cpp.defines: base.concat([
"LANGUAGEUTILS_BUILD_DIR"
])
......
......@@ -4,8 +4,6 @@ contains(CONFIG, dll) {
DEFINES += QMLDEBUG_STATIC_LIB
}
INCLUDEPATH += $$PWD/..
HEADERS += \
$$PWD/qmlprofilereventlocation.h \
$$PWD/qmldebugclient.h \
......
......@@ -438,12 +438,12 @@
<customwidget>
<class>QmlEditorWidgets::ColorButton</class>
<extends>QToolButton</extends>
<header location="global">colorbutton.h</header>
<header location="global">qmleditorwidgets/colorbutton.h</header>
</customwidget>
<customwidget>
<class>QmlEditorWidgets::FontSizeSpinBox</class>
<extends>QSpinBox</extends>
<header location="global">fontsizespinbox.h</header>
<header location="global">qmleditorwidgets/fontsizespinbox.h</header>
</customwidget>
</customwidgets>
<resources/>
......
......@@ -43,11 +43,11 @@
#include <QGraphicsEffect>
#include <QAction>
#include "contextpanetextwidget.h"
#include "easingcontextpane.h"
#include "contextpanewidgetimage.h"
#include "contextpanewidgetrectangle.h"
#include "customcolordialog.h"
#include "colorbutton.h"
#include <qmleditorwidgets/easingpane/easingcontextpane.h>
using namespace Utils;
......
......@@ -300,7 +300,7 @@
<customwidget>
<class>QmlEditorWidgets::FileWidget</class>
<extends>QComboBox</extends>
<header location="global">filewidget.h</header>
<header location="global">qmleditorwidgets/filewidget.h</header>
</customwidget>
</customwidgets>
<resources>
......
......@@ -285,7 +285,7 @@
<customwidget>
<class>QmlEditorWidgets::FileWidget</class>
<extends>QComboBox</extends>
<header location="global">filewidget.h</header>
<header location="global">qmleditorwidgets/filewidget.h</header>
</customwidget>
</customwidgets>
<resources>
......
......@@ -30,9 +30,9 @@
#include "contextpanewidgetrectangle.h"
#include "ui_contextpanewidgetrectangle.h"
#include "contextpanewidget.h"
#include "customcolordialog.h"
#include <qmljs/qmljspropertyreader.h>
#include <qmljs/qmljsutils.h>
#include <customcolordialog.h>
#include <QDebug>
namespace QmlEditorWidgets {
......
......@@ -298,12 +298,12 @@
<customwidget>
<class>QmlEditorWidgets::ColorButton</class>
<extends>QToolButton</extends>
<header location="global">colorbutton.h</header>
<header location="global">qmleditorwidgets/colorbutton.h</header>
</customwidget>
<customwidget>
<class>QmlEditorWidgets::GradientLine</class>
<extends>QWidget</extends>
<header location="global">gradientline.h</header>
<header location="global">qmleditorwidgets/gradientline.h</header>
<container>1</container>
</customwidget>
</customwidgets>
......
VPATH += $$PWD
INCLUDEPATH += $$PWD
SOURCES += $$PWD/easinggraph.cpp \
$$PWD/easingcontextpane.cpp
......
QT += script declarative
INCLUDEPATH += $$PWD
contains(CONFIG, dll) {
DEFINES += BUILD_QMLEDITORWIDGETS_LIB
} else {
......
......@@ -4,7 +4,6 @@ import "../QtcLibrary.qbs" as QtcLibrary
QtcLibrary {
name: "QmlEditorWidgets"
cpp.includePaths: base.concat(easingPane.prefix)
cpp.defines: base.concat([
"QWEAKPOINTER_ENABLE_ARROW",
"BUILD_QMLEDITORWIDGETS_LIB"
......
......@@ -6,8 +6,6 @@ contains(CONFIG, dll) {
include(parser/parser.pri)
INCLUDEPATH += $$PWD/..
HEADERS += \
$$PWD/qmljs_global.h \
$$PWD/qmljsbind.h \
......
......@@ -4,7 +4,6 @@ import "../QtcLibrary.qbs" as QtcLibrary
QtcLibrary {
name: "QmlJS"
cpp.includePaths: base.concat("parser")
cpp.defines: base.concat([
"QMLJS_BUILD_DIR"
])
......
......@@ -4,7 +4,6 @@ dll {
DEFINES += QTCREATOR_UTILS_STATIC_LIB
}
INCLUDEPATH += $$PWD
QT += script network
CONFIG += exceptions # used by portlist.cpp, textfileformat.cpp, and ssh/*
......
......@@ -26,7 +26,7 @@ Product {
if (qbs.buildVariant == "release" && (qbs.toolchain.contains("gcc") || qbs.toolchain.contains("mingw")))
return ["-Wl,-s"]
}
cpp.includePaths: [ ".", ".." ]
cpp.includePaths: [path]
Group {
name: "PluginSpec"
......@@ -47,5 +47,7 @@ Product {
Export {
Depends { name: "ExtensionSystem" }
Depends { name: "cpp" }
cpp.includePaths: [path]
}
}
......@@ -22,7 +22,6 @@ QtcPlugin {
property bool enable: false
pluginspecreplacements: ({"ANDROID_EXPERIMENTAL_STR": (enable ? "false": "true")})
cpp.includePaths: base.concat("../../shared")
cpp.defines: base.concat(project.buildQbsProjectManager ? ['HAVE_QBS'] : [])
files: [
......
......@@ -30,8 +30,8 @@
#include "actioncontainer_p.h"
#include "actionmanager.h"
#include "coreconstants.h"
#include "id.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/id.h>
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h>
......
......@@ -29,10 +29,10 @@
#include "actionmanager.h"
#include "actionmanager_p.h"
#include "mainwindow.h"
#include "actioncontainer_p.h"
#include "command_p.h"
#include "id.h"
#include <coreplugin/id.h>
#include <coreplugin/mainwindow.h>
#include <utils/qtcassert.h>
......
......@@ -29,8 +29,8 @@
#include "command_p.h"
#include "icontext.h"
#include "id.h"
#include <coreplugin/icontext.h>
#include <coreplugin/id.h>
#include <utils/hostosinfo.h>
......
......@@ -28,9 +28,9 @@
****************************************************************************/
#include "commandmappings.h"
#include "shortcutsettings.h"
#include "ui_commandmappings.h"
#include "commandsfile.h"
#include <coreplugin/dialogs/shortcutsettings.h>
#include <utils/hostosinfo.h>
#include <utils/headerviewstretcher.h>
......
......@@ -28,8 +28,8 @@
****************************************************************************/
#include "commandsfile.h"
#include "shortcutsettings.h"
#include "command_p.h"
#include <coreplugin/dialogs/shortcutsettings.h>
#include <app/app_version.h>
......
......@@ -28,16 +28,16 @@
****************************************************************************/
#include "coreplugin.h"
#include "actionmanager.h"
#include "designmode.h"
#include "editmode.h"
#include "editormanager.h"
#include "fileiconprovider.h"
#include "helpmanager.h"
#include "mainwindow.h"
#include "mimedatabase.h"
#include "modemanager.h"
#include "infobar.h"
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/editormanager/editormanager.h>
#include <utils/savefile.h>
......
......@@ -12,10 +12,6 @@ greaterThan(QT_MAJOR_VERSION, 4) {
include(../../qtcreatorplugin.pri)
include(../../shared/scriptwrapper/scriptwrapper.pri)
win32-msvc*:QMAKE_CXXFLAGS += -wd4251 -wd4290 -wd4250
INCLUDEPATH += dialogs \
actionmanager \
editormanager \
progressmanager
SOURCES += mainwindow.cpp \
editmode.cpp \
tabpositionindicator.cpp \
......
......@@ -15,15 +15,6 @@ QtcPlugin {
Depends { name: "Aggregation" }
Depends { name: "app_version_header" }
cpp.includePaths: base.concat([
"../..",
"../../shared/scriptwrapper",
"dialogs",
"editormanager",
"progressmanager",
"actionmanager"
])
cpp.dynamicLibraries: {
if (qbs.targetOS.contains("windows")) return [
"ole32",
......
......@@ -28,8 +28,8 @@
****************************************************************************/
#include "iwizard.h"
#include "icore.h"
#include "featureprovider.h"
#include <coreplugin/icore.h>
#include <coreplugin/featureprovider.h>
#include <extensionsystem/pluginmanager.h>
......
......@@ -27,11 +27,11 @@
**
****************************************************************************/
#include "fileiconprovider.h"
#include "readonlyfilesdialog.h"
#include "ui_readonlyfilesdialog.h"
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/fileiconprovider.h>
#include <coreplugin/icore.h>
#include <coreplugin/idocument.h>
#include <coreplugin/iversioncontrol.h>
......
......@@ -29,7 +29,7 @@
#include "settingsdialog.h"
#include "icore.h"
#include <coreplugin/icore.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/hostosinfo.h>
......
......@@ -28,14 +28,14 @@
****************************************************************************/
#include "shortcutsettings.h"
#include "actionmanager/actionmanager.h"
#include "actionmanager/command.h"
#include "command_p.h"
#include "commandsfile.h"
#include "coreconstants.h"
#include "documentmanager.h"
#include "icore.h"
#include "id.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/id.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/actionmanager/command_p.h>
#include <coreplugin/actionmanager/commandsfile.h>
#include <QKeyEvent>
#include <QFileDialog>
......
......@@ -29,17 +29,17 @@
#include "documentmanager.h"
#include "editormanager.h"
#include "icore.h"
#include "ieditor.h"
#include "ieditorfactory.h"
#include "iexternaleditor.h"
#include "idocument.h"
#include "mimedatabase.h"
#include "saveitemsdialog.h"
#include "coreconstants.h"
#include "dialogs/readonlyfilesdialog.h"
#include <coreplugin/dialogs/readonlyfilesdialog.h>
#include <coreplugin/dialogs/saveitemsdialog.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/editormanager/ieditorfactory.h>
#include <coreplugin/editormanager/iexternaleditor.h>
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h>
......
......@@ -28,14 +28,14 @@
****************************************************************************/
#include "editmode.h"
#include "editormanager.h"
#include "coreconstants.h"
#include "modemanager.h"
#include "minisplitter.h"
#include "outputpane.h"
#include "navigationwidget.h"
#include "rightpane.h"
#include "ieditor.h"
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <QLatin1String>
#include <QHBoxLayout>
......
......@@ -29,7 +29,7 @@
#include "documentmodel.h"
#include "ieditor.h"
#include "idocument.h"
#include <coreplugin/idocument.h>
#include <utils/qtcassert.h>
......
......@@ -29,34 +29,34 @@
#include "editormanager.h"
#include "editorview.h"
#include "findplaceholder.h"
#include "openeditorswindow.h"
#include "openeditorsview.h"
#include "documentmodel.h"
#include "openwithdialog.h"
#include "outputpane.h"
#include "outputpanemanager.h"
#include "rightpane.h"
#include "documentmanager.h"
#include "icore.h"
#include "ieditor.h"
#include "iversioncontrol.h"
#include "mimedatabase.h"
#include "vcsmanager.h"
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/dialogs/openwithdialog.h>
#include <coreplugin/dialogs/readonlyfilesdialog.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/editormanager/ieditorfactory.h>
#include <coreplugin/editormanager/iexternaleditor.h>
#include <coreplugin/editortoolbar.h>
#include <coreplugin/fileutils.h>
#include <coreplugin/findplaceholder.h>
#include <coreplugin/icore.h>
#include <coreplugin/icorelistener.h>
#include <coreplugin/infobar.h>
#include <coreplugin/iversioncontrol.h>
#include <coreplugin/mimedatabase.h>
#include <coreplugin/modemanager.h>
#include <coreplugin/outputpane.h>
#include <coreplugin/outputpanemanager.h>
#include <coreplugin/rightpane.h>
#include <coreplugin/settingsdatabase.h>
#include <coreplugin/variablemanager.h>
#include <coreplugin/dialogs/readonlyfilesdialog.h>
#include <coreplugin/vcsmanager.h>
#include <extensionsystem/pluginmanager.h>
......
......@@ -29,13 +29,13 @@
#include "editorview.h"
#include "editormanager.h"
#include "icore.h"
#include "minisplitter.h"
#include "documentmodel.h"
#include <coreplugin/editortoolbar.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/icore.h>
#include <coreplugin/infobar.h>
#include <coreplugin/minisplitter.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/findplaceholder.h>
......
......@@ -31,7 +31,7 @@
#include "documentmodel.h"
#include "editormanager.h"
#include "editorview.h"
#include "idocument.h"
#include <coreplugin/idocument.h>
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h>
......
......@@ -28,7 +28,7 @@
****************************************************************************/
#include "systemeditor.h"
#include "id.h"
#include <coreplugin/id.h>
#include <QStringList>
#include <QUrl>
......
......@@ -28,32 +28,21 @@
****************************************************************************/
#include "mainwindow.h"
#include "actioncontainer.h"
#include "command.h"
#include "actionmanager.h"
#include "actionmanager_p.h"
#include "icore.h"
#include "coreconstants.h"
#include "editormanager.h"
#include "toolsettings.h"
#include "mimetypesettings.h"
#include "fancytabwidget.h"
#include "documentmanager.h"
#include "generalsettings.h"
#include "helpmanager.h"
#include "ieditor.h"
#include "idocumentfactory.h"
#include "messagemanager.h"
#include "modemanager.h"
#include "mimedatabase.h"
#include "newdialog.h"
#include "outputpanemanager.h"
#include "plugindialog.h"
#include "progressmanager_p.h"
#include "progressview.h"
#include "shortcutsettings.h"
#include "vcsmanager.h"
#include "settingsdialog.h"
#include "variablemanager.h"
#include "versiondialog.h"
#include "statusbarmanager.h"
......@@ -71,8 +60,19 @@
#endif
#include <app/app_version.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actionmanager_p.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/dialogs/newdialog.h>
#include <coreplugin/dialogs/settingsdialog.h>
#include <coreplugin/dialogs/shortcutsettings.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/icorelistener.h>
#include <coreplugin/inavigationwidgetfactory.h>
#include <coreplugin/progressmanager/progressmanager_p.h>
#include <coreplugin/progressmanager/progressview.h>
#include <coreplugin/settingsdatabase.h>
#include <utils/historycompleter.h>
#include <utils/hostosinfo.h>
......
......@@ -28,14 +28,14 @@
****************************************************************************/
#include "coreconstants.h"
#include "editormanager.h"
#include "icore.h"
#include "ieditorfactory.h"
#include "iexternaleditor.h"
#include "mimedatabase.h"
#include "mimetypemagicdialog.h"
#include "mimetypesettings.h"
#include "ui_mimetypesettingspage.h"
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditorfactory.h>
#include <coreplugin/editormanager/iexternaleditor.h>
#include <QAbstractTableModel>
#include <QCoreApplication>
......
......@@ -30,7 +30,7 @@
#ifndef MIMETYPESETTINGSPAGE_H
#define MIMETYPESETTINGSPAGE_H
#include "ioptionspage.h"
#include <coreplugin/dialogs/ioptionspage.h>
namespace Core {
namespace Internal {
......
......@@ -28,7 +28,7 @@
****************************************************************************/
#include "textdocument.h"
#include "editormanager.h"
#include <coreplugin/editormanager/editormanager.h>
#include <QDebug>
#include <QTextCodec>
......
......@@ -30,7 +30,7 @@
#ifndef TOOLSETTINGS_H
#define TOOLSETTINGS_H
#include "ioptionspage.h"
#include <coreplugin/dialogs/ioptionspage.h>
#include <QPointer>
......
......@@ -31,12 +31,12 @@
#include "iversioncontrol.h"
#include "icore.h"
#include "documentmanager.h"
#include "editormanager.h"
#include "ieditor.h"
#include "idocument.h"
#include "infobar.h"
#include "addtovcsdialog.h"
#include <coreplugin/dialogs/addtovcsdialog.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <vcsbase/vcsbaseconstants.h>
#include <extensionsystem/pluginmanager.h>
......
......@@ -9,8 +9,8 @@ QtcTool {
submodules: ["gui", "network"]
}
Depends { name: "Core" }
Depends { name: "CppTools" }