aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connection.cpp5
-rw-r--r--connection.h2
2 files changed, 3 insertions, 4 deletions
diff --git a/connection.cpp b/connection.cpp
index aebe7631..9f56ec96 100644
--- a/connection.cpp
+++ b/connection.cpp
@@ -163,10 +163,10 @@ void Connection::logout()
job->start();
}
-SyncJob* Connection::sync(int timeout)
+void Connection::sync(int timeout)
{
if (d->syncJob)
- return d->syncJob;
+ return;
const QString filter = "{\"room\": { \"timeline\": { \"limit\": 100 } } }";
auto job = d->startSyncJob(filter, timeout);
@@ -187,7 +187,6 @@ SyncJob* Connection::sync(int timeout)
else
emit connectionError(job->errorString());
});
- return job;
}
SyncJob* Connection::Private::startSyncJob(const QString& filter, int timeout)
diff --git a/connection.h b/connection.h
index d5cf4883..fed0b1c4 100644
--- a/connection.h
+++ b/connection.h
@@ -52,7 +52,7 @@ namespace QMatrixClient
Q_INVOKABLE virtual void disconnectFromServer();
Q_INVOKABLE virtual void logout();
- Q_INVOKABLE virtual SyncJob* sync(int timeout=-1);
+ Q_INVOKABLE virtual void sync(int timeout=-1);
Q_INVOKABLE virtual void postMessage( Room* room, QString type, QString message );
Q_INVOKABLE virtual PostReceiptJob* postReceipt( Room* room, Event* event );
Q_INVOKABLE virtual void joinRoom( QString roomAlias );