summaryrefslogtreecommitdiffstats
path: root/framework/domain/accountscontroller.cpp
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2017-01-05 15:17:04 +0100
committerMichael Bohlender <michael.bohlender@kdemail.net>2017-01-05 15:17:04 +0100
commita2fda0ad4fc013e4f9dd7d68ce2ec5385c1717ce (patch)
tree3ca0df1d96c01baef1575b4d961365ed227531e1 /framework/domain/accountscontroller.cpp
parentbc7879eca0d242934ec2051af93fd58b66845461 (diff)
downloadkube-a2fda0ad4fc013e4f9dd7d68ce2ec5385c1717ce.tar.gz
kube-a2fda0ad4fc013e4f9dd7d68ce2ec5385c1717ce.zip
move accounts related files to seperate folder
Diffstat (limited to 'framework/domain/accountscontroller.cpp')
-rw-r--r--framework/domain/accountscontroller.cpp42
1 files changed, 0 insertions, 42 deletions
diff --git a/framework/domain/accountscontroller.cpp b/framework/domain/accountscontroller.cpp
deleted file mode 100644
index 5cb60d0c..00000000
--- a/framework/domain/accountscontroller.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2 Copyright (c) 2016 Michael Bohlender <michael.bohlender@kdemail.net>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20
21#include "accountscontroller.h"
22
23#include <settings/settings.h>
24#include <sink/store.h>
25
26#include <QVariant>
27#include <QDebug>
28
29AccountsController::AccountsController(QObject *parent) : QObject(parent)
30{
31}
32
33void AccountsController::createAccount(const QString &accountType)
34{
35 auto account = Sink::ApplicationDomain::ApplicationDomainType::createEntity<Sink::ApplicationDomain::SinkAccount>();
36 account.setProperty("type", accountType);
37 Sink::Store::create(account).syncThen<void>([](const KAsync::Error &error) {
38 if (error) {
39 qWarning() << "Error while creating account: " << error.errorMessage;
40 }
41 }).exec();
42}