summaryrefslogtreecommitdiffstats
path: root/tools/thesaurus/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tools/thesaurus/main.cc')
-rw-r--r--tools/thesaurus/main.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/tools/thesaurus/main.cc b/tools/thesaurus/main.cc
index e7edffa7..53ef6080 100644
--- a/tools/thesaurus/main.cc
+++ b/tools/thesaurus/main.cc
@@ -185,10 +185,10 @@ Thesaurus::Thesaurus(TQObject* tqparent, const char* name, const TQStringList &)
connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotGotoHistory(int)));
TQHBoxLayout *row2 = new TQHBoxLayout( m_top_layout );
- m_tqreplace = new KLineEdit(m_page);
- m_replace_label = new TQLabel(m_tqreplace, i18n("&Replace with:"), m_page);
+ m_replace = new KLineEdit(m_page);
+ m_replace_label = new TQLabel(m_replace, i18n("&Replace with:"), m_page);
row2->addWidget(m_replace_label, 0);
- row2->addWidget(m_tqreplace, 1);
+ row2->addWidget(m_replace, 1);
// Set focus
m_edit->setFocus();
@@ -255,7 +255,7 @@ bool Thesaurus::run(const TQString& command, void* data, const TQString& datatyp
m_replacement = false;
m_dialog->showButtonOK(false);
m_dialog->setButtonCancelText(i18n("&Close"));
- m_tqreplace->setEnabled(false);
+ m_replace->setEnabled(false);
m_replace_label->setEnabled(false);
} else {
kdDebug(31000) << "Thesaurus does only accept the command 'thesaurus' or 'thesaurus_standalone'" << endl;
@@ -281,7 +281,7 @@ bool Thesaurus::run(const TQString& command, void* data, const TQString& datatyp
}
if( m_dialog->exec() == TQDialog::Accepted ) { // "Replace"
- *((TQString*)data) = m_tqreplace->text();
+ *((TQString*)data) = m_replace->text();
}
return TRUE;
@@ -350,13 +350,13 @@ void Thesaurus::slotSetReplaceTerm(TQListBoxItem *item)
{
if( ! item )
return;
- m_tqreplace->setText(item->text());
+ m_replace->setText(item->text());
}
void Thesaurus::slotSetReplaceTerm(const TQString &term)
{
if( m_replacement && term != m_no_match ) {
- m_tqreplace->setText(term);
+ m_replace->setText(term);
}
}
@@ -446,7 +446,7 @@ void Thesaurus::thesExited(KProcess *)
if( line.startsWith(" ") ) { // ignore license (two spaces)
continue;
}
- int sep_pos = line.tqfind("#");
+ int sep_pos = line.find("#");
TQString syn_part = line.left(sep_pos);
TQString hyper_part = line.right(line.length()-sep_pos-1);
TQStringList syn_tmp = TQStringList::split(TQChar(';'), syn_part);
@@ -456,13 +456,13 @@ void Thesaurus::thesExited(KProcess *)
for ( TQStringList::Iterator it2 = syn_tmp.begin(); it2 != syn_tmp.end(); ++it2 ) {
// add if it's not the term itself and if it's not yet in the list
TQString term = (*it2);
- if( term.lower() != search_term.lower() && syn.tqcontains(term) == 0 ) {
+ if( term.lower() != search_term.lower() && syn.contains(term) == 0 ) {
syn.append(term);
}
}
for ( TQStringList::Iterator it2 = hyper_tmp.begin(); it2 != hyper_tmp.end(); ++it2 ) {
TQString term = (*it2);
- if( term.lower() != search_term.lower() && hyper.tqcontains(term) == 0 ) {
+ if( term.lower() != search_term.lower() && hyper.contains(term) == 0 ) {
hyper.append(term);
}
}
@@ -471,7 +471,7 @@ void Thesaurus::thesExited(KProcess *)
// match on the right side of the '#' -- hypernyms
for ( TQStringList::Iterator it2 = syn_tmp.begin(); it2 != syn_tmp.end(); ++it2 ) {
TQString term = (*it2);
- if( term.lower() != search_term && hypo.tqcontains(term) == 0 ) {
+ if( term.lower() != search_term && hypo.contains(term) == 0 ) {
hypo.append(term);
}
}
@@ -671,9 +671,9 @@ void Thesaurus::wnExited(KProcess *)
continue;
}
// Escape XML:
- l = l.tqreplace('&', "&amp;");
- l = l.tqreplace('<', "&lt;");
- l = l.tqreplace('>', "&gt;");
+ l = l.replace('&', "&amp;");
+ l = l.replace('<', "&lt;");
+ l = l.replace('>', "&gt;");
// TODO?:
// move "=>" in own column?
l = formatLine(l);
@@ -768,7 +768,7 @@ TQString Thesaurus::formatLine(TQString l)
re.setPattern("(.*)(=&gt;|HAS \\w+:|PART OF:)(.*) --");
re.setMinimal(true); // non-greedy
if( re.search(l) != -1 ) {
- int dash_pos = l.tqfind("--");
+ int dash_pos = l.find("--");
TQString line_end = l.mid(dash_pos+2, l.length()-dash_pos);
l = re.cap(1);
l += re.cap(2) + " ";