|
Re: IsQuery attribute adds const only to header, not to implemention [message #1777882 is a reply to message #1777638] |
Tue, 05 December 2017 15:13 |
Ernesto Posse Messages: 438 Registered: March 2011 |
Senior Member |
|
|
Shingyu Kang wrote on Fri, 01 December 2017 02:34Hi,
If a passive class is added as a parameter to a signal,
the parameter type is declared as const&.
So some member functions needs to be declared as "is query".
I'm not sure I understand. Passive classes do not have signals. Do you mean an operation?
Also, declaring the type of a parameter to be const& is not related to the operation being a query or not. Can you clarify what you mean? Perhaps with your model?
In any case, this doesn't seem to be related to the problem:
Shingyu Kang wrote on Fri, 01 December 2017 02:34Hi,
If I check "is query" attribute to a member function of a class (not capsule),
"const" is added the function in its header file.
int getFunctionConst() const;
But "const" is not added to the its body function as follows.
int ConstClass::getFunctionConst()
{ ... }
So compiling fails.
I've tested this, and indeed this is a bug. In fact, the problem seems to occur with capsules as well, not just passive classes.
Unfortunately I don't have a workaround at the moment.
I'll open a bug for this.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03337 seconds