https://bugs.kde.org/show_bug.cgi?id=365437

Igor Kushnir <igor...@meta.ua> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |igor...@meta.ua

--- Comment #6 from Igor Kushnir <igor...@meta.ua> ---
I have experienced similar Rename bugs in KDevelop 5.5.0:
    1) it always inserted spaces between the renamed variable and parentheses;
    2) sometimes it inserted out-of-place braces.

After some debugging I determined that Source Formatter kicks in during the
Rename variable refactoring in DocumentChangeSetPrivate::generateNewText():

    if (formatter && (formatPolicy == DocumentChangeSet::AutoFormatChanges
                              || formatPolicy ==
DocumentChangeSet::AutoFormatChangesKeepIndentation)) {
... }


GrepOutputModel sets formatPolicy to DocumentChangeSet::NoAutoFormat, so
Find/Replace in Files does not cause such bugs. Neither does simple
KTextEditor's Replace within a file.

It turned out that my Source Formatter for the C++ Language was set to the
default Artistic Style->1TBS. After switching to Artistic Style->Qt, at least
the easily reproducible space insertion issue is gone. Not sure about the
spurious braces yet.

Piotr, have you tried reproducing this bug and Bug 317299 with different C++
Source Formatters configured in KDevelop settings?

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to