summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/qlistview.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/widgets/qlistview.cpp b/src/widgets/qlistview.cpp
index 6f8ec29..6e2564c 100644
--- a/src/widgets/qlistview.cpp
+++ b/src/widgets/qlistview.cpp
@@ -5181,11 +5181,13 @@ void QListView::keyPressEvent( QKeyEvent * e )
QListViewItem * QListView::itemAt( const QPoint & viewPos ) const
{
- if ( viewPos.x() > contentsWidth() - contentsX() )
+ if ( viewPos.x() > contentsWidth() - contentsX() ) {
return 0;
+ }
- if ( !d->drawables || d->drawables->isEmpty() )
+ if ( !d->drawables || d->drawables->isEmpty() ) {
buildDrawableList();
+ }
QListViewPrivate::DrawableItem * c = d->drawables->first();
int g = viewPos.y() + contentsY();