src/eric7/EricWidgets/EricToolBarManager.py

branch
eric7
changeset 10373
093dcebe5ecb
parent 10278
e26fa3b06f4f
child 10423
299802979277
diff -r 1444b4bee64b -r 093dcebe5ecb src/eric7/EricWidgets/EricToolBarManager.py
--- a/src/eric7/EricWidgets/EricToolBarManager.py	Sun Dec 03 16:44:52 2023 +0100
+++ b/src/eric7/EricWidgets/EricToolBarManager.py	Sun Dec 03 19:46:34 2023 +0100
@@ -101,7 +101,7 @@
         @param name object name of the toolbar (string)
         @return reference to the toolbar (QToolBar)
         """
-        for toolBar in list(self.__allToolBars.values()):
+        for toolBar in self.__allToolBars.values():
             if toolBar.objectName() == name:
                 return toolBar
         return None
@@ -114,12 +114,12 @@
         @return reference to the action (QAction)
         """
         # check objectName() first
-        for action in list(self.__allActions.values()):
+        for action in self.__allActions.values():
             if action.objectName() == name:
                 return action
 
         # check text() next
-        for action in list(self.__allActions.values()):
+        for action in self.__allActions.values():
             if action.text() == name:
                 return action
 
@@ -240,7 +240,7 @@
         @param toolBars dictionary with toolbar id as key and
             a list of actions as value
         """
-        for key, actions in list(toolBars.items()):
+        for key, actions in toolBars.items():
             tb = self.__allToolBars[key]
             self.setToolBar(tb, actions)
 
@@ -653,7 +653,7 @@
         @param actions dictionary with toolbar id as key and
             a list of widget actions as value
         """
-        for tbID in list(actions.keys())[:]:
+        for tbID in list(actions):
             toolBar = self.__allToolBars[tbID]
             newActions = self.__toolBars[tbID][:]
             newActionsWithSeparators = self.__toolBarsWithSeparators[tbID][:]
@@ -688,7 +688,7 @@
 
         @return list of categories (list of string)
         """
-        return list(self.__categoryToActions.keys())
+        return list(self.__categoryToActions)
 
     def categoryActions(self, category):
         """

eric ide

mercurial