kdelibs/win32 : kdecore patch

Harri Porten porten at froglogic.com
Wed Sep 8 07:15:25 BST 2004


Hi,

On Tue, 7 Sep 2004, Holger Schroeder wrote:

> > -#if defined Q_WS_X11 && ! defined K_WS_QTONLY
> > +#if (defined Q_WS_X11 || defined Q_WS_WIN) && ! defined K_WS_QTONLY
> >  #include <kstartupinfo.h>
> >  #endif
[...]
> when kde will run under x11/windows/mac os, this K_WS_QTONLY will not be
> needed any more, that is right. my intention when i introduced it was, that i
> wanted to be able to have a kde that was only dependant on qt and not on x11.

There is no way to port KDE to be the mythical "Qt only"! There are
several places where you need to access system libraries. And on e.g.
Linux these will be sometimes Unix or X11 specific functions. On Windows
and Mac these will be calls to the respective libraries.

I also think that those #ifdefs are sometimes placed at strategically
suboptimal points. Instead of disabling all those places *using* a class
it's better to make the changes to the class itself. Either by writing a
new (possibly dummy) class or putting #ifdefs into the implementation of
the original class.

Frankly, I don't see the purpose of K_WS_QTONLY. What's needed are WS
specific directives for X11, Win, Mac and QWS.

Harri.





More information about the kde-core-devel mailing list