[vlc-devel] commit: Cleaning: the QPalette is not needed outisde the constructor ( Benjamin Poulain )

git version control git at videolan.org
Sun Oct 25 17:14:37 CET 2009


vlc | branch: master | Benjamin Poulain <ikipou at gmail.com> | Sun Oct 25 13:05:20 2009 +0100| [4b1160c8fe67686fb3855ffff4b22b4ede0bc204] | committer: Ilkka Ollakka 

Cleaning: the QPalette is not needed outisde the constructor

The QPalette of the widget is already stored in QWidget, there is no
need to have an attribute for it.

Signed-off-by: Ilkka Ollakka <ileoo at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4b1160c8fe67686fb3855ffff4b22b4ede0bc204
---

 modules/gui/qt4/components/interface_widgets.cpp |    2 +-
 modules/gui/qt4/components/interface_widgets.hpp |    2 --
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index 084dbe1..01c5564 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -299,7 +299,7 @@ BackgroundWidget::BackgroundWidget( intf_thread_t *_p_i )
 
     /* A dark background */
     setAutoFillBackground( true );
-    plt = palette();
+    QPalette plt = palette();
     plt.setColor( QPalette::Active, QPalette::Window , Qt::black );
     plt.setColor( QPalette::Inactive, QPalette::Window , Qt::black );
     setPalette( plt );
diff --git a/modules/gui/qt4/components/interface_widgets.hpp b/modules/gui/qt4/components/interface_widgets.hpp
index f80aab3..dc611bc 100644
--- a/modules/gui/qt4/components/interface_widgets.hpp
+++ b/modules/gui/qt4/components/interface_widgets.hpp
@@ -42,7 +42,6 @@
 #include <QMouseEvent>
 
 class ResizeEvent;
-class QPalette;
 class QPixmap;
 class QHBoxLayout;
 class QMenu;
@@ -95,7 +94,6 @@ public:
     virtual ~BackgroundWidget();
 
 private:
-    QPalette plt;
     QLabel *label;
     virtual void contextMenuEvent( QContextMenuEvent *event );
     intf_thread_t *p_intf;




More information about the vlc-devel mailing list