brewtarget-devs team mailing list archive
Mailing list archive
brewtarget and qt5
I started just toying with this earlier today. As the docs promised, it was
easy enough and I know have something that compiles and runs against Qt5.
If you want to play, it is on gitorious in my clone (git://
gitorious.org/brewtarget/mikfires-brewtarget.git) as feature/qt5.
It builds for both Qt4 and Qt5. Run ./configure -q ON to build for Qt5. I
have only tested this on Kubuntu 14.04 but did everything through cmake. It
should just sort of work anywhere. If it doesn't, I would love to know.
I know the tests only work for Qt4 right now. They changed the cmake stuff
and I just didn't have the brain power to go chasing the proper invocation
for the tests, so I effectively ifdef'd it.
I am not certain about the translations. It is done different in Qt5, and I
think I did it properly but I don't really know how to test.
I have had to add a few #ifdefs, but not that many. The Q_WS_* macros no
longer exist in Qt5, so I had to reorder about three places in
brewtarget.cpp to use Q_OS instead. The uncomfortable part is that there is
no easy Q_OS_LINUX that I could find, so I've had to invert the logic of
the tests. I also had to remove a few methods that were deprecated in 4.6
and removed somewhere in Qt5.
There are likely a hundred little bugs. I'm noticing things are much more
sensitive and generally unhappy w/ forward class declarations (see the
fourth link, the section titled "Missing Q_OBJECT macros and metatype
cleanup"). I need to find all the places we do those and make sure things
work. Nothing catastrophic, but lots of complaints about not being able to
read undeclared types.
Some good resources:
In a world of ninja v. pirate, I pilot a Gundam