]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/src/tooltip.cpp
Qt: iconView delegate: encode PLModel::IsCurrent(QModelIndex) into cache key
[vlc] / modules / gui / skins2 / src / tooltip.cpp
index f8f37b2065f67c34d70da21f0248cb96512f0218..644ef7950d14590bff8bdbbbfad0249e37149810 100644 (file)
@@ -5,7 +5,7 @@
  * $Id$
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
- *          Olivier Teulière <ipkiss@via.ecp.fr>
+ *          Olivier Teulière <ipkiss@via.ecp.fr>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #include "tooltip.hpp"
@@ -49,12 +49,9 @@ Tooltip::Tooltip( intf_thread_t *pIntf, const GenericFont &rFont, int delay ):
 Tooltip::~Tooltip()
 {
     VarManager::instance( getIntf() )->getTooltipText().delObserver( this );
-    SKINS_DELETE( m_pTimer );
-    SKINS_DELETE( m_pOsTooltip );
-    if( m_pImage )
-    {
-        delete m_pImage;
-    }
+    delete m_pTimer;
+    delete m_pOsTooltip;
+    delete m_pImage;
 }
 
 
@@ -74,7 +71,7 @@ void Tooltip::hide()
 }
 
 
-void Tooltip::onUpdate( Subject<VarText> &rVariable )
+void Tooltip::onUpdate( Subject<VarText> &rVariable , void *arg)
 {
     // Redisplay the tooltip
     displayText( ((VarText&)rVariable).get() );
@@ -106,10 +103,7 @@ void Tooltip::makeImage( const UString &rText )
     int h = m_rFont.getSize() + 8;
 
     // Create the image of the tooltip
-    if( m_pImage )
-    {
-        delete m_pImage;
-    }
+    delete m_pImage;
     m_pImage = OSFactory::instance( getIntf() )->createOSGraphics( w, h );
     m_pImage->fillRect( 0, 0, w, h, 0xffffd0 );
     m_pImage->drawRect( 0, 0, w, h, 0x000000 );