[osg-users] osgQt versioning problem

Jannik Heller scrawl at baseoftrash.de
Fri Jun 12 12:31:37 PDT 2015


Hi Robert,

that's certainly an option, and it seems like the option that would place the least burden on developers. I like the idea.

Counting the lines of code in osgQt we have just under 2000 lines in implementation files, having that much code in headers shouldn't be too much of a problem.


> 
> I don't know how feasible it is, it'd require us to automatically select between Qt4 and Qt4 based in someway.  Perhaps an osgQT/QT4 and osgQT/QT5 headers could include all the appropriate parts required, and then have 3rd party apps include which one they want, and have these set defines to select the different paths.
> 

Not even that is necessary, I think. The osgQt headers already have #if QT_VERSION_CHECK(...) macros to select the appropriate code. Users would be able to #include < osgQt/... > and automatically get the correct code for the Qt version that their application is using.

It's a bit more work though to move that much code around, so for now I'm submitting the osgQt/Version fix. We can undo it later if the better fix comes around.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64078#64078








More information about the osg-users mailing list