Bug 88360 - kget tooltip doesn't stay up
Summary: kget tooltip doesn't stay up
Status: RESOLVED FIXED
Alias: None
Product: kget
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KGet authors
URL:
Keywords:
: 100221 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-08-29 07:01 UTC by David Pretty
Modified: 2005-02-25 20:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch against current CVS_HEAD (1.86 KB, patch)
2005-01-19 00:29 UTC, Rainer Wirtz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Pretty 2004-08-29 07:01:21 UTC
Version:           v0.8.3 (using KDE 3.3.0, Gentoo)
Compiler:          gcc version 3.4.1 20040803 (Gentoo Linux 3.4.1-r2, ssp-3.4-2, pie-8.7.6.5)
OS:                Linux (i686) release 2.6.8-gentoo

When the mouse hovers over the kget icon in the system tray, the tool tip comes up but disappears about half a second later, not long enough to even read the tooltip.

The rest of the tooltips in my system tray stay as long as the mouse is hovering over the icon - so it must be a kget bug
Comment 1 Heiko Schaefer 2004-08-31 18:12:47 UTC
I can reproduce it with the same version and the SuSE 9.1 binary-RPMs
Comment 2 Tobias Haf 2004-09-13 11:39:02 UTC
That's true. While mouse-cursor is in motion above systray-icon, tolltips shows up. But when stopping moving, it disappears. Please fix this :) THX!
Comment 3 Danny Allen 2004-10-20 13:06:08 UTC
I can also reproduce this (as of KDE 3.3)
I aso vote for resolution of this bug :)

Danny
Comment 4 Giovanni Venturi 2004-10-26 13:02:24 UTC
Yes it happens also to me, with KDE 3.3.0 compiled from source.
Comment 5 Rainer Wirtz 2005-01-19 00:29:48 UTC
Created attachment 9160 [details]
patch against current CVS_HEAD
Comment 6 Rainer Wirtz 2005-02-11 06:31:34 UTC
CVS commit by ratz: 

Fixes bug 88360
BUG: 88360


  M +26 -6     docking.cpp   1.25
  M +16 -1     docking.h   1.13


--- kdenetwork/kget/docking.cpp  #1.24:1.25
@@ -51,5 +51,7 @@ DockWidget::DockWidget(KMainWidget * _pa
     // Enable dropping
     setAcceptDrops(true);
-    QToolTip::add( this, kapp->aboutData()->shortDescription() );
+   
+   dtip = new DynamicTip( this );
+   dtip->setStatus( kapp->aboutData()->shortDescription() );
 }
 
@@ -57,4 +59,6 @@ DockWidget::DockWidget(KMainWidget * _pa
 DockWidget::~DockWidget()
 {
+   delete dtip;
+   dtip = 0;
 }
 
@@ -95,11 +99,27 @@ void DockWidget::contextMenuAboutToShow 
 }
 
-#include "docking.moc"
+void DockWidget::updateToolTip( const QString& _status )
+{
+   dtip->setStatus( _status );
+}
 
 
-void DockWidget::updateToolTip( const QString& status )
+DynamicTip::DynamicTip( QWidget * parent )
+   : QToolTip( parent )
 {
-       QToolTip::remove( this );
-       QToolTip::add( this, status );
+   // no explicit initialization needed
+}
+
 
+void DynamicTip::setStatus( const QString & _status )
+{
+   status = _status;
 }
+
+void DynamicTip::maybeTip( const QPoint & _pos )
+{
+   QRect r( parentWidget()->rect() );
+   tip( r, status );
+}
+
+#include "docking.moc"

--- kdenetwork/kget/docking.h  #1.12:1.13
@@ -39,4 +39,18 @@ class KPopupMenu;
 class KMainWidget;
 
+class DynamicTip : public QToolTip
+{
+   public:
+       DynamicTip( QWidget * parent );
+       virtual ~DynamicTip() {}//TODO workaround for qt-bug, can be removed after 4.0 
+       void setStatus( const QString & _status );
+
+   protected:
+       void maybeTip( const QPoint & );
+       
+   private:
+       QString status;
+};
+
 class DockWidget:public KSystemTray
 {
@@ -61,4 +75,5 @@ protected:
 private:
     KMainWidget *parent;
+   DynamicTip * dtip;
 
 };


Comment 7 Rainer Wirtz 2005-02-25 20:13:46 UTC
*** Bug 100221 has been marked as a duplicate of this bug. ***