summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 13:26:15 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 13:26:15 -0600
commitbd55e01bc4764c5daa84bf46db6978d43898d619 (patch)
treeefc4b389d1eaffa183eb963c9e0aea1440c934c8 /src/common
parente39f93c92e88ec461668231778cbba570c82250b (diff)
downloadpiklab-bd55e01bc4764c5daa84bf46db6978d43898d619.tar.gz
piklab-bd55e01bc4764c5daa84bf46db6978d43898d619.zip
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
Diffstat (limited to 'src/common')
-rw-r--r--src/common/common/number.cpp2
-rw-r--r--src/common/global/process.cpp18
-rw-r--r--src/common/global/process.h16
-rw-r--r--src/common/nokde/nokde_kcmdlineargs.cpp6
-rw-r--r--src/common/nokde/nokde_kprocess.cpp24
-rw-r--r--src/common/nokde/nokde_kprocess.h14
6 files changed, 40 insertions, 40 deletions
diff --git a/src/common/common/number.cpp b/src/common/common/number.cpp
index e0b5b0a..39a9c73 100644
--- a/src/common/common/number.cpp
+++ b/src/common/common/number.cpp
@@ -179,7 +179,7 @@ TQString formatNumber(ulong v)
#if defined(NO_KDE)
return TQString::number(v);
#else
- return KGlobal::locale()->formatNumber(v, 0);
+ return TDEGlobal::locale()->formatNumber(v, 0);
#endif
}
diff --git a/src/common/global/process.cpp b/src/common/global/process.cpp
index 238d336..9dc4761 100644
--- a/src/common/global/process.cpp
+++ b/src/common/global/process.cpp
@@ -34,10 +34,10 @@ Process::State Process::runSynchronously(Base &process, RunActions actions, uint
Process::Base::Base(TQObject *parent, const char *name)
: TQObject(parent, name), _state(Stopped)
{
- _process = new KProcess(this);
- connect(_process, TQT_SIGNAL(processExited(KProcess *)), TQT_SLOT(exited()));
- connect(_process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), TQT_SLOT(receivedStdout(KProcess*, char *, int)));
- connect(_process, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), TQT_SLOT(receivedStderr(KProcess*, char *, int)));
+ _process = new TDEProcess(this);
+ connect(_process, TQT_SIGNAL(processExited(TDEProcess *)), TQT_SLOT(exited()));
+ connect(_process, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)), TQT_SLOT(receivedStdout(TDEProcess*, char *, int)));
+ connect(_process, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), TQT_SLOT(receivedStderr(TDEProcess*, char *, int)));
_timer = new TQTimer(this);
connect(_timer, TQT_SIGNAL(timeout()), TQT_SLOT(timeoutSlot()));
}
@@ -82,7 +82,7 @@ bool Process::Base::start(uint timeout)
#if defined(NO_KDE)
if ( !_process->start() ) {
#else
- if ( !_process->start(KProcess::NotifyOnExit, KProcess::All) ) {
+ if ( !_process->start(TDEProcess::NotifyOnExit, TDEProcess::All) ) {
#endif
_state = StartFailed;
return false;
@@ -144,20 +144,20 @@ bool Process::Base::isFilteredLine(const TQString &line)
}
//----------------------------------------------------------------------------
-void Process::StringOutput::receivedStdout(KProcess*, char *data, int len)
+void Process::StringOutput::receivedStdout(TDEProcess*, char *data, int len)
{
_stdout += TQString::fromLatin1(data, len);
emit stdoutDataReceived();
}
-void Process::StringOutput::receivedStderr(KProcess*, char *data, int len)
+void Process::StringOutput::receivedStderr(TDEProcess*, char *data, int len)
{
_stderr += TQString::fromLatin1(data, len);
emit stderrDataReceived();
}
//----------------------------------------------------------------------------
-void Process::LineBase::receivedStdout(KProcess*, char *data, int len)
+void Process::LineBase::receivedStdout(TDEProcess*, char *data, int len)
{
for (uint i=0; i<uint(len); i++) {
if ( data[i]=='\r' ) continue;
@@ -170,7 +170,7 @@ void Process::LineBase::receivedStdout(KProcess*, char *data, int len)
emit stdoutDataReceived();
}
-void Process::LineBase::receivedStderr(KProcess*, char *data, int len)
+void Process::LineBase::receivedStderr(TDEProcess*, char *data, int len)
{
for (uint i=0; i<uint(len); i++) {
if ( data[i]=='\r' ) continue;
diff --git a/src/common/global/process.h b/src/common/global/process.h
index 083fb0a..ad0143d 100644
--- a/src/common/global/process.h
+++ b/src/common/global/process.h
@@ -13,7 +13,7 @@
#include <tqstringlist.h>
#include <tqobject.h>
#include <tqtimer.h>
-class KProcess;
+class TDEProcess;
#include "global.h"
namespace PURL { class Directory; }
@@ -57,14 +57,14 @@ signals:
protected slots:
void exited();
void timeoutSlot();
- virtual void receivedStdout(KProcess*, char *buffer, int len) = 0;
- virtual void receivedStderr(KProcess*, char *buffer, int len) = 0;
+ virtual void receivedStdout(TDEProcess*, char *buffer, int len) = 0;
+ virtual void receivedStderr(TDEProcess*, char *buffer, int len) = 0;
friend State runSynchronously(Base &, RunActions, uint);
protected:
State _state;
- KProcess *_process;
+ TDEProcess *_process;
TQTimer *_timer;
TQString _stdout, _stderr;
@@ -82,8 +82,8 @@ public:
TQString serr() const { return _stderr; }
private slots:
- virtual void receivedStdout(KProcess *, char *buffer, int len);
- virtual void receivedStderr(KProcess *, char *buffer, int len);
+ virtual void receivedStdout(TDEProcess *, char *buffer, int len);
+ virtual void receivedStderr(TDEProcess *, char *buffer, int len);
};
//----------------------------------------------------------------------------
@@ -95,8 +95,8 @@ public:
LineBase(TQObject *parent = 0, const char *name = 0) : Base(parent, name) {}
private slots:
- virtual void receivedStdout(KProcess *, char *buffer, int len);
- virtual void receivedStderr(KProcess *, char *buffer, int len);
+ virtual void receivedStdout(TDEProcess *, char *buffer, int len);
+ virtual void receivedStderr(TDEProcess *, char *buffer, int len);
private:
virtual void addStdoutLine(const TQString &line) = 0;
diff --git a/src/common/nokde/nokde_kcmdlineargs.cpp b/src/common/nokde/nokde_kcmdlineargs.cpp
index dea5d6a..6f45ef0 100644
--- a/src/common/nokde/nokde_kcmdlineargs.cpp
+++ b/src/common/nokde/nokde_kcmdlineargs.cpp
@@ -757,10 +757,10 @@ void
TDECmdLineArgs::enable_i18n()
{
// called twice or too late
-/* if (KGlobal::_locale)
+/* if (TDEGlobal::_locale)
return;
- if (!KGlobal::_instance) {
+ if (!TDEGlobal::_instance) {
TDEInstance *instance = new TDEInstance(about);
(void) instance->config();
// Don't delete instance!
@@ -770,7 +770,7 @@ TDECmdLineArgs::enable_i18n()
void
TDECmdLineArgs::usage(const TQString &error)
{
-// assert(KGlobal::_locale);
+// assert(TDEGlobal::_locale);
# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000
TQCString localError = error.local8Bit();
#else
diff --git a/src/common/nokde/nokde_kprocess.cpp b/src/common/nokde/nokde_kprocess.cpp
index 8bbb711..ee3e35b 100644
--- a/src/common/nokde/nokde_kprocess.cpp
+++ b/src/common/nokde/nokde_kprocess.cpp
@@ -11,7 +11,7 @@
# include <signal.h>
#endif
-KProcess::KProcess(TQObject *parent, const char *name)
+TDEProcess::TDEProcess(TQObject *parent, const char *name)
: TQObject(parent, name)
{
_process = new Q3Process(this);
@@ -20,7 +20,7 @@ KProcess::KProcess(TQObject *parent, const char *name)
connect(_process, TQT_SIGNAL(readyReadStderr()), TQT_SLOT(readyReadStderrSlot()));
}
-bool KProcess::start()
+bool TDEProcess::start()
{
_process->setArguments(_arguments);
TQStringList env;
@@ -31,26 +31,26 @@ bool KProcess::start()
return _process->start(env.isEmpty() ? 0 : &env);
}
-void KProcess::processExitedSlot()
+void TDEProcess::processExitedSlot()
{
readyReadStdoutSlot();
readyReadStderrSlot();
emit processExited(this);
}
-void KProcess::readyReadStdoutSlot()
+void TDEProcess::readyReadStdoutSlot()
{
TQByteArray a = _process->readStdout();
emit receivedStdout(this, a.data(), a.count());
}
-void KProcess::readyReadStderrSlot()
+void TDEProcess::readyReadStderrSlot()
{
TQByteArray a = _process->readStderr();
emit receivedStderr(this, a.data(), a.count());
}
-bool KProcess::writeStdin(const char *buffer, int len)
+bool TDEProcess::writeStdin(const char *buffer, int len)
{
#if [[[TQT_VERSION IS DEPRECATED]]]<0x040000
TQByteArray a;
@@ -62,13 +62,13 @@ bool KProcess::writeStdin(const char *buffer, int len)
return true;
}
-bool KProcess::kill()
+bool TDEProcess::kill()
{
_process->kill();
return true;
}
-bool KProcess::kill(int n)
+bool TDEProcess::kill(int n)
{
#if defined(Q_OS_UNIX)
return ( ::kill(_process->processIdentifier(), n)!=-1 );
@@ -78,22 +78,22 @@ bool KProcess::kill(int n)
#endif
}
-int KProcess::exitStatus() const
+int TDEProcess::exitStatus() const
{
return _process->exitStatus();
}
-bool KProcess::isRunning() const
+bool TDEProcess::isRunning() const
{
return _process->isRunning();
}
-void KProcess::setWorkingDirectory(const TQDir &dir)
+void TDEProcess::setWorkingDirectory(const TQDir &dir)
{
return _process->setWorkingDirectory(dir);
}
-void KProcess::setUseShell(bool useShell)
+void TDEProcess::setUseShell(bool useShell)
{
// ### TODO: just issue "/bin/sh" "-c" "command"
Q_ASSERT(false);
diff --git a/src/common/nokde/nokde_kprocess.h b/src/common/nokde/nokde_kprocess.h
index 06d6851..b51d05b 100644
--- a/src/common/nokde/nokde_kprocess.h
+++ b/src/common/nokde/nokde_kprocess.h
@@ -10,15 +10,15 @@ class TQProcess;
class Q3Process;
#endif
-class KProcess : public TQObject
+class TDEProcess : public TQObject
{
Q_OBJECT
public:
- KProcess(TQObject *parent = 0, const char *name = 0);
+ TDEProcess(TQObject *parent = 0, const char *name = 0);
void clearArguments() { _arguments.clear(); }
- KProcess &operator<< (const TQString &arg) { _arguments += arg; return *this; }
- KProcess &operator<< (const TQStringList &args) { _arguments += args; return *this; }
+ TDEProcess &operator<< (const TQString &arg) { _arguments += arg; return *this; }
+ TDEProcess &operator<< (const TQStringList &args) { _arguments += args; return *this; }
TQStringList args() const { return _arguments; }
void setEnvironment(const TQString &name, const TQString &value) { _environment += name + "=" + value; }
bool start();
@@ -31,9 +31,9 @@ public:
void setUseShell(bool useShell);
signals:
- void processExited(KProcess *process);
- void receivedStdout(KProcess *process, char *buffer, int len);
- void receivedStderr(KProcess *process, char *buffer, int len);
+ void processExited(TDEProcess *process);
+ void receivedStdout(TDEProcess *process, char *buffer, int len);
+ void receivedStderr(TDEProcess *process, char *buffer, int len);
private slots:
void processExitedSlot();