From 7fc34bff7882b63121c045ab5bb81c0d2d37e4ee Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Wed, 8 Aug 2012 13:48:07 +0200 Subject: [PATCH] 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 --- examples/tutorials/addressbook/part6/addressbook.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] -- 2.7.4