Commit 5ff8bac3 authored by Daniel Teske's avatar Daniel Teske Committed by hjk

Analyzer: Fix scrolling

Broken by qtbase commit 934f06220391eb0e0ebf66a2eb037f48adb4c43c

Change-Id: Ib58aa6ff31b7ce81bfa26e1ccf1bbf209618b307
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent cecc46b9
......@@ -53,8 +53,6 @@ CostView::CostView(QWidget *parent)
{
setSelectionMode(QAbstractItemView::ExtendedSelection);
setSelectionBehavior(QAbstractItemView::SelectRows);
setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
setUniformRowHeights(true);
setAutoScroll(false);
setSortingEnabled(true);
......
......@@ -492,6 +492,19 @@ QString MemcheckErrorView::defaultSuppressionFile() const
return m_defaultSuppFile;
}
void MemcheckErrorView::updateGeometries()
{
if (model()) {
QModelIndex index = model()->index(0, modelColumn(), rootIndex());
QStyleOptionViewItem option = viewOptions();
// delegate for row / column
QSize step = itemDelegate()->sizeHint(option, index);
horizontalScrollBar()->setSingleStep(step.width() + spacing());
verticalScrollBar()->setSingleStep(step.height() + spacing());
}
QListView::updateGeometries();
}
// slot, can (for now) be invoked either when the settings were modified *or* when the active
// settings object has changed.
void MemcheckErrorView::settingsChanged(ValgrindBaseSettings *settings)
......
......@@ -54,6 +54,8 @@ public:
QString defaultSuppressionFile() const;
ValgrindBaseSettings *settings() const { return m_settings; }
void updateGeometries();
public slots:
void settingsChanged(ValgrindBaseSettings *settings);
void goNext();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment