Guest User

Untitled

a guest
Jan 4th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. ImplAddDel() is being called at places like line 209 of event.cxx
  2.  
  3. And then there is
  4. Application::ImplCallEventListeners( aEvent ); //from line 209 of event.cxx
  5.  
  6. if ( aDelData.IsDead() )
  7. return;
  8.  
  9. if (!mpWindowImpl->maEventListeners.empty())
  10. {
  11. // Copy the list, because this can be destroyed when calling a Link...
  12. std::vector<Link<VclWindowEvent&,void>> aCopy( mpWindowImpl->maEventListeners );
  13. for ( Link<VclWindowEvent&,void>& rLink : aCopy )
  14. {
  15. if (aDelData.IsDead()) break;
  16. // check this hasn't been removed in some re-enterancy scenario fdo#47368
  17. if( std::find(mpWindowImpl->maEventListeners.begin(), mpWindowImpl->maEventListeners.end(), rLink) != mpWindowImpl->maEventListeners.end() )
  18. rLink.Call( aEvent );
  19. }
  20. }
  21.  
  22. if ( aDelData.IsDead() )
  23. return;
  24.  
  25. After this ImplRemoveDel() is called //line 232 of event.cxx
  26. -------------------------------------------------------------------------------------------------------------------------
  27. So maybe, what you have in mind is something like:
  28. 1. VclPtr<vcl::Window> temp_mpWindow = aDelData.mpWindow; //Instead of line 209 from above example
  29. 2. I will need help with what is required here
  30. And then there is part from above example
  31. .....
  32. 3. //ImplRemoveDel comes here which is to be replaced with just //Instead of line 232 from above example
  33. if ( IsDisposed() ){
  34. return;
  35. }
  36. 4. And something more if required.
  37.  
  38. The reason I'm not able to fill in parts 2 and 4 is because I do not understand the connection between
  39. IsDisposed() and aDelData.mpWindow
  40.  
  41. IsDisposed() does : " return !mpWindowImpl; " as a bool.
  42. mpWindowImpl is a pointer of type WindowImpl ie WindowImpl* mpWindowImpl
Add Comment
Please, Sign In to add comment