diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-01-03 20:31:10 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-01-03 20:31:10 +0100 |
commit | dd09ca9ef4bb9780b953d6dd2999dbefe50bd1ff (patch) | |
tree | dfcef3671c7f36d762f74b4226477fe6978688f2 /framework/mail/mailplugin.cpp | |
parent | dea41f0345188d776522e5b91ba25d25c418e581 (diff) | |
download | kube-dd09ca9ef4bb9780b953d6dd2999dbefe50bd1ff.tar.gz kube-dd09ca9ef4bb9780b953d6dd2999dbefe50bd1ff.zip |
Instead of using controllers, directly use the models
...and connect components via properties
Diffstat (limited to 'framework/mail/mailplugin.cpp')
-rw-r--r-- | framework/mail/mailplugin.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/framework/mail/mailplugin.cpp b/framework/mail/mailplugin.cpp index b2939acf..bf92f4e7 100644 --- a/framework/mail/mailplugin.cpp +++ b/framework/mail/mailplugin.cpp | |||
@@ -1,23 +1,14 @@ | |||
1 | #include "mailplugin.h" | 1 | #include "mailplugin.h" |
2 | 2 | ||
3 | #include "maillistcontroller.h" | ||
4 | #include "maillistmodel.h" | 3 | #include "maillistmodel.h" |
5 | #include "singlemailcontroller.h" | ||
6 | #include "folderlistcontroller.h" | ||
7 | #include "folderlistmodel.h" | 4 | #include "folderlistmodel.h" |
8 | 5 | ||
9 | #include <QAbstractItemModel> | ||
10 | #include <QtQml> | 6 | #include <QtQml> |
11 | 7 | ||
12 | void MailPlugin::registerTypes (const char *uri) | 8 | void MailPlugin::registerTypes (const char *uri) |
13 | { | 9 | { |
14 | Q_ASSERT(uri == QLatin1String("org.kde.akonadi2.mail")); | 10 | Q_ASSERT(uri == QLatin1String("org.kde.kube.mail")); |
15 | 11 | ||
16 | qmlRegisterType<FolderListModel>(); | 12 | qmlRegisterType<FolderListModel>(uri, 1, 0, "FolderListModel"); |
17 | qmlRegisterType<FolderListController>(uri, 1, 0, "FolderList"); | 13 | qmlRegisterType<MailListModel>(uri, 1, 0, "MailListModel"); |
18 | |||
19 | qmlRegisterType<MailListModel>(); | ||
20 | qmlRegisterType<MailListController>(uri, 1, 0, "MailList"); | ||
21 | |||
22 | qmlRegisterType<SingleMailController>(uri, 1, 0, "SingleMail"); | ||
23 | } | 14 | } |