diff options
author | Andy Shaw <andy.shaw@digia.com> | 2012-12-04 14:25:36 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-12-19 21:24:23 +0100 |
commit | 7fcf1cf674d09d9dd1d41e2913252017f1d599ca (patch) | |
tree | 84fffe320ec30695fe17d58eb9bc5e126a62ec8e /src/widgets | |
parent | 3537ecfecb3dc8bf47261125395a3282455849c6 (diff) |
Check for gtk_adjustment_configure as this is not always implemented
Some implementations seem to not have the gtk_adjustment_configure
function implemented so we check for this so that there is no problem
when it tries to use it.
Task-number: QTBUG-23569
QTBUG-25760
Change-Id: I777ce09268f86907f3da3cede408c9a41be566cf
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Karim Pinter <karim.pinter@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/styles/qgtkstyle.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/widgets/styles/qgtkstyle.cpp b/src/widgets/styles/qgtkstyle.cpp index 75d2306da7..3ee242334d 100644 --- a/src/widgets/styles/qgtkstyle.cpp +++ b/src/widgets/styles/qgtkstyle.cpp @@ -2204,8 +2204,10 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom GtkRange *range = (GtkRange*)(horizontal ? gtkHScrollBar : gtkVScrollBar); - GtkAdjustment *adjustment = d->gtk_range_get_adjustment(range); + GtkAdjustment *adjustment = 0; + if (d->gtk_adjustment_configure) + adjustment = d->gtk_range_get_adjustment(range); if (adjustment) { d->gtk_adjustment_configure(adjustment, fakePos, 0, maximum, 0, 0, 0); } else { |