notes/notesui/notesmodel/src/notesmodel.cpp
changeset 26 a949c2543c15
parent 23 fd30d51f876b
child 55 2c54b51f39c4
child 58 ef813d54df51
--- a/notes/notesui/notesmodel/src/notesmodel.cpp	Mon May 03 12:30:32 2010 +0300
+++ b/notes/notesui/notesmodel/src/notesmodel.cpp	Fri May 14 15:51:09 2010 +0300
@@ -68,8 +68,10 @@
 			mAgendaUtil, SIGNAL(entryUpdated(ulong)),
 			this, SLOT(updateSourceModel(ulong)));
 
-	// Populate the model in a different thread.
-	QTimer::singleShot(1, this, SLOT(populateSourceModel()));
+	// Connect for instance view creation completed signal
+	connect(
+			mAgendaUtil, SIGNAL(instanceViewCreationCompleted(int)),
+			this,SLOT(handleInstanceViewCreationCompleted(int)));
 }
 
 /*!
@@ -325,6 +327,15 @@
 }
 
 /*!
+	Populate the model after instance view creation.
+ */
+void NotesModel::handleInstanceViewCreationCompleted(int status)
+{
+	Q_UNUSED(status);
+	populateSourceModel();
+}
+
+/*!
 	Modifies the content of a given `row' with the data of the entry given by
 	`id'.