[RFC] Using KPassivePopup from KSystrayIcon
David Faure
faure at kde.org
Thu Mar 29 15:17:19 BST 2007
On Thursday 29 March 2007, Alessandro Praduroux wrote:
> Since QSystemTrayIcon does not derive from QWidget, it is not possible to call
> the static ::message methods of KPassivePopup from a tray icon handler and
> have the passive popup displayed near the tray area.
>
> since Qt 4.3 introduced the geometry() method to QSystemTrayIcon, it is now
> possible to correctly place the KPassivePopup.
>
> I implemented the needed new static methods in KPassivePopup accepting a
> QSystemTrayIcon * instead of a QWidget.
>
> Patch attached, AFAICT doesn't even break BC, is it ok to commit?
It breaks SC though:
/d/kde/src/4/koffice/kspread/CellStorage.cpp:320: error: call of overloaded ‘message(QString, int)’ is ambiguous
/d/kde/inst/kde4/include/kpassivepopup.h:207: note: candidates are: static KPassivePopup* KPassivePopup::message(const QString&, QWidget*)
/d/kde/inst/kde4/include/kpassivepopup.h:215: note: static KPassivePopup* KPassivePopup::message(const QString&, QSystemTrayIcon*)
Not that breaking SC isn't allowed currently [on mondays], but it makes me wonder if the API could be improved to
avoid the ambiguity when passing 0... (QWidget*)0 works but is always a bit ugly...
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list