summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qgtkstyle.cpp
diff options
context:
space:
mode:
authorAndreas Kling <andreas.kling@nokia.com>2010-12-06 16:25:40 (GMT)
committerAndreas Kling <andreas.kling@nokia.com>2010-12-06 16:25:40 (GMT)
commitc5a9bf1553dc1960ef5d1531a0acf405ace6a05c (patch)
tree0abefc29b6641bc24b4af577e6e38e2c5c23875d /src/gui/styles/qgtkstyle.cpp
parent1ba320366e1b010ecf32c263574e183e4b1f452d (diff)
downloadQt-c5a9bf1553dc1960ef5d1531a0acf405ace6a05c.zip
Qt-c5a9bf1553dc1960ef5d1531a0acf405ace6a05c.tar.gz
Qt-c5a9bf1553dc1960ef5d1531a0acf405ace6a05c.tar.bz2
QGtkStyle: Use gtk_progress_configure() instead of adjustment API
There is no corresponding getter for gtk_progress_set_adjustment() anyway, so the old code was actually crashing. Reviewed-by: Jens Bache-Wiig
Diffstat (limited to 'src/gui/styles/qgtkstyle.cpp')
-rw-r--r--src/gui/styles/qgtkstyle.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index f3ec746..323639a 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -3017,13 +3017,7 @@ void QGtkStyle::drawControl(ControlElement element,
else if (bar->progress > bar->minimum)
fakePos = maximum - 1;
- GtkAdjustment *adjustment = d->gtk_progress_get_adjustment((GtkProgress*)gtkProgressBar);
- if (adjustment) {
- d->gtk_adjustment_configure(adjustment, fakePos, 0, maximum, 0, 0, 0);
- } else {
- adjustment = (GtkAdjustment*)d->gtk_adjustment_new(fakePos, 0, maximum, 0, 0, 0);
- d->gtk_progress_set_adjustment((GtkProgress*)(gtkProgressBar), adjustment);
- }
+ d->gtk_progress_configure((GtkProgress*)gtkProgressBar, fakePos, 0, maximum);
QRect progressBar;