本文整理汇总了C++中QSslSocket::setParent方法的典型用法代码示例。如果您正苦于以下问题:C++ QSslSocket::setParent方法的具体用法?C++ QSslSocket::setParent怎么用?C++ QSslSocket::setParent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSslSocket
的用法示例。
在下文中一共展示了QSslSocket::setParent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QObject
QXmppClient::QXmppClient(QObject *parent)
: QObject(parent),
d(new QXmppClientPrivate)
{
QSslSocket *socket = new QSslSocket;
d->stream = new QXmppStream(socket, this);
socket->setParent(d->stream);
d->clientPresence.setExtensions(d->stream->presenceExtensions());
bool check = connect(d->stream, SIGNAL(elementReceived(const QDomElement&, bool&)),
this, SIGNAL(elementReceived(const QDomElement&, bool&)));
Q_ASSERT(check);
check = connect(d->stream, SIGNAL(messageReceived(const QXmppMessage&)),
this, SIGNAL(messageReceived(const QXmppMessage&)));
Q_ASSERT(check);
check = connect(d->stream, SIGNAL(presenceReceived(const QXmppPresence&)),
this, SIGNAL(presenceReceived(const QXmppPresence&)));
Q_ASSERT(check);
check = connect(d->stream, SIGNAL(iqReceived(const QXmppIq&)), this,
SIGNAL(iqReceived(const QXmppIq&)));
Q_ASSERT(check);
check = connect(d->stream, SIGNAL(discoveryIqReceived(const QXmppDiscoveryIq&)), this,
SIGNAL(discoveryIqReceived(const QXmppDiscoveryIq&)));
Q_ASSERT(check);
check = connect(d->stream, SIGNAL(disconnected()), this,
SIGNAL(disconnected()));
Q_ASSERT(check);
check = connect(d->stream, SIGNAL(xmppConnected()), this,
SLOT(xmppConnected()));
Q_ASSERT(check);
check = connect(d->stream, SIGNAL(xmppConnected()), this,
SIGNAL(connected()));
Q_ASSERT(check);
check = connect(d->stream, SIGNAL(error(QXmppClient::Error)), this,
SIGNAL(error(QXmppClient::Error)));
Q_ASSERT(check);
check = setReconnectionManager(new QXmppReconnectionManager(this));
Q_ASSERT(check);
// rpc
check = connect(d->stream, SIGNAL(rpcCallInvoke(QXmppRpcInvokeIq)),
this, SLOT(invokeInterfaceMethod(QXmppRpcInvokeIq)));
Q_ASSERT(check);
// logging
check = connect(this, SIGNAL(logMessage(QXmppLogger::MessageType, QString)),
d->stream, SIGNAL(logMessage(QXmppLogger::MessageType, QString)));
Q_ASSERT(check);
// create managers
d->rosterManager = new QXmppRosterManager(d->stream, this);
d->archiveManager = new QXmppArchiveManager(d->stream, this);
d->callManager = new QXmppCallManager(d->stream, this);
d->mucManager = new QXmppMucManager(d->stream, this);
d->transferManager = new QXmppTransferManager(d->stream, this);
d->vCardManager = new QXmppVCardManager(d->stream, this);
}