X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fqt4%2Fqt4.cpp;h=76e642efa3fd54d3880fc6fc59a6c91cb7e5296d;hb=af04bf606c21ff622359b0e04ff0e8933f13cf54;hp=f769317dec7edce358011b3318f5cb5648252450;hpb=90f719f7712411e17abd0ef30d442143d441b265;p=vlc diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp index f769317dec..76e642efa3 100644 --- a/modules/gui/qt4/qt4.cpp +++ b/modules/gui/qt4/qt4.cpp @@ -244,6 +244,7 @@ static int Open( vlc_object_t *p_this ) p_intf->p_sys->p_playlist = pl_Yield( p_intf ); /* Listen to the messages */ p_intf->p_sys->p_sub = msg_Subscribe( p_intf ); + /* one settings to rule them all */ var_Create( p_this, "window_widget", VLC_VAR_ADDRESS ); return VLC_SUCCESS; @@ -323,6 +324,7 @@ static void Init( intf_thread_t *p_intf ) QApplication *app = new QApplication( argc, argv , true ); p_intf->p_sys->p_app = app; + p_intf->p_sys->mainSettings = new QSettings( "vlc", "vlc-qt-interface" ); /* Icon setting FIXME: use a bigger icon ? */ if( QDate::currentDate().dayOfYear() >= 354 ) @@ -368,7 +370,7 @@ static void Init( intf_thread_t *p_intf ) QString path = QString( QT4LOCALEDIR ); #else QString path = QString( QString(config_GetDataDir()) + DIR_SEP + - "locale" + DIR_SEP ); + "locale" + DIR_SEP + "qt4" + DIR_SEP ); #endif // files depending on locale bool b_loaded = qtTranslator.load( path + "qt_" + ql.name()); @@ -390,13 +392,12 @@ static void Init( intf_thread_t *p_intf ) if( config_GetInt( p_intf, "qt-updates-notif" ) ) { int interval = config_GetInt( p_intf, "qt-updates-days" ); - QSettings settings( "vlc", "vlc-qt-interface" ); if( QDate::currentDate() > - settings.value( "updatedate" ).toDate().addDays( interval ) ) + getSettings()->value( "updatedate" ).toDate().addDays( interval ) ) { /* The constructor of the update Dialog will do the 1st request */ UpdateDialog::getInstance( p_intf ); - settings.setValue( "updatedate", QDate::currentDate() ); + getSettings()->setValue( "updatedate", QDate::currentDate() ); } } #endif @@ -425,6 +426,9 @@ static void Init( intf_thread_t *p_intf ) /* Destroy the MainInputManager */ MainInputManager::killInstance(); + /* Delete the configuration */ + delete p_intf->p_sys->mainSettings; + /* Delete the application */ delete app;