Commit f4652711 authored by Andreas Pakulat's avatar Andreas Pakulat
Browse files

Uff. Unify #include's across libs and plugins.

The #include's now follow these rules:

For libraries
 - #include <foo.h> / #include <Foo> for anything outside kdevplatform - i.e.
   other libraries
 - #include "foo.h" or #include "../foo.h" or #include "bar/foo.h" or #include
   "../bar/foo.h" for headers that are inside the same library
 - #include <bar/foo.h> for any library bar in kdevplatform

For plugins
 - #include "foo.h" only for files inside the plugin
 - #include <bar/foo.h> for any kdevplatform library bar
 - #include <foo.h> / #include <Foo> for any other libs

This allows us to remove all include_directories() calls, so we're only have -I
switches for "external" libs (like KDE/Qt) and the top-level source/binary dir
as well as the "current" source/binary dir.

This is also supposed to make our header safer against include-problems, like
using #include <icore.h> and that picks up a header of similar name from some
other lib. 

We've had a discussion about this quite a while back. Still if anybody feels
like this still has problem please speak up.

CCMAIL:kdevelop-devel@kdevelop.org
parent 2498560e
add_subdirectory(tests)
include_directories( ${KDE4_INCLUDES}
${CMAKE_SOURCE_DIR}/util
${CMAKE_SOURCE_DIR}/interfaces
${CMAKE_SOURCE_DIR}/project
${CMAKE_SOURCE_DIR}/vcs
${CMAKE_SOURCE_DIR}/vcs/interfaces
${CMAKE_SOURCE_DIR}/vcs/models
${CMAKE_SOURCE_DIR}/vcs/dvcs/
)
########### next target ###############
set(kdevgit_PART_SRCS
......
......@@ -32,8 +32,8 @@
#include <KShell>
#include <KDebug>
#include <dvcsjob.h>
#include <iplugin.h>
#include <vcs/dvcs/dvcsjob.h>
#include <interfaces/iplugin.h>
GitExecutor::GitExecutor(KDevelop::IPlugin* parent)
: QObject(parent), vcsplugin(parent)
......
......@@ -29,8 +29,8 @@
#include <KJob>
#include <QStringList>
#include <idvcsexecutor.h>
#include "vcsrevision.h"
#include <vcs/dvcs/idvcsexecutor.h>
#include <vcs/vcsrevision.h>
class DVCSjob;
......
......@@ -25,13 +25,13 @@
#include <klocalizedstring.h>
#include <QDebug>
#include <icore.h>
#include <iprojectcontroller.h>
#include <interfaces/icore.h>
#include <interfaces/iprojectcontroller.h>
#include <interfaces/iproject.h>
#include "vcsjob.h"
#include "vcsrevision.h"
#include <dvcsjob.h>
#include <vcs/vcsjob.h>
#include <vcs/vcsrevision.h>
#include <vcs/dvcs/dvcsjob.h>
#include "gitexecutor.h"
......
......@@ -22,7 +22,7 @@
#define GIT_PLUGIN_H
#include <vcs/interfaces/idistributedversioncontrol.h>
#include <dvcs/dvcsplugin.h>
#include <vcs/dvcs/dvcsplugin.h>
#include <qobject.h>
namespace KDevelop
......
......@@ -17,14 +17,6 @@ FIND_PROGRAM(GIT NAMES git
if (GIT)
include_directories( ${KDE4_INCLUDES}
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/util
${CMAKE_SOURCE_DIR}/interfaces
${CMAKE_SOURCE_DIR}/vcs
${CMAKE_SOURCE_DIR}/plugins/git
${CMAKE_SOURCE_DIR}/vcs/dvcs/
)
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
set(gitInitTest_SRCS initTest.cpp ../gitexecutor.cpp)
kde4_add_unit_test(kdevgit-test ${gitInitTest_SRCS})
......@@ -36,4 +28,4 @@ if (GIT)
)
endif (GIT)
endif (UNIX)
\ No newline at end of file
endif (UNIX)
......@@ -31,8 +31,8 @@
#include <KDebug>
#include <kio/netaccess.h>
#include <dvcsjob.h>
#include <gitexecutor.h>
#include <vcs/dvcs/dvcsjob.h>
#include "../gitexecutor.h"
#define GITTEST_DIR1 "kdevGit_testdir"
#define GITTEST_BASEDIR_NO_TR_SLASH "/tmp/kdevGit_testdir"
......
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