Replace hardcoded event ids with QEvent::registerEvent() and use specialized classes instead a DataEvent with a void* ptr (Part1/2)
Review Request #126456 - Created Dec. 21, 2015 and discarded
During my checks with valgrind I found a memleak in the event dispatching code. After inspecting the sources I found, that most events are delivered as a generic 'DataEvent' which holds a void* ptr. This pointer is then casted to the specific structure. Sometimes this structure has to be deleted (but only sometimes) which leads to a memleak. The deletion will also not work when more than one receiver is in place (which is not the case here but who knows).
Also hardcoded event-ids are no good idea because they can be used by other parts too which can lead to a lot of confusion...
I changed this by creating a dedicated event class for each event.
This is the first patch which changes the events for FillCacheThread and ModifiedThread.
The events are still delivered as expected.