Summary: | 'Update declaration signature' doesn't update declaration of function after change function from const to non const in definition | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Piotr Mierzwinski <piotr.mierzwinski> |
Component: | Language Support: CPP (old) | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | olivier.jg, piotr.mierzwinski |
Priority: | NOR | Keywords: | usability |
Version: | git master | ||
Target Milestone: | 4.3.0 | ||
Platform: | Mandriva RPMs | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdevelop/15ef959f791389c1cf3b4a8e31751191890098e4 | Version Fixed In: |
Description
Piotr Mierzwinski
2012-05-04 18:08:10 UTC
Seems to work fine now. Sorry, but doesn't. Works partially. Only if function has not parameters. Let's try with: header file: void foo2( const QString & str ) const; cpp file: void foo2( const QString & str ) const { qDebug() << "aa"; } 1. Remove const in cpp file (i.e.: press Ctrl+Backspace when cursor is at end of method signature) 2, Choose ''Update declaration signature' in popuping menu 3. Check header file Actual Results: void foo( const QString& str) const; Expected Results: void foo( const QString& str); I tested on Mandriva 2011.0 (KDE-4.6.5), qt-4.7.4) and KDevelop 4.4.1. System newly installed (and updated) on VirtualBox 4.2.0. KDevelop builded from official sources. indeed, this is broken In branch: master is still broken. Git commit 15ef959f791389c1cf3b4a8e31751191890098e4 by Milian Wolff. Committed on 17/01/2013 at 22:40. Pushed by mwolff into branch '4.5'. Properly cope with function signatures containing whitespace. The main issue is that our function contexts don't go from the opening paren to the closing paren, but from the first to the last token inside the closing parens. Thus if you put whitespace padding in there the old code broke down... M +23 -15 languages/cpp/codegen/adaptsignatureaction.cpp M +9 -0 languages/cpp/tests/test_cppassistants.cpp http://commits.kde.org/kdevelop/15ef959f791389c1cf3b4a8e31751191890098e4 |