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.cc44
1 files changed, 22 insertions, 22 deletions
diff --git a/tools/thesaurus/main.cc b/tools/thesaurus/main.cc
index 32271af8d..cca6f4953 100644
--- a/tools/thesaurus/main.cc
+++ b/tools/thesaurus/main.cc
@@ -74,7 +74,7 @@ Thesaurus::Thesaurus(TQObject* parent, const char* name, const TQStringList &)
m_config = new KConfig("kthesaurusrc");
m_data_file = m_config->readPathEntry("datafile");
if( ! m_data_file ) {
- m_data_file = KGlobal::dirs()->findResourceDir("data", "thesaurus/")
+ m_data_file = TDEGlobal::dirs()->findResourceDir("data", "thesaurus/")
+ "thesaurus/thesaurus.txt";
}
setCaption();
@@ -199,20 +199,20 @@ Thesaurus::Thesaurus(TQObject* parent, const char* name, const TQStringList &)
//
// calling the 'wn' binary
- m_wnproc = new KProcess;
- connect(m_wnproc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(wnExited(KProcess*)));
- connect(m_wnproc, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
- this, TQT_SLOT(receivedWnStdout(KProcess*, char*, int)));
- connect(m_wnproc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
- this, TQT_SLOT(receivedWnStderr(KProcess*, char*, int)));
+ m_wnproc = new TDEProcess;
+ connect(m_wnproc, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(wnExited(TDEProcess*)));
+ connect(m_wnproc, TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),
+ this, TQT_SLOT(receivedWnStdout(TDEProcess*, char*, int)));
+ connect(m_wnproc, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)),
+ this, TQT_SLOT(receivedWnStderr(TDEProcess*, char*, int)));
// grep'ing the text file
- m_thesproc = new KProcess;
- connect(m_thesproc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(thesExited(KProcess*)));
- connect(m_thesproc, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
- this, TQT_SLOT(receivedThesStdout(KProcess*, char*, int)));
- connect(m_thesproc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
- this, TQT_SLOT(receivedThesStderr(KProcess*, char*, int)));
+ m_thesproc = new TDEProcess;
+ connect(m_thesproc, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(thesExited(TDEProcess*)));
+ connect(m_thesproc, TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),
+ this, TQT_SLOT(receivedThesStdout(TDEProcess*, char*, int)));
+ connect(m_thesproc, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)),
+ this, TQT_SLOT(receivedThesStderr(TDEProcess*, char*, int)));
}
@@ -291,7 +291,7 @@ bool Thesaurus::run(const TQString& command, void* data, const TQString& datatyp
void Thesaurus::slotChangeLanguage()
{
TQString filename = KFileDialog::getOpenFileName(
- KGlobal::dirs()->findResourceDir("data", "thesaurus/")+"thesaurus/");
+ TDEGlobal::dirs()->findResourceDir("data", "thesaurus/")+"thesaurus/");
if( !filename.isNull() ) {
m_data_file = filename;
setCaption();
@@ -415,7 +415,7 @@ void Thesaurus::findTermThesaurus(const TQString &term)
*m_thesproc << "grep" << "-i" << term_tmp;
*m_thesproc << m_data_file;
- if( !m_thesproc->start(KProcess::NotifyOnExit, KProcess::AllOutput) ) {
+ if( !m_thesproc->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput) ) {
KMessageBox::error(0, i18n("Failed to execute grep."));
TQApplication::restoreOverrideCursor();
return;
@@ -424,7 +424,7 @@ void Thesaurus::findTermThesaurus(const TQString &term)
// The external process has ended, so we parse its result and put it in
// the list box.
-void Thesaurus::thesExited(KProcess *)
+void Thesaurus::thesExited(TDEProcess *)
{
if( !m_thesproc_stderr.isEmpty() ) {
@@ -511,12 +511,12 @@ void Thesaurus::thesExited(KProcess *)
TQApplication::restoreOverrideCursor();
}
-void Thesaurus::receivedThesStdout(KProcess *, char *result, int len)
+void Thesaurus::receivedThesStdout(TDEProcess *, char *result, int len)
{
m_thesproc_stdout += TQString::fromLocal8Bit( TQCString(result, len+1) );
}
-void Thesaurus::receivedThesStderr(KProcess *, char *result, int len)
+void Thesaurus::receivedThesStderr(TDEProcess *, char *result, int len)
{
m_thesproc_stderr += TQString::fromLocal8Bit( TQCString(result, len+1) );
}
@@ -628,7 +628,7 @@ void Thesaurus::findTermWordnet(const TQString &term)
return;
}
- if( !m_wnproc->start(KProcess::NotifyOnExit, KProcess::AllOutput) ) {
+ if( !m_wnproc->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput) ) {
m_resultbox->setText(i18n("<b>Error:</b> Failed to execute WordNet program 'wn'. "
"WordNet has to be installed on your computer if you want to use it, "
"and 'wn' has to be in your PATH. "
@@ -643,7 +643,7 @@ void Thesaurus::findTermWordnet(const TQString &term)
}
// The process has ended, so parse its result and display it as TQt richtext.
-void Thesaurus::wnExited(KProcess *)
+void Thesaurus::wnExited(TDEProcess *)
{
if( !m_wnproc_stderr.isEmpty() ) {
@@ -699,12 +699,12 @@ void Thesaurus::wnExited(KProcess *)
TQApplication::restoreOverrideCursor();
}
-void Thesaurus::receivedWnStdout(KProcess *, char *result, int len)
+void Thesaurus::receivedWnStdout(TDEProcess *, char *result, int len)
{
m_wnproc_stdout += TQString::fromLocal8Bit( TQCString(result, len+1) );
}
-void Thesaurus::receivedWnStderr(KProcess *, char *result, int len)
+void Thesaurus::receivedWnStderr(TDEProcess *, char *result, int len)
{
m_wnproc_stderr += TQString::fromLocal8Bit( TQCString(result, len+1) );
}