forked from openlp/openlp
Fix theme migration method parameters
This commit is contained in:
parent
31c3be39e4
commit
78a6d20bb3
@ -366,8 +366,7 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
if os.path.splitext(file)[1].lower() in [u'.xml']:
|
if os.path.splitext(file)[1].lower() in [u'.xml']:
|
||||||
if self.checkVersion1(xml_data):
|
if self.checkVersion1(xml_data):
|
||||||
# upgrade theme xml
|
# upgrade theme xml
|
||||||
filexml = self.migrateVersion122(filename,
|
filexml = self.migrateVersion122(xml_data)
|
||||||
fullpath, xml_data)
|
|
||||||
else:
|
else:
|
||||||
filexml = xml_data
|
filexml = xml_data
|
||||||
outfile = open(fullpath, u'w')
|
outfile = open(fullpath, u'w')
|
||||||
@ -399,13 +398,12 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def migrateVersion122(self, filename, fullpath, xml_data):
|
def migrateVersion122(self, xml_data):
|
||||||
"""
|
"""
|
||||||
Called by convert the xml data from version 1 format
|
Called by convert the xml data from version 1 format
|
||||||
to the current format.
|
to the current format.
|
||||||
New fields are defaulted but the new theme is useable
|
New fields are defaulted but the new theme is useable
|
||||||
"""
|
"""
|
||||||
log.debug(u'migrateVersion122 %s %s', filename, fullpath)
|
|
||||||
theme = Theme(xml_data)
|
theme = Theme(xml_data)
|
||||||
newtheme = ThemeXML()
|
newtheme = ThemeXML()
|
||||||
newtheme.new_document(theme.Name)
|
newtheme.new_document(theme.Name)
|
||||||
|
Loading…
Reference in New Issue
Block a user