diff options
Diffstat (limited to 'common/domain/mail.cpp')
-rw-r--r-- | common/domain/mail.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/domain/mail.cpp b/common/domain/mail.cpp index a698b6d..8875d88 100644 --- a/common/domain/mail.cpp +++ b/common/domain/mail.cpp | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <QVector> | 21 | #include <QVector> |
22 | #include <QByteArray> | 22 | #include <QByteArray> |
23 | #include <QString> | 23 | #include <QString> |
24 | #include <QMutex> | ||
25 | #include <QMutexLocker> | ||
24 | 26 | ||
25 | #include "../resultset.h" | 27 | #include "../resultset.h" |
26 | #include "../index.h" | 28 | #include "../index.h" |
@@ -33,10 +35,13 @@ | |||
33 | 35 | ||
34 | #include "mail_generated.h" | 36 | #include "mail_generated.h" |
35 | 37 | ||
38 | static QMutex sMutex; | ||
39 | |||
36 | using namespace Akonadi2::ApplicationDomain; | 40 | using namespace Akonadi2::ApplicationDomain; |
37 | 41 | ||
38 | static TypeIndex &getIndex() | 42 | static TypeIndex &getIndex() |
39 | { | 43 | { |
44 | QMutexLocker locker(&sMutex); | ||
40 | static TypeIndex *index = 0; | 45 | static TypeIndex *index = 0; |
41 | if (!index) { | 46 | if (!index) { |
42 | index = new TypeIndex("mail"); | 47 | index = new TypeIndex("mail"); |