aboutsummaryrefslogtreecommitdiff
path: root/lib/jobs/syncjob.cpp
diff options
context:
space:
mode:
authorMarc Deop <marc@marcdeop.com>2019-03-02 12:26:57 +0100
committerMarc Deop <marc@marcdeop.com>2019-03-02 12:26:57 +0100
commitaacc4bcb4a487871daae6717f77605aaba444341 (patch)
tree4f50b6874821667ccb6b91c017e5d041e3846112 /lib/jobs/syncjob.cpp
parentc971b924cd62822ed6fb1a0291c483ae73a3ecda (diff)
downloadlibquotient-aacc4bcb4a487871daae6717f77605aaba444341.tar.gz
libquotient-aacc4bcb4a487871daae6717f77605aaba444341.zip
style: apply .clang-format to all .cpp and .h files
Diffstat (limited to 'lib/jobs/syncjob.cpp')
-rw-r--r--lib/jobs/syncjob.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/jobs/syncjob.cpp b/lib/jobs/syncjob.cpp
index 84385b55..db11005a 100644
--- a/lib/jobs/syncjob.cpp
+++ b/lib/jobs/syncjob.cpp
@@ -13,7 +13,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "syncjob.h"
@@ -29,25 +29,26 @@ SyncJob::SyncJob(const QString& since, const QString& filter, int timeout,
{
setLoggingCategory(SYNCJOB);
QUrlQuery query;
- if( !filter.isEmpty() )
+ if (!filter.isEmpty())
query.addQueryItem(QStringLiteral("filter"), filter);
- if( !presence.isEmpty() )
+ if (!presence.isEmpty())
query.addQueryItem(QStringLiteral("set_presence"), presence);
- if( timeout >= 0 )
+ if (timeout >= 0)
query.addQueryItem(QStringLiteral("timeout"), QString::number(timeout));
- if( !since.isEmpty() )
+ if (!since.isEmpty())
query.addQueryItem(QStringLiteral("since"), since);
setRequestQuery(query);
setMaxRetries(std::numeric_limits<int>::max());
}
-SyncJob::SyncJob(const QString& since, const Filter& filter,
- int timeout, const QString& presence)
+SyncJob::SyncJob(const QString& since, const Filter& filter, int timeout,
+ const QString& presence)
: SyncJob(since,
QJsonDocument(toJson(filter)).toJson(QJsonDocument::Compact),
timeout, presence)
-{ }
+{
+}
BaseJob::Status SyncJob::parseJson(const QJsonDocument& data)
{
@@ -59,4 +60,3 @@ BaseJob::Status SyncJob::parseJson(const QJsonDocument& data)
<< d.unresolvedRooms().join(',');
return BaseJob::IncorrectResponseError;
}
-