>From 3b151565b0fa39f9b58c5f051d478fdd476eed75 Mon Sep 17 00:00:00 2001
From: Christophe Dumez <christophe.dumez@intel.com>
Date: Fri, 13 May 2011 16:10:55 +0300
Subject: [PATCH 1/7] QContactEBookBackend: Remove validateDefinition() method

This method is not needed since the engine does not support
mutable definitions. This method is only called before
saving a detail definition.
---
 engine/qcontactebookbackend.cpp |   12 ------------
 engine/qcontactebookbackend_p.h |    1 -
 2 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/engine/qcontactebookbackend.cpp b/engine/qcontactebookbackend.cpp
index 75ca157..9a9b48a 100644
--- a/engine/qcontactebookbackend.cpp
+++ b/engine/qcontactebookbackend.cpp
@@ -214,18 +214,6 @@ bool QContactEBookEngine::validateContact(const QContact& contact, QContactManag
   return QContactManagerEngine::validateContact(contact, error);
 }
 
-bool QContactEBookEngine::validateDefinition(const QContactDetailDefinition& definition, QContactManager::Error* error) const
-{
-  QContactDetailDefinition existing = detailDefinition(definition.name(), QContactType::TypeContact, error);
-  if (existing == definition) {
-    *error = QContactManager::NoError;
-    return true;
-  }
-
-  *error = QContactManager::NotSupportedError; // XXX TODO: mutable definitions?
-  return false;
-}
-
 QContact QContactEBookEngine::compatibleContact(const QContact& contact, QContactManager::Error* error) const
 {
   QContact compatible = contact;
diff --git a/engine/qcontactebookbackend_p.h b/engine/qcontactebookbackend_p.h
index 9d4e865..1588f59 100644
--- a/engine/qcontactebookbackend_p.h
+++ b/engine/qcontactebookbackend_p.h
@@ -87,7 +87,6 @@ public:
   QMap<QString, QString> managerParameters() const;
   QString synthesizedDisplayLabel(const QContact& contact, QContactManager::Error* error) const;
   bool validateContact(const QContact&, QContactManager::Error* error) const;
-  bool validateDefinition(const QContactDetailDefinition&, QContactManager::Error* error) const;
   QContact compatibleContact(const QContact& contact, QContactManager::Error* error) const;
 
   /* "Self" contact id (MyCard) */
-- 
1.7.4.4

