[vlc-devel] commit: Qt: correctly handle cancelling of sout/convert dialogs. Update copyrights. (Jean-Baptiste Kempf )

git version control git at videolan.org
Sat Mar 14 16:49:31 CET 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Mar 14 16:48:58 2009 +0100| [6b7e4a811f0037112663b826521724133b9374c3] | committer: Jean-Baptiste Kempf 

Qt: correctly handle cancelling of sout/convert dialogs. Update copyrights.

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

 modules/gui/qt4/components/sout/sout_widgets.cpp |    5 +++-
 modules/gui/qt4/dialogs/convert.cpp              |    3 +-
 modules/gui/qt4/dialogs/sout.cpp                 |    6 +----
 modules/gui/qt4/dialogs_provider.cpp             |   23 ++++++++++++++++++---
 4 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/modules/gui/qt4/components/sout/sout_widgets.cpp b/modules/gui/qt4/components/sout/sout_widgets.cpp
index 457228a..9dfb940 100644
--- a/modules/gui/qt4/components/sout/sout_widgets.cpp
+++ b/modules/gui/qt4/components/sout/sout_widgets.cpp
@@ -1,10 +1,13 @@
 /*****************************************************************************
  * profile_selector.cpp : A small profile selector and editor
  ****************************************************************************
- * Copyright (C) 2009 the VideoLAN team
+ * Copyright (C) 2007-2009 the VideoLAN team
+ * Copyright (C) 2007 Société des arts technologiques
+ * Copyright (C) 2007 Savoir-faire Linux
  * $Id$
  *
  * Authors: Jean-Baptiste Kempf <jb at videolan.org>
+ *          Pierre-Luc Beaudoin <pierre-luc.beaudoin at savoirfairelinux.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/modules/gui/qt4/dialogs/convert.cpp b/modules/gui/qt4/dialogs/convert.cpp
index 5b64b48..5a989ff 100644
--- a/modules/gui/qt4/dialogs/convert.cpp
+++ b/modules/gui/qt4/dialogs/convert.cpp
@@ -112,7 +112,7 @@ void ConvertDialog::fileBrowse()
 
 void ConvertDialog::cancel()
 {
-    hide();
+    reject();
 }
 
 void ConvertDialog::close()
@@ -131,4 +131,5 @@ void ConvertDialog::close()
             ",dst='" + fileLine->text() + "'}";
 
     msg_Dbg( p_intf, "Transcode MRL: %s", qtu( mrl ) );
+    accept();
 }
diff --git a/modules/gui/qt4/dialogs/sout.cpp b/modules/gui/qt4/dialogs/sout.cpp
index 250dc3c..f7ec1a3 100644
--- a/modules/gui/qt4/dialogs/sout.cpp
+++ b/modules/gui/qt4/dialogs/sout.cpp
@@ -1,16 +1,12 @@
 /*****************************************************************************
  * sout.cpp : Stream output dialog ( old-style )
  ****************************************************************************
- * Copyright (C) 2007-2008 the VideoLAN team
- * Copyright (C) 2007 Société des arts technologiques
- * Copyright (C) 2007 Savoir-faire Linux
+ * Copyright (C) 2007-2009 the VideoLAN team
  *
  * $Id$
  *
  * Authors: Clément Stenac <zorglub at videolan.org>
  *          Jean-Baptiste Kempf <jb at videolan.org>
- *          Jean-François Massol <jf.massol -at- gmail.com>
- *          Pierre-Luc Beaudoin <pierre-luc.beaudoin at savoirfairelinux.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index d7aec12..4e254be 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -574,14 +574,29 @@ void DialogsProvider::streamingDialog( QWidget *parent, QString mrl,
     {
         SoutDialog *s = SoutDialog::getInstance( parent, p_intf, mrl );
         if( s->exec() == QDialog::Accepted )
-            psz_option = qtu( s->getMrl() );
-    }else {
+        {
+            psz_option = strdup( qtu( s->getMrl() ) );
+            delete s;
+        }
+        else
+        {
+            delete s;
+            return;
+        }
+    } else {
         ConvertDialog *s = new ConvertDialog( parent, p_intf, mrl );
         if( s->exec() == QDialog::Accepted )
-            psz_option = qtu( s->getMrl() );
+        {
+            psz_option = strdup( qtu( s->getMrl() ) );
+            delete s;
+        }
+        else
+        {
+            delete s;
+            return;
+        }
     }
 
-
     if( !EMPTY_STR( psz_option ) )
     {
 




More information about the vlc-devel mailing list