void SendFileAction::actionInstanceCreated(Action *action) { auto account = action->context()->chat().chatAccount(); if (!account || !account.protocolHandler() || !account.protocolHandler()->fileTransferService()) return; connect(account.protocolHandler()->fileTransferService(), SIGNAL(canSendChanged()), action, SLOT(checkState())); }
void GaduFileTransferService::setGaduIMTokenService(GaduIMTokenService *imTokenService) { m_imTokenService = imTokenService; connect(m_imTokenService, SIGNAL(imTokenChanged(QByteArray)), this, SIGNAL(canSendChanged())); }
GaduFileTransferService::GaduFileTransferService(GaduProtocol *protocol) : FileTransferService(protocol), Protocol(protocol) { connect(Protocol, SIGNAL(connected(Account)), this, SIGNAL(canSendChanged())); connect(Protocol, SIGNAL(disconnected(Account)), this, SIGNAL(canSendChanged())); }