D26368: Add an is<PropertyName>Immutable to know if a property is immutable

Méven Car noreply at phabricator.kde.org
Wed Jan 29 15:05:29 GMT 2020


meven added a comment.


  In D26368#602498 <https://phabricator.kde.org/D26368#602498>, @tcanabrava wrote:
  
  > I like it, but considering that this adds a new method, I'd like to see it exposed to Qml too o the generated code if GenerateProperties is set to true, currently we write this kind of code in Qml:
  >
  >             enabled: !kcm.balooSettings.isImmutable("indexingEnabled")
  >   
  >   something in the lines of `settings.indexingEnabledIsImmutable` would be of great help.
  >   
  
  
  That's what I had in mind. I am missing the `Q_INVOKABLE`, will add.
  
  > (I would go further and try to add a class for each property with a .isImmutable, .name, .value and so on but this is out of scope and *maybe* only for KF6.)
  
  Let's see what Qt 6 reserves. That'd be very nice, quite expressive.

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D26368

To: meven, ervin, #frameworks
Cc: dfaure, tcanabrava, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200129/877ce939/attachment.html>


More information about the Kde-frameworks-devel mailing list