D13502: Fix compiler warning about hidden virtual overloads
David Edmundson
noreply at phabricator.kde.org
Tue Jun 12 20:04:14 UTC 2018
davidedmundson created this revision.
davidedmundson added a reviewer: KWin.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: kde-frameworks-devel.
davidedmundson requested review of this revision.
REVISION 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/
REPOSITORY
R127 KWayland
BRANCH
xdg_squash
REVISION DETAIL
https://phabricator.kde.org/D13502
AFFECTED FILES
src/client/textinput_v0.cpp
src/client/textinput_v2.cpp
To: davidedmundson, #kwin
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180612/fa2e2d6d/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list