summaryrefslogtreecommitdiffstats
path: root/framework/domain/accountscontroller.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-04-29 14:26:30 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-04-29 14:28:53 +0200
commit53e988faa295f245dea4f69249ecb165e245a9c3 (patch)
tree78c45e89e7bba5f4bb5a22dbe498561c98b7df34 /framework/domain/accountscontroller.cpp
parent90a5016995f43a5f65b7877dc206092af581f29e (diff)
downloadkube-53e988faa295f245dea4f69249ecb165e245a9c3.tar.gz
kube-53e988faa295f245dea4f69249ecb165e245a9c3.zip
Avoid assembling uid ourselves
Diffstat (limited to 'framework/domain/accountscontroller.cpp')
-rw-r--r--framework/domain/accountscontroller.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/framework/domain/accountscontroller.cpp b/framework/domain/accountscontroller.cpp
index b5e7e9ca..2f47fa03 100644
--- a/framework/domain/accountscontroller.cpp
+++ b/framework/domain/accountscontroller.cpp
@@ -24,7 +24,6 @@
24#include <sink/store.h> 24#include <sink/store.h>
25 25
26#include <QVariant> 26#include <QVariant>
27#include <QUuid>
28#include <QDebug> 27#include <QDebug>
29 28
30AccountsController::AccountsController(QObject *parent) : QObject(parent) 29AccountsController::AccountsController(QObject *parent) : QObject(parent)
@@ -33,9 +32,7 @@ AccountsController::AccountsController(QObject *parent) : QObject(parent)
33 32
34void AccountsController::createAccount(const QString &accountType) 33void AccountsController::createAccount(const QString &accountType)
35{ 34{
36 const auto identifier = QUuid::createUuid().toByteArray(); 35 auto account = Sink::ApplicationDomain::ApplicationDomainType::createEntity<Sink::ApplicationDomain::SinkAccount>();
37 Sink::ApplicationDomain::SinkAccount account;
38 account.setProperty("identifier", identifier);
39 account.setProperty("type", accountType); 36 account.setProperty("type", accountType);
40 Sink::Store::create(account).then<void>([]() {}, 37 Sink::Store::create(account).then<void>([]() {},
41 [](int errorCode, const QString &errorMessage) { 38 [](int errorCode, const QString &errorMessage) {