https://bugs.kde.org/show_bug.cgi?id=367735
Bug ID: 367735 Summary: Problem in semantic analysis - cannot rename all variables after click in usage this variable Product: kdevelop Version: unspecified 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 an example of code: foo() { QString sFileName = QFileDialog::getSaveFileName(this, tr("Save as"), m_InitialPath); if (! sFileName.isEmpty()) { if (QFileInfo(sFileName).exists()) { // file already exists } else saveFile(sFileName); } } I rename declaration of sFileName to sFileName2, so now first line looks like this: QString sFileName2 = QFileDialog::getSaveFileName(this, tr("Save as"), m_InitialPath); All occurrences for not declared variable are underlined. OK. I move cursor over declaration and I get: Solution (1): Rename "sFileName" to "sFileName2". But wait. In this place variable is already renamed :/. OK. Nevermind. I click "Solution (1)" and all occurrences are renamed. Great. This is what I wanted. I undo all changes, and again rename declaration in the same way. Now I move cursor over first usage. This is mentioned line: if (! sFileName.isEmpty()) I get the same tool tip, so again I click in "Solution (1)". After that only occurrence under cursor is renamed. This is happen on every next usages of variable. Why? I'm not sure, but I think it was working before change with tool tip: "Problem in semantic analysis". I mean all occurrences were always renamed. Reproducible: Always Steps to Reproduce: 1. Rename declaration of local variable 2. Try to use "Semantic analysis helper" for any usage of variable not for declaration 3. Click "Solution (1)" Actual Results: Only occurrence under cursor is renamed Expected Results: All occurrences for selected variable should be renamed. Thanks that kdevelop will avoid forcing an user to go back to declaration and again back to current code. kdevelop 5.0.0.r23419.7314e99 (built 22/08/2016, branch: 5.0) kdevplatform 5.0.0.r13346.09a1848 (built 22/08/2016, branch: 5.0) KFrameworks 5.25, Qt-5.7.0 -- You are receiving this mail because: You are watching all bug changes.