diff options
| author | Linus Jahn <lnj@kaidan.im> | 2020-02-02 18:14:27 +0100 |
|---|---|---|
| committer | LNJ <lnj@kaidan.im> | 2020-02-03 00:11:55 +0100 |
| commit | 57f1b775197aed1d32e98b0299c0999339a7d5f6 (patch) | |
| tree | ce5702781e15f3a5c438ab153edf06f51a501b29 /examples/example_3_transferHandling/example_3_transferHandling.cpp | |
| parent | 99b850a3008bbb03d3449d683adb87839f7d5c4b (diff) | |
| download | qxmpp-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.cpp | 19 |
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; } |
