Bug 338853 - Add C++11 override keyword when overriding methods by completion
Summary: Add C++11 override keyword when overriding methods by completion
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-06 18:44 UTC by Nicolás Alvarez
Modified: 2018-03-25 22:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.0.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolás Alvarez 2014-09-06 18:44:35 UTC
class Base {
    virtual int foo() {}
};
class Derived {
    foo<Ctrl-Space>
};
will complete to "virtual int foo();". I'd like it to complete to "int foo() override;" instead (I don't care if with or without the virtual keyword). Maybe it should be a project option ("C++11 mode"? Or part of the coding style settings?).
Comment 1 Kevin Funk 2018-03-25 22:54:45 UTC
Fixed already.

commit d80c4cb286a077fa7dc9bfbb2e00d12277c41f79
Author: Aleix Pol <aleixpol@kde.org>
Date:   Thu Oct 8 11:20:44 2015 +0200

    Improve the signature we present of an overriden method
    
    Adds the override keyword (and a ; to end the line properly).
    Drops the virtual method, because it's redundant to override.
    
    Differential Revision: https://phabricator.kde.org/D382