Fix compiler warning about hidden virtual overloads

Authored by davidedmundson on Jun 19 2018, 12:33 PM.

Description

Fix compiler warning about hidden virtual overloads

Summary:
TextInput has 4 virtual operators for casting. Each of the two
subclasses override a different 2. It all works perfectly but results in
this compiler warning.

In file included from
client/textinput_v2.cpp:20:
client/textinput_p.h:95:13: warning: ‘virtual
KWayland::Client::TextInputManager::Private::operator
wl_text_input_manager*() const’ was hidden [-Woverloaded-virtual]

virtual operator wl_text_input_manager*() const {
        ^~~~~~~~

This is the compiler telling us that we're overriding some overloads, but
not all overloads which it thinks is wrong, even though it makes perfect
sense in this particular case.

Adding a "using" keyword silences the warning.

Test Plan: Compiles with no warnings \o/

Reviewers: KWin, zzag

Reviewed By: KWin, zzag

Subscribers: zzag, kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D13502

Details

Committed
davidedmundsonJun 19 2018, 12:33 PM
Reviewer
KWin
Differential Revision
D13502: Fix compiler warning about hidden virtual overloads
Parents
R127:2d06b24a86f2: Honor BUILD_TESTING
Branches
Unknown
Tags
Unknown