KTextEditorPreview::KPartView: optimize shortcut code
This commit optimizes code added in 40ec8280.
-
QHash
should be faster thanQMap
; - Make temporary container variables
const
to prevent detaching; -
auto shortcut
=>const auto &shortcut
to prevent unnecessary copying ofQKeySequence
, which has non-inline copy constructor.