Open msc94 opened 6 years ago
Just by looking at it, I like the removal of all the Q_UNUSED
statements. @ChipmunkV designed the GUI, so he should be more competent to decide about good design and potential problems here.
Yes, I always wondered why in the code examples there are type registrations in main()
.
I'd rather not bundle them. Bundling makes harder to find out "why my type doesn't work". It also mixes game-specific and non-game-specific types. If doing Q_COREAPP_STARTUP_FUNCTION
separately for each of them works - then perfect.
Actually, there are a lot of questions and discussions around the problems with the self-registering types in C++, it's not a particularly exciting topic.
Hello,
since I haven't got the debug build on windows to run successfully, but wanted to fix some test I just tried disabling the Optimizations on libopenage for some smoother debugging experience.
I got a
ACCESS_VIOLATION
crash when I tried that on the functionqmlRegisterTypes<>
. I probably ran into the same problem these guys have: https://github.com/benlau/quickflux/issues/7 and did the same thing to fix the problem as they did. I bundled all the global static calls and wrapped them aroundQ_COREAPP_STARTUP_FUNCTION
so they are called afterQCoreApplication
has been initialized.You can see my progress there: https://github.com/schnema123/openage/commit/25bde24e278fbe6ee6588131f9a03fa7343c5afb
Could there be any problems on linux with this setup?
Greetings