Merge pull request #1380 from softrabbit/journalling-killswitch
Master kill switch for journalling, useful when closing program.
This commit is contained in:
@@ -74,7 +74,7 @@ public:
|
||||
}
|
||||
|
||||
void clearJournal();
|
||||
|
||||
void stopAllJournalling();
|
||||
JournallingObject * journallingObject( const jo_id_t _id )
|
||||
{
|
||||
if( m_joIDs.contains( _id ) )
|
||||
|
||||
@@ -70,14 +70,19 @@ void JournallingObject::addJournalCheckPoint()
|
||||
QDomElement JournallingObject::saveState( QDomDocument & _doc,
|
||||
QDomElement & _parent )
|
||||
{
|
||||
QDomElement _this = SerializingObject::saveState( _doc, _parent );
|
||||
if( isJournalling() )
|
||||
{
|
||||
QDomElement _this = SerializingObject::saveState( _doc, _parent );
|
||||
|
||||
QDomElement journalNode = _doc.createElement( "journallingObject" );
|
||||
journalNode.setAttribute( "id", id() );
|
||||
journalNode.setAttribute( "metadata", true );
|
||||
_this.appendChild( journalNode );
|
||||
QDomElement journalNode = _doc.createElement( "journallingObject" );
|
||||
journalNode.setAttribute( "id", id() );
|
||||
journalNode.setAttribute( "metadata", true );
|
||||
_this.appendChild( journalNode );
|
||||
|
||||
return _this;
|
||||
return _this;
|
||||
} else {
|
||||
return QDomElement();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -168,5 +168,17 @@ void ProjectJournal::clearJournal()
|
||||
}
|
||||
}
|
||||
|
||||
void ProjectJournal::stopAllJournalling()
|
||||
{
|
||||
for( JoIdMap::Iterator it = m_joIDs.begin(); it != m_joIDs.end(); ++it)
|
||||
{
|
||||
if( it.value() != NULL )
|
||||
{
|
||||
it.value()->setJournalling(false);
|
||||
}
|
||||
}
|
||||
setJournalling(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -115,6 +115,7 @@ void engine::init( const bool _has_gui )
|
||||
|
||||
void engine::destroy()
|
||||
{
|
||||
s_projectJournal->stopAllJournalling();
|
||||
s_mixer->stopProcessing();
|
||||
|
||||
deleteHelper( &s_projectNotes );
|
||||
|
||||
Reference in New Issue
Block a user