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>
This commit is contained in:
Andy Shaw 2012-12-04 14:25:36 +01:00 committed by The Qt Project
parent 3537ecfecb
commit 7fcf1cf674

View File

@ -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 {