Skip to content

KTextEditorPreview::KPartView: optimize shortcut code

Igor Kushnir requested to merge work/optimize-kpartview-shortcuts into master

This commit optimizes code added in 40ec8280.

  • QHash should be faster than QMap;
  • Make temporary container variables const to prevent detaching;
  • auto shortcut => const auto &shortcut to prevent unnecessary copying of QKeySequence, which has non-inline copy constructor.

Merge request reports

Loading