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/corelib/statemachine | |
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/corelib/statemachine')
-rw-r--r-- | src/corelib/statemachine/qstatemachine.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index 757584a..185fb7d 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -803,8 +803,7 @@ void QStateMachinePrivate::applyProperties(const QList<QAbstractTransition*> &tr stateForAnimation.insert(a, s); animationsForState[s].append(a); // ### connect to just the top-level animation? - QObject::disconnect(a, SIGNAL(finished()), q, SLOT(_q_animationFinished())); - QObject::connect(a, SIGNAL(finished()), q, SLOT(_q_animationFinished())); + QObject::connect(a, SIGNAL(finished()), q, SLOT(_q_animationFinished()), Qt::UniqueConnection); } it2 = assignments.erase(it2); } else { |