diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-26 13:21:20 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-26 13:21:20 +0200 |
commit | cf487248df311bd055844ce44786e28ea5aa7c2c (patch) | |
tree | 06c9bd80278855e4810cb194362e6e597a5329ee /common | |
parent | 3db36de42fc986341b0fac8c4cbfe869f0bac356 (diff) | |
download | sink-cf487248df311bd055844ce44786e28ea5aa7c2c.tar.gz sink-cf487248df311bd055844ce44786e28ea5aa7c2c.zip |
Reuse mailpreprocessor
Diffstat (limited to 'common')
-rw-r--r-- | common/mailpreprocessor.cpp | 7 | ||||
-rw-r--r-- | common/mailpreprocessor.h | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/common/mailpreprocessor.cpp b/common/mailpreprocessor.cpp index 64cb3d9..005a93e 100644 --- a/common/mailpreprocessor.cpp +++ b/common/mailpreprocessor.cpp | |||
@@ -29,9 +29,14 @@ | |||
29 | 29 | ||
30 | using namespace Sink; | 30 | using namespace Sink; |
31 | 31 | ||
32 | QString MailPropertyExtractor::getFilePathFromMimeMessagePath(const QString &s) const | ||
33 | { | ||
34 | return s; | ||
35 | } | ||
36 | |||
32 | void MailPropertyExtractor::updatedIndexedProperties(Sink::ApplicationDomain::Mail &mail) | 37 | void MailPropertyExtractor::updatedIndexedProperties(Sink::ApplicationDomain::Mail &mail) |
33 | { | 38 | { |
34 | const auto mimeMessagePath = mail.getMimeMessagePath(); | 39 | const auto mimeMessagePath = getFilePathFromMimeMessagePath(mail.getMimeMessagePath()); |
35 | Trace() << "Updating indexed properties " << mimeMessagePath; | 40 | Trace() << "Updating indexed properties " << mimeMessagePath; |
36 | QFile f(mimeMessagePath); | 41 | QFile f(mimeMessagePath); |
37 | if (!f.open(QIODevice::ReadOnly)) { | 42 | if (!f.open(QIODevice::ReadOnly)) { |
diff --git a/common/mailpreprocessor.h b/common/mailpreprocessor.h index 715e336..473931c 100644 --- a/common/mailpreprocessor.h +++ b/common/mailpreprocessor.h | |||
@@ -26,6 +26,9 @@ public: | |||
26 | virtual ~MailPropertyExtractor(){} | 26 | virtual ~MailPropertyExtractor(){} |
27 | virtual void newEntity(Sink::ApplicationDomain::Mail &mail, Sink::Storage::Transaction &transaction) Q_DECL_OVERRIDE; | 27 | virtual void newEntity(Sink::ApplicationDomain::Mail &mail, Sink::Storage::Transaction &transaction) Q_DECL_OVERRIDE; |
28 | virtual void modifiedEntity(const Sink::ApplicationDomain::Mail &oldMail, Sink::ApplicationDomain::Mail &newMail,Sink::Storage::Transaction &transaction) Q_DECL_OVERRIDE; | 28 | virtual void modifiedEntity(const Sink::ApplicationDomain::Mail &oldMail, Sink::ApplicationDomain::Mail &newMail,Sink::Storage::Transaction &transaction) Q_DECL_OVERRIDE; |
29 | protected: | ||
30 | virtual QString getFilePathFromMimeMessagePath(const QString &) const; | ||
31 | |||
29 | private: | 32 | private: |
30 | void updatedIndexedProperties(Sink::ApplicationDomain::Mail &mail); | 33 | void updatedIndexedProperties(Sink::ApplicationDomain::Mail &mail); |
31 | }; | 34 | }; |