Bug 356179 - Completion helper removes static word from begin of declaration function
Summary: Completion helper removes static word from begin of declaration function
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (show other bugs)
Version: 4.90.90
Platform: Kubuntu Linux
: VHI normal
Target Milestone: 5.0.0
Assignee: kdevelop-bugs-null
URL:
Keywords: release_blocker
Depends on:
Blocks:
 
Reported: 2015-12-02 02:17 UTC by Piotr Mierzwinski
Modified: 2016-02-03 00:25 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Mierzwinski 2015-12-02 02:17:20 UTC
In class MyClass there is...

Declaration (header file): 
static QString getText( QWidget *pParent, const QString &sInInitText, bool &bParam, const QString &sInLabel = QString::null, unsigned int par = 2, const QString &sInWndTitle = QString::null );

Definition (cpp file): 
QString MyClass::getText( QWidget *pParent, const QString &sInInitText, bool &bParam, const QString &sInLabel, unsigned int par, const QString &sInWndTitle )
{
...
}

Being in cpp file try to remove entire last argument: ", const QString &sInWndTitle" and choose "Update declaration signature" (pressing Alt+1) on "Adapt signature" helper window.

Reproducible: Always


Actual Results:  
Declaration (header file): 
QString getText( QWidget *pParent, const QString &sInInitText, bool &bParam, const QString &sInLabel = QString::null, unsigned int par = 2 );

Expected Results:  
Declaration (header file): 
static QString getText( QWidget *pParent, const QString &sInInitText, bool &bParam, const QString &sInLabel = QString::null, unsigned int par = 2 );
Comment 1 Piotr Mierzwinski 2015-12-02 02:17:45 UTC
kdevelop and kdevplatform cloned at 30.11.2015
Comment 2 Milian Wolff 2015-12-02 11:44:01 UTC
confirmed, on it
Comment 3 Milian Wolff 2015-12-02 12:16:44 UTC
Git commit d332c3af3168cb3499674642d7884395e6db54f1 by Milian Wolff.
Committed on 02/12/2015 at 12:16.
Pushed by mwolff into branch '5.0'.

Keep static modifier of class functions if we adapt the signature.

M  +11   -1    languages/clang/codegen/adaptsignatureaction.cpp
M  +14   -0    languages/clang/tests/test_assistants.cpp

http://commits.kde.org/kdevelop/d332c3af3168cb3499674642d7884395e6db54f1
Comment 4 Kevin Funk 2016-02-03 00:25:31 UTC
*** Bug 298511 has been marked as a duplicate of this bug. ***