Helpviewer/HelpWindow.py

changeset 7
c679fb30c8f3
parent 6
52e8c820d0dd
child 8
0ae9bd4d2993
diff -r 52e8c820d0dd -r c679fb30c8f3 Helpviewer/HelpWindow.py
--- a/Helpviewer/HelpWindow.py	Mon Dec 28 18:31:37 2009 +0000
+++ b/Helpviewer/HelpWindow.py	Wed Dec 30 15:40:33 2009 +0000
@@ -1398,13 +1398,13 @@
         """
         self.historyMenu.clear()
         self.historyMenu.addAction(self.clearHistoryAct)
-        self.clearHistoryAct.setData(QVariant(-1))
+        self.clearHistoryAct.setData(-1)
         self.historyMenu.addSeparator()
         idx = 0
         for hist in self.mHistory:
             act = self.historyMenu.addAction(
                 Utilities.compactPath(hist, self.maxMenuFilePathLen))
-            act.setData(QVariant(idx))
+            act.setData(idx)
             idx += 1
             act.setIcon(HelpWindow.__getWebIcon(QUrl(hist)))
         
@@ -2577,7 +2577,7 @@
         for index in range(self.tabWidget.count()):
             act = self.__navigationMenu.addAction(self.tabWidget.tabIcon(index), 
                                               self.tabWidget.tabText(index))
-            act.setData(QVariant(index))
+            act.setData(index)
         
     def __navigationMenuTriggered(self, act):
         """
@@ -2585,7 +2585,7 @@
         
         @param act reference to the selected action (QAction)
         """
-        index, ok = act.data().toInt()
+        index = act.data()
         if ok:
             self.tabWidget.setCurrentIndex(index)
         
@@ -2600,7 +2600,7 @@
         for index in range(len(backItems) - 1, -1, -1):
             item = backItems[index]
             act = QAction(self)
-            act.setData(QVariant(-1 * (index + 1)))
+            act.setData(-1 * (index + 1))
             icon = HelpWindow.__getWebIcon(item.url())
             act.setIcon(icon)
             act.setText(item.title())
@@ -2617,7 +2617,7 @@
         for index in range(len(forwardItems)):
             item = forwardItems[index]
             act = QAction(self)
-            act.setData(QVariant(index + 1))
+            act.setData(index + 1)
             icon = HelpWindow.__getWebIcon(item.url())
             act.setIcon(icon)
             act.setText(item.title())
@@ -2629,7 +2629,7 @@
         
         @param act reference to the action selected in the navigation menu (QAction)
         """
-        offset = act.data().toInt()[0]
+        offset = act.data()
         history = self.currentBrowser().history()
         historyCount = history.count()
         if offset < 0:

eric ide

mercurial