final clean ups

This commit is contained in:
Andreas Preikschat 2013-01-18 21:43:19 +01:00
parent bf4c1dafb4
commit 2f3a5d1fb2
2 changed files with 9 additions and 30 deletions

View File

@ -233,10 +233,10 @@ class Settings(QtCore.QSettings):
(u'general/enable slide loop', u'advanced/slide limits', [(SlideLimits.Wrap, True), (SlideLimits.End, False)]),
(u'themes/last directory', u'themes/last directory import', []),
(u'themes/last directory 1', u'themes/last directory export', []),
(u'servicemanager/last directory', u'', [])
# songusage/last directory 1 -> songusage/last directory export
# songs/last directory 1 -> songs/last directory import
# bibles/last directory 1 -> bibles/last directory import
(u'servicemanager/last directory', u'', []),
(u'songs/last directory 1', u'songs/last directory import', []),
(u'bibles/last directory 1', u'bibles/last directory import', []),
(u'songusage/last directory 1', u'songusage/last directory export', [])
]
@staticmethod
@ -303,12 +303,7 @@ class Settings(QtCore.QSettings):
``key``
The key to return the value from.
``default_value``
**Note**, do **not** use this. It is *only* for dynamic keys such as ``something %d``.
"""
# FIXME: remove default_value
if default_value is None:
# if group() is not empty the group has not been specified together with the key.
if self.group():
default_value = Settings.__default_settings__[self.group() + u'/' + key]

View File

@ -1,16 +0,0 @@
"""
Package to test our customised Settings class.
"""
from unittest import TestCase
from mock import MagicMock, patch
from openlp.core.lib import Settings
class TestSettings(TestCase):
def value_test(self):
#assert not(default_value is not None and key in Settings.__default_settings__)
pass