KDE_IS_VERSION and downwards compatibility (Re: Miscellaneous warnings and errors during CVS compile)

Martijn Klingens klingens at kde.org
Mon Jan 20 19:02:42 GMT 2003


On Monday 20 January 2003 15:44, Dirk Mueller wrote:
> On Mon, 20 Jan 2003, Martijn Klingens wrote:
> > On Monday 20 January 2003 03:27, Tim Bates wrote:
> > > Can't compile the latest CVS because of this error:
> > >
> > > msnnotifysocket.cpp:357: parse error
> > > make[5]: *** [msnnotifysocket.lo] Error 1
> >
> > ----
> > #if defined(KDE_IS_VERSION) && KDE_IS_VERSION(3,1,90)
> > 		KRun::runURL( tmpFile.name(), "text/html", true );
> > #else
> > 		KRun::runURL( tmpFile.name(), "text/html" );
> > #endif
> > ----
> >
> > Dirk: this is using KDE 3.0/Qt 3.0. Are you sure this is going to work ok?
> > It almost seems like gcc wants to expand the macro regardless of whether
> > it is defined or not.
> >
> > If that's true, it would render the KDE_IS_VERSION macro almost useless
> > for apps requiring to build against older KDE versions.
>
> then try
>
> #ifndef KDE_IS_VERSION
> #define KDE_IS_VERSION 0
> #endif
>
> in a useful place.

But that looks like a horrible hack :(

Why not follow the scheme the Trolls use, i.e. use binary coded decimals?

#if KDE_VERSION < 0x030190

is completely downwards-compatible and saves us from the KDE_IS_VERSION 
kludge.

-- 
Martijn



More information about the kde-core-devel mailing list