Giter Site home page Giter Site logo

Qt 5.14 errors about qt5.cr HOT 12 OPEN

papierkorb avatar papierkorb commented on July 19, 2024
Qt 5.14 errors

from qt5.cr.

Comments (12)

docelic avatar docelic commented on July 19, 2024 2

Hey how about we just rename newer and older to newer_or and older_or before this gets used in practice?
This small rename could better capture the inclusion of equal (">="/"<="), and also it would not clash with possible future addition of real newer/older which does not imply the "=".

from qt5.cr.

ZaWertun avatar ZaWertun commented on July 19, 2024 1

@ZaWertun Yeah that would be the ideal addition. The syntax I chose is X_(is|isnt|match)_Y to be as readable as possible (Without the reader scouring some docs on that syntax). Maybe there's a syntax possible in that vein like X_olderthan_Y.
Why it's not there yet? I guess I didn't need it, can't remember really.

Maybe just call it newer / older? (newer_or_equals / older_or_equals)

from qt5.cr.

ZaWertun avatar ZaWertun commented on July 19, 2024

To fix this you has to modify config/enums.yml, like in this commit that fixes build for Qt-5.13:
ZaWertun@87b1471.
See that I've added mappings for QGradient::Preset and QAbstractSpinBox::StepType.

from qt5.cr.

ZaWertun avatar ZaWertun commented on July 19, 2024

I'll try to fix this and make PR.

from qt5.cr.

docelic avatar docelic commented on July 19, 2024

Hey, sure, just listed it here due to a question in #20. I already added some, but will wait for your PR then not to duplicate effort. Thanks!

from qt5.cr.

docelic avatar docelic commented on July 19, 2024

@ZaWertun speaking of which, are you aware of a way to add entries depending on version? From what I see here, once we add e.g. new enum entries, older versions no longer build, erroring out with:

Enum doesn't have any constants at <enum name>

from qt5.cr.

ZaWertun avatar ZaWertun commented on July 19, 2024

@ZaWertun speaking of which, are you aware of a way to add entries depending on version? From what I see here, once we add e.g. new enum entries, older versions no longer build, erroring out with:

Enum doesn't have any constants at <enum name>

Didn't think about it. I think we need some enum mappings defined only in Qt >= 5.13 for example.
Could it be done in current bindgen version?

from qt5.cr.

ZaWertun avatar ZaWertun commented on July 19, 2024

@ZaWertun speaking of which, are you aware of a way to add entries depending on version? From what I see here, once we add e.g. new enum entries, older versions no longer build, erroring out with:

Enum doesn't have any constants at <enum name>

Or maybe that check is wrong...

from qt5.cr.

docelic avatar docelic commented on July 19, 2024

I think we need some enum mappings defined only in Qt >= 5.13 for example.
Could it be done in current bindgen version?

I did a quick search and didn't find an example of it. It seems that if_* can only compare against strings and regexes.
I also wonder how Stefan was able to generate bindings for those 4 or 5 Qt versions without needing this feature.

from qt5.cr.

ZaWertun avatar ZaWertun commented on July 19, 2024

I think we need some enum mappings defined only in Qt >= 5.13 for example.
Could it be done in current bindgen version?

I did a quick search and didn't find an example of it. It seems that if_* can only compare against strings and regexes.
I also wonder how Stefan was able to generate bindings for those 4 or 5 Qt versions without needing this feature.

Maybe we need something like this conditions syntax in YML files for bindgen:

  • version_gte - version >= given (string param must be parsed with Bindgen::FindPath::GenericVersion);
  • version_lte - version <= given;
    Maybe same for version_gt (>) + version_lt (<).

from qt5.cr.

Papierkorb avatar Papierkorb commented on July 19, 2024

@ZaWertun Yeah that would be the ideal addition. The syntax I chose is X_(is|isnt|match)_Y to be as readable as possible (Without the reader scouring some docs on that syntax). Maybe there's a syntax possible in that vein like X_olderthan_Y.
Why it's not there yet? I guess I didn't need it, can't remember really.

from qt5.cr.

ZaWertun avatar ZaWertun commented on July 19, 2024

Hey how about we just rename newer and older to newer_or and older_or before this gets used in practice?
This small rename could better capture the inclusion of equal (">="/"<="), and also it would not clash with possible future addition of real newer/older which does not imply the "=".

Looks good.

from qt5.cr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.