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 | |
| parent | 7697a663a092584d5b784f6834ad0aeb919bebe5 (diff) | |
| download | qxmpp-5fb08c24b61176969903ad45abaa4a73d4be62c5.tar.gz | |
fix indentation & compiler warnings
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/example_2_rosterHandling/xmppClient.cpp | 14 | ||||
| -rw-r--r-- | examples/example_3_transferHandling/xmppClient.cpp | 34 | ||||
| -rw-r--r-- | examples/example_7_archiveHandling/xmppClient.cpp | 7 | ||||
| -rw-r--r-- | examples/example_9_vCard/xmppClient.cpp | 10 |
4 files changed, 42 insertions, 23 deletions
diff --git a/examples/example_2_rosterHandling/xmppClient.cpp b/examples/example_2_rosterHandling/xmppClient.cpp index bcf8b104..c3a6976f 100644 --- a/examples/example_2_rosterHandling/xmppClient.cpp +++ b/examples/example_2_rosterHandling/xmppClient.cpp @@ -31,19 +31,21 @@ xmppClient::xmppClient(QObject *parent) : QXmppClient(parent) { - bool check = connect(this, SIGNAL(connected()), - SLOT(clientConnected())); + bool check; + Q_UNUSED(check); + + check = connect(this, SIGNAL(connected()), + SLOT(clientConnected())); Q_ASSERT(check); check = connect(&this->rosterManager(), SIGNAL(rosterReceived()), - SLOT(rosterReceived())); + SLOT(rosterReceived())); Q_ASSERT(check); /// Then QXmppRoster::presenceChanged() is emitted whenever presence of someone /// in roster changes - check = connect(&this->rosterManager(), - SIGNAL(presenceChanged(QString,QString)), - SLOT(presenceChanged(QString,QString))); + check = connect(&this->rosterManager(), SIGNAL(presenceChanged(QString,QString)), + SLOT(presenceChanged(QString,QString))); Q_ASSERT(check); } 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); } diff --git a/examples/example_7_archiveHandling/xmppClient.cpp b/examples/example_7_archiveHandling/xmppClient.cpp index c09808e7..2eac1011 100644 --- a/examples/example_7_archiveHandling/xmppClient.cpp +++ b/examples/example_7_archiveHandling/xmppClient.cpp @@ -33,13 +33,16 @@ xmppClient::xmppClient(QObject *parent) : QXmppClient(parent) { + bool check; + Q_UNUSED(check); + // add archive manager archiveManager = new QXmppArchiveManager; addExtension(archiveManager); // connect signals - bool check = connect(this, SIGNAL(connected()), - this, SLOT(clientConnected())); + check = connect(this, SIGNAL(connected()), + this, SLOT(clientConnected())); Q_ASSERT(check); check = connect(archiveManager, SIGNAL(archiveChatReceived(QXmppArchiveChat)), diff --git a/examples/example_9_vCard/xmppClient.cpp b/examples/example_9_vCard/xmppClient.cpp index 5ecc9ab3..6dcf70a9 100644 --- a/examples/example_9_vCard/xmppClient.cpp +++ b/examples/example_9_vCard/xmppClient.cpp @@ -39,14 +39,16 @@ xmppClient::xmppClient(QObject *parent) : QXmppClient(parent) { - bool check = connect(this, SIGNAL(connected()), - SLOT(clientConnected())); + bool check; + Q_UNUSED(check); + + check = connect(this, SIGNAL(connected()), + SLOT(clientConnected())); Q_ASSERT(check); check = connect(&this->rosterManager(), SIGNAL(rosterReceived()), - SLOT(rosterReceived())); + SLOT(rosterReceived())); Q_ASSERT(check); - } xmppClient::~xmppClient() |
