178 if hasattr(ref, "getActions"): |
178 if hasattr(ref, "getActions"): |
179 actions = ref.getActions() |
179 actions = ref.getActions() |
180 for act in actions: |
180 for act in actions: |
181 __saveShortcut(act, category, prefClass) |
181 __saveShortcut(act, category, prefClass) |
182 |
182 |
183 for act in e5App().getObject("DummyHelpViewer").getActions(): |
183 try: |
184 __saveShortcut(act, "HelpViewer", prefClass) |
184 for act in e5App().getObject("DummyHelpViewer").getActions(): |
|
185 __saveShortcut(act, "HelpViewer", prefClass) |
|
186 except KeyError: |
|
187 # no QtWebKit available |
|
188 pass |
185 |
189 |
186 |
190 |
187 def exportShortcuts(fn): |
191 def exportShortcuts(fn): |
188 """ |
192 """ |
189 Module function to export the keyboard shortcuts for the defined QActions. |
193 Module function to export the keyboard shortcuts for the defined QActions. |
322 for category, ref in e5App().getPluginObjects(): |
326 for category, ref in e5App().getPluginObjects(): |
323 if category in shortcuts and hasattr(ref, "getActions"): |
327 if category in shortcuts and hasattr(ref, "getActions"): |
324 actions = ref.getActions() |
328 actions = ref.getActions() |
325 __setAction(actions, shortcuts[category]) |
329 __setAction(actions, shortcuts[category]) |
326 |
330 |
327 if "HelpViewer" in shortcuts: |
331 try: |
328 __setAction(e5App().getObject("DummyHelpViewer").getActions(), |
332 if "HelpViewer" in shortcuts: |
329 shortcuts["HelpViewer"]) |
333 __setAction(e5App().getObject("DummyHelpViewer").getActions(), |
|
334 shortcuts["HelpViewer"]) |
|
335 except KeyError: |
|
336 # no QtWebKit available |
|
337 pass |