[umbrello] [Bug 442134] "const" correctness in Umbrello sources
Robert Hairgrove
evorgriahr at hispeed.ch
Wed Sep 8 20:55:42 BST 2021
> The compiler reports
> "assignment of member ‘CodeDocument::m_lastTagIndex’ in read-only object".
Sounds to me like a reason to declare the member
"CodeDocument::m_lastTagIndex" mutable?
--
On 08.09.21 21:16, Oliver Kellogg wrote:
> https://bugs.kde.org/show_bug.cgi?id=442134
>
> --- Comment #1 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
> Thanks for making the attachment, it is helpful.
>
> Minor point:
>> File: codedocument.h
>> virtual QString getUniqueTag(const QString& prefix = QString()); // const
> This one can't be made const due to a side effect this the function body,
>
> QString CodeDocument::getUniqueTag (const QString& prefix) const
> {
> [...]
> m_lastTagIndex = number;
>
> The compiler reports
> "assignment of member ‘CodeDocument::m_lastTagIndex’ in read-only object".
>
More information about the umbrello-devel
mailing list