https://bugs.kde.org/show_bug.cgi?id=365437
Bug ID: 365437 Summary: Rename local variable using "Rename" assistant breaks code Product: kdevelop Version: git master Platform: Archlinux Packages OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: Language Support: CPP (Clang-based) Assignee: kdevelop-bugs-n...@kde.org Reporter: piotr.mierzwin...@gmail.com There is following code: void MyClass::foo( bool param ) { bool stat; QString string; if (param) { if (string.isEmpty()) stat = true; else stat = false; } } I rename "stat" variable to "stat2". Choosing "Rename stat to stat2" makes that in code are inserted two (opening) curly brackets. Reproducible: Always Steps to Reproduce: 1. Rename local variable what is used inside of block of code like above 2. Choose "Rename old_name to new_name" 3. Actual Results: void MyClass::foo( bool param ) { bool stat2; QString string; if (param) { if (string.isEmpty()) { stat2 = true; else { stat2 = false; } } Expected Results: void MyClass::foo( bool param ) { bool stat2; QString string; if (param) { if (string.isEmpty()) stat2 = true; else stat2 = false; } } KDevelop and KDevPlatform cloned and built from branch 5.0, at 08-07.2016. Plasma 5.7.0, KFrameworks 5.23, Qt-5.7.0 -- You are receiving this mail because: You are watching all bug changes.