diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index 2e6518d..cda3b8f 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -2196,13 +2196,13 @@ bool QColorDialogPrivate::handleColorPickingKeyPress(QKeyEvent *e) void QColorDialog::done(int result) { Q_D(QColorDialog); - QDialog::done(result); if (result == Accepted) { d->selectedQColor = d->currentQColor(); emit colorSelected(d->selectedQColor); } else { d->selectedQColor = QColor(); } + QDialog::done(result); if (d->receiverToDisconnectOnClose) { disconnect(this, SIGNAL(colorSelected(QColor)), d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose);