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/itemviews | |
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/itemviews')
-rw-r--r-- | src/gui/itemviews/qtreeview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp index c3fca8e..7837700 100644 --- a/src/gui/itemviews/qtreeview.cpp +++ b/src/gui/itemviews/qtreeview.cpp @@ -851,7 +851,7 @@ void QTreeView::setSortingEnabled(bool enable) // because otherwise it will not call sort on the model. sortByColumn(header()->sortIndicatorSection(), header()->sortIndicatorOrder()); connect(header(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)), - this, SLOT(_q_sortIndicatorChanged(int, Qt::SortOrder))); + this, SLOT(_q_sortIndicatorChanged(int, Qt::SortOrder)), Qt::UniqueConnection); } else { disconnect(header(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)), this, SLOT(_q_sortIndicatorChanged(int, Qt::SortOrder))); |