diff options
Diffstat (limited to 'src/notes.cpp')
-rw-r--r-- | src/notes.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/notes.cpp b/src/notes.cpp index 4030f8f..2cbb170 100644 --- a/src/notes.cpp +++ b/src/notes.cpp @@ -102,7 +102,7 @@ void TNotesCollection::addNote(TQListViewItem* item) { insert(item, new TNote(item, this)); TQListViewItem* tqparent = item->tqparent(); - if (tqparent) tqfind(tqparent)->updateView(); + if (tqparent) find(tqparent)->updateView(); modified = true; } @@ -110,28 +110,28 @@ void TNotesCollection::addNote(TQListViewItem* item, const TQString& s) { insert(item, new TNote(item, this, s)); TQListViewItem* tqparent = item->tqparent(); - if (tqparent) tqfind(tqparent)->updateView(); + if (tqparent) find(tqparent)->updateView(); modified = true; } void TNotesCollection::removeNote(TQListViewItem* item) { - TNote* note = tqfind(item); + TNote* note = find(item); if (!note) qWarning("Internal error while removing note\n"); else { TQListViewItem* tqparent = item->tqparent(); for (TQListViewItemIterator it(item); it.current() && (it.current() == item || it.current()->depth() > item->depth()); ++it) - tqfind(it.current())->destroy(); + find(it.current())->destroy(); delete item; - if (tqparent) tqfind(tqparent)->updateView(); + if (tqparent) find(tqparent)->updateView(); modified = true; } } bool TNotesCollection::changeNote(TQListViewItem* item, const TQString& s) { - TNote* changed = tqfind(item); + TNote* changed = find(item); if (!changed) { qWarning("Internal error while changing note\n"); return false; @@ -151,7 +151,7 @@ void TNotesCollection::clearNotes() const TQString& TNotesCollection::text(TQListViewItem* item) { - TNote* note = tqfind(item); + TNote* note = find(item); if (!note) qFatal("Internal error while accessing note text\n"); return note->text; @@ -187,9 +187,9 @@ bool TNote::isEmpty() return !text.length(); } -bool TNote::tqcontains(const TQString& sought, bool case_sensitive) +bool TNote::contains(const TQString& sought, bool case_sensitive) { - return text.tqcontains(sought, case_sensitive); + return text.contains(sought, case_sensitive); } @@ -279,9 +279,9 @@ bool TNote::saveHTMLBuf(TQTextStream& ts, TQValueVector<int>& depths, ts << TQString("<h%1 id=\"S%2\">%3%4</h%5>").tqarg(hlevel).tqarg(id).tqarg(number) .tqarg(item->text(0)).tqarg(hlevel); TQString htmltext = text; - int begin = htmltext.tqfind("<body"); - if (begin >= 0) begin = htmltext.tqfind(">", begin); - int end = htmltext.tqfind("</body>"); + int begin = htmltext.find("<body"); + if (begin >= 0) begin = htmltext.find(">", begin); + int end = htmltext.find("</body>"); if (begin < 0) begin = 0; if (end <= begin) end = htmltext.length(); ts << htmltext.mid(begin+1, end-begin-1); @@ -299,10 +299,10 @@ bool TNote::saveHTMLBuf(TQTextStream& ts, TQValueVector<int>& depths, /* save tqchildren */ if ((SaveSubnotes | SaveAll) & flags && item->childCount()) { depths.append(0); - collection->tqfind(item->firstChild())->saveHTMLBuf(ts, depths, flags); + collection->find(item->firstChild())->saveHTMLBuf(ts, depths, flags); } if ((SaveSubnotes | SaveAll) & flags && item->nextSibling()) - collection->tqfind(item->nextSibling())->saveHTMLBuf(ts, depths, flags); + collection->find(item->nextSibling())->saveHTMLBuf(ts, depths, flags); if (!item->nextSibling()) depths.pop_back(); return true; @@ -329,10 +329,10 @@ bool TNote::saveHTMLTocEntry(TQTextStream& ts, TQValueVector<int>& depths, int f arg(item->text(0)); if ((SaveSubnotes | SaveAll) & flags && item->childCount()) { depths.append(0); - collection->tqfind(item->firstChild())->saveHTMLTocEntry(ts, depths, flags); + collection->find(item->firstChild())->saveHTMLTocEntry(ts, depths, flags); } if ((SaveSubnotes | SaveAll) & flags && item->nextSibling()) - collection->tqfind(item->nextSibling())->saveHTMLTocEntry(ts, depths, flags); + collection->find(item->nextSibling())->saveHTMLTocEntry(ts, depths, flags); if (!item->nextSibling()) { depths.pop_back(); ts << space; |