diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/imapresource/imapresource.cpp | 9 | ||||
-rw-r--r-- | examples/imapresource/tests/imapmailsynctest.cpp | 5 | ||||
-rw-r--r-- | examples/imapresource/tests/imapmailtest.cpp | 3 | ||||
-rw-r--r-- | examples/mailtransportresource/tests/mailtransporttest.cpp | 3 |
4 files changed, 10 insertions, 10 deletions
diff --git a/examples/imapresource/imapresource.cpp b/examples/imapresource/imapresource.cpp index 2aba6b0..b8a741b 100644 --- a/examples/imapresource/imapresource.cpp +++ b/examples/imapresource/imapresource.cpp | |||
@@ -841,7 +841,7 @@ protected: | |||
841 | auto messageByUid = QSharedPointer<QHash<qint64, Imap::Message>>::create(); | 841 | auto messageByUid = QSharedPointer<QHash<qint64, Imap::Message>>::create(); |
842 | SinkTrace() << "Connecting to:" << mServer << mPort; | 842 | SinkTrace() << "Connecting to:" << mServer << mPort; |
843 | SinkTrace() << "as:" << mUser; | 843 | SinkTrace() << "as:" << mUser; |
844 | auto inspectionJob = imap->login(mUser, mPassword) | 844 | auto inspectionJob = imap->login(mUser, secret()) |
845 | .then(imap->select(folderRemoteId)) | 845 | .then(imap->select(folderRemoteId)) |
846 | .then([](Imap::SelectResult){}) | 846 | .then([](Imap::SelectResult){}) |
847 | .then(imap->fetch(set, scope, [imap, messageByUid](const Imap::Message &message) { | 847 | .then(imap->fetch(set, scope, [imap, messageByUid](const Imap::Message &message) { |
@@ -907,7 +907,7 @@ protected: | |||
907 | scope.mode = KIMAP2::FetchJob::FetchScope::Headers; | 907 | scope.mode = KIMAP2::FetchJob::FetchScope::Headers; |
908 | auto imap = QSharedPointer<ImapServerProxy>::create(mServer, mPort); | 908 | auto imap = QSharedPointer<ImapServerProxy>::create(mServer, mPort); |
909 | auto messageByUid = QSharedPointer<QHash<qint64, Imap::Message>>::create(); | 909 | auto messageByUid = QSharedPointer<QHash<qint64, Imap::Message>>::create(); |
910 | return imap->login(mUser, mPassword) | 910 | return imap->login(mUser, secret()) |
911 | .then(imap->select(remoteId)) | 911 | .then(imap->select(remoteId)) |
912 | .then(imap->fetch(set, scope, [=](const Imap::Message message) { | 912 | .then(imap->fetch(set, scope, [=](const Imap::Message message) { |
913 | messageByUid->insert(message.uid, message); | 913 | messageByUid->insert(message.uid, message); |
@@ -924,7 +924,7 @@ protected: | |||
924 | auto folderByName = QSharedPointer<QSet<QString>>::create(); | 924 | auto folderByName = QSharedPointer<QSet<QString>>::create(); |
925 | 925 | ||
926 | auto imap = QSharedPointer<ImapServerProxy>::create(mServer, mPort); | 926 | auto imap = QSharedPointer<ImapServerProxy>::create(mServer, mPort); |
927 | auto inspectionJob = imap->login(mUser, mPassword) | 927 | auto inspectionJob = imap->login(mUser, secret()) |
928 | .then(imap->fetchFolders([=](const Imap::Folder &f) { | 928 | .then(imap->fetchFolders([=](const Imap::Folder &f) { |
929 | *folderByPath << f.path(); | 929 | *folderByPath << f.path(); |
930 | *folderByName << f.name(); | 930 | *folderByName << f.name(); |
@@ -949,7 +949,6 @@ public: | |||
949 | QString mServer; | 949 | QString mServer; |
950 | int mPort; | 950 | int mPort; |
951 | QString mUser; | 951 | QString mUser; |
952 | QString mPassword; | ||
953 | }; | 952 | }; |
954 | 953 | ||
955 | 954 | ||
@@ -981,8 +980,6 @@ ImapResource::ImapResource(const ResourceContext &resourceContext) | |||
981 | inspector->mServer = server; | 980 | inspector->mServer = server; |
982 | inspector->mPort = port; | 981 | inspector->mPort = port; |
983 | inspector->mUser = user; | 982 | inspector->mUser = user; |
984 | //TODO | ||
985 | // inspector->mPassword = password; | ||
986 | setupInspector(inspector); | 983 | setupInspector(inspector); |
987 | 984 | ||
988 | setupPreprocessors(ENTITY_TYPE_MAIL, QVector<Sink::Preprocessor*>() << new SpecialPurposeProcessor << new MailPropertyExtractor); | 985 | setupPreprocessors(ENTITY_TYPE_MAIL, QVector<Sink::Preprocessor*>() << new SpecialPurposeProcessor << new MailPropertyExtractor); |
diff --git a/examples/imapresource/tests/imapmailsynctest.cpp b/examples/imapresource/tests/imapmailsynctest.cpp index 7cdb103..f20a77e 100644 --- a/examples/imapresource/tests/imapmailsynctest.cpp +++ b/examples/imapresource/tests/imapmailsynctest.cpp | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include "common/test.h" | 26 | #include "common/test.h" |
27 | #include "common/domain/applicationdomaintype.h" | 27 | #include "common/domain/applicationdomaintype.h" |
28 | #include "common/secretstore.h" | ||
28 | 29 | ||
29 | using namespace Sink; | 30 | using namespace Sink; |
30 | using namespace Sink::ApplicationDomain; | 31 | using namespace Sink::ApplicationDomain; |
@@ -57,7 +58,7 @@ protected: | |||
57 | resource.setProperty("server", "localhost"); | 58 | resource.setProperty("server", "localhost"); |
58 | resource.setProperty("port", 993); | 59 | resource.setProperty("port", 993); |
59 | resource.setProperty("username", "doe"); | 60 | resource.setProperty("username", "doe"); |
60 | resource.setProperty("password", "doe"); | 61 | Sink::SecretStore::instance().insert(resource.identifier(), "doe"); |
61 | return resource; | 62 | return resource; |
62 | } | 63 | } |
63 | 64 | ||
@@ -68,7 +69,7 @@ protected: | |||
68 | resource.setProperty("server", "111.111.1.1"); | 69 | resource.setProperty("server", "111.111.1.1"); |
69 | resource.setProperty("port", 993); | 70 | resource.setProperty("port", 993); |
70 | resource.setProperty("username", "doe"); | 71 | resource.setProperty("username", "doe"); |
71 | resource.setProperty("password", "doe"); | 72 | Sink::SecretStore::instance().insert(resource.identifier(), "doe"); |
72 | return resource; | 73 | return resource; |
73 | } | 74 | } |
74 | 75 | ||
diff --git a/examples/imapresource/tests/imapmailtest.cpp b/examples/imapresource/tests/imapmailtest.cpp index e6f41f4..60ec1bf 100644 --- a/examples/imapresource/tests/imapmailtest.cpp +++ b/examples/imapresource/tests/imapmailtest.cpp | |||
@@ -5,6 +5,7 @@ | |||
5 | 5 | ||
6 | #include "common/test.h" | 6 | #include "common/test.h" |
7 | #include "common/domain/applicationdomaintype.h" | 7 | #include "common/domain/applicationdomaintype.h" |
8 | #include "common/secretstore.h" | ||
8 | 9 | ||
9 | using namespace Sink; | 10 | using namespace Sink; |
10 | using namespace Sink::ApplicationDomain; | 11 | using namespace Sink::ApplicationDomain; |
@@ -37,7 +38,7 @@ protected: | |||
37 | resource.setProperty("server", "localhost"); | 38 | resource.setProperty("server", "localhost"); |
38 | resource.setProperty("port", 993); | 39 | resource.setProperty("port", 993); |
39 | resource.setProperty("username", "doe"); | 40 | resource.setProperty("username", "doe"); |
40 | resource.setProperty("password", "doe"); | 41 | Sink::SecretStore::instance().insert(resource.identifier(), "doe"); |
41 | return resource; | 42 | return resource; |
42 | } | 43 | } |
43 | }; | 44 | }; |
diff --git a/examples/mailtransportresource/tests/mailtransporttest.cpp b/examples/mailtransportresource/tests/mailtransporttest.cpp index 2a831ed..8669024 100644 --- a/examples/mailtransportresource/tests/mailtransporttest.cpp +++ b/examples/mailtransportresource/tests/mailtransporttest.cpp | |||
@@ -8,6 +8,7 @@ | |||
8 | #include "common/resourcecontrol.h" | 8 | #include "common/resourcecontrol.h" |
9 | #include "common/domain/applicationdomaintype.h" | 9 | #include "common/domain/applicationdomaintype.h" |
10 | #include "common/log.h" | 10 | #include "common/log.h" |
11 | #include "common/secretstore.h" | ||
11 | 12 | ||
12 | using namespace Sink; | 13 | using namespace Sink; |
13 | using namespace Sink::ApplicationDomain; | 14 | using namespace Sink::ApplicationDomain; |
@@ -22,7 +23,7 @@ class MailtransportTest : public QObject | |||
22 | resource.setProperty("server", "localhost"); | 23 | resource.setProperty("server", "localhost"); |
23 | // resource.setProperty("port", 993); | 24 | // resource.setProperty("port", 993); |
24 | resource.setProperty("user", "doe"); | 25 | resource.setProperty("user", "doe"); |
25 | resource.setProperty("password", "doe"); | 26 | Sink::SecretStore::instance().insert(resource.identifier(), "doe"); |
26 | resource.setProperty("testmode", true); | 27 | resource.setProperty("testmode", true); |
27 | return resource; | 28 | return resource; |
28 | } | 29 | } |