Bug 367881 - Incorrect virtual function override of textChanged in AdaptSignatureAssistant
Summary: Incorrect virtual function override of textChanged in AdaptSignatureAssistant
Status: RESOLVED NOT A BUG
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: 5.0.0
Platform: Other Linux
: NOR critical
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-27 04:30 UTC by Rafal Lalik
Modified: 2016-08-31 16:51 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 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.