D26368: Add an isImmutable to know if a property is immutable

2020-02-04 Thread Méven Car
This revision was automatically updated to reflect the committed changes.
Closed by commit R237:d46739294d04: Add an isPropertyNameImmutable to 
know if a property is immutable (authored by meven).

REPOSITORY
  R237 KConfig

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26368?vs=74589=75001

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

AFFECTED FILES
  autotests/kconfig_compiler/test1.h.ref
  autotests/kconfig_compiler/test10.h.ref
  autotests/kconfig_compiler/test11.h.ref
  autotests/kconfig_compiler/test11a.h.ref
  autotests/kconfig_compiler/test12.h.ref
  autotests/kconfig_compiler/test13.h.ref
  autotests/kconfig_compiler/test2.h.ref
  autotests/kconfig_compiler/test3.h.ref
  autotests/kconfig_compiler/test3a.h.ref
  autotests/kconfig_compiler/test4.h.ref
  autotests/kconfig_compiler/test5.h.ref
  autotests/kconfig_compiler/test6.h.ref
  autotests/kconfig_compiler/test7.h.ref
  autotests/kconfig_compiler/test8a.h.ref
  autotests/kconfig_compiler/test8b.h.ref
  autotests/kconfig_compiler/test8c.h.ref
  autotests/kconfig_compiler/test9.h.ref
  autotests/kconfig_compiler/test_dpointer.cpp.ref
  autotests/kconfig_compiler/test_dpointer.h.ref
  autotests/kconfig_compiler/test_notifiers.h.ref
  autotests/kconfig_compiler/test_qdebugcategory.h.ref
  autotests/kconfig_compiler/test_signal.h.ref
  autotests/kconfig_compiler/test_translation_kde.h.ref
  autotests/kconfig_compiler/test_translation_kde_domain.h.ref
  autotests/kconfig_compiler/test_translation_qt.h.ref
  src/kconfig_compiler/KConfigCodeGeneratorBase.cpp
  src/kconfig_compiler/KConfigCodeGeneratorBase.h
  src/kconfig_compiler/KConfigCommonStructs.h
  src/kconfig_compiler/KConfigHeaderGenerator.cpp
  src/kconfig_compiler/KConfigHeaderGenerator.h
  src/kconfig_compiler/KConfigSourceGenerator.cpp
  src/kconfig_compiler/KConfigSourceGenerator.h
  src/kconfig_compiler/kconfig_compiler.cpp

To: meven, ervin, #frameworks, dfaure
Cc: dfaure, tcanabrava, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
ngraham, bruns


D26368: Add an isImmutable to know if a property is immutable

2020-02-03 Thread Méven Car
meven added a reviewer: dfaure.

REPOSITORY
  R237 KConfig

BRANCH
  arcpatch-D26368

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

To: meven, ervin, #frameworks, dfaure
Cc: dfaure, tcanabrava, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
ngraham, bruns


D26368: Add an isImmutable to know if a property is immutable

2020-01-31 Thread Kevin Ottens
ervin accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R237 KConfig

BRANCH
  arcpatch-D26368

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

To: meven, ervin, #frameworks
Cc: dfaure, tcanabrava, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
ngraham, bruns


D26368: Add an isImmutable to know if a property is immutable

2020-01-29 Thread Tomaz Canabrava
tcanabrava added a comment.


  it's a +1 for me. @dfaure and @ervin ?

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


D26368: Add an isImmutable to know if a property is immutable

2020-01-29 Thread Méven Car
meven updated this revision to Diff 74589.
meven added a comment.


  Make isImmutable function constant PROPERTY when generateProperties is passed

REPOSITORY
  R237 KConfig

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26368?vs=74582=74589

BRANCH
  arcpatch-D26368

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

AFFECTED FILES
  autotests/kconfig_compiler/test1.h.ref
  autotests/kconfig_compiler/test10.h.ref
  autotests/kconfig_compiler/test11.h.ref
  autotests/kconfig_compiler/test11a.h.ref
  autotests/kconfig_compiler/test12.h.ref
  autotests/kconfig_compiler/test13.h.ref
  autotests/kconfig_compiler/test2.h.ref
  autotests/kconfig_compiler/test3.h.ref
  autotests/kconfig_compiler/test3a.h.ref
  autotests/kconfig_compiler/test4.h.ref
  autotests/kconfig_compiler/test5.h.ref
  autotests/kconfig_compiler/test6.h.ref
  autotests/kconfig_compiler/test7.h.ref
  autotests/kconfig_compiler/test8a.h.ref
  autotests/kconfig_compiler/test8b.h.ref
  autotests/kconfig_compiler/test8c.h.ref
  autotests/kconfig_compiler/test9.h.ref
  autotests/kconfig_compiler/test_dpointer.cpp.ref
  autotests/kconfig_compiler/test_dpointer.h.ref
  autotests/kconfig_compiler/test_notifiers.h.ref
  autotests/kconfig_compiler/test_qdebugcategory.h.ref
  autotests/kconfig_compiler/test_signal.h.ref
  autotests/kconfig_compiler/test_translation_kde.h.ref
  autotests/kconfig_compiler/test_translation_kde_domain.h.ref
  autotests/kconfig_compiler/test_translation_qt.h.ref
  src/kconfig_compiler/KConfigCodeGeneratorBase.cpp
  src/kconfig_compiler/KConfigCodeGeneratorBase.h
  src/kconfig_compiler/KConfigCommonStructs.h
  src/kconfig_compiler/KConfigHeaderGenerator.cpp
  src/kconfig_compiler/KConfigHeaderGenerator.h
  src/kconfig_compiler/KConfigSourceGenerator.cpp
  src/kconfig_compiler/KConfigSourceGenerator.h
  src/kconfig_compiler/kconfig_compiler.cpp

To: meven, ervin, #frameworks
Cc: dfaure, tcanabrava, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
ngraham, bruns


D26368: Add an isImmutable to know if a property is immutable

2020-01-29 Thread Méven Car
meven updated this revision to Diff 74582.
meven added a comment.


  Allow the isImmutable to be invokable from Qml when generateProperties is set

REPOSITORY
  R237 KConfig

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26368?vs=74563=74582

BRANCH
  arcpatch-D26368

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

AFFECTED FILES
  autotests/kconfig_compiler/test1.h.ref
  autotests/kconfig_compiler/test10.h.ref
  autotests/kconfig_compiler/test11.h.ref
  autotests/kconfig_compiler/test11a.h.ref
  autotests/kconfig_compiler/test12.h.ref
  autotests/kconfig_compiler/test13.h.ref
  autotests/kconfig_compiler/test2.h.ref
  autotests/kconfig_compiler/test3.h.ref
  autotests/kconfig_compiler/test3a.h.ref
  autotests/kconfig_compiler/test4.h.ref
  autotests/kconfig_compiler/test5.h.ref
  autotests/kconfig_compiler/test6.h.ref
  autotests/kconfig_compiler/test7.h.ref
  autotests/kconfig_compiler/test8a.h.ref
  autotests/kconfig_compiler/test8b.h.ref
  autotests/kconfig_compiler/test8c.h.ref
  autotests/kconfig_compiler/test9.h.ref
  autotests/kconfig_compiler/test_dpointer.cpp.ref
  autotests/kconfig_compiler/test_dpointer.h.ref
  autotests/kconfig_compiler/test_notifiers.h.ref
  autotests/kconfig_compiler/test_qdebugcategory.h.ref
  autotests/kconfig_compiler/test_signal.h.ref
  autotests/kconfig_compiler/test_translation_kde.h.ref
  autotests/kconfig_compiler/test_translation_kde_domain.h.ref
  autotests/kconfig_compiler/test_translation_qt.h.ref
  src/kconfig_compiler/KConfigCodeGeneratorBase.cpp
  src/kconfig_compiler/KConfigCodeGeneratorBase.h
  src/kconfig_compiler/KConfigCommonStructs.h
  src/kconfig_compiler/KConfigHeaderGenerator.cpp
  src/kconfig_compiler/KConfigHeaderGenerator.h
  src/kconfig_compiler/KConfigSourceGenerator.cpp
  src/kconfig_compiler/KConfigSourceGenerator.h
  src/kconfig_compiler/kconfig_compiler.cpp

To: meven, ervin, #frameworks
Cc: dfaure, tcanabrava, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
ngraham, bruns


D26368: Add an isImmutable to know if a property is immutable

2020-01-29 Thread Méven Car
meven added a comment.


  In 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


D26368: Add an isImmutable to know if a property is immutable

2020-01-29 Thread Tomaz Canabrava
tcanabrava added a comment.


  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.
  
  (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.)

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


D26368: Add an isImmutable to know if a property is immutable

2020-01-29 Thread Kevin Ottens
ervin added subscribers: tcanabrava, dfaure.
ervin added a comment.


  LGTM but lets' wait for a second pair of eyes. Mines are definitely not sharp 
today. :-)
  
  @tcanabrava @dfaure, opinions?

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


D26368: Add an isImmutable to know if a property is immutable

2020-01-29 Thread Méven Car
meven updated this revision to Diff 74563.
meven added a comment.


  Clean unnecessary files

REPOSITORY
  R237 KConfig

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26368?vs=74561=74563

BRANCH
  arcpatch-D26368

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

AFFECTED FILES
  autotests/kconfig_compiler/test1.h.ref
  autotests/kconfig_compiler/test10.h.ref
  autotests/kconfig_compiler/test11.h.ref
  autotests/kconfig_compiler/test11a.h.ref
  autotests/kconfig_compiler/test12.h.ref
  autotests/kconfig_compiler/test13.h.ref
  autotests/kconfig_compiler/test2.h.ref
  autotests/kconfig_compiler/test3.h.ref
  autotests/kconfig_compiler/test3a.h.ref
  autotests/kconfig_compiler/test4.h.ref
  autotests/kconfig_compiler/test5.h.ref
  autotests/kconfig_compiler/test6.h.ref
  autotests/kconfig_compiler/test7.h.ref
  autotests/kconfig_compiler/test8a.h.ref
  autotests/kconfig_compiler/test8b.h.ref
  autotests/kconfig_compiler/test8c.h.ref
  autotests/kconfig_compiler/test9.h.ref
  autotests/kconfig_compiler/test_dpointer.cpp.ref
  autotests/kconfig_compiler/test_dpointer.h.ref
  autotests/kconfig_compiler/test_notifiers.h.ref
  autotests/kconfig_compiler/test_qdebugcategory.h.ref
  autotests/kconfig_compiler/test_signal.h.ref
  autotests/kconfig_compiler/test_translation_kde.h.ref
  autotests/kconfig_compiler/test_translation_kde_domain.h.ref
  autotests/kconfig_compiler/test_translation_qt.h.ref
  src/kconfig_compiler/KConfigCodeGeneratorBase.cpp
  src/kconfig_compiler/KConfigCodeGeneratorBase.h
  src/kconfig_compiler/KConfigCommonStructs.h
  src/kconfig_compiler/KConfigHeaderGenerator.cpp
  src/kconfig_compiler/KConfigHeaderGenerator.h
  src/kconfig_compiler/KConfigSourceGenerator.cpp
  src/kconfig_compiler/KConfigSourceGenerator.h
  src/kconfig_compiler/kconfig_compiler.cpp

To: meven, ervin, #frameworks
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26368: Add an isImmutable to know if a property is immutable

2020-01-29 Thread Méven Car
meven updated this revision to Diff 74561.
meven added a comment.


  Rebase & update tests

REPOSITORY
  R237 KConfig

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26368?vs=72618=74561

BRANCH
  arcpatch-D26368

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

AFFECTED FILES
  autotests/kconfig_compiler/signals_test_no_singleton.cpp.ref
  autotests/kconfig_compiler/signals_test_no_singleton.h.ref
  autotests/kconfig_compiler/signals_test_no_singleton_dpointer.cpp.ref
  autotests/kconfig_compiler/signals_test_no_singleton_dpointer.h.ref
  autotests/kconfig_compiler/signals_test_singleton.cpp.ref
  autotests/kconfig_compiler/signals_test_singleton.h.ref
  autotests/kconfig_compiler/signals_test_singleton_dpointer.cpp.ref
  autotests/kconfig_compiler/signals_test_singleton_dpointer.h.ref
  autotests/kconfig_compiler/test1.h.ref
  autotests/kconfig_compiler/test10.h.ref
  autotests/kconfig_compiler/test11.h.ref
  autotests/kconfig_compiler/test11a.h.ref
  autotests/kconfig_compiler/test12.h.ref
  autotests/kconfig_compiler/test13.h.ref
  autotests/kconfig_compiler/test2.h.ref
  autotests/kconfig_compiler/test3.h.ref
  autotests/kconfig_compiler/test3a.h.ref
  autotests/kconfig_compiler/test4.h.ref
  autotests/kconfig_compiler/test5.h.ref
  autotests/kconfig_compiler/test6.h.ref
  autotests/kconfig_compiler/test7.h.ref
  autotests/kconfig_compiler/test8a.h.ref
  autotests/kconfig_compiler/test8b.h.ref
  autotests/kconfig_compiler/test8c.h.ref
  autotests/kconfig_compiler/test9.h.ref
  autotests/kconfig_compiler/test_dpointer.cpp.ref
  autotests/kconfig_compiler/test_dpointer.h.ref
  autotests/kconfig_compiler/test_notifiers.h.ref
  autotests/kconfig_compiler/test_qdebugcategory.h.ref
  autotests/kconfig_compiler/test_signal.h.ref
  autotests/kconfig_compiler/test_translation_kde.h.ref
  autotests/kconfig_compiler/test_translation_kde_domain.h.ref
  autotests/kconfig_compiler/test_translation_qt.h.ref
  src/kconfig_compiler/KConfigCodeGeneratorBase.cpp
  src/kconfig_compiler/KConfigCodeGeneratorBase.h
  src/kconfig_compiler/KConfigCommonStructs.h
  src/kconfig_compiler/KConfigHeaderGenerator.cpp
  src/kconfig_compiler/KConfigHeaderGenerator.h
  src/kconfig_compiler/KConfigSourceGenerator.cpp
  src/kconfig_compiler/KConfigSourceGenerator.h
  src/kconfig_compiler/kconfig_compiler.cpp

To: meven, ervin, #frameworks
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26368: Add an isImmutable to know if a property is immutable

2020-01-29 Thread Kevin Ottens
ervin added a comment.


  In D26368#602296 , @meven wrote:
  
  > In D26368#602254 , @ervin wrote:
  >
  > > Now that the refactoring landed, what about rebasing this one?
  >
  >
  > That's almost a complete rewrite ^^
  
  
  I guessed so. ;-)

REPOSITORY
  R237 KConfig

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

To: meven, ervin, #frameworks
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26368: Add an isImmutable to know if a property is immutable

2020-01-29 Thread Méven Car
meven added a comment.


  In D26368#602254 , @ervin wrote:
  
  > Now that the refactoring landed, what about rebasing this one?
  
  
  That's almost a complete rewrite ^^

REPOSITORY
  R237 KConfig

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

To: meven, ervin, #frameworks
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26368: Add an isImmutable to know if a property is immutable

2020-01-29 Thread Kevin Ottens
ervin added a comment.


  Now that the refactoring landed, what about rebasing this one?

REPOSITORY
  R237 KConfig

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

To: meven, ervin, #frameworks
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26368: Add an isImmutable to know if a property is immutable

2020-01-02 Thread Méven Car
meven edited the summary of this revision.

REPOSITORY
  R237 KConfig

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

To: meven, ervin, #frameworks
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26368: Add an isImmutable to know if a property is immutable

2020-01-02 Thread Méven Car
meven created this revision.
meven added reviewers: ervin, Frameworks.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
meven requested review of this revision.

REVISION SUMMARY
  Add a utility function isImmutable to access immutability quickly.
  Generated classes uses them internally to avoid code redundance.
  
  Sample:
  
/**
  Set blocked-by-default
*/
void setBlockedByDefault( bool v )
{
  if (v != mBlockedByDefault && !isBlockedByDefaultImmutable() )  {
mBlockedByDefault = v;
Q_EMIT blockedByDefaultChanged();
  }
}

/**
  Is blocked-by-default Immutable
*/
bool isBlockedByDefaultImmutable()
{
  return isImmutable( QStringLiteral( "blockedByDefault" ) );
}
  
  
  
/**
  Set org.kde.ActivityManager.ResourceScoringEnabled
*/
void setResourceScoringEnabled( bool v )
{
  if (!isResourceScoringEnabledImmutable() ) 
mResourceScoringEnabled = v;
}

REPOSITORY
  R237 KConfig

BRANCH
  master

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

AFFECTED FILES
  src/kconfig_compiler/kconfig_compiler.cpp

To: meven, ervin, #frameworks
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns