Commit 0ea61050 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt Fix profile edition and saving. Close #2477

parent 2fb77408
...@@ -58,6 +58,7 @@ inline void VLCProfileSelector::fillProfilesCombo() ...@@ -58,6 +58,7 @@ inline void VLCProfileSelector::fillProfilesCombo()
for( int i = 0; i < i_size; i++ ) for( int i = 0; i < i_size; i++ )
{ {
settings.setArrayIndex( i ); settings.setArrayIndex( i );
if( settings.value( "Profile-Name" ).toString().isEmpty() ) continue;
profileBox->addItem( settings.value( "Profile-Name" ).toString(), profileBox->addItem( settings.value( "Profile-Name" ).toString(),
settings.value( "Profile-Value" ) ); settings.value( "Profile-Value" ) );
} }
...@@ -204,7 +205,7 @@ VLCProfileEditor::VLCProfileEditor( QString qs_name, QString value, ...@@ -204,7 +205,7 @@ VLCProfileEditor::VLCProfileEditor( QString qs_name, QString value,
inline void VLCProfileEditor::registerCodecs() inline void VLCProfileEditor::registerCodecs()
{ {
#define ADD_VCODEC( name, fourcc ) ui.vCodecBox->addItem( name, QVariant( fourcc ) ); #define ADD_VCODEC( name, fourcc ) ui.vCodecBox->addItem( name, QVariant( fourcc ) );
ADD_VCODEC( "MPEG-1", "mp1v" ) ADD_VCODEC( "MPEG-1", "mp1v" )
ADD_VCODEC( "MPEG-2", "mp2v" ) ADD_VCODEC( "MPEG-2", "mp2v" )
......
...@@ -70,7 +70,7 @@ public: ...@@ -70,7 +70,7 @@ public:
private: private:
void registerCodecs(); void registerCodecs();
void fillProfile( QString qs ); void fillProfile( QString qs );
protected: protected slots:
virtual void close(); virtual void close();
private slots: private slots:
void setVTranscodeOptions( bool ); void setVTranscodeOptions( bool );
......
...@@ -155,13 +155,13 @@ protected: ...@@ -155,13 +155,13 @@ protected:
{ {
if( keyEvent->key() == Qt::Key_Escape ) if( keyEvent->key() == Qt::Key_Escape )
{ {
cancel(); this->cancel();
} }
else if( keyEvent->key() == Qt::Key_Return else if( keyEvent->key() == Qt::Key_Return
|| keyEvent->key() == Qt::Key_Enter ) || keyEvent->key() == Qt::Key_Enter )
{ {
close(); this->close();
} }
} }
}; };
...@@ -193,14 +193,12 @@ protected: ...@@ -193,14 +193,12 @@ protected:
{ {
if( keyEvent->key() == Qt::Key_Escape ) if( keyEvent->key() == Qt::Key_Escape )
{ {
msg_Dbg( p_intf, "Escp Key pressed" ); this->cancel();
cancel();
} }
else if( keyEvent->key() == Qt::Key_Return else if( keyEvent->key() == Qt::Key_Return
|| keyEvent->key() == Qt::Key_Enter ) || keyEvent->key() == Qt::Key_Enter )
{ {
msg_Dbg( p_intf, "Enter Key pressed" ); this->close();
close();
} }
} }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment