Bug 367881

Summary: Incorrect virtual function override of textChanged in AdaptSignatureAssistant
Product: [Applications] kdevelop Reporter: Rafal Lalik <rafallalik>
Component: generalAssignee: kdevelop-bugs-null
Status: RESOLVED NOT A BUG    
Severity: critical CC: mail
Priority: NOR    
Version: 5.0.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Rafal Lalik 2016-08-27 04:30:20 UTC
Compilation of kdevelop-5.0 fails with following error:

In file included from /tmp/portage/dev-util/kdevelop-5.0.0/work/kdevelop-5.0/languages/cpp/cpplanguagesupport.cpp:81:0:
/tmp/portage/dev-util/kdevelop-5.0.0/work/kdevelop-5.0/languages/cpp/codegen/adaptsignatureassistant.h:45:18: error: ‘virtual void Cpp::AdaptSignatureAssistant::textChanged(KTextEditor::View*, const KTextEditor::Range&, const QString&)’ marked override, but does not override
     virtual void textChanged(KTextEditor::View* view, const KTextEditor::Range& invocationRange, const QString& removedText = QString()) override;

I found that kdevplatform defines base function (kdevplatform-5.0/language/assistant/staticassistant.h, line 82) as:

virtual void textChanged(KTextEditor::Document* doc, const KTextEditor::Range& invocationRange, const QString& removedText = QString()) = 0;

whereas kdevelop overrides it as (kdevelop-5.0/languages/cpp/codegen/adaptsignatureassistant.h, line 45):

virtual void textChanged(KTextEditor::View* view, const KTextEditor::Range& invocationRange, const QString& removedText = QString()) override;

Mismatch is with the first argument: KTextEditor::Document* -> KTextEditor::View*) and 'override' modifier causes fail of the compilation.
Comment 1 Sven Brauch 2016-08-31 16:51:54 UTC
The build issue is in old-cpp, which is dead. Pass set LEGACY_CPP_SUPPORT=OFF in cmake (or rather, don't set it to ON, it's off by default) and it will work.