Debugging `KApplicationTrader::queryByMimeType`

I’ve been chipping away at my problem with digikam (Digikam crashing on right-click after upgrade). I’ve been able to get to capture a backtrace (Build digikam with debug symbols? - #10 by mikelygee), showing that digikam makes a call to KApplicationTrader::queryByMimeType, which never returns.

Now, I’m stuck. I don’t know how to build kservice with debug symbols, and to build digikam using that. Or is there another way to get more detail on what’s going on?

Any advice would be appreciated!