Helpviewer/Passwords/PasswordModel.py

changeset 7
c679fb30c8f3
parent 0
de9c2efb9d02
child 13
1af94a91f439
--- a/Helpviewer/Passwords/PasswordModel.py	Mon Dec 28 18:31:37 2009 +0000
+++ b/Helpviewer/Passwords/PasswordModel.py	Wed Dec 30 15:40:33 2009 +0000
@@ -114,24 +114,24 @@
         
         @param index index to get data for (QModelIndex)
         @param role role of the data to retrieve (integer)
-        @return requested data (QVariant)
+        @return requested data
         """
         if index.row() >= self.__manager.sitesCount() or index.row() < 0:
-            return QVariant()
+            return None
         
         site = self.__manager.allSiteNames()[index.row()]
         siteInfo = self.__manager.siteInfo(site)
         
         if siteInfo is None:
-            return QVariant()
+            return None
         
         if role == Qt.DisplayRole:
             if index.column() == 0:
-                return QVariant(site)
+                return site
             elif index.column() in [1, 2]:
-                return QVariant(siteInfo[index.column() - 1])
+                return siteInfo[index.column() - 1]
         
-        return QVariant()
+        return None
     
     def headerData(self, section, orientation, role = Qt.DisplayRole):
         """
@@ -140,12 +140,12 @@
         @param section section number (integer)
         @param orientation header orientation (Qt.Orientation)
         @param role data role (integer)
-        @return header data (QVariant)
+        @return header data
         """
         if orientation == Qt.Horizontal and role == Qt.DisplayRole:
             try:
-                return QVariant(self.__headers[section])
+                return self.__headers[section]
             except IndexError:
                 pass
         
-        return QVariant()
+        return None

eric ide

mercurial