There's no need for having each JournallingObject maintain it's own
checkpoints and build a complex (and buggy) logic in ProjectJournal
in order to manage all the JournallingObject with their checkpoints.
Instead do it the simple way: in ProjectJournal maintain a stack for
undo checkpoints and a stack for redo checkpoints. On each undo or redo
operation simply push and pop to/from the according stacks and save
and load states of the concerned JournallingObject.
This basically strips most functionality from JournallingObject. All
what's left is the management of its ID which unluckily is still
required in order to properly implement undo/redo of additions and
removals of JournallingObject.
Recording single changes of objects or their specific properties is
completely superfluous as we have full implemented state tracking in all
objects already. Therefore use SerializingObject::saveState() and
SerializingObject::restoreState() in order to implement the undo/redo
functionality.
This is just an initial commit and needs some further work (especially
regarding stability). However even things like undo/redo of
addition/removal of Tracks and TrackContentObjects do work already.
Most files and most of the core classes and their methods have been
renamed to match new coding style conventions:
391 files changed, 25400 insertions(+), 25598 deletions(-)
Furthermore splitted some files where model and view classes were
declared or implemented together in the same file.
Should be tested thoroughly as I might have missed renaming some virtual
methods or SIGNAL/SLOT parameters.
(cherry picked from commit 8c9a9dd14c)