mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-06-01 18:49:38 +12:00
Fixes test_settingsWindow and clean up
This commit is contained in:
parent
b9e35c8709
commit
a7f668c2bf
|
@ -29,18 +29,21 @@ def test_general(MWSampleProject):
|
||||||
|
|
||||||
# Style
|
# Style
|
||||||
assert SW.cmbStyle.count() == len(list(QStyleFactory.keys()))
|
assert SW.cmbStyle.count() == len(list(QStyleFactory.keys()))
|
||||||
assert SW.cmbStyle.currentText() == qS.value("applicationStyle")
|
if qS.value("applicationStyle"):
|
||||||
|
assert SW.cmbStyle.currentText() == qS.value("applicationStyle")
|
||||||
## Seg fault when trying to set the style in tests:
|
## Seg fault when trying to set the style in tests:
|
||||||
# for s in styles:
|
# for s in styles:
|
||||||
# SW.cmbStyle.setCurrentText(s)
|
# SW.cmbStyle.setCurrentText(s)
|
||||||
# assert S.value("applicationStyle") == s
|
# assert S.value("applicationStyle") == s
|
||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
assert (SW.cmbTranslation.currentData()
|
if qS.value("applicationTranslation"):
|
||||||
== qS.value("applicationTranslation"))
|
assert (SW.cmbTranslation.currentData()
|
||||||
|
== qS.value("applicationTranslation"))
|
||||||
for name in SW.translations:
|
for name in SW.translations:
|
||||||
SW.cmbTranslation.setCurrentText(name)
|
SW.cmbTranslation.setCurrentText(name)
|
||||||
assert qS.value("applicationTranslation") == SW.translations[name]
|
if qS.value("applicationTranslation"):
|
||||||
|
assert qS.value("applicationTranslation") == SW.translations[name]
|
||||||
|
|
||||||
def switchCheckBoxAndAssert(chk, settings):
|
def switchCheckBoxAndAssert(chk, settings):
|
||||||
"""
|
"""
|
||||||
|
@ -139,26 +142,3 @@ def test_general(MWSampleProject):
|
||||||
SW.lstThemes.setCurrentItem(item)
|
SW.lstThemes.setCurrentItem(item)
|
||||||
SW.removeTheme()
|
SW.removeTheme()
|
||||||
assert SW.lstThemes.count() == count
|
assert SW.lstThemes.count() == count
|
||||||
|
|
||||||
# self._editingTheme = None
|
|
||||||
# self.btnThemeEditOK.setIcon(qApp.style().standardIcon(QStyle.SP_DialogApplyButton))
|
|
||||||
# self.btnThemeEditOK.clicked.connect(self.saveTheme)
|
|
||||||
# self.btnThemeEditCancel.setIcon(qApp.style().standardIcon(QStyle.SP_DialogCancelButton))
|
|
||||||
# self.btnThemeEditCancel.clicked.connect(self.cancelEdit)
|
|
||||||
# self.cmbThemeEdit.currentIndexChanged.connect(self.themeEditStack.setCurrentIndex)
|
|
||||||
# self.cmbThemeEdit.setCurrentIndex(0)
|
|
||||||
# self.cmbThemeEdit.currentIndexChanged.emit(0)
|
|
||||||
# self.themeStack.setCurrentIndex(0)
|
|
||||||
# self.populatesThemesList()
|
|
||||||
# self.btnThemeAdd.clicked.connect(self.newTheme)
|
|
||||||
# self.btnThemeEdit.clicked.connect(self.editTheme)
|
|
||||||
# self.btnThemeRemove.clicked.connect(self.removeTheme)
|
|
||||||
# self.timerUpdateFSPreview = QTimer()
|
|
||||||
# self.timerUpdateFSPreview.setSingleShot(True)
|
|
||||||
# self.timerUpdateFSPreview.setInterval(250)
|
|
||||||
# self.timerUpdateFSPreview.timeout.connect(self.updatePreview)
|
|
||||||
# saveTheme
|
|
||||||
# themeEditStack.setCurrentIndex
|
|
||||||
# editTheme
|
|
||||||
# removeTheme
|
|
||||||
# updatePreview
|
|
||||||
|
|
Loading…
Reference in a new issue