Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.6.1
-
None
Description
So I've just learned about QMetaProperty's obscure hasStdCppSet() attribute. After some experiments I realized that this attribute simply it is not set for some properties that definitely have C++ getters in their Q_PROPERTY() declaration. Worried I'd use Qt properties inefficently for years I've looked at the code and found this:
bool stdCppSet() const { if (name.isEmpty()) return false; QByteArray s("set"); s += QtMiscUtils::toAsciiUpper(name[0]); s += name.mid(1); return (s == write); }
So apparently this attribute only gets set when moc finds a C++ setter with proper name. Properties with proper C++ getter are ignored. Is this the intended and reasonable behavior? Should this attribute also be set for readonly properties with C++ getter? Should this behavior stay as it is for compability with the myriad of tools outside maybe depending on the current behavior? If the behavior shall remain as it is, this obscure behavior should be documented at least.