summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-05-26 10:31:23 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2009-05-26 10:33:44 (GMT)
commit3037e466ebf21aa4a47a722a1e2ff497690cbef5 (patch)
tree80e531cd4cd3649b29e597ca77212ba34f660f89 /src/3rdparty
parent1386d291082aaf7ebb55f0ebce20bca0ed89ae53 (diff)
downloadQt-3037e466ebf21aa4a47a722a1e2ff497690cbef5.zip
Qt-3037e466ebf21aa4a47a722a1e2ff497690cbef5.tar.gz
Qt-3037e466ebf21aa4a47a722a1e2ff497690cbef5.tar.bz2
Fix a crash in Phonon::EffectWidget
When creating a UI based on double types we only assigned the control pointer in certain cases. This would crash because the tooltip did not check for the pointer, but the real issue was that we didnt assign the control in the first place. Task-number: 249710 Reviewed-by: Richard Moe Gustavsen
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/phonon/phonon/effectwidget.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/3rdparty/phonon/phonon/effectwidget.cpp b/src/3rdparty/phonon/phonon/effectwidget.cpp
index da5a51a..d5c6c81 100644
--- a/src/3rdparty/phonon/phonon/effectwidget.cpp
+++ b/src/3rdparty/phonon/phonon/effectwidget.cpp
@@ -165,6 +165,7 @@ void EffectWidgetPrivate::autogenerateUi()
if (minValue == -1. && maxValue == 1.) {
//Special case values between -1 and 1.0 to use a slider for improved usability
QSlider *slider = new QSlider(Qt::Horizontal, q);
+ control = slider;
slider->setRange(-SLIDER_RANGE, +SLIDER_RANGE);
slider->setValue(int(SLIDER_RANGE * value.toDouble()));
slider->setTickPosition(QSlider::TicksBelow);
@@ -188,10 +189,10 @@ void EffectWidgetPrivate::autogenerateUi()
break;
}
+ if (control) {
#ifndef QT_NO_TOOLTIP
control->setToolTip(para.description());
#endif
- if (control) {
#ifndef QT_NO_SHORTCUT
label->setBuddy(control);
#endif