← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~smpettit/openlp/export-settings into lp:openlp

 

Stevan Pettit has proposed merging lp:~smpettit/openlp/export-settings into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~smpettit/openlp/export-settings/+merge/74907

Added code to remove obsolete settings entries causing problems with the export/import of settings.
A much earlier version of OpenLP used "custom slide", replaced by "custom"
Recently "service" was changed to "servicemanager"
-- 
https://code.launchpad.net/~smpettit/openlp/export-settings/+merge/74907
Your team OpenLP Core is requested to review the proposed merge of lp:~smpettit/openlp/export-settings into lp:openlp.
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py	2011-09-05 13:03:30 +0000
+++ openlp/core/ui/mainwindow.py	2011-09-11 12:39:23 +0000
@@ -1044,9 +1044,6 @@
         for section_key in keys:
             section, key = section_key.split(u'/')
             key_value = settings.value(section_key)
-            # Change the service section to servicemanager.
-            if section == u'service':
-                section_key = u'servicemanager/' + key
             export_settings.setValue(section_key, key_value)
         export_settings.sync()
         # Temp CONF file has been written.  Blanks in keys are now '%20'.
@@ -1294,6 +1291,9 @@
         """
         log.debug(u'Loading QSettings')
         settings = QtCore.QSettings()
+        # Remove obsolete entries.
+        settings.remove(u'custom slide')
+        settings.remove(u'service')
         settings.beginGroup(self.generalSettingsSection)
         self.recentFiles = settings.value(u'recent files').toStringList()
         settings.endGroup()


Follow ups