ubports / ubuntu-ui-toolkit

Moved to https://gitlab.com/ubports/core/lomiri-ui-toolkit
https://gitlab.com/ubports/core/lomiri-ui-toolkit
GNU Lesser General Public License v3.0
13 stars 21 forks source link

Make it compile with Qt 5.12 #29

Closed z3ntu closed 4 years ago

z3ntu commented 5 years ago

@zsombi That's because the CI doesn't compile it against Qt 5.12...

dobey commented 5 years ago

@zsombi That's because the CI doesn't compile it against Qt 5.12...

You need to keep the code buildable against 5.9 as well. Please update your changes so it can build against both.

z3ntu commented 5 years ago

I don't think this will be possible except either duplicating the file and choosing the one for the build Qt version in the build system or using tons of #ifdef macros

zsombi commented 5 years ago

I don't think this will be possible except either duplicating the file and choosing the one for the build Qt version in the build system or using tons of #ifdef macros

You can move the differences in separate files and pick the proper ones from the .pro file. Lot cleaner than having a bunch of ifdefs...

dobey commented 5 years ago

Or another option could be to simply define the type in the header file with a single #if/#else block as a macro, then use the macro in the code, as this seems to be only changing a single type from a pointer to a templated reference type for the same pointer type.

z3ntu commented 5 years ago

@patrickathompson For Qt 5.13 having this additional commit should work: https://github.com/z3ntu/ubuntu-ui-toolkit/commit/ab542b01f461951dd732d8eb1bdb4bf5df4eea6e

vanyasem commented 4 years ago

@z3ntu can confirm that this commit makes it compile with Qt5.13

mariogrip commented 4 years ago

Made this: https://github.com/ubports/ubuntu-ui-toolkit/pull/61

@zsombi: If you have time, please review there also :)

z3ntu commented 4 years ago

Closing in favor of #61 , many thanks to @mariogrip for pushing this forward!