summaryrefslogtreecommitdiffstats
path: root/src/knowit.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit99be31af9886eab5fd5bdab6e1e7887ea71945d2 (patch)
tree60d4364c085f80c5d34ce1b00baaf757bdc262eb /src/knowit.cpp
parent185b99383fdff00a099df949fa94cb9bcc800cc2 (diff)
downloadknowit-99be31af9886eab5fd5bdab6e1e7887ea71945d2.tar.gz
knowit-99be31af9886eab5fd5bdab6e1e7887ea71945d2.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/knowit@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/knowit.cpp')
-rw-r--r--src/knowit.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/knowit.cpp b/src/knowit.cpp
index 30874d1..b4c820f 100644
--- a/src/knowit.cpp
+++ b/src/knowit.cpp
@@ -362,7 +362,7 @@ bool Knowit::open(const KURL& fname)
}
prevdepth = depth;
Notes.addNote(current);
- Notes.tqfind(current)->open(ts);
+ Notes.find(current)->open(ts);
if (s.left(13) == "\\CurrentEntry")
active = current;
}
@@ -401,7 +401,7 @@ bool Knowit::save(const KURL& fname)
TQTextStream ts(&file);
ts.setEncoding(TQTextStream::UnicodeUTF8);
for (TQListViewItemIterator it(Items); it.current(); it++)
- Notes.tqfind(it.current())->save(ts, it.current() == Items->currentItem());
+ Notes.find(it.current())->save(ts, it.current() == Items->currentItem());
filename = fname;
setCaption(fname.fileName());
Notes.modified = false;
@@ -472,20 +472,20 @@ bool Knowit::queryExit()
}
-void Knowit::tqfind(TQListViewItem* start)
+void Knowit::find(TQListViewItem* start)
{
if (soughtText.isEmpty() || !Items->firstChild()) return;
if (start && lastSought == start &&
- Edit->tqfind(soughtText, FindDlg.case_sensitive(), false))
+ Edit->find(soughtText, FindDlg.case_sensitive(), false))
return;
if (!start) start = Items->firstChild();
TQListViewItemIterator it(start);
while (it.current()) {
TQString s = Notes.text(it.current());
if (lastSought != it.current() &&
- s.tqcontains(soughtText, FindDlg.case_sensitive())) {
+ s.contains(soughtText, FindDlg.case_sensitive())) {
slotNoteChanged(it.current());
- Edit->tqfind(soughtText, FindDlg.case_sensitive(), false);
+ Edit->find(soughtText, FindDlg.case_sensitive(), false);
lastSought = it.current();
return;
}
@@ -585,7 +585,7 @@ void Knowit::applyOptions(const KnowitOptions& O, bool store)
TNote* Knowit::currentNote() const
{
if (!Items->currentItem()) return 0;
- return Notes.tqfind(Items->currentItem());
+ return Notes.find(Items->currentItem());
}
@@ -708,7 +708,7 @@ void Knowit::slotItemChanged(TQListViewItem* i)
Edit->setText(s);
Edit->setModified(false);
Links->clear();
- TNote* note = Notes.tqfind(i);
+ TNote* note = Notes.find(i);
if (note)
for (int j=0; j<note->linkCount(); j++)
Links->insertItem(note->link(j).icon(), note->link(j).text(Options.linkFormat));
@@ -760,7 +760,7 @@ void Knowit::slotNoteMoveBegin()
Items->takeNode(elt);
Items->insertItem(elt);
if (tqparent)
- Notes.tqfind(tqparent)->updateView();
+ Notes.find(tqparent)->updateView();
slotNoteChanged(elt);
Notes.modified = true;
}
@@ -780,7 +780,7 @@ void Knowit::slotNoteMoveEnd()
Items->insertNode(0, elt, last);
slotNoteChanged(elt);
if (tqparent)
- Notes.tqfind(tqparent)->updateView();
+ Notes.find(tqparent)->updateView();
Notes.modified = true;
}
}
@@ -792,7 +792,7 @@ void Knowit::slotNoteMoveLeft()
if (elt && tqparent) {
Items->takeNode(elt);
Items->insertNode(tqparent->tqparent(), elt, tqparent);
- Notes.tqfind(tqparent)->updateView();
+ Notes.find(tqparent)->updateView();
slotNoteChanged(elt);
Notes.modified = true;
}
@@ -815,7 +815,7 @@ void Knowit::slotNoteMoveRight()
Items->takeNode(elt);
Items->insertNode(above->tqparent(), elt, above);
}
- Notes.tqfind(above)->updateView();
+ Notes.find(above)->updateView();
slotNoteChanged(elt);
Notes.modified = true;
}
@@ -879,7 +879,7 @@ void Knowit::slotFileSaveAs()
KURL url=KFileDialog::getSaveURL(TQDir::currentDirPath(),
i18n("*.kno|KnowIt files (*.kno)\n*|All files"), this, i18n("Save as..."));
if (!url.isEmpty()) {
- if (!url.fileName().tqcontains('.'))
+ if (!url.fileName().contains('.'))
url = KURL(url.path() + ".kno");
TQFileInfo fileinfo(url.path());
if (fileinfo.exists() && KMessageBox::questionYesNo(0,
@@ -971,7 +971,7 @@ void Knowit::slotFileExport()
KURL url=KFileDialog::getSaveURL(htmlfile,
i18n("*.html|HTML files (*.html)\n*|All files"), this, i18n("Export to HTML"));
if (!url.isEmpty()) {
- if (!url.fileName().tqcontains('.'))
+ if (!url.fileName().contains('.'))
url = KURL(url.path() + ".html");
TQFileInfo fileinfo(url.path());
if (fileinfo.exists() && KMessageBox::questionYesNo(0,
@@ -987,7 +987,7 @@ void Knowit::slotFileExport()
style = TQString("body {font-family: \"%1\"; color: %2; background-color: %3}")
.tqarg(Edit->family()).tqarg(Edit->paletteForegroundColor().name())
.tqarg(Edit->paletteBackgroundColor().name());
- Notes.tqfind(start)->saveHTML(url, origname, style, choice);
+ Notes.find(start)->saveHTML(url, origname, style, choice);
Options.exportFlags = choice;
}
}
@@ -1079,16 +1079,16 @@ void Knowit::slotEditFind()
if (soughtText != FindDlg.getText()) {
soughtText = FindDlg.getText();
lastSought = 0;
- tqfind();
+ find();
}
else
- tqfind(Items->currentItem());
+ find(Items->currentItem());
}
void Knowit::slotEditFindNext()
{
if (soughtText.isEmpty()) FindDlg.exec();
- tqfind(Items->currentItem());
+ find(Items->currentItem());
}
void Knowit::slotEditGoTo()
@@ -1097,9 +1097,9 @@ void Knowit::slotEditGoTo()
TQString page = KInputDialog::getText(i18n("Go to"),
i18n("Go to page with given title"), "", &Ok);
if (Ok && !page.isEmpty()) {
- TQListViewItem* item = Items->tqfindItem(page, 0);
- if (!item) item = Items->tqfindItem(page, 0, TQt::ExactMatch);
- if (!item) item = Items->tqfindItem(page, 0, TQt::Contains);
+ TQListViewItem* item = Items->findItem(page, 0);
+ if (!item) item = Items->findItem(page, 0, TQt::ExactMatch);
+ if (!item) item = Items->findItem(page, 0, TQt::Contains);
slotNoteChanged(item);
}
}
@@ -1292,9 +1292,9 @@ void Knowit::slotLinkOpen()
TNoteLink link = currentNote()->link(Links->currentItem());
if (link.isLocalReference()) {
TQString s = link.link.remove(0, 9);
- TQListViewItem* item = Items->tqfindItem(s, 0);
- if (!item) Items->tqfindItem(s, 0, TQt::BeginsWith);
- if (!item) Items->tqfindItem(s, 0, TQt::Contains);
+ TQListViewItem* item = Items->findItem(s, 0);
+ if (!item) Items->findItem(s, 0, TQt::BeginsWith);
+ if (!item) Items->findItem(s, 0, TQt::Contains);
slotNoteChanged(item);
}
else