void Chunk::removeNote(const ChunkNote ¬e) { qDebug()<<"Looking for note "<<note; qDebug()<<"In :"; for(auto & n : _notes) { qDebug()<<n.first; } if(_scene != 0) { ChunkNotes::iterator i = _notes.find(note); if(i != _notes.end()) { _scene->unmark_view(i->second); } else { qDebug("CANNOT FIND NOTE"); } } _notes.erase(note); emit(noteRemoved(this, note)); }
void XmlNotes::removeNote(const QString &id) { //DEBUG_FUNC_NAME QMap<QString, QString> ref = notesRef.value(id); notesType.remove(id); notesTitle.remove(id); notesData.remove(id); notesRef.remove(id); notesID.removeOne(id); emit noteRemoved(id, ref); }
void FileStorage::deleteNote(const QString ¬eId) { QHash<QString, NoteListItem>::const_iterator r = cache.find(noteId); if (r != cache.end()) { if (QFile::remove( QDir(notesDir).absoluteFilePath( QString("%1.%2").arg(noteId).arg(fileExt)) )) { NoteListItem item = r.value(); cache.remove(r.key()); emit noteRemoved(item); } } }