aboutsummaryrefslogtreecommitdiff
path: root/lib/connectiondata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/connectiondata.cpp')
-rw-r--r--lib/connectiondata.cpp33
1 files changed, 11 insertions, 22 deletions
diff --git a/lib/connectiondata.cpp b/lib/connectiondata.cpp
index 91cda09f..c157565f 100644
--- a/lib/connectiondata.cpp
+++ b/lib/connectiondata.cpp
@@ -13,19 +13,21 @@
*
* 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 "connectiondata.h"
-#include "networkaccessmanager.h"
#include "logging.h"
+#include "networkaccessmanager.h"
using namespace QMatrixClient;
struct ConnectionData::Private
{
- explicit Private(QUrl url) : baseUrl(std::move(url)) { }
+ explicit Private(QUrl url)
+ : baseUrl(std::move(url))
+ {}
QUrl baseUrl;
QByteArray accessToken;
@@ -38,19 +40,13 @@ struct ConnectionData::Private
ConnectionData::ConnectionData(QUrl baseUrl)
: d(std::make_unique<Private>(std::move(baseUrl)))
-{ }
+{}
ConnectionData::~ConnectionData() = default;
-QByteArray ConnectionData::accessToken() const
-{
- return d->accessToken;
-}
+QByteArray ConnectionData::accessToken() const { return d->accessToken; }
-QUrl ConnectionData::baseUrl() const
-{
- return d->baseUrl;
-}
+QUrl ConnectionData::baseUrl() const { return d->baseUrl; }
QNetworkAccessManager* ConnectionData::nam() const
{
@@ -80,10 +76,7 @@ void ConnectionData::setPort(int port)
qCDebug(MAIN) << "updated baseUrl to" << d->baseUrl;
}
-const QString& ConnectionData::deviceId() const
-{
- return d->deviceId;
-}
+const QString& ConnectionData::deviceId() const { return d->deviceId; }
void ConnectionData::setDeviceId(const QString& deviceId)
{
@@ -91,10 +84,7 @@ void ConnectionData::setDeviceId(const QString& deviceId)
qCDebug(MAIN) << "updated deviceId to" << d->deviceId;
}
-QString ConnectionData::lastEvent() const
-{
- return d->lastEvent;
-}
+QString ConnectionData::lastEvent() const { return d->lastEvent; }
void ConnectionData::setLastEvent(QString identifier)
{
@@ -103,6 +93,5 @@ void ConnectionData::setLastEvent(QString identifier)
QByteArray ConnectionData::generateTxnId() const
{
- return QByteArray::number(d->id) + 'q' +
- QByteArray::number(++d->txnCounter);
+ return QByteArray::number(d->id) + 'q' + QByteArray::number(++d->txnCounter);
}