]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/util/searchlineedit.cpp
Qt: add a close to systray menu option.
[vlc] / modules / gui / qt4 / util / searchlineedit.cpp
index 68130b7cefbcdad5d6cbd2f67b408cec8d3f0d31..9b3abdb1899d60b0ec8f4b379c3895649e049726 100644 (file)
@@ -40,7 +40,7 @@
 
 #include <vlc_intf_strings.h>
 
-#if QT_VERSION < 0x040700
+#if !HAS_QT47
 
 ClickLineEdit::ClickLineEdit( const QString &msg, QWidget *parent) : QLineEdit( parent )
 {
@@ -65,7 +65,7 @@ void ClickLineEdit::setText( const QString &txt )
 void ClickLineEdit::paintEvent( QPaintEvent *pe )
 {
     QLineEdit::paintEvent( pe );
-    if ( mDrawClickMsg == true && !hasFocus() ) {
+    if ( mDrawClickMsg && !hasFocus() ) {
         QPainter p( this );
         QPen tmp = p.pen();
         p.setPen( palette().color( QPalette::Disabled, QPalette::Text ) );
@@ -86,7 +86,7 @@ void ClickLineEdit::dropEvent( QDropEvent *ev )
 
 void ClickLineEdit::focusInEvent( QFocusEvent *ev )
 {
-    if ( mDrawClickMsg == true ) {
+    if ( mDrawClickMsg ) {
         mDrawClickMsg = false;
         repaint();
     }
@@ -103,9 +103,10 @@ void ClickLineEdit::focusOutEvent( QFocusEvent *ev )
 }
 #endif
 
+#ifndef Q_WS_MAC
 SearchLineEdit::SearchLineEdit( QWidget *parent ) : QLineEdit( parent )
 {
-    clearButton = new QVLCFramelessButton( this );
+    clearButton = new QFramelessButton( this );
     clearButton->setIcon( QIcon( ":/toolbar/clear" ) );
     clearButton->setIconSize( QSize( 16, 16 ) );
     clearButton->setCursor( Qt::ArrowCursor );
@@ -198,3 +199,4 @@ void SearchLineEdit::searchEditingFinished()
     emit searchDelayedChanged( text() );
 }
 
+#endif