From: Mitch Curtis Date: Wed, 8 Aug 2012 11:48:07 +0000 (+0200) Subject: Call clear() instead of empty() in addressbook/part6 tutorial. X-Git-Tag: v5.0.0-beta1~345 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7fc34bff7882b63121c045ab5bb81c0d2d37e4ee;p=profile%2Fivi%2Fqtbase.git Call clear() instead of empty() in addressbook/part6 tutorial. empty() doesn't remove elements, it just returns whether it is empty. Task-number: QTBUG-8849 Change-Id: I9bb8e855d96cecd2a0df336cb46e308ddedf0d07 Reviewed-by: Michalina Ziemba Reviewed-by: Thiago Macieira --- diff --git a/examples/tutorials/addressbook/part6/addressbook.cpp b/examples/tutorials/addressbook/part6/addressbook.cpp index 5159a41..c7155cc 100644 --- a/examples/tutorials/addressbook/part6/addressbook.cpp +++ b/examples/tutorials/addressbook/part6/addressbook.cpp @@ -373,7 +373,7 @@ void AddressBook::loadFromFile() QDataStream in(&file); in.setVersion(QDataStream::Qt_4_5); - contacts.empty(); // empty existing contacts + contacts.clear(); // clear existing contacts in >> contacts; //! [loadFromFile() function part2]