[vlc-commits] Qt: raise the tooltip so it stays in front of the fullscreen controller

Ludovic Fauvet git at videolan.org
Wed Jul 17 16:30:16 CEST 2013


vlc/vlc-2.0 | branch: master | Ludovic Fauvet <etix at videolan.org> | Wed Jul 17 13:45:59 2013 +0200| [342f1a74646db33448d3da7d6d651e75641e3c25] | committer: Ludovic Fauvet

Qt: raise the tooltip so it stays in front of the fullscreen controller

(cherry picked from commit 697766fe84fc6fa94f1bef61dbf0193991474a58)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=342f1a74646db33448d3da7d6d651e75641e3c25
---

 modules/gui/qt4/util/timetooltip.cpp |   12 ++----------
 modules/gui/qt4/util/timetooltip.hpp |    1 -
 2 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/modules/gui/qt4/util/timetooltip.cpp b/modules/gui/qt4/util/timetooltip.cpp
index 3039750..d14e0f7 100644
--- a/modules/gui/qt4/util/timetooltip.cpp
+++ b/modules/gui/qt4/util/timetooltip.cpp
@@ -56,8 +56,6 @@ TimeTooltip::TimeTooltip( QWidget *parent ) :
     // Set default text
     setText( "00:00:00", "" );
 
-    mInitialized = false;
-
     // By default the widget is unintialized and should not be displayed
     resize( 0, 0 );
 }
@@ -119,7 +117,6 @@ void TimeTooltip::buildPath()
 
 void TimeTooltip::setText( const QString& time, const QString& text )
 {
-    mInitialized = true;
     mDisplayedText = time;
     if ( !text.isEmpty() )
         mDisplayedText.append( " - " ).append( text );
@@ -130,18 +127,13 @@ void TimeTooltip::setText( const QString& time, const QString& text )
     mTime = time;
     mText = text;
     update();
+    raise();
 }
 
 void TimeTooltip::show()
 {
     setVisible( true );
-#ifdef Q_WS_PM
-    // Bring a tooltip on the top
-    // Without this, tooltip does not appear on fullscreen
-    // from the second fullscreen state change
-    if( mInitialized )
-        QWidget::raise();
-#endif
+    raise();
 }
 
 void TimeTooltip::paintEvent( QPaintEvent * )
diff --git a/modules/gui/qt4/util/timetooltip.hpp b/modules/gui/qt4/util/timetooltip.hpp
index 4e74286..dffb226 100644
--- a/modules/gui/qt4/util/timetooltip.hpp
+++ b/modules/gui/qt4/util/timetooltip.hpp
@@ -52,7 +52,6 @@ private:
     QPainterPath mPainterPath;
     QBitmap mMask;
     int mPreviousMetricsWidth;
-    bool mInitialized;
 };
 
 #endif // TIMETOOLTIP_H



More information about the vlc-commits mailing list