aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMéven Car <meven.car@enioka.com>2020-02-19 11:13:37 +0100
committerMéven Car <meven.car@enioka.com>2020-02-19 14:24:20 +0100
commit55aaa712b75b1401331e29aef08123556b0257f3 (patch)
treea9046ff0a5dccf59a7436a7269b2558a1baa9a76
parentff6db7aee73b9f6f974f0a4357ed7182c6cc6e3f (diff)
downloadkconfig-55aaa712b75b1401331e29aef08123556b0257f3.tar.gz
kconfig-55aaa712b75b1401331e29aef08123556b0257f3.tar.bz2
Fix is<PropertyName>Immutable generated property
Summary: Relates to D26368 Test Plan: ctest Reviewers: hchain, ervin, bport, crossi, #frameworks Reviewed By: hchain, crossi Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D27496
-rw-r--r--autotests/kconfig_compiler/test13.h.ref6
-rw-r--r--src/kconfig_compiler/KConfigHeaderGenerator.cpp1
2 files changed, 4 insertions, 3 deletions
diff --git a/autotests/kconfig_compiler/test13.h.ref b/autotests/kconfig_compiler/test13.h.ref
index 6dad0e57..45863900 100644
--- a/autotests/kconfig_compiler/test13.h.ref
+++ b/autotests/kconfig_compiler/test13.h.ref
@@ -17,7 +17,7 @@ class Test13 : public KConfigSkeleton
~Test13();
Q_PROPERTY(QUrl picturesDir READ picturesDir CONSTANT)
- Q_PROPERTY(bool isPicturesDirImmutable CONSTANT)
+ Q_PROPERTY(bool isPicturesDirImmutable READ isPicturesDirImmutable CONSTANT)
/**
Get picturesDir
*/
@@ -46,7 +46,7 @@ class Test13 : public KConfigSkeleton
}
Q_PROPERTY(double brightness READ brightness WRITE setBrightness NOTIFY brightnessChanged)
- Q_PROPERTY(bool isBrightnessImmutable CONSTANT)
+ Q_PROPERTY(bool isBrightnessImmutable READ isBrightnessImmutable CONSTANT)
/**
Get brightness
*/
@@ -64,7 +64,7 @@ class Test13 : public KConfigSkeleton
}
Q_PROPERTY(bool startsWithUppercase READ startsWithUppercase CONSTANT)
- Q_PROPERTY(bool isStartsWithUppercaseImmutable CONSTANT)
+ Q_PROPERTY(bool isStartsWithUppercaseImmutable READ isStartsWithUppercaseImmutable CONSTANT)
/**
Get StartsWithUppercase
*/
diff --git a/src/kconfig_compiler/KConfigHeaderGenerator.cpp b/src/kconfig_compiler/KConfigHeaderGenerator.cpp
index f6c39b6a..84f89e26 100644
--- a/src/kconfig_compiler/KConfigHeaderGenerator.cpp
+++ b/src/kconfig_compiler/KConfigHeaderGenerator.cpp
@@ -424,6 +424,7 @@ void KConfigHeaderGenerator::createImmutableProperty(const CfgEntry *entry)
}
stream() << whitespace();
stream() << "Q_PROPERTY(bool " << immutableFunction(entry->name);
+ stream() << " READ " << immutableFunction(entry->name);
stream() << " CONSTANT)\n";
}