diff options
Diffstat (limited to 'common/domain/propertyregistry.cpp')
-rw-r--r-- | common/domain/propertyregistry.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/common/domain/propertyregistry.cpp b/common/domain/propertyregistry.cpp index 2208193..7b9b61a 100644 --- a/common/domain/propertyregistry.cpp +++ b/common/domain/propertyregistry.cpp | |||
@@ -64,6 +64,17 @@ QVariant parseString<bool>(const QString &s) | |||
64 | } | 64 | } |
65 | 65 | ||
66 | template <> | 66 | template <> |
67 | QVariant parseString<int>(const QString &s) | ||
68 | { | ||
69 | bool ok = false; | ||
70 | auto n = s.toInt(&ok); | ||
71 | if (ok) { | ||
72 | return QVariant::fromValue(n); | ||
73 | } | ||
74 | return {}; | ||
75 | } | ||
76 | |||
77 | template <> | ||
67 | QVariant parseString<QList<QByteArray>>(const QString &s) | 78 | QVariant parseString<QList<QByteArray>>(const QString &s) |
68 | { | 79 | { |
69 | auto list = s.split(','); | 80 | auto list = s.split(','); |
@@ -92,6 +103,13 @@ QVariant parseString<QList<Sink::ApplicationDomain::Mail::Contact>>(const QStrin | |||
92 | return QVariant{}; | 103 | return QVariant{}; |
93 | } | 104 | } |
94 | 105 | ||
106 | template <> | ||
107 | QVariant parseString<QList<Sink::ApplicationDomain::Contact::Email>>(const QString &s) | ||
108 | { | ||
109 | Q_ASSERT(false); | ||
110 | return QVariant{}; | ||
111 | } | ||
112 | |||
95 | PropertyRegistry &PropertyRegistry::instance() | 113 | PropertyRegistry &PropertyRegistry::instance() |
96 | { | 114 | { |
97 | static PropertyRegistry instance; | 115 | static PropertyRegistry instance; |