diff options
Diffstat (limited to 'framework/domain/settings')
-rw-r--r-- | framework/domain/settings/accountsettings.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/framework/domain/settings/accountsettings.cpp b/framework/domain/settings/accountsettings.cpp index 067d1d79..d7c8c1c0 100644 --- a/framework/domain/settings/accountsettings.cpp +++ b/framework/domain/settings/accountsettings.cpp | |||
@@ -152,7 +152,7 @@ void AccountSettings::loadAccount() | |||
152 | { | 152 | { |
153 | Q_ASSERT(!mAccountIdentifier.isEmpty()); | 153 | Q_ASSERT(!mAccountIdentifier.isEmpty()); |
154 | Store::fetchOne<SinkAccount>(Query().filter(mAccountIdentifier)) | 154 | Store::fetchOne<SinkAccount>(Query().filter(mAccountIdentifier)) |
155 | .syncThen<void, SinkAccount>([this](const SinkAccount &account) { | 155 | .then([this](const SinkAccount &account) { |
156 | mIcon = account.getIcon(); | 156 | mIcon = account.getIcon(); |
157 | mName = account.getName(); | 157 | mName = account.getName(); |
158 | emit changed(); | 158 | emit changed(); |
@@ -162,7 +162,7 @@ void AccountSettings::loadAccount() | |||
162 | void AccountSettings::loadImapResource() | 162 | void AccountSettings::loadImapResource() |
163 | { | 163 | { |
164 | Store::fetchOne<SinkResource>(Query().filter<SinkResource::Account>(mAccountIdentifier).containsFilter<SinkResource::Capabilities>(ResourceCapabilities::Mail::storage)) | 164 | Store::fetchOne<SinkResource>(Query().filter<SinkResource::Account>(mAccountIdentifier).containsFilter<SinkResource::Capabilities>(ResourceCapabilities::Mail::storage)) |
165 | .syncThen<void, SinkResource>([this](const SinkResource &resource) { | 165 | .then([this](const SinkResource &resource) { |
166 | mImapIdentifier = resource.identifier(); | 166 | mImapIdentifier = resource.identifier(); |
167 | mImapServer = resource.getProperty("server").toString(); | 167 | mImapServer = resource.getProperty("server").toString(); |
168 | mImapUsername = resource.getProperty("username").toString(); | 168 | mImapUsername = resource.getProperty("username").toString(); |
@@ -176,7 +176,7 @@ void AccountSettings::loadImapResource() | |||
176 | void AccountSettings::loadMaildirResource() | 176 | void AccountSettings::loadMaildirResource() |
177 | { | 177 | { |
178 | Store::fetchOne<SinkResource>(Query().filter<SinkResource::Account>(mAccountIdentifier).containsFilter<SinkResource::Capabilities>(ResourceCapabilities::Mail::storage)) | 178 | Store::fetchOne<SinkResource>(Query().filter<SinkResource::Account>(mAccountIdentifier).containsFilter<SinkResource::Capabilities>(ResourceCapabilities::Mail::storage)) |
179 | .syncThen<void, SinkResource>([this](const SinkResource &resource) { | 179 | .then([this](const SinkResource &resource) { |
180 | mMaildirIdentifier = resource.identifier(); | 180 | mMaildirIdentifier = resource.identifier(); |
181 | auto path = resource.getProperty("path").toString(); | 181 | auto path = resource.getProperty("path").toString(); |
182 | if (mPath != path) { | 182 | if (mPath != path) { |
@@ -191,7 +191,7 @@ void AccountSettings::loadMaildirResource() | |||
191 | void AccountSettings::loadMailtransportResource() | 191 | void AccountSettings::loadMailtransportResource() |
192 | { | 192 | { |
193 | Store::fetchOne<SinkResource>(Query().filter<SinkResource::Account>(mAccountIdentifier).containsFilter<SinkResource::Capabilities>(ResourceCapabilities::Mail::transport)) | 193 | Store::fetchOne<SinkResource>(Query().filter<SinkResource::Account>(mAccountIdentifier).containsFilter<SinkResource::Capabilities>(ResourceCapabilities::Mail::transport)) |
194 | .syncThen<void, SinkResource>([this](const SinkResource &resource) { | 194 | .then([this](const SinkResource &resource) { |
195 | mMailtransportIdentifier = resource.identifier(); | 195 | mMailtransportIdentifier = resource.identifier(); |
196 | mSmtpServer = resource.getProperty("server").toString(); | 196 | mSmtpServer = resource.getProperty("server").toString(); |
197 | mSmtpUsername = resource.getProperty("username").toString(); | 197 | mSmtpUsername = resource.getProperty("username").toString(); |
@@ -206,7 +206,7 @@ void AccountSettings::loadIdentity() | |||
206 | { | 206 | { |
207 | //FIXME this assumes that we only ever have one identity per account | 207 | //FIXME this assumes that we only ever have one identity per account |
208 | Store::fetchOne<Identity>(Query().filter<Identity::Account>(mAccountIdentifier)) | 208 | Store::fetchOne<Identity>(Query().filter<Identity::Account>(mAccountIdentifier)) |
209 | .syncThen<void, Identity>([this](const Identity &identity) { | 209 | .then([this](const Identity &identity) { |
210 | mIdentityIdentifier = identity.identifier(); | 210 | mIdentityIdentifier = identity.identifier(); |
211 | mUsername = identity.getName(); | 211 | mUsername = identity.getName(); |
212 | mEmailAddress = identity.getAddress(); | 212 | mEmailAddress = identity.getAddress(); |