Qt4 - don't use a class member when you don't need it. Ref #19854
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 17 Apr 2007 17:34:28 +0000 (17:34 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 17 Apr 2007 17:34:28 +0000 (17:34 +0000)
modules/gui/qt4/components/open.cpp
modules/gui/qt4/components/open.hpp

index de5705b..e037604 100644 (file)
@@ -69,7 +69,8 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     ui.gridLayout->addWidget( dialogBox, 0, 0, 1, 3 );
 
     // But hide the two OK/Cancel buttons. Enable them for debug.
     ui.gridLayout->addWidget( dialogBox, 0, 0, 1, 3 );
 
     // But hide the two OK/Cancel buttons. Enable them for debug.
-    fileDialogAcceptBox = findChildren<QDialogButtonBox*>()[0];
+    QDialogButtonBox *fileDialogAcceptBox =
+                        findChildren<QDialogButtonBox*>()[0];
     fileDialogAcceptBox->hide();
 
     /* Ugly hacks to get the good Widget */
     fileDialogAcceptBox->hide();
 
     /* Ugly hacks to get the good Widget */
index 9378be6..7c83364 100644 (file)
 #include <QWidget>
 #include <QString>
 #include <QFileDialog>
 #include <QWidget>
 #include <QString>
 #include <QFileDialog>
+
 #include "ui/open_file.h"
 #include "ui/open_disk.h"
 #include "ui/open_net.h"
 #include "ui/open_capture.h"
 #include "ui/open_file.h"
 #include "ui/open_disk.h"
 #include "ui/open_net.h"
 #include "ui/open_capture.h"
-#include <QDialogButtonBox>
 
 class QLineEdit;
 
 
 class QLineEdit;
 
@@ -80,7 +80,6 @@ private:
     QStringList browse( QString );
     FileOpenBox *dialogBox;
     QLineEdit *lineFileEdit;
     QStringList browse( QString );
     FileOpenBox *dialogBox;
     QLineEdit *lineFileEdit;
-    QDialogButtonBox *fileDialogAcceptBox;
 public slots:
     virtual void updateMRL();
 private slots:
 public slots:
     virtual void updateMRL();
 private slots: