diff --git a/openlp/core/__init__.py b/openlp/core/__init__.py index eae3d0ab9..fa952162d 100644 --- a/openlp/core/__init__.py +++ b/openlp/core/__init__.py @@ -201,11 +201,11 @@ class OpenLP(OpenLPMixin, QtGui.QApplication): :param has_run_wizard: OpenLP has been run before """ - data_version = Settings().value('core/data version') + data_version = Settings().value('core/application version') openlp_version = get_application_version()['version'] # New installation, no need to create backup if not has_run_wizard: - Settings().setValue('core/data version', openlp_version) + Settings().setValue('core/application version', openlp_version) # If data_version is different from the current version ask if we should backup the data folder elif data_version != openlp_version: if QtGui.QMessageBox.question(None, translate('OpenLP', 'Backup'), @@ -227,7 +227,7 @@ class OpenLP(OpenLPMixin, QtGui.QApplication): translate('OpenLP', 'A backup of the data folder has been created at %s') % data_folder_backup_path) # Update the version in the settings - Settings().setValue('core/data version', openlp_version) + Settings().setValue('core/application version', openlp_version) def process_events(self): """ diff --git a/openlp/core/common/settings.py b/openlp/core/common/settings.py index a0adbe906..dc61b10fd 100644 --- a/openlp/core/common/settings.py +++ b/openlp/core/common/settings.py @@ -137,7 +137,7 @@ class Settings(QtCore.QSettings): # circular dependency. 'core/display on monitor': True, 'core/override position': False, - 'core/data version': '0.0', + 'core/application version': '0.0', 'images/background color': '#000000', 'media/players': 'webkit', 'media/override player': QtCore.Qt.Unchecked, diff --git a/tests/functional/test_init.py b/tests/functional/test_init.py index 1c2ce4339..7897895c7 100644 --- a/tests/functional/test_init.py +++ b/tests/functional/test_init.py @@ -83,7 +83,7 @@ class TestInit(TestCase, TestMixin): 'version': '2.2.0', 'build': 'bzr000' } - Settings().setValue('core/data version', '2.2.0') + Settings().setValue('core/application version', '2.2.0') with patch('openlp.core.get_application_version') as mocked_get_application_version,\ patch('openlp.core.QtGui.QMessageBox.question') as mocked_question: mocked_get_application_version.return_value = MOCKED_VERSION @@ -93,7 +93,7 @@ class TestInit(TestCase, TestMixin): self.openlp.backup_on_upgrade(old_install) # THEN: It should not ask if we want to create a backup - self.assertEqual(Settings().value('core/data version'), '2.2.0', 'Version should be the same!') + self.assertEqual(Settings().value('core/application version'), '2.2.0', 'Version should be the same!') self.assertEqual(mocked_question.call_count, 0, 'No question should have been asked!') def backup_on_upgrade_test(self): @@ -107,7 +107,7 @@ class TestInit(TestCase, TestMixin): 'version': '2.2.0', 'build': 'bzr000' } - Settings().setValue('core/data version', '2.0.5') + Settings().setValue('core/application version', '2.0.5') with patch('openlp.core.get_application_version') as mocked_get_application_version,\ patch('openlp.core.QtGui.QMessageBox.question') as mocked_question: mocked_get_application_version.return_value = MOCKED_VERSION @@ -117,5 +117,5 @@ class TestInit(TestCase, TestMixin): self.openlp.backup_on_upgrade(old_install) # THEN: It should ask if we want to create a backup - self.assertEqual(Settings().value('core/data version'), '2.2.0', 'Version should be upgraded!') + self.assertEqual(Settings().value('core/application version'), '2.2.0', 'Version should be upgraded!') self.assertEqual(mocked_question.call_count, 1, 'A question should have been asked!')