aboutsummaryrefslogtreecommitdiff
path: root/examples/example_3_transferHandling/example_3_transferHandling.cpp
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2020-02-02 18:14:27 +0100
committerLNJ <lnj@kaidan.im>2020-02-03 00:11:55 +0100
commit57f1b775197aed1d32e98b0299c0999339a7d5f6 (patch)
treece5702781e15f3a5c438ab153edf06f51a501b29 /examples/example_3_transferHandling/example_3_transferHandling.cpp
parent99b850a3008bbb03d3449d683adb87839f7d5c4b (diff)
downloadqxmpp-57f1b775197aed1d32e98b0299c0999339a7d5f6.tar.gz
Run clang-format also on all cpp files
Diffstat (limited to 'examples/example_3_transferHandling/example_3_transferHandling.cpp')
-rw-r--r--examples/example_3_transferHandling/example_3_transferHandling.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/examples/example_3_transferHandling/example_3_transferHandling.cpp b/examples/example_3_transferHandling/example_3_transferHandling.cpp
index c39e4b9b..28243989 100644
--- a/examples/example_3_transferHandling/example_3_transferHandling.cpp
+++ b/examples/example_3_transferHandling/example_3_transferHandling.cpp
@@ -49,10 +49,10 @@ xmppClient::xmppClient(QObject *parent)
// transferManager->setSupportedMethods(QXmppTransferJob::SocksMethod);
connect(this, &QXmppClient::presenceReceived,
- this, &xmppClient::slotPresenceReceived);
+ this, &xmppClient::slotPresenceReceived);
connect(transferManager, &QXmppTransferManager::fileReceived,
- this, &xmppClient::slotFileReceived);
+ this, &xmppClient::slotFileReceived);
}
void xmppClient::setRecipient(const QString &recipient)
@@ -74,13 +74,13 @@ void xmppClient::slotFileReceived(QXmppTransferJob *job)
qDebug() << "Got transfer request from:" << job->jid();
connect(job, SIGNAL(error(QXmppTransferJob::Error)),
- this, SLOT(slotError(QXmppTransferJob::Error)));
+ this, SLOT(slotError(QXmppTransferJob::Error)));
connect(job, &QXmppTransferJob::finished,
- this, &xmppClient::slotFinished);
+ this, &xmppClient::slotFinished);
connect(job, &QXmppTransferJob::progress,
- this, &xmppClient::slotProgress);
+ this, &xmppClient::slotProgress);
// allocate a buffer to receive the file
auto *buffer = new QBuffer(this);
@@ -110,12 +110,12 @@ void xmppClient::slotPresenceReceived(const QXmppPresence &presence)
QXmppTransferJob *job = transferManager->sendFile(presence.from(), ":/example_3_transferHandling.cpp", "example source code");
connect(job, SIGNAL(error(QXmppTransferJob::Error)),
- this, SLOT(slotError(QXmppTransferJob::Error)));
+ this, SLOT(slotError(QXmppTransferJob::Error)));
connect(job, &QXmppTransferJob::finished,
- this, &xmppClient::slotFinished);
+ this, &xmppClient::slotFinished);
connect(job, &QXmppTransferJob::progress,
- this, &xmppClient::slotProgress);
+ this, &xmppClient::slotProgress);
}
/// A file transfer has made progress.
@@ -130,8 +130,7 @@ int main(int argc, char *argv[])
QCoreApplication a(argc, argv);
// we want one argument : "send" or "receive"
- if (argc != 2 || (strcmp(argv[1], "send") && strcmp(argv[1], "receive")))
- {
+ if (argc != 2 || (strcmp(argv[1], "send") && strcmp(argv[1], "receive"))) {
fprintf(stderr, "Usage: %s send|receive\n", argv[0]);
return EXIT_FAILURE;
}