]> git.sesse.net Git - vlc/commitdiff
Qt Fix profile edition and saving. Close #2477
authorJean-Baptiste Kempf <jb@videolan.org>
Fri, 6 Feb 2009 23:50:07 +0000 (00:50 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 6 Feb 2009 23:51:05 +0000 (00:51 +0100)
modules/gui/qt4/components/sout/profile_selector.cpp
modules/gui/qt4/components/sout/profile_selector.hpp
modules/gui/qt4/util/qvlcframe.hpp

index b52d17f913567d6448ca3a8ff9eb915db4570462..4893c17bbce56b82dea53b9025547cef4136a571 100644 (file)
@@ -58,6 +58,7 @@ inline void VLCProfileSelector::fillProfilesCombo()
     for( int i = 0; i < i_size; i++ )
     {
         settings.setArrayIndex( i );
+        if( settings.value( "Profile-Name" ).toString().isEmpty() ) continue;
         profileBox->addItem( settings.value( "Profile-Name" ).toString(),
                 settings.value( "Profile-Value" ) );
     }
@@ -204,7 +205,7 @@ VLCProfileEditor::VLCProfileEditor( QString qs_name, QString value,
 
 inline void VLCProfileEditor::registerCodecs()
 {
+
 #define ADD_VCODEC( name, fourcc ) ui.vCodecBox->addItem( name, QVariant( fourcc ) );
     ADD_VCODEC( "MPEG-1", "mp1v" )
     ADD_VCODEC( "MPEG-2", "mp2v" )
index 6a70db5d936ed16f50ba15c03f3622d3c5c04608..e8b4364b5ccd89d57e6762dbbe7e06f399081abc 100644 (file)
@@ -70,7 +70,7 @@ public:
 private:
     void registerCodecs();
     void fillProfile( QString qs );
-protected:
+protected slots:
     virtual void close();
 private slots:
     void setVTranscodeOptions( bool );
index b48c3ca86a98cff6830ecebc6cc725f043becf57..059497f7b3c78ac429b6ad218c6606d4cbe05a67 100644 (file)
@@ -155,13 +155,13 @@ protected:
     {
         if( keyEvent->key() == Qt::Key_Escape )
         {
-            cancel();
+            this->cancel();
         }
         else if( keyEvent->key() == Qt::Key_Return
               || keyEvent->key() == Qt::Key_Enter )
         {
-             close();
-         }
+             this->close();
+        }
     }
 };
 
@@ -193,14 +193,12 @@ protected:
     {
         if( keyEvent->key() == Qt::Key_Escape )
         {
-            msg_Dbg( p_intf, "Escp Key pressed" );
-            cancel();
+            this->cancel();
         }
         else if( keyEvent->key() == Qt::Key_Return
               || keyEvent->key() == Qt::Key_Enter )
         {
-             msg_Dbg( p_intf, "Enter Key pressed" );
-             close();
+            this->close();
         }
     }
 };