summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qinputdialog.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-05-28 07:51:43 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-05-28 08:02:13 (GMT)
commit0bb0699d403b7541472a72a4057ecf0ca366a7cd (patch)
tree339b2151707e273f08d7249c877801587745339d /src/gui/dialogs/qinputdialog.cpp
parentb3be28bf199521546bc7890c66f8454f5d310083 (diff)
downloadQt-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/dialogs/qinputdialog.cpp')
-rw-r--r--src/gui/dialogs/qinputdialog.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/dialogs/qinputdialog.cpp b/src/gui/dialogs/qinputdialog.cpp
index 78d99e3..8608334 100644
--- a/src/gui/dialogs/qinputdialog.cpp
+++ b/src/gui/dialogs/qinputdialog.cpp
@@ -307,8 +307,7 @@ void QInputDialogPrivate::ensureEnabledConnection(QAbstractSpinBox *spinBox)
{
if (spinBox) {
QAbstractButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
- QObject::disconnect(spinBox, SIGNAL(textChanged(bool)), okButton, SLOT(setEnabled(bool)));
- QObject::connect(spinBox, SIGNAL(textChanged(bool)), okButton, SLOT(setEnabled(bool)));
+ QObject::connect(spinBox, SIGNAL(textChanged(bool)), okButton, SLOT(setEnabled(bool)), Qt::UniqueConnection);
}
}