Review Request 122981: add KGlobalAccel::loadShortcutFromGlobalSettings

Gregor Mi codestruct at posteo.org
Fri Apr 10 10:52:42 UTC 2015



> On April 4, 2015, 9:31 p.m., Albert Astals Cid wrote:
> > Honestly, i think the problem here is that the function just doesn't do what you want it to do, i mean what it does is return the shorcut for the action with that pointer, your passing a different pointer and thus you're not getting the values, and what you want to do is retrieve the global shortcut someone else set. I understand that is something you awnt to do, but it's not what this does, to do that, i suggest you add a new function (that should not take a QAction *, since the pointer in there is irrelevant, the important is the metadata) or either call the dbus interface of kglobalacced directly from the app that needs it  ( Q_SCRIPTABLE QList<int> shortcut(const QStringList &actionId) const; is the dbus function in kglobalacced that you want)

> i suggest you add a new function (that should not take a QAction *, since the pointer in there is irrelevant, the important is the metadata)

Thanks for this suggestion. I'll update the RR accordingly. 

> or either call the dbus interface of kglobalacced directly from the app that needs it

I think the first method is easier to use for the app.


- Gregor


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122981/#review78505
-----------------------------------------------------------


On April 3, 2015, 5:50 p.m., Gregor Mi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122981/
> -----------------------------------------------------------
> 
> (Updated April 3, 2015, 5:50 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() (which is const).
> 
> See discussion in https://git.reviewboard.kde.org/r/122249/ ("libksysguard: add Kill Window to End Process button and show correct keyboard shortcut").
> 
> 
> Diffs
> -----
> 
>   autotests/kglobalshortcuttest.h b1122a8f5ca2f3f7afbe78f8edba87325426c1a6 
>   autotests/kglobalshortcuttest.cpp 3b661bbb612807a3bbbe34835d4ae712c2ec74da 
>   src/kglobalaccel.h 3fe20ca8e4ec6ceb0bb9e54235aef7f1aeeb8c16 
>   src/kglobalaccel.cpp 1b6b3f5cb6d42401d684e6a491d12a6e57248fd1 
>   src/kglobalaccel_p.h eca7c52378ad60d0d5806561214b9788dd46a11e 
> 
> Diff: https://git.reviewboard.kde.org/r/122981/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Gregor Mi
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150410/1b361e9f/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list