src/gui/dialogs/qfontdialog.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   946     The signal will be disconnected from the slot when the dialog is closed.
   946     The signal will be disconnected from the slot when the dialog is closed.
   947 */
   947 */
   948 void QFontDialog::open(QObject *receiver, const char *member)
   948 void QFontDialog::open(QObject *receiver, const char *member)
   949 {
   949 {
   950     Q_D(QFontDialog);
   950     Q_D(QFontDialog);
   951     connect(this, SIGNAL(fontSelected(const QFont&)), receiver, member);
   951     connect(this, SIGNAL(fontSelected(QFont)), receiver, member);
   952     d->receiverToDisconnectOnClose = receiver;
   952     d->receiverToDisconnectOnClose = receiver;
   953     d->memberToDisconnectOnClose = member;
   953     d->memberToDisconnectOnClose = member;
   954     QDialog::open();
   954     QDialog::open();
   955 }
   955 }
   956 
   956 
  1036         emit fontSelected(d->selectedFont);
  1036         emit fontSelected(d->selectedFont);
  1037     } else {
  1037     } else {
  1038         d->selectedFont = QFont();
  1038         d->selectedFont = QFont();
  1039     }
  1039     }
  1040     if (d->receiverToDisconnectOnClose) {
  1040     if (d->receiverToDisconnectOnClose) {
  1041         disconnect(this, SIGNAL(fontSelected(const QFont&)),
  1041         disconnect(this, SIGNAL(fontSelected(QFont)),
  1042                    d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose);
  1042                    d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose);
  1043         d->receiverToDisconnectOnClose = 0;
  1043         d->receiverToDisconnectOnClose = 0;
  1044     }
  1044     }
  1045     d->memberToDisconnectOnClose.clear();
  1045     d->memberToDisconnectOnClose.clear();
  1046 }
  1046 }