New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support older Qt versions, down to 5.6 #123
Conversation
|
A bit offtopic - where one can read how to use this fork for SFOS development? I've been waiting a long time for Jolla to upgrade Qt, but this might not happen soon and I have an app to rewrite. :) |
You happen to be on IRC or Matrix? We can discuss this further on #whisperfish:rubdos.be or freenode #whisperfish if you want. There are more people interested in SFOS+Rust than I imagined before. I've been using it for Whisperfish, which is nearing beta release. You can read how it's done there, but it's currently extremely ugly (and it doesn't work in the official SDK, so I use some... workarounds). Its ugliness is partially resolved by this PR ;-) |
|
Unfortunately IRC and Matrix are not among my channels, I'm using almost everything else. :) I'll consider Matrix. |
Feel free to send an email, get in contact on the Sailfish forum, or use the fork's issue tracker at https://gitlab.com/rubdos/qmetaobject-sfos-rs/-/issues/, or Twitter, or ... anything really :-) |
239d290
to
5419d84
Compare
|
Guarding C++ code with |
|
looks good to me. Could you rebase? |
- Inheritance checking is only introduced in Qt5.7 - Add a qmeta_inherits method for Qt < 5.7
cpp_build cannot correctly read `cfg(qt_5_x)` decorators, so we have to guard the types and calls in another way in C++.
done. I still have some other Sailfish related issues, but I'll do them separate. |
|
thanks! |
|
Seems that my Travis addon points to some other problem, cfr. https://travis-ci.org/github/woboq/qmetaobject-rs/jobs/743931414 diff --git a/qmetaobject/tests/tests.rs b/qmetaobject/tests/tests.rs
index d1a8d9b..8b0acfa 100644
--- a/qmetaobject/tests/tests.rs
+++ b/qmetaobject/tests/tests.rs
@@ -720,6 +720,7 @@ struct MyEnumObject {
base: qt_base_class!(trait QObject),
}
+#[cfg(qt_5_7)]
#[test]
fn enum_properties() {
qml_register_enum::<MyEnum>(should do it. |
Hi!
I know 5.6 is kinda old (an LTS that has known life from 2016-03-16 until 2019-03-16), but this is still what SailfishOS uses, and will probably be that for a while, until they switch to 5.12 (or hopefully something even more recent).
With the eye on keeping the difference between my qmetaobject-sfos-rs fork and your upstream as small as possible, I'd like to introduce
cfgflags on all functionality between 5.6 and 5.most-recent. This should not impact upstream, but should provide me with a way more maintainable set of patches.I hope this is alright for you folks! If it is, I will start adding the relevant
cfgflags to allstructs and methods that require them.TODO:
git rebase --autosquash