Commit f8bec7a6 authored by mvogt's avatar mvogt

[libcontacts] Only index valid phone numbers

parent 4af2c39d
......@@ -1095,6 +1095,11 @@ QString SeasideCache::normalizePhoneNumber(const QString &input)
// TODO: use a configuration variable to make this configurable
static const int maxCharacters = 7;
// If the number if not valid, return null
QString validated(QtContactsSqliteExtensions::normalizePhoneNumber(input, QtContactsSqliteExtensions::ValidatePhoneNumber));
if (validated.isNull())
return validated;
return QtContactsSqliteExtensions::minimizePhoneNumber(input, maxCharacters);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment