diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-02-08 14:22:14 +0000 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-02-08 14:22:14 +0000 |
| commit | 5fb08c24b61176969903ad45abaa4a73d4be62c5 (patch) | |
| tree | d3029e66fb2c77397134b903743ddb912043a5bc /examples/example_3_transferHandling/xmppClient.cpp | |
| parent | 7697a663a092584d5b784f6834ad0aeb919bebe5 (diff) | |
| download | qxmpp-5fb08c24b61176969903ad45abaa4a73d4be62c5.tar.gz | |
fix indentation & compiler warnings
Diffstat (limited to 'examples/example_3_transferHandling/xmppClient.cpp')
| -rw-r--r-- | examples/example_3_transferHandling/xmppClient.cpp | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/examples/example_3_transferHandling/xmppClient.cpp b/examples/example_3_transferHandling/xmppClient.cpp index b3091f72..adfbcfd7 100644 --- a/examples/example_3_transferHandling/xmppClient.cpp +++ b/examples/example_3_transferHandling/xmppClient.cpp @@ -33,6 +33,9 @@ xmppClient::xmppClient(QObject *parent) : QXmppClient(parent), transferManager(0) { + bool check; + Q_UNUSED(check); + // add transfer manager transferManager = new QXmppTransferManager; addExtension(transferManager); @@ -42,8 +45,8 @@ xmppClient::xmppClient(QObject *parent) // transferManager->setSupportedMethods(QXmppTransferJob::InBandMethod); // transferManager->setSupportedMethods(QXmppTransferJob::SocksMethod); - bool check = connect(this, SIGNAL(presenceReceived(QXmppPresence)), - this, SLOT(slotPresenceReceived(QXmppPresence))); + check = connect(this, SIGNAL(presenceReceived(QXmppPresence)), + this, SLOT(slotPresenceReceived(QXmppPresence))); Q_ASSERT(check); check = connect(transferManager, SIGNAL(fileReceived(QXmppTransferJob*)), @@ -62,15 +65,21 @@ void xmppClient::slotError(QXmppTransferJob::Error error) void xmppClient::slotFileReceived(QXmppTransferJob *job) { + bool check; + Q_UNUSED(check); + qDebug() << "Got transfer request from:" << job->jid(); - bool check = connect(job, SIGNAL(error(QXmppTransferJob::Error)), this, SLOT(slotError(QXmppTransferJob::Error))); + check = connect(job, SIGNAL(error(QXmppTransferJob::Error)), + this, SLOT(slotError(QXmppTransferJob::Error))); Q_ASSERT(check); - check = connect(job, SIGNAL(finished()), this, SLOT(slotFinished())); + check = connect(job, SIGNAL(finished()), + this, SLOT(slotFinished())); Q_ASSERT(check); - check = connect(job, SIGNAL(progress(qint64,qint64)), this, SLOT(slotProgress(qint64,qint64))); + check = connect(job, SIGNAL(progress(qint64,qint64)), + this, SLOT(slotProgress(qint64,qint64))); Q_ASSERT(check); // allocate a buffer to receive the file @@ -90,6 +99,9 @@ void xmppClient::slotFinished() void xmppClient::slotPresenceReceived(const QXmppPresence &presence) { + bool check; + Q_UNUSED(check); + const QLatin1String recipient("qxmpp.test2@gmail.com"); // if we are the recipient, or if the presence is not from the recipient, @@ -102,16 +114,16 @@ void xmppClient::slotPresenceReceived(const QXmppPresence &presence) // send the file and connect to the job's signals QXmppTransferJob *job = transferManager->sendFile(presence.from(), "xmppClient.cpp"); - bool check = connect( job, SIGNAL(error(QXmppTransferJob::Error)), - this, SLOT(slotError(QXmppTransferJob::Error)) ); + check = connect(job, SIGNAL(error(QXmppTransferJob::Error)), + this, SLOT(slotError(QXmppTransferJob::Error))); Q_ASSERT(check); - check = connect( job, SIGNAL(finished()), - this, SLOT(slotFinished()) ); + check = connect(job, SIGNAL(finished()), + this, SLOT(slotFinished())); Q_ASSERT(check); - check = connect( job, SIGNAL(progress(qint64,qint64)), - this, SLOT(slotProgress(qint64,qint64)) ); + check = connect(job, SIGNAL(progress(qint64,qint64)), + this, SLOT(slotProgress(qint64,qint64))); Q_ASSERT(check); } |
