Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
[libcontacts] Increase the maximum digits used in minimized phone num…
…bers

Although 7 digits is typically enough to differentiate phone numbers
in their local forms, an eighth digit is sometimes required to
differentiate between a local number and the voicemail service for
that number.
  • Loading branch information
matthewvogt committed Oct 18, 2013
1 parent f3a0747 commit ccc49d1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rpm/libcontacts-qt5.spec
Expand Up @@ -13,7 +13,7 @@ BuildRequires: pkgconfig(Qt5Contacts)
BuildRequires: pkgconfig(Qt5Versit)
BuildRequires: pkgconfig(mlite5)
BuildRequires: pkgconfig(mlocale5)
BuildRequires: pkgconfig(qtcontacts-sqlite-qt5-extensions) >= 0.1.8
BuildRequires: pkgconfig(qtcontacts-sqlite-qt5-extensions) >= 0.1.27

%description
%{summary}.
Expand Down
2 changes: 1 addition & 1 deletion rpm/libcontacts.spec
Expand Up @@ -11,7 +11,7 @@ BuildRequires: pkgconfig(QtCore)
BuildRequires: pkgconfig(QtContacts)
BuildRequires: pkgconfig(QtVersit)
BuildRequires: pkgconfig(mlite)
BuildRequires: pkgconfig(qtcontacts-sqlite-extensions) >= 0.1.8
BuildRequires: pkgconfig(qtcontacts-sqlite-extensions) >= 0.1.27

%description
%{summary}.
Expand Down
2 changes: 1 addition & 1 deletion src/seasidecache.cpp
Expand Up @@ -1093,7 +1093,7 @@ QUrl SeasideCache::filteredAvatarUrl(const QContact &contact, const QStringList
QString SeasideCache::normalizePhoneNumber(const QString &input)
{
// TODO: use a configuration variable to make this configurable
static const int maxCharacters = 7;
static const int maxCharacters = QtContactsSqliteExtensions::DefaultMaximumPhoneNumberCharacters;

// If the number if not valid, return null
QString validated(QtContactsSqliteExtensions::normalizePhoneNumber(input, QtContactsSqliteExtensions::ValidatePhoneNumber));
Expand Down

0 comments on commit ccc49d1

Please sign in to comment.