From ae4bc7e97ea30dfef03498fcada6f337dcfd4bd7 Mon Sep 17 00:00:00 2001
From: Holger Hans Peter Freyther <holger@moiji-mobile.com>
Date: Sat, 6 Jun 2015 16:37:27 +0200
Subject: [PATCH] Remove bogus call and comment from addressbook

QMap::empty() does not empty the list but is the STL
version to ask if the map is empty. Remove the comment
and code as operator>> of QDataStream will clear the
map.

Fixes Coverity CID#89073

Change-Id: I259e518b44afd42b698368b42aedcc3b84240aca
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
---
 examples/widgets/tutorials/addressbook/part7/addressbook.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/examples/widgets/tutorials/addressbook/part7/addressbook.cpp b/examples/widgets/tutorials/addressbook/part7/addressbook.cpp
index 45ded876a72..6764423d713 100644
--- a/examples/widgets/tutorials/addressbook/part7/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook/part7/addressbook.cpp
@@ -370,7 +370,6 @@ void AddressBook::loadFromFile()
 
         QDataStream in(&file);
         in.setVersion(QDataStream::Qt_4_3);
-        contacts.empty();   // empty existing contacts
         in >> contacts;
 
         QMap<QString, QString>::iterator i = contacts.begin();
-- 
GitLab