/// Sets the persisted in dex and fires a signal void TextUndoStack::setPersistedIndex(int index) { bool oldPersisted = isPersisted(); persistedIndex_ = index; bool persisted = isPersisted(); if( oldPersisted != persisted ) { emit persistedChanged( persisted ); } }
void MetaDboBase::remove() { checkNotOrphaned(); if(isDeleted()) { // is already removed or being removed in this transaction } else if(isPersisted()) { state_ |= NeedsDelete; session_->needsFlush(this); } else if(session_) { // was added to a Session but not yet flushed Session *session = session_; setSession(0); session->discardChanges(this); state_ &= ~NeedsSave; } else { // is not yet added to the Session } }