summaryrefslogtreecommitdiffstats
path: root/tools/thesaurus
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 13:23:24 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 13:23:24 -0600
commit5b8ab149469c8e186ee8b05d90c0103ae722dd85 (patch)
treefb31321c80b12ee8e2237bdcf8c228fe44e67772 /tools/thesaurus
parentfe33d391dd7c9da0f83e779344a17e2e445b70a8 (diff)
downloadkoffice-5b8ab149469c8e186ee8b05d90c0103ae722dd85.tar.gz
koffice-5b8ab149469c8e186ee8b05d90c0103ae722dd85.zip
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
Diffstat (limited to 'tools/thesaurus')
-rw-r--r--tools/thesaurus/main.cc44
-rw-r--r--tools/thesaurus/main.h16
2 files changed, 30 insertions, 30 deletions
diff --git a/tools/thesaurus/main.cc b/tools/thesaurus/main.cc
index 32271af8..cca6f495 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) );
}
diff --git a/tools/thesaurus/main.h b/tools/thesaurus/main.h
index 88aa19ee..210be195 100644
--- a/tools/thesaurus/main.h
+++ b/tools/thesaurus/main.h
@@ -86,13 +86,13 @@ protected slots:
void slotBack();
void slotForward();
- void thesExited(KProcess *proc);
- void receivedThesStdout(KProcess *proc, char *result, int len);
- void receivedThesStderr(KProcess *proc, char *result, int len);
+ void thesExited(TDEProcess *proc);
+ void receivedThesStdout(TDEProcess *proc, char *result, int len);
+ void receivedThesStderr(TDEProcess *proc, char *result, int len);
- void wnExited(KProcess *proc);
- void receivedWnStdout(KProcess *proc, char *result, int len);
- void receivedWnStderr(KProcess *proc, char *result, int len);
+ void wnExited(TDEProcess *proc);
+ void receivedWnStdout(TDEProcess *proc, char *result, int len);
+ void receivedWnStderr(TDEProcess *proc, char *result, int len);
protected:
enum Mode {grep, other};
@@ -117,11 +117,11 @@ protected:
KConfig *m_config;
- KProcess *m_thesproc;
+ TDEProcess *m_thesproc;
TQString m_thesproc_stdout;
TQString m_thesproc_stderr;
- KProcess *m_wnproc;
+ TDEProcess *m_wnproc;
TQString m_wnproc_stdout;
TQString m_wnproc_stderr;