diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-24 13:51:01 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-24 13:51:01 -0600 |
commit | b9e542d0c805e9adee3a67e44532d5321032e21e (patch) | |
tree | e82d85b9035cc2ca322911e8a6e38a3bd8b1d431 /lib/util | |
parent | 7a392a04059bd904dab4c78910a6d34aa0b37798 (diff) | |
download | tdevelop-b9e542d0c805e9adee3a67e44532d5321032e21e.tar.gz tdevelop-b9e542d0c805e9adee3a67e44532d5321032e21e.zip |
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
Diffstat (limited to 'lib/util')
-rw-r--r-- | lib/util/blockingkprocess.cpp | 48 | ||||
-rw-r--r-- | lib/util/blockingkprocess.h | 24 | ||||
-rw-r--r-- | lib/util/execcommand.cpp | 18 | ||||
-rw-r--r-- | lib/util/execcommand.h | 8 | ||||
-rw-r--r-- | lib/util/kdevshellwidget.cpp | 4 | ||||
-rw-r--r-- | lib/util/kdevshellwidget.h | 4 | ||||
-rw-r--r-- | lib/util/kscriptactionmanager.cpp | 4 | ||||
-rw-r--r-- | lib/util/settings.cpp | 2 |
8 files changed, 56 insertions, 56 deletions
diff --git a/lib/util/blockingkprocess.cpp b/lib/util/blockingkprocess.cpp index aef4fb1f..b88b0cad 100644 --- a/lib/util/blockingkprocess.cpp +++ b/lib/util/blockingkprocess.cpp @@ -14,44 +14,44 @@ #include <tqapplication.h> #include <tqtimer.h> -BlockingKProcess::BlockingKProcess(TQObject *parent, const char *name) - : KProcess(parent, name) +BlockingTDEProcess::BlockingTDEProcess(TQObject *parent, const char *name) + : TDEProcess(parent, name) { m_stdOut = ""; m_stdErr = ""; m_timeoutValue = 60; m_timer = 0L; - connect(this, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), - this, TQT_SLOT(slotReceivedStdOut(KProcess *, char *, int))); - connect(this, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), - this, TQT_SLOT(slotReceivedStdErr(KProcess *, char *, int))); - connect(this, TQT_SIGNAL(processExited(KProcess *)), - this, TQT_SLOT(slotProcessExited(KProcess *))); + connect(this, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)), + this, TQT_SLOT(slotReceivedStdOut(TDEProcess *, char *, int))); + connect(this, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), + this, TQT_SLOT(slotReceivedStdErr(TDEProcess *, char *, int))); + connect(this, TQT_SIGNAL(processExited(TDEProcess *)), + this, TQT_SLOT(slotProcessExited(TDEProcess *))); } -BlockingKProcess::BlockingKProcess() - : KProcess() +BlockingTDEProcess::BlockingTDEProcess() + : TDEProcess() { m_stdOut = ""; m_stdErr = ""; m_timeoutValue = 60; m_timer = 0L; - connect(this, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), - this, TQT_SLOT(slotReceivedStdOut(KProcess *, char *, int))); - connect(this, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), - this, TQT_SLOT(slotReceivedStdErr(KProcess *, char *, int))); - connect(this, TQT_SIGNAL(processExited(KProcess *)), - this, TQT_SLOT(slotProcessExited(KProcess *))); + connect(this, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)), + this, TQT_SLOT(slotReceivedStdOut(TDEProcess *, char *, int))); + connect(this, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), + this, TQT_SLOT(slotReceivedStdErr(TDEProcess *, char *, int))); + connect(this, TQT_SIGNAL(processExited(TDEProcess *)), + this, TQT_SLOT(slotProcessExited(TDEProcess *))); } -BlockingKProcess::~BlockingKProcess() +BlockingTDEProcess::~BlockingTDEProcess() { } -bool BlockingKProcess::start(RunMode runmode, Communication comm) +bool BlockingTDEProcess::start(RunMode runmode, Communication comm) { - if (KProcess::start(runmode, comm)) + if (TDEProcess::start(runmode, comm)) { m_timeout = false; m_timer = new TQTimer(); @@ -66,22 +66,22 @@ bool BlockingKProcess::start(RunMode runmode, Communication comm) } -void BlockingKProcess::slotReceivedStdOut(KProcess *, char *buffer, int buflen) +void BlockingTDEProcess::slotReceivedStdOut(TDEProcess *, char *buffer, int buflen) { m_stdOut += TQString::fromLatin1(buffer, buflen); } -void BlockingKProcess::slotReceivedStdErr(KProcess *, char *buffer, int buflen) +void BlockingTDEProcess::slotReceivedStdErr(TDEProcess *, char *buffer, int buflen) { m_stdErr += TQString::fromLatin1(buffer, buflen); } -void BlockingKProcess::slotProcessExited(KProcess *) +void BlockingTDEProcess::slotProcessExited(TDEProcess *) { tqApp->exit_loop(); } -void BlockingKProcess::slotTimeOut() +void BlockingTDEProcess::slotTimeOut() { m_timeout = true; kill(); @@ -92,7 +92,7 @@ void BlockingKProcess::slotTimeOut() void tqt_enter_modal( TQWidget *widget ); void tqt_leave_modal( TQWidget *widget ); -void BlockingKProcess::enter_loop() +void BlockingTDEProcess::enter_loop() { TQWidget dummy(0,0,WType_Dialog | WShowModal); dummy.setFocusPolicy( TQ_NoFocus ); diff --git a/lib/util/blockingkprocess.h b/lib/util/blockingkprocess.h index f6fa9d2e..8d164bef 100644 --- a/lib/util/blockingkprocess.h +++ b/lib/util/blockingkprocess.h @@ -17,8 +17,8 @@ #include <kprocess.h> /** - * Blocking version of KProcess, which stores the stdout. - * Differences between start(KProcess::Block, KProcess::StdOut) and this + * Blocking version of TDEProcess, which stores the stdout. + * Differences between start(TDEProcess::Block, TDEProcess::StdOut) and this * class are: * - the GUI update is not blocked why the external process is running * - in case of problems there is a timeout (defaults to 60 seconds), after which the @@ -28,22 +28,22 @@ */ class TQTimer; -class BlockingKProcess : public KProcess +class BlockingTDEProcess : public TDEProcess { Q_OBJECT public: - BlockingKProcess(TQObject *parent, const char *name=0); - BlockingKProcess(); + BlockingTDEProcess(TQObject *parent, const char *name=0); + BlockingTDEProcess(); - virtual ~BlockingKProcess(); + virtual ~BlockingTDEProcess(); /** * Start the process. It waits until the process exits or the timeout is hit. - * @param runmode @see KProcess, use KProcess::NotifyOnExit to get proper behaviour, - * not KProcess::Block - * @param comm if Stdout is passed, it catches the output. For the rest @see KProcess + * @param runmode @see TDEProcess, use TDEProcess::NotifyOnExit to get proper behaviour, + * not TDEProcess::Block + * @param comm if Stdout is passed, it catches the output. For the rest @see TDEProcess * @return true in case of success, false if there are problems to start the process * or it was killed because of the timeout. */ @@ -75,9 +75,9 @@ public: void setTimeOut(int timeout) { m_timeoutValue = timeout; } private slots: - void slotReceivedStdOut(KProcess *proc, char *buffer, int buflen); - void slotReceivedStdErr(KProcess *proc, char *buffer, int buflen); - void slotProcessExited(KProcess *proc); + void slotReceivedStdOut(TDEProcess *proc, char *buffer, int buflen); + void slotReceivedStdErr(TDEProcess *proc, char *buffer, int buflen); + void slotProcessExited(TDEProcess *proc); void slotTimeOut(); private: diff --git a/lib/util/execcommand.cpp b/lib/util/execcommand.cpp index 62eb5924..d62cb2e7 100644 --- a/lib/util/execcommand.cpp +++ b/lib/util/execcommand.cpp @@ -32,21 +32,21 @@ ExecCommand::ExecCommand( const TQString& executable, const TQStringList& args, { progressDlg = 0; - proc = new KProcess(); + proc = new TDEProcess(); proc->setWorkingDirectory( workingDir ); for ( TQStringList::ConstIterator it = env.begin(); it != env.end(); ++it ) proc->setEnvironment( (*it).section( '=', 0, 0 ), (*it).section( '=', 1, 1 ) ); *proc << executable; *proc << args; - connect( proc, TQT_SIGNAL(processExited(KProcess*)), + connect( proc, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(processExited()) ); - connect( proc, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), - this, TQT_SLOT(receivedStdout(KProcess*,char*,int)) ); - connect( proc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), - this, TQT_SLOT(receivedStderr(KProcess*,char*,int)) ); + connect( proc, TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)), + this, TQT_SLOT(receivedStdout(TDEProcess*,char*,int)) ); + connect( proc, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)), + this, TQT_SLOT(receivedStderr(TDEProcess*,char*,int)) ); - bool ok = proc->start( KProcess::NotifyOnExit, KProcess::AllOutput ); + bool ok = proc->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput ); if ( !ok ) { KMessageBox::error( 0, i18n("Could not invoke \"%1\". Please make sure it is installed correctly").arg( executable ), @@ -63,12 +63,12 @@ ExecCommand::ExecCommand( const TQString& executable, const TQStringList& args, } } -void ExecCommand::receivedStdout (KProcess*, char *buffer, int buflen) +void ExecCommand::receivedStdout (TDEProcess*, char *buffer, int buflen) { out += TQString::fromUtf8( buffer, buflen ); } -void ExecCommand::receivedStderr (KProcess*, char *buffer, int buflen) +void ExecCommand::receivedStderr (TDEProcess*, char *buffer, int buflen) { err += TQString::fromUtf8( buffer, buflen ); } diff --git a/lib/util/execcommand.h b/lib/util/execcommand.h index 540e5b1a..6c9b96a7 100644 --- a/lib/util/execcommand.h +++ b/lib/util/execcommand.h @@ -23,7 +23,7 @@ #include <tqobject.h> #include <tqstringlist.h> -class KProcess; +class TDEProcess; class KProgressDialog; /** @@ -56,13 +56,13 @@ signals: void finished( const TQString& output, const TQString& errorOutput ); private slots: - void receivedStdout (KProcess *, char *buffer, int buflen); - void receivedStderr (KProcess *, char *buffer, int buflen); + void receivedStdout (TDEProcess *, char *buffer, int buflen); + void receivedStderr (TDEProcess *, char *buffer, int buflen); void processExited(); void cancelClicked(); private: - KProcess* proc; + TDEProcess* proc; KProgressDialog* progressDlg; TQString out; TQString err; diff --git a/lib/util/kdevshellwidget.cpp b/lib/util/kdevshellwidget.cpp index 5eb7c871..b85bea80 100644 --- a/lib/util/kdevshellwidget.cpp +++ b/lib/util/kdevshellwidget.cpp @@ -44,7 +44,7 @@ void KDevShellWidget::activate( ) m_konsolePart = (KParts::ReadOnlyPart *) factory->create( TQT_TQOBJECT(this), "libkonsolepart", "KParts::ReadOnlyPart" ); if ( !m_konsolePart ) return; - connect( m_konsolePart, TQT_SIGNAL( processExited(KProcess *) ), this, TQT_SLOT( processExited(KProcess *) ) ); + connect( m_konsolePart, TQT_SIGNAL( processExited(TDEProcess *) ), this, TQT_SLOT( processExited(TDEProcess *) ) ); connect( m_konsolePart, TQT_SIGNAL( receivedData( const TQString& ) ), this, TQT_SIGNAL( receivedData( const TQString& ) ) ); connect( m_konsolePart, TQT_SIGNAL(destroyed()), this, TQT_SLOT(partDestroyed()) ); @@ -75,7 +75,7 @@ void KDevShellWidget::partDestroyed( ) } } -void KDevShellWidget::processExited( KProcess * proc ) +void KDevShellWidget::processExited( TDEProcess * proc ) { m_isRunning = false; diff --git a/lib/util/kdevshellwidget.h b/lib/util/kdevshellwidget.h index 2743c829..6bb6a8d7 100644 --- a/lib/util/kdevshellwidget.h +++ b/lib/util/kdevshellwidget.h @@ -17,7 +17,7 @@ #include <tqvbox.h> #include <tqguardedptr.h> -class KProcess; +class TDEProcess; namespace KParts { class ReadOnlyPart; @@ -85,7 +85,7 @@ signals: private slots: void partDestroyed(); - void processExited( KProcess * ); + void processExited( TDEProcess * ); void setAutoReactivateOnCloseDelayed( ); private: diff --git a/lib/util/kscriptactionmanager.cpp b/lib/util/kscriptactionmanager.cpp index ff3204ca..28756841 100644 --- a/lib/util/kscriptactionmanager.cpp +++ b/lib/util/kscriptactionmanager.cpp @@ -135,12 +135,12 @@ TQPtrList< KAction > KScriptActionManager::scripts( TQObject * interface , const TQPtrList<KAction> actions; TQStringList scripts; - scripts += KGlobal::dirs()->findAllResources("data", + scripts += TDEGlobal::dirs()->findAllResources("data", TQString(kapp->name())+"/scripts/*.desktop", false, true ); for( TQStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it) { - scripts += KGlobal::dirs()->findAllResources("data", + scripts += TDEGlobal::dirs()->findAllResources("data", (*it)+"/*.desktop", false, true ); } diff --git a/lib/util/settings.cpp b/lib/util/settings.cpp index c9087942..90af2b1c 100644 --- a/lib/util/settings.cpp +++ b/lib/util/settings.cpp @@ -23,7 +23,7 @@ TQString Settings::terminalEmulatorName( KConfig & config ) if ( useKDESetting ) { - KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") ); + KConfigGroup confGroup( TDEGlobal::config(), TQString::fromLatin1("General") ); terminal = confGroup.readEntry("TerminalApplication", TQString::fromLatin1("konsole")); } else |