summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-05-26 12:31:23 +0200
committerJason McDonald <jason.mcdonald@nokia.com>2009-05-26 20:39:04 +1000
commitdf98d5c0ac45bad7ef4bc09b4db9e49c7258bc42 (patch)
treeed18dbdde46257d5d98da954ad53e3e0dacc4688 /src
parentce42a5ddc98c45cd9111a91b02b8b6e946f73331 (diff)
downloadqt4-tools-df98d5c0ac45bad7ef4bc09b4db9e49c7258bc42.tar.gz
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 (cherry picked from commit 3037e466ebf21aa4a47a722a1e2ff497690cbef5)
Diffstat (limited to 'src')
-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 da5a51a469..d5c6c81b1b 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