From 02617cc3a2ad9abe3e536e83230901ac83afd122 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Kempf <jb@videolan.org>
Date: Tue, 17 Apr 2007 17:21:13 +0000
Subject: [PATCH] Qt4 - Open - Hide the OK/Cancel for everyone ( Windows too )

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

diff --git a/modules/gui/qt4/components/open.cpp b/modules/gui/qt4/components/open.cpp
index 2450a6370c40..de5705baa818 100644
--- a/modules/gui/qt4/components/open.cpp
+++ b/modules/gui/qt4/components/open.cpp
@@ -69,9 +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.
-#ifndef WIN32
-    findChild<QDialogButtonBox*>()->hide();
-#endif
+    fileDialogAcceptBox = findChildren<QDialogButtonBox*>()[0];
+    fileDialogAcceptBox->hide();
 
     /* Ugly hacks to get the good Widget */
     //This lineEdit is the normal line in the fileDialog.
diff --git a/modules/gui/qt4/components/open.hpp b/modules/gui/qt4/components/open.hpp
index 257ae381abb5..9378be6fc069 100644
--- a/modules/gui/qt4/components/open.hpp
+++ b/modules/gui/qt4/components/open.hpp
@@ -33,6 +33,7 @@
 #include "ui/open_disk.h"
 #include "ui/open_net.h"
 #include "ui/open_capture.h"
+#include <QDialogButtonBox>
 
 class QLineEdit;
 
@@ -79,6 +80,7 @@ private:
     QStringList browse( QString );
     FileOpenBox *dialogBox;
     QLineEdit *lineFileEdit;
+    QDialogButtonBox *fileDialogAcceptBox;
 public slots:
     virtual void updateMRL();
 private slots:
-- 
GitLab