--- a/phonebookengines/VirtualPhonebook/VPbkCntModel/src/CFindViewBase.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/VirtualPhonebook/VPbkCntModel/src/CFindViewBase.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -87,7 +87,8 @@
TBool aOwnsContacts ) :
iParentView( aParentView ),
iBaseView( aBaseView ),
- iOwnsContacts( aOwnsContacts )
+ iOwnsContacts( aOwnsContacts ),
+ iDestroyed( NULL )
{
}
@@ -136,6 +137,10 @@
delete iViewContact;
delete iFieldTypeRefsList;
delete iFindStrings;
+ if ( iDestroyed )
+ {
+ *iDestroyed = ETrue;
+ }
}
// --------------------------------------------------------------------------
@@ -501,6 +506,10 @@
{
ContactViewError( aView, error, EFalse );
}
+ else
+ {
+ ContactViewReady( aView );
+ }
}
// --------------------------------------------------------------------------
@@ -786,13 +795,21 @@
void CFindViewBase::SendContactViewErrorEvent( TInt aError,
TBool aErrorNotified )
{
+ TBool destroy = EFalse;
+ iDestroyed = &destroy;
+
// Send first to external observers...
- VPbkEng::SendEventToObservers( *this, aError, aErrorNotified, iObservers,
- &MVPbkContactViewObserver::ContactViewError );
+ VPbkEng::SendEventToObserversWhenNotDestroyed( *this, aError, aErrorNotified, iObservers,
+ &MVPbkContactViewObserver::ContactViewError, destroy );
// ...then to internal. This ensures that events come first from lower
// level find view.
- VPbkEng::SendEventToObservers( *this, aError, aErrorNotified,
- iFilteringObservers, &MVPbkContactViewObserver::ContactViewError );
+ VPbkEng::SendEventToObserversWhenNotDestroyed( *this, aError, aErrorNotified,
+ iFilteringObservers, &MVPbkContactViewObserver::ContactViewError, destroy );
+
+ if ( !destroy )
+ {
+ iDestroyed = NULL;
+ }
}
} // namespace VPbkCntModel
// End of File