diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-05-28 07:51:43 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-05-28 08:02:13 (GMT) |
commit | 0bb0699d403b7541472a72a4057ecf0ca366a7cd (patch) | |
tree | 339b2151707e273f08d7249c877801587745339d /src/gui/styles/qstylesheetstyle.cpp | |
parent | b3be28bf199521546bc7890c66f8454f5d310083 (diff) | |
download | Qt-0bb0699d403b7541472a72a4057ecf0ca366a7cd.zip Qt-0bb0699d403b7541472a72a4057ecf0ca366a7cd.tar.gz Qt-0bb0699d403b7541472a72a4057ecf0ca366a7cd.tar.bz2 |
Use Qt::UniqueConnection instead of disconnect/connect
Also fix an issue in QTreeView where a signal could be connected
several times
Reviewed-by: Thierry
Diffstat (limited to 'src/gui/styles/qstylesheetstyle.cpp')
-rw-r--r-- | src/gui/styles/qstylesheetstyle.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index 1d6dc8a..9a8f97e 100644 --- a/src/gui/styles/qstylesheetstyle.cpp +++ b/src/gui/styles/qstylesheetstyle.cpp @@ -2702,14 +2702,10 @@ void QStyleSheetStyle::polish(QWidget *w) QRenderRule rule = renderRule(sa, PseudoElement_None, PseudoClass_Enabled); if ((rule.hasBorder() && rule.border()->hasBorderImage()) || (rule.hasBackground() && !rule.background()->pixmap.isNull())) { - QObject::disconnect(sa->horizontalScrollBar(), SIGNAL(valueChanged(int)), - sa, SLOT(update())); - QObject::disconnect(sa->verticalScrollBar(), SIGNAL(valueChanged(int)), - sa, SLOT(update())); QObject::connect(sa->horizontalScrollBar(), SIGNAL(valueChanged(int)), - sa, SLOT(update())); + sa, SLOT(update()), Qt::UniqueConnection); QObject::connect(sa->verticalScrollBar(), SIGNAL(valueChanged(int)), - sa, SLOT(update())); + sa, SLOT(update()), Qt::UniqueConnection); } } #endif |