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

Martijn Klingens klingens at kde.org
Mon Jan 20 19:23:35 GMT 2003


On Monday 20 January 2003 20:03, Harri Porten wrote:
> On Mon, 20 Jan 2003, Martijn Klingens wrote:
> > But that looks like a horrible hack :(
>
> I haven't followed the previous discussion but won't this be a non-issue
> in the future ?

>From 3.1 onwards, sure. But we have no plans to drop 3.0 support yet and I 
think Kopete isn't the only project.

All relevant parts of the discussion are in the mail btw, I added the original 
quote from Tim Bates that was cut somewhere, so it is complete again.

> > 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.
>
> If time had permitted Qt had such a macro, too :) And it still might come.
> Using the hex number was just a first step. It's still ugly to expose it.

Hmm, it's uglier to break source compat. Normally you #ifdef out stuff that's 
source incompatible, but in this very case it's the #ifdef itself that causes 
the breakage...

I'd have voted for KDE_IS_VERSION for 3.1+ projects, but a possibility to fall 
back to BCD notation for projects that also support 3.0.

Anyway, I'll add the hack Dirk proposed then :(

-- 
Martijn



More information about the kde-core-devel mailing list