Comments (12)
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 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 likeX_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.
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.
I'll try to fix this and make PR.
from qt5.cr.
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.
@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 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 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.
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.
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 forversion_gt
(>) +version_lt
(<).
from qt5.cr.
@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.
Hey how about we just rename
newer
andolder
tonewer_or
andolder_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 realnewer
/older
which does not imply the "=".
Looks good.
from qt5.cr.
Related Issues (20)
- On FreeBSD : require "./qt5/binding" qmake: could not find a Qt installation of '5'
- "Generated on #{Time.now}" error when compiling project using qt5.cr HOT 3
- random invalid memory access HOT 4
- Renewed maintenance of qt5.cr HOT 10
- Building Qt 5.12 bindings on Debian 9 HOT 1
- Qt signal handlers are not using type converters HOT 1
- Instructions for new binding versions give error/5.11 does't work on Debian HOT 2
- Archive download locations differ based on versions for generate_bindings HOT 1
- Crystal 1.0.0-dev breaks several QGraphicsItem subclasses
- Marshalling polymorphic Crystal wrappers in QObject HOT 3
- QStringList not mapped HOT 1
- SEGV in operator delete() after DeferredDelete event HOT 1
- Undefined method 'mapping' for YAML:Module HOT 10
- Crystal 1.2 issue HOT 3
- GC frees objects and signal handlers HOT 17
- --ldflags: command not found HOT 2
- Problem to regenerate a specific qt5 binding HOT 3
- Problems with Macs os m1 platform HOT 1
- Build error -- missing method in YAML HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qt5.cr.