From 30a0d8c1592f781f49c64f12f972e5ba67b0a5e1 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Mon, 23 Aug 2010 18:58:47 +0200 Subject: [PATCH] Qt: warn when we cannot save the configuration Close #3944 --- modules/gui/qt4/dialogs/preferences.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/gui/qt4/dialogs/preferences.cpp b/modules/gui/qt4/dialogs/preferences.cpp index 32b6704fbb..2bfa9db793 100644 --- a/modules/gui/qt4/dialogs/preferences.cpp +++ b/modules/gui/qt4/dialogs/preferences.cpp @@ -28,6 +28,7 @@ #include "dialogs/preferences.hpp" #include "util/qvlcframe.hpp" +#include "dialogs/errors.hpp" #include "components/complete_preferences.hpp" #include "components/simple_preferences.hpp" @@ -294,7 +295,11 @@ void PrefsDialog::save() } /* Save to file */ - config_SaveConfigFile( p_intf, NULL ); + if( config_SaveConfigFile( p_intf, NULL ) != 0 ) + { + ErrorsDialog::getInstance (p_intf)->addError( qtr( "Cannot save Configuration" ), + qtr("Preferences file could not be saved") ); + } accept(); } -- 2.39.2