From d27b11fbbce60516a4bd2da5e8671733420bc1af Mon Sep 17 00:00:00 2001
From: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
Date: Wed, 16 Sep 2015 11:26:12 -0400
Subject: [PATCH] phonedirectorymodel: regroup getNumber() implementations

getNumber is vastly used across LRC, and has three variants. This commits
regroups them for readbility.

Issue: #75334
Change-Id: If1348a6079d721e751e38a88f8cb464bc425296e
---
 src/phonedirectorymodel.cpp | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/phonedirectorymodel.cpp b/src/phonedirectorymodel.cpp
index ac016520..45d406f9 100644
--- a/src/phonedirectorymodel.cpp
+++ b/src/phonedirectorymodel.cpp
@@ -328,16 +328,6 @@ void PhoneDirectoryModelPrivate::setAccount(ContactMethod* number, Account* acco
    }
 }
 
-/**
- * This version of getNumber() try to get a phone number with a contact from an URI and account
- * It will also try to attach an account to existing numbers. This is not 100% reliable, but
- * it is correct often enough to do it.
- */
-ContactMethod* PhoneDirectoryModel::getNumber(const QString& uri, Account* account, const QString& type)
-{
-   return getNumber(uri,nullptr,account,type);
-}
-
 ///Add new information to existing numbers and try to merge
 ContactMethod* PhoneDirectoryModelPrivate::fillDetails(NumberWrapper* wrap, const URI& strippedUri, Account* account, Person* contact, const QString& type)
 {
@@ -413,6 +403,16 @@ ContactMethod* PhoneDirectoryModelPrivate::fillDetails(NumberWrapper* wrap, cons
    return nullptr;
 }
 
+/**
+ * This version of getNumber() try to get a phone number with a contact from an URI and account
+ * It will also try to attach an account to existing numbers. This is not 100% reliable, but
+ * it is correct often enough to do it.
+ */
+ContactMethod* PhoneDirectoryModel::getNumber(const QString& uri, Account* account, const QString& type)
+{
+   return getNumber(uri,nullptr,account,type);
+}
+
 ///Return/create a number when no information is available
 ContactMethod* PhoneDirectoryModel::getNumber(const QString& uri, const QString& type)
 {
-- 
GitLab