]> git.sesse.net Git - vlc/commitdiff
Delete the "QPainter::begin: A paint device can only be painted by one painter at...
authorJean-Baptiste Kempf <jb@videolan.org>
Fri, 1 Aug 2008 20:05:56 +0000 (13:05 -0700)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 1 Aug 2008 20:06:59 +0000 (13:06 -0700)
modules/gui/qt4/util/customwidgets.cpp

index 4de1129e9e491709bcc768d21ecaf16fba342d50..ba58004ae9520e00ba6752e4ccf39924e72056f1 100644 (file)
@@ -30,7 +30,6 @@
 #include "customwidgets.hpp"
 #include <QPainter>
 #include <QLineEdit>
-#include <QPainter>
 #include <QColorGroup>
 #include <QRect>
 #include <QKeyEvent>
@@ -60,9 +59,9 @@ void ClickLineEdit::setText( const QString &txt )
 
 void ClickLineEdit::paintEvent( QPaintEvent *pe )
 {
-    QPainter p( this );
     QLineEdit::paintEvent( pe );
     if ( mDrawClickMsg == true && !hasFocus() ) {
+        QPainter p( this );
         QPen tmp = p.pen();
         p.setPen( palette().color( QPalette::Disabled, QPalette::Text ) );
         QRect cr = contentsRect();
@@ -70,6 +69,7 @@ void ClickLineEdit::paintEvent( QPaintEvent *pe )
         cr.setLeft( cr.left() + 3 );
         p.drawText( cr, Qt::AlignLeft | Qt::AlignVCenter, mClickMessage );
         p.setPen( tmp );
+        p.end();
     }
 }