Helpviewer/HelpLanguagesDialog.py

changeset 7
c679fb30c8f3
parent 0
de9c2efb9d02
child 8
0ae9bd4d2993
--- a/Helpviewer/HelpLanguagesDialog.py	Mon Dec 28 18:31:37 2009 +0000
+++ b/Helpviewer/HelpLanguagesDialog.py	Wed Dec 30 15:40:33 2009 +0000
@@ -33,9 +33,8 @@
             SIGNAL("currentChanged(const QModelIndex&, const QModelIndex&)"), 
             self.__currentChanged)
         
-        languages = Preferences.Prefs.settings.value(
-            "Help/AcceptLanguages", QVariant(self.defaultAcceptLanguages()))\
-            .toStringList()
+        languages = Preferences.Prefs.settings.value(Preferences.toList(
+            "Help/AcceptLanguages", self.defaultAcceptLanguages()))
         self.__model.setStringList(languages)
         
         allLanguages = []
@@ -100,7 +99,7 @@
         
         self.__model.insertRow(self.__model.rowCount())
         self.__model.setData(self.__model.index(self.__model.rowCount() - 1), 
-                             QVariant(language))
+                             language)
         self.languagesList.setCurrentIndex(
             self.__model.index(self.__model.rowCount() - 1))
     
@@ -112,7 +111,7 @@
         if result == self.defaultAcceptLanguages():
             Preferences.Prefs.settings.remove("Help/AcceptLanguages")
         else:
-            Preferences.Prefs.settings.setValue("Help/AcceptLanguages", QVariant(result))
+            Preferences.Prefs.settings.setValue("Help/AcceptLanguages", result)
         QDialog.accept(self)
     
     @classmethod

eric ide

mercurial