KDevelop's QMake Manager

Andreas Pakulat apaku at gmx.de
Sun Nov 19 16:26:13 UTC 2006


On 19.11.06 09:08:49, Steven T. Hatton wrote:
> On Sunday 19 November 2006 06:35, Andreas Pakulat wrote:
> > On 19.11.06 05:25:35, Steven T. Hatton wrote:
> 
> > You can't use KTextEditor::Editor from Qt4 programs, thats still KDE3
> > then.
> 
> It's in my includes 
>  rpm -q --whatprovides /opt/kde3/include/ktexteditor/editor.h
> kdelibs3-devel-3.5.5-19.1

What I was saying is that you can't mix KDE3/Qt3 with Qt4 programs. They
won't work together.

> > > for line in $(rpm -ql qt-qt3support-4.1.2-2 qt-devel-4.1.2 qt-4.1.2); do
> > > \ echo ${line%/*}; done | grep -v mkspecs/|sort| uniq
> > > /usr/bin
> > > /usr/include
> > > /usr/include/Qt
> >
> > Ok, then you should provide "/usr" as your Qt directory. That will work.
> 
> It didn't laugh at me when I tried, and "Hello from Qt 4" app compiled.  I no 
> longer have a pressing need for using the stock Qt, but it's nice to know how 
> to deal with the issue.

I changed that a bit more, because SuSE and Gentoo have very different
ideas about where to put Qt stuff, than Debian...

> > > > If SuSE doesn't provide that please tell me, then we need to think
> > > > about a different solution.
> > >
> > > This is very similar to the problem I have with wanting to structure my
> > > programs with header, implementation, and .pro files in different
> > > directories.
> >
> > But that should work with 3.4, doesn't it?
> 
> That depends what you mean.  I could /make/ it work with the previous 
> incarnation of QMakeManager, but it was not consistent with the KDevelop 
> features such as the class wizard.  I haven't tried very hard with the latest 
> build.  I just tried to create a header file in ../include relative to the 
> src directory, and it didn't complain. Shift+F11 works, so one big problem is 
> solved.  I'll have to study the problem a bit more before I determine what 
> the limitations are.  The way I do things by hand is to organize my files 
> according to namespace, where each namespace has its own src/namespace 
> include/namespace and build/namespace.  The .pro files and all the Makefile, 
> moc_* and .o files go in the build/namespace directory.  I use #include 
> <header> rather than #include "../include/namespace/header.h".  

The qmake manager should handle anything qmake itself can. In fact we
can nearly completely read and handle the Qt4 buildsystem itself (and
that uses a couple of qmake hacks and undocumented features). So if you
find anything that doesn't work, please send a bugreport to
bugs.kde.org.

> I also do the Qt4 trick of wrapping the .h file in a file with no filename 
> extension. I don't particularly like the idea, but it seems to be the 
> prevailing trend.  Which raises still another issue.  OSG doesn't have any .h 
> files.  They simply put the interface code in a file without a filename 
> extension. That makes it difficult to build the PCS database, and KDevelop 
> doesn't recognize the file as C++.

Hmm, kdevelop3.4's class database creator parses STL here perfectly
(which also uses files without .h endings) and as long as the project
mananger knows about the headers-without-suffix the code completion
should work on it too.

Andreas

-- 
Beware of a tall blond man with one black shoe.




More information about the KDevelop-devel mailing list