diff libgui/src/resource-manager.h @ 24282:a669809df612 stable

update wrong setting keys accidentally introduced into the settings file * octave-dock-widget.cc (handle_settings): check whether wrong settings keys fixed with cset bda0c5b38bda exist in the settings file and update them if so; * resource-manager.cc (do_update_settings_key): new function for testing existence of wrong settings key and copying it to the new one if necessary; * resource-manager.h (update_settings_key): static wrapper for new function do_update_settings_key
author Torsten <mttl@mailbox.org>
date Sun, 19 Nov 2017 21:15:17 +0100
parents 3ac9f9ecfae5
children 8612ab9fc564
line wrap: on
line diff
--- a/libgui/src/resource-manager.h	Sun Nov 12 22:10:46 2017 +0100
+++ b/libgui/src/resource-manager.h	Sun Nov 19 21:15:17 2017 +0100
@@ -77,6 +77,12 @@
       instance->do_set_settings (file);
   }
 
+  static bool update_settings_key (const QString& new_key, const QString& old_key)
+  {
+    return instance_ok () ?
+           instance->do_update_settings_key (new_key, old_key) : false;
+  }
+
   static void combo_encoding (QComboBox *combo, QString current = QString ())
   {
     if (instance_ok ())
@@ -138,6 +144,8 @@
 
   void do_set_settings (const QString& file);
 
+  bool do_update_settings_key (const QString& new_key, const QString& old_key);
+
   void do_update_network_settings (void);
 
   bool do_is_first_run (void) const;