diff options
-rw-r--r-- | accounts/maildir/maildirsettings.cpp | 9 | ||||
-rw-r--r-- | components/package/contents/ui/Settings.qml | 3 |
2 files changed, 9 insertions, 3 deletions
diff --git a/accounts/maildir/maildirsettings.cpp b/accounts/maildir/maildirsettings.cpp index a2e2e96e..58ff77fd 100644 --- a/accounts/maildir/maildirsettings.cpp +++ b/accounts/maildir/maildirsettings.cpp | |||
@@ -49,10 +49,14 @@ QByteArray MaildirSettings::identifier() const | |||
49 | 49 | ||
50 | void MaildirSettings::setAccountIdentifier(const QByteArray &id) | 50 | void MaildirSettings::setAccountIdentifier(const QByteArray &id) |
51 | { | 51 | { |
52 | if (id.isEmpty()) { | ||
53 | return; | ||
54 | } | ||
52 | mAccountIdentifier = id; | 55 | mAccountIdentifier = id; |
56 | Q_ASSERT(!id.isEmpty()); | ||
53 | Kube::Account account(id); | 57 | Kube::Account account(id); |
54 | account.property("maildirResource").toByteArray(); | 58 | auto maildirResource = account.property("maildirResource").toByteArray(); |
55 | setIdentifier(account.property("maildirResource").toByteArray()); | 59 | setIdentifier(maildirResource); |
56 | } | 60 | } |
57 | 61 | ||
58 | QByteArray MaildirSettings::accountIdentifier() const | 62 | QByteArray MaildirSettings::accountIdentifier() const |
@@ -88,6 +92,7 @@ void MaildirSettings::save() | |||
88 | resource.setProperty("identifier", resourceIdentifier); | 92 | resource.setProperty("identifier", resourceIdentifier); |
89 | resource.setProperty("type", "org.kde.maildir"); | 93 | resource.setProperty("type", "org.kde.maildir"); |
90 | Sink::Store::create(resource).exec(); | 94 | Sink::Store::create(resource).exec(); |
95 | Q_ASSERT(!mAccountIdentifier.isEmpty()); | ||
91 | Kube::Account account(mAccountIdentifier); | 96 | Kube::Account account(mAccountIdentifier); |
92 | account.setProperty("maildirResource", resourceIdentifier); | 97 | account.setProperty("maildirResource", resourceIdentifier); |
93 | account.save(); | 98 | account.save(); |
diff --git a/components/package/contents/ui/Settings.qml b/components/package/contents/ui/Settings.qml index e0d993ad..d96ccfb0 100644 --- a/components/package/contents/ui/Settings.qml +++ b/components/package/contents/ui/Settings.qml | |||
@@ -99,8 +99,9 @@ Rectangle { | |||
99 | } | 99 | } |
100 | 100 | ||
101 | onClicked: { | 101 | onClicked: { |
102 | console.warn("Loading module is ", accountFactory.acountId); | 102 | console.warn("Loading module is ", accountFactory.accountId); |
103 | accountDetails.source = accountFactory.uiPath | 103 | accountDetails.source = accountFactory.uiPath |
104 | accountDetails.item.accountId = accountFactory.accountId | ||
104 | listView.currentIndex = model.index | 105 | listView.currentIndex = model.index |
105 | } | 106 | } |
106 | } | 107 | } |