Commit beadadc1 authored by Matt Rogers's avatar Matt Rogers

Merge the kdev-model-and-api-experiments branch into trunk.

Nothing inherits from KDevProject anymore. This means that if your
project manager was inheriting from KDevProject like KDevProjectManager was,
then it'll need to be changed. Several methods in KDevProject have also been 
renamed. Here is the list of conversions:

openProject -> open
closeProject -> close
projectDirectory -> folder
absoluteUrl -> urlRelativeToProject
projectName -> name

KDevProject::relativeUrl has been deprecated. a name property has been
added to KDevProject with the accompanying accessors setName and name. This is
so that the name of the project no longer depends on the name of the
project file.

KDevPluginController has been given a massive overhaul. It is no longer 
managed by KDevCore. So code that used KDevCore::pluginController should
use KDevPluginController::self(). This is due, in part, to the strict nature
of the way KDevCore objects are cleaned up. 

!!! IMPORTANT !!! Plugins must have an X-KDE-PluginInfo-Name key in
their desktop file or they will not be found or loaded by the new plugin 
controller! It is preferable to fill in the whole X-KDE-PluginInfo
structure, but X-KDE-PluginInfo-Name is the only key required. 

The project model is now based on QStandardItemModel and QStandardItem.
The project model is now populated by the KDevProject object itself when
open() is called and can be accessed using the model() function.
parent adb5f608
include_directories( ${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/lib/util ${CMAKE_SOURCE_DIR}/lib/interfaces
include_directories( ${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/lib/util
${CMAKE_SOURCE_DIR}/lib/interfaces ${CMAKE_SOURCE_DIR}/lib/project
)
......
......@@ -34,7 +34,7 @@ KDevMakeBuilder::KDevMakeBuilder(QObject *parent, const QStringList &)
m_project = qobject_cast<KDevProject*>(parent);
Q_ASSERT(m_project);
KDevPluginController* kdpc = KDevCore::pluginController();
KDevPluginController* kdpc = KDevPluginController::self();
KDevMakeFrontend* make = kdpc->extension<KDevMakeFrontend>("KDevelop/MakeFrontend");
if ( make )
{
......@@ -57,12 +57,12 @@ KDevProject *KDevMakeBuilder::project() const
bool KDevMakeBuilder::build(KDevProjectItem *dom)
{
KDevPluginController* kdpc = KDevCore::pluginController();
KDevPluginController* kdpc = KDevPluginController::self();
if (KDevMakeFrontend *make = kdpc->extension<KDevMakeFrontend>("KDevelop/MakeFrontend")) {
if (KDevProjectFolderItem *folder = dom->folder()) {
// ### compile the folder
QString command = buildCommand(dom);
make->queueCommand(folder->name(), command);
make->queueCommand(folder->text(), command);
m_commands.append(qMakePair(command, dom));
return true;
} else if (KDevProjectTargetItem *target = dom->target()) {
......@@ -140,7 +140,7 @@ QString KDevMakeBuilder::buildCommand(KDevProjectItem *item, const QString &targ
Q_ASSERT(item->folder());
QString dircmd = "cd ";
QString dir = item->folder()->name();
QString dir = item->folder()->text();
dircmd += KProcess::quote(dir);
dircmd += " && ";
......
......@@ -29,13 +29,13 @@
#include "automakeprojectmodel.h"
#include "makefileinterface.h"
typedef KGenericFactory<AutoMakeImporter> AutotoolsSupportFactory;
K_EXPORT_COMPONENT_FACTORY( kdevautomakeimporter,
KGenericFactory<AutoMakeImporter>( "kdevautomakeimporter" ) )
AutotoolsSupportFactory( "kdevautomakeimporter" ) )
AutoMakeImporter::AutoMakeImporter( QObject* parent,
const QStringList& )
: KDevBuildManager( parent ), m_rootItem(0L)
: KDevBuildManager( AutotoolsSupportFactory::instance(), parent ), m_rootItem(0L)
{
m_project = qobject_cast<KDevProject*>( parent );
Q_ASSERT( m_project );
......@@ -52,6 +52,11 @@ KDevProject* AutoMakeImporter::project() const
return m_project;
}
KUrl AutoMakeImporter::buildDirectory() const
{
return project()->folder();
}
QList<KDevProjectFolderItem*> AutoMakeImporter::parse( KDevProjectFolderItem* dom )
{
Q_UNUSED( dom );
......
......@@ -46,6 +46,7 @@ public:
virtual KDevProject* project() const;
virtual KDevProjectBuilder* builder() const { return 0; }
virtual KUrl buildDirectory() const;
virtual KUrl::List includeDirectories() const { return KUrl::List(); }
virtual KUrl::List preprocessorDefines() const { return KUrl::List(); }
......
......@@ -20,7 +20,7 @@
#include "automakeprojectmodel.h"
AutoMakeDirItem::AutoMakeDirItem( const KUrl& url, KDevItemGroup* parent )
AutoMakeDirItem::AutoMakeDirItem( const KUrl& url, QStandardItem* parent )
: KDevProjectFolderItem( url, parent )
{
}
......@@ -30,7 +30,7 @@ AutoMakeDirItem::~AutoMakeDirItem()
}
AutoMakeFileItem::AutoMakeFileItem( const KUrl& url, KDevItemGroup* parent )
AutoMakeFileItem::AutoMakeFileItem( const KUrl& url, QStandardItem* parent )
: KDevProjectFileItem( url, parent )
{
}
......@@ -39,11 +39,11 @@ AutoMakeFileItem::~AutoMakeFileItem()
{
}
AutoMakeTargetItem::AutoMakeTargetItem( const TargetInfo& target, KDevItemGroup* parent )
AutoMakeTargetItem::AutoMakeTargetItem( const TargetInfo& target, QStandardItem* parent )
: KDevProjectTargetItem( target.url.pathOrUrl(), parent )
{
m_target = target;
setName( target.name );
setText( target.name );
}
AutoMakeTargetItem::~AutoMakeTargetItem()
......
......@@ -29,7 +29,7 @@ namespace AutoTools { class ProjectAST; }
class AutoMakeDirItem : public KDevProjectFolderItem
{
public:
AutoMakeDirItem( const KUrl& url, KDevItemGroup* parent = 0 );
AutoMakeDirItem( const KUrl& url, QStandardItem* parent = 0 );
virtual ~AutoMakeDirItem();
virtual KDevProjectFolderItem* folder() const
......@@ -44,7 +44,7 @@ public:
class AutoMakeFileItem : public KDevProjectFileItem
{
public:
AutoMakeFileItem( const KUrl& url, KDevItemGroup* parent = 0 );
AutoMakeFileItem( const KUrl& url, QStandardItem* parent = 0 );
virtual ~AutoMakeFileItem();
virtual KDevProjectFileItem* file() const
......@@ -56,7 +56,7 @@ public:
class AutoMakeTargetItem : public KDevProjectTargetItem
{
public:
AutoMakeTargetItem( const TargetInfo& target, KDevItemGroup* parent = 0 );
AutoMakeTargetItem( const TargetInfo& target, QStandardItem* parent = 0 );
virtual ~AutoMakeTargetItem();
......@@ -81,7 +81,7 @@ private:
class AutoMakeGenericItem : public KDevProjectItem
{
public:
AutoMakeGenericItem( const QString& target, KDevItemGroup* parent = 0 );
AutoMakeGenericItem( const QString& target, QStandardItem* parent = 0 );
virtual ~AutoMakeGenericItem();
};
......
......@@ -39,9 +39,9 @@
#include "config.h"
#include "cmaketargetitem.h"
typedef KGenericFactory<CMakeImporter> CMakeSupportFactory ;
K_EXPORT_COMPONENT_FACTORY( kdevcmakeimporter,
KGenericFactory<CMakeImporter>( "kdevcmakeimporter" ) )
CMakeSupportFactory( "kdevcmakeimporter" ) )
void updateProgress( const char* text, float percent )
{
......@@ -50,7 +50,7 @@ void updateProgress( const char* text, float percent )
CMakeImporter::CMakeImporter( QObject* parent,
const QStringList& )
: KDevBuildManager( parent ), m_rootItem(0L)
: KDevBuildManager( CMakeSupportFactory::instance(), parent ), m_rootItem(0L)
{
m_project = qobject_cast<KDevProject*>( parent );
Q_ASSERT( m_project );
......@@ -75,6 +75,11 @@ KDevProject* CMakeImporter::project() const
return m_project;
}
KUrl CMakeImporter::buildDirectory() const
{
return project()->folder();
}
QList<KDevProjectFolderItem*> CMakeImporter::parse( KDevProjectFolderItem* dom )
{
Q_UNUSED( dom );
......@@ -84,7 +89,7 @@ QList<KDevProjectFolderItem*> CMakeImporter::parse( KDevProjectFolderItem* dom )
KDevProjectItem* CMakeImporter::import( KDevProjectModel* model,
const KUrl& fileName )
{
QString projectPath = m_project->projectDirectory().path();
QString projectPath = m_project->folder().path();
kDebug( 9025 ) << k_funcinfo << "project path is " << projectPath << endl;
QString buildDir = CMakeSettings::self()->buildFolder();
kDebug( 9025 ) << k_funcinfo << "build dir is " << qPrintable( buildDir ) << endl;
......@@ -116,9 +121,8 @@ KDevProjectItem* CMakeImporter::import( KDevProjectModel* model,
for ( git = generatorVector.begin(); git != generatorVector.end(); ++git )
{
KUrl url( ( *git )->GetMakefile()->GetStartDirectory() );
KDevProjectFolderItem* item = new KDevProjectFolderItem( url, 0 );
KDevProjectFolderItem* item = new KDevProjectFolderItem( url, m_rootItem );
createProjectItems( ( *git ), item );
m_rootItem->add( item );
}
return m_rootItem;
}
......@@ -151,7 +155,7 @@ void CMakeImporter::createProjectItems( cmLocalGenerator* generator, KDevProject
{
cmTarget target = ( *it ).second;
CMakeTargetItem* targetItem = new CMakeTargetItem( target, rootItem );
rootItem->add( targetItem );
std::vector<std::string> sourceLists = target.GetSourceLists();
std::vector<std::string>::iterator sit, sitEnd = sourceLists.end();
for ( sit = sourceLists.begin(); sit != sitEnd; ++sit )
......@@ -174,7 +178,7 @@ void CMakeImporter::createProjectItems( cmLocalGenerator* generator, KDevProject
for ( git = generatorVector.begin(); git != generatorVector.end(); ++git )
{
KUrl url( ( *git )->GetMakefile()->GetStartDirectory() );
KDevProjectBuildFolderItem* item = new KDevProjectBuildFolderItem( url, 0 );
KDevProjectBuildFolderItem* item = new KDevProjectBuildFolderItem( url, rootItem );
std::vector<std::string> includeList = makefile->GetIncludeDirectories();
std::vector<std::string>::iterator it, itEnd = includeList.end();
for ( it = includeList.begin(); it != itEnd; ++it )
......@@ -184,7 +188,6 @@ void CMakeImporter::createProjectItems( cmLocalGenerator* generator, KDevProject
m_includeDirList.append( urlCandidate );
}
createProjectItems( ( *git ), item );
rootItem->add( item );
}
}
......
......@@ -49,6 +49,7 @@ public:
virtual KDevProject* project() const;
virtual KDevProjectBuilder* builder() const { return 0; }
virtual KUrl buildDirectory() const;
virtual KUrl::List includeDirectories() const;
virtual KUrl::List preprocessorDefines() const { return KUrl::List(); }
......
......@@ -26,7 +26,7 @@ CMakeTargetItem::CMakeTargetItem( cmTarget target, KDevProjectItem* item)
{
m_target = target;
QString targetName = QLatin1String( target.GetFullName().c_str() );
setName( targetName );
setText( targetName );
std::vector<std::string> includes = m_target.GetMakefile()->GetIncludeDirectories();
std::vector<std::string>::iterator it = includes.begin(), itEnd = includes.end();
......
include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/lib/util
include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/lib/util
${CMAKE_SOURCE_DIR}/lib/project
)
......
......@@ -32,10 +32,11 @@
#include <qfileinfo.h>
#include <QRegExp>
K_EXPORT_COMPONENT_FACTORY(kdevgenericimporter, KGenericFactory<KDevGenericImporter>("kdevgenericimporter"))
typedef KGenericFactory<KDevGenericImporter> GenericSupportFactory;
K_EXPORT_COMPONENT_FACTORY(kdevgenericimporter, GenericSupportFactory("kdevgenericimporter"))
KDevGenericImporter::KDevGenericImporter(QObject *parent, const QStringList &)
: KDevFileManager(parent)
: KDevFileManager( GenericSupportFactory::instance(), parent)
{
if (includes.isEmpty())
includes << "*.h" << "*.cpp" << "*.c" << "*.ui" << "*.cs" << "*.java"; // ### remove me
......@@ -97,11 +98,9 @@ QList<KDevProjectFolderItem*> KDevGenericImporter::parse(KDevProjectFolderItem *
} else if (fileInfo.isDir() && fileInfo.fileName() != QLatin1String(".")
&& fileInfo.fileName() != QLatin1String("..")) {
KDevProjectFolderItem *folder = new KDevProjectFolderItem(KUrl(fileInfo.absoluteFilePath()), item);
item->add(folder);
folder_list.append(folder);
} else if (fileInfo.isFile()) {
KDevProjectFileItem *file = new KDevProjectFileItem(KUrl( fileInfo.absoluteFilePath() ), item);
item->add(file);
}
}
......
include_directories(${CMAKE_SOURCE_DIR}/buildtools/lib/parsers/qmake
${CMAKE_SOURCE_DIR}/lib/util
${CMAKE_SOURCE_DIR}/lib/util ${CMAKE_SOURCE_DIR}/lib/project
)
......
[Background Parser]
Enabled=true
[CMake]
Generator=0
[General Options]
Builder=KDevMakeBuilder
Importer=KDevGenericImporter
......
......@@ -15,7 +15,6 @@
<description/>
<ignoreparts>
<part>kdevbookmarks</part>
<part>kdevfilelist</part>
<part>kdevdistpart</part>
</ignoreparts>
<defaultencoding/>
......@@ -242,7 +241,7 @@
</run>
<build>
<buildtool>make</buildtool>
<builddir>/home/kde/trunk/KDE/kdevelop</builddir>
<builddir>/home/kde/branches/work/kdev-model-and-api-experiments</builddir>
</build>
<make>
<abortonerror>false</abortonerror>
......
......@@ -3,7 +3,7 @@ add_subdirectory(parser)
add_subdirectory(duchain)
#add_subdirectory(app_templates)
include_directories( ${CMAKE_TOP_BUILD_DIR}/ ${CMAKE_SOURCE_DIR}/lib ${THREADWEAVER_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/lib/editor ${CMAKE_SOURCE_DIR}/languages/cpp/duchain ${CMAKE_SOURCE_DIR}/languages/cpp/parser ${CMAKE_SOURCE_DIR}/languages/cpp/duchain/viewer
include_directories( ${CMAKE_TOP_BUILD_DIR}/ ${CMAKE_SOURCE_DIR}/lib ${THREADWEAVER_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/lib/editor ${CMAKE_SOURCE_DIR}/languages/cpp/duchain ${CMAKE_SOURCE_DIR}/languages/cpp/parser ${CMAKE_SOURCE_DIR}/languages/cpp/duchain/viewer ${CMAKE_SOURCE_DIR}/lib/project
)
......
......@@ -11,6 +11,7 @@ GenericName[x-test]=xxC/C++ Supportxx
ServiceTypes=KDevelop/LanguageSupport
Icon=source_cpp
X-KDE-Library=kdevcpplanguagesupport
X-KDE-PluginInfo-Name=kdevcppsupport
X-KDevelop-Version=4
X-KDevelop-Language=C++
X-KDevelop-Args=CPP
......@@ -2,6 +2,7 @@
add_subdirectory(parser)
include_directories( ${CMAKE_SOURCE_DIR}/lib ${THREADWEAVER_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/lib/project
)
......
......@@ -2,6 +2,7 @@
add_subdirectory(parser)
include_directories( ${CMAKE_SOURCE_DIR}/lib ${THREADWEAVER_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/lib/project
)
......
add_subdirectory(parser)
include_directories(${CMAKE_SOURCE_DIR}/lib ${THREADWEAVER_INCLUDE_DIR})
include_directories(${CMAKE_SOURCE_DIR}/lib ${THREADWEAVER_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/lib/project )
########### next target ###############
......
......@@ -5,22 +5,28 @@ add_subdirectory(debugger)
add_subdirectory(projectmanager)
add_subdirectory(settings)
include_directories( ${CMAKE_SOURCE_DIR}/lib/util ${CMAKE_SOURCE_DIR}/lib/widgets ${THREADWEAVER_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/lib/editor ${CMAKE_SOURCE_DIR}/lib/backgroundparser ${CMAKE_SOURCE_DIR}/lib/interfaces )
include_directories(
${CMAKE_SOURCE_DIR}/lib/util
${CMAKE_SOURCE_DIR}/lib/widgets
${THREADWEAVER_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/lib/editor
${CMAKE_SOURCE_DIR}/lib/backgroundparser
${CMAKE_SOURCE_DIR}/lib/interfaces
${CMAKE_SOURCE_DIR}/lib/project
)
########### next target ###############
set(kdevplatform_LIB_SRCS
kdevlanguagesupport.cpp
kdevmainwindow.cpp
kdevprojectbuilder.cpp
kdevproject.cpp
kdevcodemodel.cpp
kdevdocumentcontroller.cpp
kdevcoderepository.cpp
kdevcore.cpp
kdevpcsimporter.cpp
kdevplugincontroller.cpp
kdevprojectmodel.cpp
kdevplugin.cpp
domutil.cpp
kdevitemmodel.cpp
......@@ -29,7 +35,6 @@ set(kdevplatform_LIB_SRCS
kdevcodeproxy.cpp
kdevcodeaggregate.cpp
kdevdocument.cpp
kdevbuildableproject.cpp
kdevfilemanager.cpp
kdevbuildmanager.cpp
kdevprofile.cpp
......@@ -38,7 +43,6 @@ set(kdevplatform_LIB_SRCS
kdevconfigskeleton.cpp
kdevenvironment.cpp
kdevconfig.cpp
kdevprojectcontroller.cpp
kdevpartcontroller.cpp
kdevlanguagecontroller.cpp
kdevstatusbar.cpp
......@@ -58,6 +62,11 @@ set(kdevplatform_LIB_SRCS
interfaces/kdevapplicationinterface.cpp
interfaces/kdevdiffinterface.cpp
interfaces/kdevmakeinterface.cpp
project/kdevprojectbuilder.cpp
project/kdevproject.cpp
project/kdevprojectmodel.cpp
project/kdevprojectcontroller.cpp
project/importprojectjob.cpp
)
set(kdevplatform_UI
......@@ -83,19 +92,15 @@ install(FILES
kdevplugin.h
kdevcoderepository.h
kdevcore.h
kdevprojectbuilder.h
kdevcreatefile.h
kdevproject.h
domutil.h
kdevlanguagesupport.h
kdevprojectmodel.h
kdevmainwindow.h
kdevitemmodel.h
filetemplate.h
kdevcodedelegate.h
kdevcodeproxy.h
kdevfilemanager.h
kdevbuildableproject.h
kdevbuildmanager.h
kdevprofile.h
kdevprofileengine.h
......@@ -104,7 +109,6 @@ install(FILES
kdevenvironment.h
kdevconfig.h
kdevsharedptr.h
kdevprojectcontroller.h
kdevpartcontroller.h
kdevlanguagecontroller.h
kdevstatusbar.h
......@@ -123,6 +127,10 @@ install(FILES
interfaces/kdevapplicationinterface.h
interfaces/kdevdiffinterface.h
interfaces/kdevmakeinterface.h
project/kdevprojectbuilder.h
project/kdevproject.h
project/kdevprojectmodel.h
project/kdevprojectcontroller.h
DESTINATION ${INCLUDE_INSTALL_DIR}/kdevelop/
)
......
......@@ -113,7 +113,7 @@ KUrl FileTemplate::fullPathForName(const QString &name, Policy p)
// first try project-specific
if (KDevCore::activeProject())
{
QString projectDir = KDevCore::activeProject()->projectDirectory().path();
QString projectDir = KDevCore::activeProject()->folder().path();
projectDir += "/templates/" + name;
url = KUrl(projectDir);
if (KIO::NetAccess::exists(url, true, KDevCore::mainWindow()))
......
/* This file is part of the KDevelop platform
Copyright (C) 2006 Matt Rogers <mattr@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "kdevbuildableproject.h"
KDevBuildableProject::KDevBuildableProject(KInstance *instance, QObject *parent)
: KDevProject(instance, parent)
{
}
KDevBuildableProject::~KDevBuildableProject()
{
}
#include "kdevbuildableproject.moc"
/* This file is part of the KDevelop platform
Copyright (C) 2006 Matt Rogers <mattr@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KDEVBUILDABLEPROJECT_H
#define KDEVBUILDABLEPROJECT_H
#include "kdevproject.h"
class KDevBuildManager;
class KDevProjectTargetItem;
/**
* This class represents a project that is buildable, in other words it
* requires going through some sort of compile process before something that
* can be executed is generated.
*/
class KDevBuildableProject : public KDevProject
{
Q_OBJECT
public:
KDevBuildableProject(KInstance *instance, QObject *parent = 0);
virtual ~KDevBuildableProject();
/**
* Get the buildable file manager for the project.
*
* @return the file manager for the project, if one exists; otherwise null
*/
KDevBuildManager* buildManager() const;
/**
* Set the file manager for the project.
*/
void setBuildManager( KDevBuildManager* fileManager ) const;
/**
* Get the canonical build directory of the project.
*
* If a seperate build directory is not supported, this should return
* the same url as projectDirectory(). The url will not point to a symbolic
* link or have redundant "." or ".." elements
*
* Remote URLs for a project's build directory are not supported and should
* not be used.
*
* @return The canonical build directory of the project.
*/
virtual KUrl buildDirectory() const = 0;
/**
* Get the environment to use when running the program
*
* @return the environment variables that should be set before running
* mainProgram()
*/
virtual DomUtil::PairList runEnvironmentVars() const = 0;
/**
* Absolute path (directory) from where the mainProgram() should be run.
**/
virtual KUrl runDirectory() const = 0;
/**The command line arguments that the mainProgram() should be run with.*/
virtual QString runArguments() const = 0;
signals:
/**
* Emitted when one compile related command (make, make install, make ...)
* ends sucessfuly. Used to reparse the files after a sucessful
* compilation.
*/
void projectCompiled();
};
#endif
//kate: indent-mode cstyle; indent-width 4; space-indent on; auto-insert-doxygen on;
......@@ -20,8 +20,8 @@
#include "kdevbuildmanager.h"
KDevBuildManager::KDevBuildManager(QObject* parent)
: KDevFileManager(parent)
KDevBuildManager::KDevBuildManager(KInstance* instance, QObject* parent)
: KDevFileManager(instance, parent)
{
}
......
......@@ -35,7 +35,7 @@ class KDEVINTERFACES_EXPORT KDevBuildManager : public KDevFileManager
Q_OBJECT
public:
KDevBuildManager(QObject* parent);
KDevBuildManager(KInstance*, QObject* parent);
~KDevBuildManager();
enum BuildFeature
......@@ -110,6 +110,11 @@ public:
*/
virtual bool removeFileFromTarget(KDevProjectFileItem *file, KDevProjectTargetItem *parent) = 0;
/**
* Get the toplevel build directory for the project
*/
virtual KUrl buildDirectory() const = 0;
/**
* Get a list of all the targets in this project
*
......@@ -120,6 +125,8 @@ public:
* @todo implement
*/
//QList<KDevProjectTargetItem*> targets() const;
};
Q_DECLARE_OPERATORS_FOR_FLAGS( KDevBuildManager::BuildFeatures )
......
......@@ -39,7 +39,6 @@ Boston, MA 02110-1301, USA.
#include "kdevenvironment.h"
#include "kdevpartcontroller.h"
#include "kdevlanguagesupport.h"
#include "kdevplugincontroller.h"
#include "kdevprojectcontroller.h"
#include "kdevdocumentcontroller.h"
#include "kdevlanguagecontroller.h"
......@@ -68,7 +67,6 @@ public:
QPointer<KDevPartController> partController;
QPointer<KDevProjectController> projectController;
QPointer<KDevLanguageController> languageController;
QPointer<KDevPluginController> pluginController;
QPointer<KDevDocumentController> documentController;
QPointer<KDevBackgroundParser> backgroundParser;
......@@ -89,8 +87,6 @@ private:
*/
if ( environment )
delete environment;
if ( pluginController )
delete pluginController;
if ( projectController )
delete projectController;
if ( documentController )
......@@ -146,16 +142,6 @@ void KDevCore::setMainWindow( KDevMainWindow *mainWindow )
d->mainWindow = mainWindow;
}
KDevPluginController* KDevCore::pluginController()
{
return d->pluginController;
}
void KDevCore::setPluginController( KDevPluginController* pluginController )
{
d->pluginController = pluginController;
}
KDevDocumentController* KDevCore::documentController()
{
return d->documentController;
......@@ -215,7 +201,6 @@ void KDevCore::initialize()
Q_ASSERT( d->projectController );
Q_ASSERT( d->mainWindow );
Q_ASSERT( d->backgroundParser );
Q_ASSERT( d->pluginController );
d->environment->initialize();
d->partController->initialize();
......@@ -224,7 +209,6 @@ void KDevCore::initialize()
d->projectController->initialize();
d->mainWindow->initialize();
d->backgroundParser->initialize();
d->pluginController->initialize();
bool success = false;
......@@ -268,7 +252,8 @@ void KDevCore::cleanup()
Q_ASSERT( d->projectController );
Q_ASSERT( d->mainWindow );
Q_ASSERT( d->backgroundParser );
Q_ASSERT( d->pluginController );
d->mainWindow->setVisible( false );
//If a project is open then projectController will call KDevCore::saveSettings
//both before the project is closed and then once after. Else we will do it here.
......@@ -282,7 +267,6 @@ void KDevCore::cleanup()
d->projectController->cleanup();
d->mainWindow->cleanup();
d->backgroundParser->cleanup();
d->pluginController->cleanup();
}
/* This function should be called right after initialization of the objects and a project has
......@@ -296,7 +280,6 @@ void KDevCore::loadSettings()
Q_ASSERT( d->projectController );
Q_ASSERT( d->mainWindow );