[umbrello] [Bug 442134] "const" correctness in Umbrello sources

Oliver Kellogg bugzilla_noreply at kde.org
Wed Sep 8 20:16:16 BST 2021


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".

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the umbrello-devel mailing list