Review Request: Enable the hidden stateChanged(QString&) method in KMediaPlayer::Player, inherited from KXMLGUIClient.

Pedro Lopez-Cabanillas pedro.lopez.cabanillas at gmail.com
Thu Jul 29 09:37:09 BST 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/4773/
-----------------------------------------------------------

Review request for kdelibs.


Summary
-------

Compiling any class inherited from KMediaPlayer::Player, gcc reports this warning:

/usr/include/kxmlguiclient.h:326: warning: ‘virtual void 
KXMLGUIClient::stateChanged(const QString&, 
KXMLGUIClient::ReverseStateChange)’ was hidden
/usr/include/KDE/KMediaPlayer/../../kmediaplayer/player.h:131: warning:   
by ‘void KMediaPlayer::Player::stateChanged(int)’

KParts::Part inherits from XMLGUIClient the stateChanged(const QString&,...) method, and KMediaPlayer::Player::stateChanged(int) is a signal.

The problem is that hiding the method stateChanged(QString&) prevents the KPart to be able to use XMLGUI states.


This addresses bug 246130.
    https://bugs.kde.org/show_bug.cgi?id=246130


Diffs
-----

  /trunk/KDE/kdelibs/interfaces/kmediaplayer/player.h 1156320 

Diff: http://reviewboard.kde.org/r/4773/diff


Testing
-------

Olivier Goffart provided a solution in k-c-d:

The 'workaround' is to explicitly hide or enable it back with the 'using' 
keyword

put 
using KXMLGUIClient::stateChanged;
in the protected section of the KMediaPlayer::Player class

this does not break BC

I've confirmed that this solution works, and didn't detect any breakage.


Thanks,

Pedro

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20100729/4efa4741/attachment.htm>


More information about the kde-core-devel mailing list