[Development] New property system

Thiago Macieira thiago.macieira at intel.com
Mon Aug 31 06:17:11 CEST 2020


On Wednesday, 26 August 2020 00:18:49 PDT Lars Knoll wrote:
> To summarise the advantages of the redesigned system:
> 
> * Very little memory overhead if bindings aren’t used
> * Very low runtime overhead if bindings aren’t used
> * Binding support can be added to properties in QObjects in a binary
> compatible way * Straight forward extension of the existing and known
> property system * Much easier to port existing properties
> 
> https://codereview.qt-project.org/c/qt/qtbase/+/310748 is also the end of
> the patch series that does implement the required infrastructure. It’s
> still lacking a bit of documentation, but the series is now pretty clean
> and should be in a good state for reviewing.

Hello Lars

Thank you for the work. I appreciate removing the dependency on 
[[no_unique_address]], which we're still not completely sure the implications 
of, for now. By the way, this re-allows GCC 7 and 8 in the for Qt 6.

But I'm still confused as to what the API should be. In your submission above, 
we see:

     int currentTime() const;
+    QBindable<int> bindableCurrentTime();
     int currentLoopTime() const;

Is this what the API is expected to be for new APIs? Or is it only for 
compatibility?

If it's only for compatibility, what should one write in the Q_PROPERTY header 
for new properties?

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering





More information about the Development mailing list