diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-01-05 15:17:04 +0100 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-01-05 15:17:04 +0100 |
commit | a2fda0ad4fc013e4f9dd7d68ce2ec5385c1717ce (patch) | |
tree | 3ca0df1d96c01baef1575b4d961365ed227531e1 | |
parent | bc7879eca0d242934ec2051af93fd58b66845461 (diff) | |
download | kube-a2fda0ad4fc013e4f9dd7d68ce2ec5385c1717ce.tar.gz kube-a2fda0ad4fc013e4f9dd7d68ce2ec5385c1717ce.zip |
move accounts related files to seperate folder
-rw-r--r-- | framework/accounts/accountfactory.cpp (renamed from framework/domain/accountfactory.cpp) | 0 | ||||
-rw-r--r-- | framework/accounts/accountfactory.h (renamed from framework/domain/accountfactory.h) | 0 | ||||
-rw-r--r-- | framework/accounts/accountsmodel.cpp (renamed from framework/domain/accountsmodel.cpp) | 0 | ||||
-rw-r--r-- | framework/accounts/accountsmodel.h (renamed from framework/domain/accountsmodel.h) | 0 | ||||
-rw-r--r-- | framework/domain/CMakeLists.txt | 3 | ||||
-rw-r--r-- | framework/domain/accountscontroller.cpp | 42 | ||||
-rw-r--r-- | framework/domain/accountscontroller.h | 33 | ||||
-rw-r--r-- | framework/domain/composercontroller.cpp | 1 | ||||
-rw-r--r-- | framework/domain/mailplugin.cpp | 6 |
9 files changed, 0 insertions, 85 deletions
diff --git a/framework/domain/accountfactory.cpp b/framework/accounts/accountfactory.cpp index 182a0a1d..182a0a1d 100644 --- a/framework/domain/accountfactory.cpp +++ b/framework/accounts/accountfactory.cpp | |||
diff --git a/framework/domain/accountfactory.h b/framework/accounts/accountfactory.h index 047454ae..047454ae 100644 --- a/framework/domain/accountfactory.h +++ b/framework/accounts/accountfactory.h | |||
diff --git a/framework/domain/accountsmodel.cpp b/framework/accounts/accountsmodel.cpp index ea37784b..ea37784b 100644 --- a/framework/domain/accountsmodel.cpp +++ b/framework/accounts/accountsmodel.cpp | |||
diff --git a/framework/domain/accountsmodel.h b/framework/accounts/accountsmodel.h index e3c08cd4..e3c08cd4 100644 --- a/framework/domain/accountsmodel.h +++ b/framework/accounts/accountsmodel.h | |||
diff --git a/framework/domain/CMakeLists.txt b/framework/domain/CMakeLists.txt index 00499f30..01d55de2 100644 --- a/framework/domain/CMakeLists.txt +++ b/framework/domain/CMakeLists.txt | |||
@@ -13,9 +13,6 @@ set(mailplugin_SRCS | |||
13 | mailtemplates.cpp | 13 | mailtemplates.cpp |
14 | modeltest.cpp | 14 | modeltest.cpp |
15 | retriever.cpp | 15 | retriever.cpp |
16 | accountfactory.cpp | ||
17 | accountscontroller.cpp | ||
18 | accountsmodel.cpp | ||
19 | outboxmodel.cpp | 16 | outboxmodel.cpp |
20 | identitiesmodel.cpp | 17 | identitiesmodel.cpp |
21 | recepientautocompletionmodel.cpp | 18 | recepientautocompletionmodel.cpp |
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 | |||
29 | AccountsController::AccountsController(QObject *parent) : QObject(parent) | ||
30 | { | ||
31 | } | ||
32 | |||
33 | void 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 | } | ||
diff --git a/framework/domain/accountscontroller.h b/framework/domain/accountscontroller.h deleted file mode 100644 index a4421de8..00000000 --- a/framework/domain/accountscontroller.h +++ /dev/null | |||
@@ -1,33 +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 | #pragma once | ||
21 | |||
22 | #include <QObject> | ||
23 | #include <QString> | ||
24 | |||
25 | class AccountsController : public QObject | ||
26 | { | ||
27 | Q_OBJECT | ||
28 | public: | ||
29 | explicit AccountsController(QObject *parent = Q_NULLPTR); | ||
30 | |||
31 | public slots: | ||
32 | void createAccount(const QString &accountId); | ||
33 | }; | ||
diff --git a/framework/domain/composercontroller.cpp b/framework/domain/composercontroller.cpp index e97af4c2..a4a8857f 100644 --- a/framework/domain/composercontroller.cpp +++ b/framework/domain/composercontroller.cpp | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <sink/store.h> | 31 | #include <sink/store.h> |
32 | #include <sink/log.h> | 32 | #include <sink/log.h> |
33 | 33 | ||
34 | #include "accountsmodel.h" | ||
35 | #include "identitiesmodel.h" | 34 | #include "identitiesmodel.h" |
36 | #include "recepientautocompletionmodel.h" | 35 | #include "recepientautocompletionmodel.h" |
37 | #include "mailtemplates.h" | 36 | #include "mailtemplates.h" |
diff --git a/framework/domain/mailplugin.cpp b/framework/domain/mailplugin.cpp index f9dbe3ec..2ec73644 100644 --- a/framework/domain/mailplugin.cpp +++ b/framework/domain/mailplugin.cpp | |||
@@ -25,9 +25,6 @@ | |||
25 | #include "composercontroller.h" | 25 | #include "composercontroller.h" |
26 | #include "messageparser.h" | 26 | #include "messageparser.h" |
27 | #include "retriever.h" | 27 | #include "retriever.h" |
28 | #include "accountfactory.h" | ||
29 | #include "accountscontroller.h" | ||
30 | #include "accountsmodel.h" | ||
31 | #include "outboxmodel.h" | 28 | #include "outboxmodel.h" |
32 | #include "outboxcontroller.h" | 29 | #include "outboxcontroller.h" |
33 | #include "mailcontroller.h" | 30 | #include "mailcontroller.h" |
@@ -45,9 +42,6 @@ void MailPlugin::registerTypes (const char *uri) | |||
45 | qmlRegisterType<ComposerController>(uri, 1, 0, "ComposerController"); | 42 | qmlRegisterType<ComposerController>(uri, 1, 0, "ComposerController"); |
46 | qmlRegisterType<MessageParser>(uri, 1, 0, "MessageParser"); | 43 | qmlRegisterType<MessageParser>(uri, 1, 0, "MessageParser"); |
47 | qmlRegisterType<Retriever>(uri, 1, 0, "Retriever"); | 44 | qmlRegisterType<Retriever>(uri, 1, 0, "Retriever"); |
48 | qmlRegisterType<AccountFactory>(uri, 1, 0, "AccountFactory"); | ||
49 | qmlRegisterType<AccountsController>(uri, 1, 0, "AccountsController"); | ||
50 | qmlRegisterType<AccountsModel>(uri, 1, 0, "AccountsModel"); | ||
51 | qmlRegisterType<OutboxController>(uri, 1, 0, "OutboxController"); | 45 | qmlRegisterType<OutboxController>(uri, 1, 0, "OutboxController"); |
52 | qmlRegisterType<OutboxModel>(uri, 1, 0, "OutboxModel"); | 46 | qmlRegisterType<OutboxModel>(uri, 1, 0, "OutboxModel"); |
53 | qmlRegisterType<MailController>(uri, 1, 0, "MailController"); | 47 | qmlRegisterType<MailController>(uri, 1, 0, "MailController"); |