woboq / verdigris

Qt without moc: set of macros to use Qt without needing moc
https://woboq.com/blog/verdigris-qt-without-moc.html
GNU Lesser General Public License v3.0
638 stars 58 forks source link

Simplifications and Speed Improvements #66

Closed arBmind closed 5 years ago

arBmind commented 5 years ago

This is based on #59 and adds C++14 variants where necessary.

Status:

Suggestions are welcome!

arBmind commented 5 years ago

It seems that qmake + clang generates crashes. I have currently have no tools to debug this further.

arBmind commented 5 years ago

It seems like Gcc 5 can no longer be supported. This compiler is too eager to decay an array to just a pointer. Everything else seems to run well. Including Qt5.5.

ogoffart commented 5 years ago

Great job. This feels a lot like a complete rewrite :-) I haven't had time to carefully the change and i would like to test them if they work fine for me.

I guess it is OK to drop GCC 5 altough i'm curious what exactly does not work and if it is not possible to work around.

arBmind commented 5 years ago

It's not a complete rewrite but collection of quite some incremental improvements and refactoring.

Here is a Godbolt version of the GCC 5 issue: https://godbolt.org/z/grB7G5 We might try to work around this by turning the RawArray into an OwnArray before assigning it to the holder. The question is, if it is worth the effort to support such an old compiler.

I hope you can review and pull it!

ogoffart commented 5 years ago

In the godbold, using return Holder{ {a.strings} }; fixes it