https://bugs.kde.org/show_bug.cgi?id=420525

--- Comment #16 from David Hurka <david.hu...@mailbox.org> ---
Thanks to you, I have learned how to trigger KActionCollection contents through
gdb. ;) It would probably be easier through D-Bus, if it was exposed there.

Note that some shortcuts are not applied until a restart, due to another bug.

The black background problem is very likely not related.

If the actions don’t appear in Configure Shortcuts and Configure Toolbars, you
could use this procedure to see whether they exist in the action collection:

1. You need KF5 KXMLGui, Qt5 core, Qt5 gui, Qt5 widgets, Okular debugging
symbol packages installed. You need gdb for your local system, usually just
called “gdb”.

2. Start Okular:
$ gdb okular
(gdb) start
(gdb breaks at main function)
(gdb) continue

3. Open a document with enough pages and select Facing Pages.

4. Type view_render_mode_single in the find bar (Ctrl-F), we will use that
string to fetch the action.

5. Go back to the gdb console and set a breakpoint at the Find Next button:
Ctrl-C
(gdb) break FindBar::findNext
(gdb) continue

6. Click the Next button.

7. Get the address of the FindBar object:
(gdb) print this
$1 = (FindBar * const) 0x555555a314f0

8. Break somewhere inside PageView:
(gdb) break PageView::mouseMoveEvent
(gdb) continue

9. Move your mouse over the Okular window, gdb will catch the breakpoint. Then:
(gdb) print
actionCollection()->action(((FindBar*)0x555555a314f0)->text())->trigger()
(You need to adjust the pointer to what was printed in step 7.)

10. Observe the results (if not crashed in step 9):
(gdb) continue

11. Quit Okular. To quit gdb:
(gdb) quit
y

The intended result is that Okular switches to Single Page view mode. Release
20.04.0 should switch to Overview mode. If the action does not exist in the
action collection, Okular should segfault at step 9, and we have to figure out
how the action got lost.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to