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

--- Comment #4 from John Kizer <john.ki...@proton.me> ---
I'm having a heck of a time figuring out how to get to the next step, but from
what I can tell so far, there's a problem in how the shortcut property of the
QKeySequence for an Alternate shortcut is converted to a string, at least when
writing to the katerc file. That ends up causing a space to always be inserted
after the semicolon.

This was causing the issue I was observing in my case, but it also affects
trying to set an Alternate shortcut in the first place - it looks like if
someone tries to set both a Primary and Alternate shortcut for the same thing
in that same dialog, it'll work during that session, but katerc will have a
space incorrectly inserted after the semicolon (like "Ctrl+F; Alt+Shift+R") -
so when Kate is restarted and it loads from katerc, it won't load the alternate
correctly.

I gave it a shot to try following the debugging instructions on the Community
website, and try to look at what the data looks like "inside" QKeySequence, but
I don't know if I'm doing the right thing at all there - but I can at least
confirm that in kactioncollection.cpp, the shortcut value for a "stolen"/empty
one in that process is "; ":

> Thread 1 "kate" hit Breakpoint 4, KActionCollection::writeSettings 
> (this=<optimized out>, config=0x7ffe1f0c2f20, writeAll=false,
>    oneAction=<optimized out>) at 
> /usr/src/debug/kf6-kxmlgui-6.6.0-1.fc40.x86_64/src/kactioncollection.cpp:692
> 692                     qCDebug(DEBUG_KXMLGUI) << "\twriting " << actionName 
> << " = " << s;
> (gdb) list
> 687                     // not set to its default value. Write it
> 688                     QString s = 
> QKeySequence::listToString(action->shortcuts());
> 689                     if (s.isEmpty()) {
> 690                         s = QStringLiteral("none");
> 691                     }
> 692                     qCDebug(DEBUG_KXMLGUI) << "\twriting " << actionName 
> << " = " << s;
> 693                     config->writeEntry(actionName, s, flags);
> 694
> 695                 } else if (bConfigHasAction) {
> 696                     // Otherwise, this key is the same as default but 
> exists in
> (gdb) print actionName
> $25 = "kate_mdi_focus_toolview_kate_plugin_katesearch"
> (gdb) print s
> $26 = "; "

I'm just not sure where to go to investigate further - I'm trying out Qt
Creator but I think I'm in over my head because I can't figure out how to look
"inside" the QKeySequence referenced on line 688?

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

Reply via email to