Review Request 122981: add KGlobalAccel::loadShortcutFromGlobalSettings

Thomas Lübking thomas.luebking at gmail.com
Sat Apr 4 09:40:15 UTC 2015



> On April 4, 2015, 9:14 vorm., Gregor Mi wrote:
> > src/kglobalaccel.h, line 372
> > <https://git.reviewboard.kde.org/r/122981/diff/4/?file=359983#file359983line372>
> >
> >     NOTE that this causes compile error in libKF5XmlGui
> >     
> >     
> >     /home/gregor/dev/kf5/usr/lib64/libKF5XmlGui.so.5.8.0: undefined reference to `KGlobalAccel::globalShortcutChanged(QAction*, QKeySequence const&)'
> >     collect2: error: ld returned 1 exit status

"Of course not" - that's an ABI *and* API incompatible change (big no-go, not gonna happen)

a) introduce a flag to ::updateGlobalShortcut() whether the shortcut should actually be updated (or just somehow initialized) by shortcut() (defaulting true)
b) if that flag is false (set by shortcut() on invocation)
   1. exit early if there's a known shortcut to skip the expensive stuff
   2. NEVER emit the changed signal
c) const_cast<QAction*> the action parameter from ::shortcut()
d) add comments that constness is to be (weakly) guaranteed if "onlyInitial" (or so) is true
e) add a TODO for KF/6 to remove constness from the ::shortcut() parameter


- Thomas


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


On April 3, 2015, 5:50 nachm., 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 nachm.)
> 
> 
> 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/20150404/831f06cf/attachment.html>


More information about the Kde-frameworks-devel mailing list