> On March 22, 2015, 4:56 p.m., Albert Astals Cid wrote: > > src/kglobalaccel.h, line 260 > > <https://git.reviewboard.kde.org/r/122981/diff/2/?file=356138#file356138line260> > > > > typo in following > > Gregor Mi wrote: > About why it is needed: see > KGlobalShortcutTest::testLoadShortcutFromGlobalSettings: shortcut() does not > behave as expected when the new method loadShortcutFromGlobalSettings() is > not called > > I don't know if always calling loadShortcutFromGlobalSettings() before > shortcut() would break existing code. E.g. in > kwin/effects/desktopgrid/desktopgrid_config.cpp shortcut() is used without > prior call of loadShortcutFromGlobalSettings(). > > On the other hand, a call to loadShortcutFromGlobalSettings() might be > harmless but I don't have a good overview of the KGlobalAccel usage patterns. > > Albert Astals Cid wrote: > Honestly i have no idea on how this kglobalaccel thing works, but it > seems to me you're just adding a way to workaround a bug instead of fixing it. > > Gregor Mi wrote: > Me neither :-) > > I was hoping that someone with more experience with kglobalaccel can say > more about the proposed solution. > > Like you Thomas suggested to put the loading method into shortcut() > (which is essentially a one-liner: d->updateGlobalShortcut(action, > KGlobalAccelPrivate::ActiveShortcut, KGlobalAccel::Autoloading);).
well we could try it: add the one-line change and try whether the unit tests pass and then try whether the case in DesktopGridConfig works. Unfortunately I'm also not that into KGloalAccel code yet to be 100 % whether it's a valid change :-( - Martin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/122981/#review77912 ----------------------------------------------------------- On March 22, 2015, 5:05 p.m., Gregor Mi wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/122981/ > ----------------------------------------------------------- > > (Updated March 22, 2015, 5:05 p.m.) > > > Review request for KDE Frameworks, Martin Gräßlin and Thomas Lübking. > > > Repository: kglobalaccel > > > Description > ------- > > In some cases you need to call loadShortcutFromGlobalSettings() in order not > to get a an empty list when calling shortcut(). See discussion in > https://git.reviewboard.kde.org/r/122249/. > > > Diffs > ----- > > autotests/kglobalshortcuttest.h 2a7b40d34875e16345a659fb9764e4f536ad79c6 > autotests/kglobalshortcuttest.cpp 169bf92ffbff985cd4381e771c2fcecaff77156b > src/kglobalaccel.h 3fe20ca8e4ec6ceb0bb9e54235aef7f1aeeb8c16 > src/kglobalaccel.cpp 1b6b3f5cb6d42401d684e6a491d12a6e57248fd1 > > Diff: https://git.reviewboard.kde.org/r/122981/diff/ > > > Testing > ------- > > > Thanks, > > Gregor Mi > >
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel