[Differential] [Requested Changes To] D4123: Show shortcuts on the tooltips.

Anton Anikin noreply at phabricator.kde.org
Mon Jan 16 04:22:15 UTC 2017


antonanikin requested changes to this revision.
antonanikin added a reviewer: antonanikin.
antonanikin added a comment.
This revision now requires changes to proceed.


  This works, thanks.
  
  But I think you should add some comments to code about current restrictions - for example, tooltips are not updated after shortcut changing - we need to restart kdevelop for this.
  
  And also maybe it better to use monospace font for shortcut displaying? Something like this:
  
    foreach(QAction *action, actionCollection()->actions()) {
        QString shortCut;
        if (!action->shortcut().isEmpty())
            shortCut = action->shortcut().toString();
        else if (!actionCollection()->defaultShortcut(action).isEmpty())
            shortCut = actionCollection()->defaultShortcut(action).toString();
    
        if (!shortCut.isEmpty())
            action->setToolTip(QString("<html>%1 (<b><tt>%2</tt></b>)</html>").arg(action->toolTip()).arg(shortCut));
    }

REPOSITORY
  R33 KDevPlatform

REVISION DETAIL
  https://phabricator.kde.org/D4123

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: tcanabrava, kfunk, apol, antonanikin
Cc: antonanikin, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170116/daa09184/attachment.html>


More information about the KDevelop-devel mailing list