# HG changeset patch # User Torsten # Date 1399392495 -7200 # Node ID 0f9ed79fb206299b64c8b0c730655cb920a8f738 # Parent 95249367d6faddf6a11d2485e9c21dc014401f7d fix performance issue of history viewer with large history entries (bug #42255) * history-dock-widget.cc (constructor): set elide text mode, set max. displayed entry width to the desktop width diff -r 95249367d6fa -r 0f9ed79fb206 libgui/src/history-dock-widget.cc --- a/libgui/src/history-dock-widget.cc Mon May 05 19:49:41 2014 +0200 +++ b/libgui/src/history-dock-widget.cc Tue May 06 18:08:15 2014 +0200 @@ -29,7 +29,7 @@ #include #include #include - +#include #include "error.h" #include "cmd-hist.h" @@ -93,6 +93,14 @@ this, SLOT (handle_double_click (QModelIndex))); setFocusProxy (_filter_line_edit); + + // shrink max. displayed entry size to desktop width + QSize screen = QDesktopWidget ().screenGeometry ().size (); + int w = screen.width (); + QFontMetrics fm = _history_list_view->fontMetrics (); + int h = fm.height (); + _history_list_view->setGridSize (QSize (w,h)); + _history_list_view->setTextElideMode (Qt::ElideRight); } void history_dock_widget::ctxMenu (const QPoint &xpos) @@ -234,4 +242,3 @@ _history_list_view->selectAll (); } } -