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

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]
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment