Commit 8c7b38de authored by Adam Treat's avatar Adam Treat

Lots of changes... Let's summarize:

* Implement the new config framework.
    This means that project files are now INI style
    and split between a global FOO.kdev4 file that is
    safe to share, and a local .kdev4/FOO.kdev4 file
    that stores non-shareable settings like paths and
    environment variables.
* Change CMake settings to use new config framework
* Replace src/projectmanager.* classes with a 
  projectcontroller.* class.  Add a languagecontroller.*
  class that will allow more than one language part to be
  loaded at one time.
* Add a kdevelop.kdev4 global INI project file that should
  be safe to share and commit to svn.  Remove the old
  kdevelop4.kdevelop file.
* For now, project loading only takes place via the command
  line OR if you have Last Project=/path/to/kdevelop.kdev4 file
  in your local kdeveloprc.  I'm going to work on the action
  classes necessary to open projects soon ;)
* Introduce a kdevenv.* class in lib/interfaces where all 
  plugins that need access to the environment variables will get
  them.  This means we'll no longer have separate plugins running
  with different variables and the user can expect to set/get env
  variables in one central KCM.  You can get the environment from
  KDevApi... although it is not complete yet.
* I'll be creating a tool to convert between kdevelop3 project files
  to kdev4 project files sooner or later.
parent 19672169
......@@ -149,33 +149,35 @@ void KDevMakeBuilder::commandFailed(const QString &command)
QString KDevMakeBuilder::buildCommand(KDevProjectItem *item, const QString &target)
{
QDomDocument &dom = *KDevApi::self()->projectDom();
//FIXME Get this from the new project file format
// QDomDocument &dom = *KDevApi::self()->projectDom();
QString cmdline = DomUtil::readEntry(dom, makeTool);
int prio = DomUtil::readIntEntry(dom, priority);
QString nice;
if (prio != 0) {
nice = QString("nice -n%1 ").arg(prio);
}
QString cmdline;
// QString cmdline = DomUtil::readEntry(dom, makeTool);
// int prio = DomUtil::readIntEntry(dom, priority);
// QString nice;
// if (prio != 0) {
// nice = QString("nice -n%1 ").arg(prio);
// }
if (cmdline.isEmpty())
cmdline = MAKE_COMMAND;
if (!DomUtil::readBoolEntry(dom, abortOnError))
cmdline += " -k";
int jobs = DomUtil::readIntEntry(dom, numberOfJobs);
if (jobs != 0) {
cmdline += " -j";
cmdline += QString::number(jobs);
}
if (DomUtil::readBoolEntry(dom, dontAct))
cmdline += " -n";
// if (!DomUtil::readBoolEntry(dom, abortOnError))
// cmdline += " -k";
// int jobs = DomUtil::readIntEntry(dom, numberOfJobs);
// if (jobs != 0) {
// cmdline += " -j";
// cmdline += QString::number(jobs);
// }
// if (DomUtil::readBoolEntry(dom, dontAct))
// cmdline += " -n";
cmdline += " ";
cmdline += target;
cmdline.prepend(nice);
cmdline.prepend(makeEnvironment());
// cmdline.prepend(nice);
// cmdline.prepend(makeEnvironment());
Q_ASSERT(item->folder());
......@@ -189,18 +191,19 @@ QString KDevMakeBuilder::buildCommand(KDevProjectItem *item, const QString &targ
QString KDevMakeBuilder::makeEnvironment() const
{
DomUtil::PairList envvars =
DomUtil::readPairListEntry(*KDevApi::self()->projectDom(), environment, "envvar", "name", "value");
QString env;
DomUtil::PairList::ConstIterator it;
for (it = envvars.begin(); it != envvars.end(); ++it) {
env += (*it).first;
env += "=";
env += KProcess::quote((*it).second);
env += " ";
}
return env;
//FIXME use the new KDevEnv class
// DomUtil::PairList envvars =
// DomUtil::readPairListEntry(*KDevApi::self()->projectDom(), environment, "envvar", "name", "value");
//
// QString env;
// DomUtil::PairList::ConstIterator it;
// for (it = envvars.begin(); it != envvars.end(); ++it) {
// env += (*it).first;
// env += "=";
// env += KProcess::quote((*it).second);
// env += " ";
// }
// return env;
}
#include "kdevmakebuilder.moc"
......@@ -13,12 +13,10 @@ include_directories(
set( cmakeimporter_SRCS
cmakeimporter.cpp
cmaketargetitem.cpp
cmakesettings.cpp
)
set( cmakesettings_SRCS
cmakepreferences.cpp
cmakesettings.cpp
)
set( cmakesettings_UI
......@@ -27,13 +25,15 @@ set( cmakesettings_UI
remove_definitions( -DQT_NO_STL )
kde4_automoc( ${cmakeimporter_SRCS} )
kde4_add_kcfg_files( cmakeimporter_SRCS config.kcfgc )
kde4_add_plugin( kdevcmakeimporter ${cmakeimporter_SRCS} )
target_link_libraries( kdevcmakeimporter ${KDE4_KDECORE_LIBS}
kdevinterfaces CMakeLib )
kde4_automoc( ${cmakesettings_SRCS} )
kde4_add_ui_files( cmakesettings_SRCS ${cmakesettings_UI} )
kde4_add_plugin(kcm_kdevcmake_settings ${cmakesettings_SRCS} )
kde4_add_kcfg_files( cmakesettings_SRCS config.kcfgc )
kde4_add_plugin( kcm_kdevcmake_settings ${cmakesettings_SRCS} )
target_link_libraries( kcm_kdevcmake_settings ${KDE4_KUTILS_LIBS} kdevinterfaces )
......@@ -44,4 +44,5 @@ install(TARGETS kdevcmakeimporter DESTINATION ${PLUGIN_INSTALL_DIR} )
install(TARGETS kcm_kdevcmake_settings DESTINATION ${PLUGIN_INSTALL_DIR} )
install(FILES kdevcmakeimporter.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
install(FILES kcm_kdevcmake_settings.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
install( FILES data.kdev4 DESTINATION ${DATA_INSTALL_DIR}/kdevcmakeimporter )
......@@ -20,7 +20,7 @@
<number>6</number>
</property>
<item row="0" column="1" >
<widget class="QLineEdit" name="installPrefix" >
<widget class="QLineEdit" name="kcfg_installPrefix" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
......@@ -32,7 +32,7 @@
</widget>
</item>
<item row="2" column="1" >
<widget class="QLineEdit" name="buildType" />
<widget class="QLineEdit" name="kcfg_buildType" />
</item>
<item row="3" column="1" >
<spacer>
......@@ -48,7 +48,7 @@
</spacer>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="buildFolder" />
<widget class="QLineEdit" name="kcfg_buildFolder" />
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_3" >
......@@ -59,7 +59,7 @@
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy" >
<cstring>buildFolder</cstring>
<cstring>kcfg_buildFolder</cstring>
</property>
</widget>
</item>
......@@ -72,7 +72,7 @@
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy" >
<cstring>installPrefix</cstring>
<cstring>kcfg_installPrefix</cstring>
</property>
</widget>
</item>
......@@ -85,15 +85,15 @@
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy" >
<cstring>buildType</cstring>
<cstring>kcfg_buildType</cstring>
</property>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>installPrefix</tabstop>
<tabstop>buildType</tabstop>
<tabstop>kcfg_installPrefix</tabstop>
<tabstop>kcfg_buildType</tabstop>
</tabstops>
<resources/>
<connections/>
......
......@@ -35,7 +35,7 @@
#include "cmLocalGenerator.h"
#include "cmGlobalGenerator.h"
#include "cmakesettings.h"
#include "config.h"
#include "cmaketargetitem.h"
......@@ -78,7 +78,7 @@ KDevProjectItem* CMakeImporter::import( KDevProjectModel* model,
{
QString projectPath = m_project->projectDirectory().path();
kDebug( 9025 ) << k_funcinfo << "project path is " << projectPath << endl;
QString buildDir = CMakeSettings::self()->buildDirectory().path();
QString buildDir = CMakeSettings::self()->buildFolder();
kDebug( 9025 ) << k_funcinfo << "build dir is " << qPrintable( buildDir ) << endl;
m_cmakeEngine.SetHomeDirectory( projectPath.toLocal8Bit().data() );
......
......@@ -26,24 +26,27 @@
#include <kurl.h>
#include <kgenericfactory.h>
#include "cmakesettings.h"
#include "ui_cmakebuildsettings.h"
#include "config.h"
typedef KGenericFactory<CMakePreferences> CMakePreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kdevcmake_settings, CMakePreferencesFactory( "kcm_kdevcmake_settings" ) )
CMakePreferences::CMakePreferences(QWidget* parent, const QStringList& args)
: KCModule(CMakePreferencesFactory::instance(), parent, args)
: KDevCModule(CMakeSettings::self(),CMakePreferencesFactory::instance(), parent, args)
{
QVBoxLayout* l = new QVBoxLayout( this );
QWidget* w = new QWidget;
m_prefsUi = new Ui::CMakeBuildSettings;
m_prefsUi->setupUi( w );
l->addWidget( w );
//Is this correct?
addConfig( CMakeSettings::self(), w );
load();
}
}
CMakePreferences::~CMakePreferences()
{
......@@ -51,26 +54,17 @@ CMakePreferences::~CMakePreferences()
void CMakePreferences::load()
{
CMakeSettings *settings = CMakeSettings::self();
m_prefsUi->buildFolder->setText(settings->buildDirectory().path());
m_prefsUi->installPrefix->setText(settings->installationPrefix().path());
m_prefsUi->buildType->setText(settings->buildType());
KDevCModule::load();
}
void CMakePreferences::save()
{
CMakeSettings* settings = CMakeSettings::self();
settings->setInstallationPrefix(KUrl(m_prefsUi->installPrefix->text()));
settings->setBuildDirectory(KUrl(m_prefsUi->buildFolder->text()));
settings->setBuildType(m_prefsUi->buildType->text());
KDevCModule::save();
}
void CMakePreferences::defaults()
{
m_prefsUi->buildFolder->setText( QString() );
m_prefsUi->installPrefix->setText( QString() );
m_prefsUi->buildType->setText( QString() );
KDevCModule::defaults();
}
//kate: space-indent on; indent-width 4; replace-tabs on;
......@@ -21,7 +21,10 @@
#ifndef CMAKEPREFERENCES_H
#define CMAKEPREFERENCES_H
#include <kcmodule.h>
#include "kdevcmodule.h"
#include <kurl.h>
#include <kstandarddirs.h>
class QWidget;
class QStringList;
......@@ -31,7 +34,7 @@ namespace Ui { class CMakeBuildSettings; }
/**
* @author Matt Rogers <mattr@kde.org>
*/
class CMakePreferences : public KCModule
class CMakePreferences : public KDevCModule
{
public:
CMakePreferences(QWidget* parent = 0, const QStringList& args = QStringList());
......@@ -41,6 +44,12 @@ public:
virtual void save();
virtual void defaults();
virtual KUrl localNonShareableFile() const
{
return KUrl::fromPath(
KStandardDirs::locate( "data", "kdevcmakeimporter/data.kdev4" ) );
}
private slots:
void settingsChanged();
......
/* KDevelop CMake Support
*
* Copyright 2006 Matt Rogers <mattr@kde.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
#include "cmakesettings.h"
#include <QString>
#include <QDomDocument>
#include <kurl.h>
#include <kdebug.h>
#include "domutil.h"
#include "kdevapi.h"
CMakeSettings* CMakeSettings::s_instance = 0;
CMakeSettings* CMakeSettings::self()
{
if ( !s_instance )
s_instance = new CMakeSettings;
return s_instance;
}
CMakeSettings::CMakeSettings()
{
}
CMakeSettings::~CMakeSettings()
{
}
KUrl CMakeSettings::installationPrefix() const
{
QDomDocument* dom = KDevApi::self()->projectDom();
return KUrl(DomUtil::readEntry(*dom, QLatin1String("cmakeproject/prefix")));
}
KUrl CMakeSettings::buildDirectory() const
{
QDomDocument* dom = KDevApi::self()->projectDom();
QString value = DomUtil::readEntry(*dom, QLatin1String("cmakeproject/builddir"));
kDebug( 9020 ) << k_funcinfo << "build dir is " << value << endl;
return KUrl(value);
}
QString CMakeSettings::buildType() const
{
QDomDocument* dom = KDevApi::self()->projectDom();
QString value = DomUtil::readEntry(*dom , QLatin1String("cmakeproject/buildtype"));
kDebug( 9020 ) << k_funcinfo << "build type is " << value << endl;
return value;
}
void CMakeSettings::setInstallationPrefix(const KUrl& newPrefix)
{
QDomDocument* dom = KDevApi::self()->projectDom();
DomUtil::writeEntry(*dom, QLatin1String("cmakeproject/prefix"), newPrefix.path());
}
void CMakeSettings::setBuildDirectory(const KUrl& newBuildDir)
{
QDomDocument* dom = KDevApi::self()->projectDom();
DomUtil::writeEntry(*dom, QLatin1String("cmakeproject/builddir"), newBuildDir.path());
}
void CMakeSettings::setBuildType(const QString& newType)
{
QDomDocument* dom = KDevApi::self()->projectDom();
DomUtil::writeEntry(*dom, QLatin1String("cmakeproject/buildtype"), newType);
}
//kate: space-indent on; indent-width 4; replace-tabs on;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd">
<kcfg>
<kcfgfile name="kdeveloprc"/>
<group name="CMake">
<entry name="installPrefix" key="Prefix" type="String">
</entry>
<entry name="buildFolder" key="Build Dir" type="String">
</entry>
<entry name="buildType" key="Build Type" type="String">
</entry>
</group>
</kcfg>
File=config.kcfg
ClassName=CMakeSettings
Singleton=true
Inherits=KDevConfigSkeleton
IncludeFiles="kdevconfigskeleton.h"
\ No newline at end of file
installPrefix
buildFolder
buildType
\ No newline at end of file
[General Options]
Builder=KDevMakeBuilder
Display Document Categories=false
Importer=KDevGenericImporter
PrimaryLanguage=C++
Project Management=KDevProjectManager
<!DOCTYPE kdevelop>
<kdevelop>
<general>
<projectmanagement>KDevProjectManager</projectmanagement>
<importer>KDevGenericImporter</importer>
<builder>KDevMakeBuilder</builder>
<projectdirectory>.</projectdirectory>
<absoluteprojectpath>false</absoluteprojectpath>
<author>KDevelop Authors</author>
<email>kdevelop-devel@kdevelop.org</email>
<version>CVS</version>
<primarylanguage>C++</primarylanguage>
<keywords>
<keyword>Qt</keyword>
<keyword>KDE</keyword>
</keywords>
<description>KDevelop is an easy to use IDE (Integrated Development Environment) for developing applications under X11.</description>
<ignoreparts/>
<secondaryLanguages/>
</general>
<kdevfileview>
<groups>
<group pattern="*.cpp;*.cxx" name="Sources" />
<group pattern="*.h;*.hpp" name="Headers" />
<group pattern="*.ui" name="User Interface" />
<group pattern="*.desktop" name="desktop" />
<group pattern="*.rc" name="Resources" />
<group pattern="*.png" name="Icons" />
<group pattern="*.kdevelop" name="Project templates" />
<group pattern="*.toc;*.index" name="Documentation" />
<group pattern="*.po;*.ts" name="Translations" />
<group pattern="*script" name="scripts" />
<group pattern="*" name="Others" />
<hidenonprojectfiles>true</hidenonprojectfiles>
<hidenonlocation>true</hidenonlocation>
</groups>
<tree>
<hidenonprojectfiles>false</hidenonprojectfiles>
<hidepatterns>*.o,*.lo,CVS,autom4te.cache</hidepatterns>
<showvcsfields>true</showvcsfields>
</tree>
</kdevfileview>
<kdevdoctreeview>
<ignoretocs>
<toc>gtk</toc>
<toc>gnustep</toc>
<toc>python</toc>
<toc>php</toc>
<toc>perl</toc>
<toc>bash</toc>
<toc>gnome1</toc>
<toc>sw</toc>
<toc>w3c-dom-level2-html</toc>
<toc>w3c-svg</toc>
<toc>w3c-uaag10</toc>
<toc>Ruby</toc>
<toc>Ruby</toc>
<toc>Ruby</toc>
<toc>opengl</toc>
<toc>ruby</toc>
<toc>sdl</toc>
<toc>stl</toc>
<toc>ada</toc>
<toc>clanlib</toc>
<toc>haskell</toc>
<toc>ada_bugs_gcc</toc>
<toc>bash_bugs</toc>
<toc>fortran_bugs_gcc</toc>
<toc>gtk_bugs</toc>
<toc>haskell_bugs_ghc</toc>
<toc>java_bugs_gcc</toc>
<toc>java_bugs_sun</toc>
<toc>php_bugs</toc>
<toc>pascal_bugs_fp</toc>
<toc>perl_bugs</toc>
<toc>python_bugs</toc>
<toc>ruby_bugs</toc>
<toc>wxwidgets_bugs</toc>
</ignoretocs>
<projectdoc>
<userdocDir>html/</userdocDir>
<apidocDir>apidocs/html/</apidocDir>
</projectdoc>
<ignoredocs/>
<ignoreqt_xml>
<toc>Guide to the Qt Translation Tools</toc>
<toc>Qt Assistant Manual</toc>
<toc>qmake User Guide</toc>
</ignoreqt_xml>
<ignorekdocs/>
<ignoredevhelp/>
<ignoredoxygen/>
</kdevdoctreeview>
<kdevautoproject>
<make>
<envvars>
<envvar value="1" name="WANT_AUTOCONF_2_5" />
<envvar value="1" name="WANT_AUTOMAKE_1_6" />
</envvars>
<abortonerror>true</abortonerror>
<numberofjobs>1</numberofjobs>
<dontact>false</dontact>
<makebin/>
</make>
<run>
<mainprogram/>
<programargs/>
<terminal>false</terminal>
<envvars/>
<autocompile>false</autocompile>
<directoryradio>build</directoryradio>
<customdirectory>/</customdirectory>
<runarguments>
<kdevassistant/>
<kdevelop/>
<kdevprofileeditor/>
</runarguments>
</run>
<general>
<projectmanagement>KDevCustomProject</projectmanagement>
<projectdirectory>/usr/src/kde3-HEAD/kdevelop</projectdirectory>
<absoluteprojectpath>true</absoluteprojectpath>
<useconfiguration>default</useconfiguration>
<activetarget>parts/annotation/libkdevannotation.la</activetarget>
</general>
<configurations>
<default>
<configargs>--enable-debug=full --prefix=/home/gremlin/kde3 --with-kdelibsdoxy-dir=/opt/kde3/share/doc/HTML/en/kdelibs-apidocs</configargs>
<topsourcedir/>
<cppflags/>
<ldflags/>
<ccompiler>kdevgccoptions</ccompiler>
<cxxcompiler>kdevgppoptions</cxxcompiler>
<f77compiler>kdevpgf77options</f77compiler>
<ccompilerbinary/>
<cxxcompilerbinary/>
<f77compilerbinary/>
<cflags/>
<cxxflags>-O0 -g3</cxxflags>
<f77flags/>
<envvars/>
</default>
</configurations>
<subclassing>
<subclass uifile="/parts/documentation/docglobalconfigwidgetbase.ui" sourcefile="/parts/documentation/docglobalconfigwidget.cpp" />
<subclass uifile="/parts/documentation/docglobalconfigwidgetbase.ui" sourcefile="/parts/documentation/docglobalconfigwidget.h" />
<subclass uifile="/parts/documentation/editcatalogdlgbase.ui" sourcefile="/parts/documentation/editcatalogdlg.cpp" />
<subclass uifile="/parts/documentation/editcatalogdlgbase.ui" sourcefile="/parts/documentation/editcatalogdlg.h" />
</subclassing>
</kdevautoproject>
<kdevfilecreate>
<filetypes>
<type icon="source_h" ext="h" create="template" name="C/C++ header" >
<descr>A new empty header file for C or C++.</descr>
</type>
<type icon="source_cpp" ext="cpp" create="template" name="C++ source" >
<descr>A new empty C++ file.</descr>
</type>
</filetypes>
<useglobaltypes>
<type ext="ui" />
</useglobaltypes>
</kdevfilecreate>
<cppsupportpart>
<codecompletion/>
<filetemplates>
<choosefiles>false</choosefiles>
<interfaceURL/>
<implementationURL/>
<interfacesuffix>.h</interfacesuffix>
<implementationsuffix>.cpp</implementationsuffix>
<lowercasefilenames>true</lowercasefilenames>
</filetemplates>
</cppsupportpart>
<kdevclassview>
<folderhierarchy>true</folderhierarchy>
<depthoffolders>2</depthoffolders>
</kdevclassview>
<kdevcppsupport>
<codecompletion>
<includeGlobalFunctions>true</includeGlobalFunctions>
<includeTypes>true</includeTypes>
<includeEnums>true</includeEnums>
<includeTypedefs>false</includeTypedefs>
<automaticCodeCompletion>true</automaticCodeCompletion>
<automaticArgumentsHint>true</automaticArgumentsHint>
<automaticHeaderCompletion>true</automaticHeaderCompletion>
<codeCompletionDelay>250</codeCompletionDelay>
<argumentsHintDelay>400</argumentsHintDelay>
<headerCompletionDelay>250</headerCompletionDelay>
</codecompletion>
<references>
<pcs>Qt</pcs>
<pcs>KDElibs</pcs>
</references>
<designerintegration>
<qtdesigner>
<implementation class="SelectTopic" path="/develop/kde/kdevelop/parts/documentation/selecttopicbase.ui" implementationpath="/develop/kde/kdevelop/parts/documentation/selecttopic.h" />
<implementation class="ProfileEditor" path="/develop/kde/kdevelop/src/profileengine/editor/profileeditorbase.ui" implementationpath="/develop/kde/kdevelop/src/profileengine/editor/profileeditor.h" />
</qtdesigner>
</designerintegration>
<creategettersetter>
<prefixGet/>
<prefixSet>set</prefixSet>
<prefixVariable>m_,_</prefixVariable>
<parameterName>theValue</parameterName>
<inlineGet>true</inlineGet>
<inlineSet>true</inlineSet>
</creategettersetter>
</kdevcppsupport>
<kdevcvsservice>
<recursivewhenupdate>true</recursivewhenupdate>
<prunedirswhenupdate>true</prunedirswhenupdate>
<createdirswhenupdate>true</createdirswhenupdate>
<recursivewhencommitremove>true</recursivewhencommitremove>
<revertoptions>-C</revertoptions>
</kdevcvsservice>
<kdevdebugger>
<general>
<projectmanagement>KDevCustomProject</projectmanagement>
<projectdirectory>/usr/src/kde3-HEAD/kdevelop</projectdirectory>
<absoluteprojectpath>true</absoluteprojectpath>
<programargs/>
<gdbpath/>
<dbgshell>libtool</dbgshell>
<configGdbScript/>
<runShellScript/>
<runGdbScript/>
<breakonloadinglibs>true</breakonloadinglibs>
<separatetty>false</separatetty>
<floatingtoolbar>false</floatingtoolbar>
</general>
<display>
<staticmembers>false</staticmembers>
<demanglenames>true</demanglenames>
<outputradix>10</outputradix>
</display>
</kdevdebugger>
<kdevdocumentation>
<projectdoc>
<docsystem/>
<docurl/>
<usermanualurl>help:/kdevelop</usermanualurl>
</projectdoc>
</kdevdocumentation>
</kdevelop>
add_subdirectory(settings)
include_directories( ${CMAKE_SOURCE_DIR}/lib )
......@@ -37,6 +39,8 @@ set(kdevinterfaces_LIB_SRCS
kdevprofileengine.cpp
kdevcmodule.cpp
kdevconfigskeleton.cpp
kdevenv.cpp
kdevconfig.cpp
)
kde4_automoc(${kdevinterfaces_LIB_SRCS})
......@@ -82,6 +86,8 @@ install(FILES
kdevprofileengine.h
kdevcmodule.h
kdevconfigskeleton.h
kdevenv.h
kdevconfig.h
kdevsharedptr.h
DESTINATION ${INCLUDE_INSTALL_DIR}/kdevelop/interfaces
)
......
......@@ -47,16 +47,18 @@ QString FileTemplate::read(const QString &name, Policy p)
QString FileTemplate::readFile(const KUrl &fileName)
{
QDomDocument* dom = KDevApi::self()->projectDom();
Q_ASSERT(dom);
QFile f(fileName.path());
if (!f.open(QIODevice::ReadOnly))
return QString();
QTextStream stream(&f);
QString str = stream.readAll();
return makeSubstitutions( *dom, str );
//FIXME
// QDomDocument* dom = KDevApi::self()->projectDom();