Commit 9e9b8859 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Delete the "QPainter::begin: A paint device can only be painted by one painter...

Delete the "QPainter::begin: A paint device can only be painted by one painter at a time" boring messages in playlist.
parent e3da66b7
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include "customwidgets.hpp" #include "customwidgets.hpp"
#include <QPainter> #include <QPainter>
#include <QLineEdit> #include <QLineEdit>
#include <QPainter>
#include <QColorGroup> #include <QColorGroup>
#include <QRect> #include <QRect>
#include <QKeyEvent> #include <QKeyEvent>
...@@ -60,9 +59,9 @@ void ClickLineEdit::setText( const QString &txt ) ...@@ -60,9 +59,9 @@ void ClickLineEdit::setText( const QString &txt )
void ClickLineEdit::paintEvent( QPaintEvent *pe ) void ClickLineEdit::paintEvent( QPaintEvent *pe )
{ {
QPainter p( this );
QLineEdit::paintEvent( pe ); QLineEdit::paintEvent( pe );
if ( mDrawClickMsg == true && !hasFocus() ) { if ( mDrawClickMsg == true && !hasFocus() ) {
QPainter p( this );
QPen tmp = p.pen(); QPen tmp = p.pen();
p.setPen( palette().color( QPalette::Disabled, QPalette::Text ) ); p.setPen( palette().color( QPalette::Disabled, QPalette::Text ) );
QRect cr = contentsRect(); QRect cr = contentsRect();
...@@ -70,6 +69,7 @@ void ClickLineEdit::paintEvent( QPaintEvent *pe ) ...@@ -70,6 +69,7 @@ void ClickLineEdit::paintEvent( QPaintEvent *pe )
cr.setLeft( cr.left() + 3 ); cr.setLeft( cr.left() + 3 );
p.drawText( cr, Qt::AlignLeft | Qt::AlignVCenter, mClickMessage ); p.drawText( cr, Qt::AlignLeft | Qt::AlignVCenter, mClickMessage );
p.setPen( tmp ); p.setPen( tmp );
p.end();
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment