From e6aaa3624cc6179b82a9bfff1760e742a669064c Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 24 Jan 2013 13:49:56 -0600 Subject: Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4 --- kbabel/addons/preview/pothumbcreator.cpp | 6 +-- kbabel/catalogmanager/catalogmanager.cpp | 6 +-- kbabel/catalogmanager/catalogmanagerview.cpp | 46 +++++++++++----------- kbabel/catalogmanager/catalogmanagerview.h | 6 +-- kbabel/catalogmanager/findinfilesdialog.cpp | 4 +- kbabel/catalogmanager/libcvs/cvsdialog.cpp | 32 +++++++-------- kbabel/catalogmanager/libcvs/cvsdialog.h | 10 ++--- kbabel/catalogmanager/libcvs/cvshandler.cpp | 8 ++-- kbabel/catalogmanager/libsvn/svndialog.cpp | 28 ++++++------- kbabel/catalogmanager/libsvn/svndialog.h | 10 ++--- kbabel/catalogmanager/libsvn/svnhandler.cpp | 24 +++++------ kbabel/catalogmanager/libsvn/svnhandler.h | 10 ++--- kbabel/catalogmanager/markpatterndialog.cpp | 4 +- kbabel/catalogmanager/multiroughtransdlg.cpp | 2 +- kbabel/common/catalog.cpp | 2 +- kbabel/common/catalogsettings.cpp | 6 +-- kbabel/common/msgfmt.cpp | 28 ++++++------- kbabel/common/msgfmt.h | 4 +- kbabel/common/projectsettings.cpp | 4 +- kbabel/common/tagextractor.cpp | 2 +- kbabel/commonui/finddialog.cpp | 4 +- kbabel/commonui/projectwizard.cpp | 2 +- kbabel/commonui/roughtransdlg.cpp | 6 +-- kbabel/commonui/toolaction.cpp | 2 +- kbabel/kbabel/headereditor.cpp | 4 +- kbabel/kbabel/kbabel.cpp | 8 ++-- kbabel/kbabel/kbabel.kcfg | 2 +- kbabel/kbabel/kbabelview.cpp | 6 +-- kbabel/kbabel/kbcataloglistview.cpp | 2 +- kbabel/kbabel/kbhighlighting.cpp | 4 +- kbabel/kbabel/mymultilineedit.cpp | 4 +- kbabel/kbabel/spelldlg.cpp | 4 +- kbabel/kbabeldict/kbabeldict.cpp | 4 +- kbabel/kbabeldict/kbabeldictbox.cpp | 12 +++--- kbabel/kbabeldict/kbabeldictview.cpp | 4 +- .../modules/dbsearchengine/KDBSearchEngine.cpp | 2 +- .../modules/dbsearchengine/preferenceswidget.cpp | 2 +- .../modules/dbsearchengine2/KDBSearchEngine2.cpp | 2 +- .../modules/dbsearchengine2/preferenceswidget.cpp | 2 +- .../modules/pocompendium/pocompendium.cpp | 2 +- kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp | 2 +- 41 files changed, 161 insertions(+), 161 deletions(-) (limited to 'kbabel') diff --git a/kbabel/addons/preview/pothumbcreator.cpp b/kbabel/addons/preview/pothumbcreator.cpp index 3dbd6611..fb3d9daa 100644 --- a/kbabel/addons/preview/pothumbcreator.cpp +++ b/kbabel/addons/preview/pothumbcreator.cpp @@ -324,17 +324,17 @@ bool PoThumbCreator::create(const TQString &path, int width, int height, TQImage TQPixmap kbabelPix; if(pix.width() < 80) { - kbabelPix = KGlobal::iconLoader()->loadIcon("kbabel" + kbabelPix = TDEGlobal::iconLoader()->loadIcon("kbabel" ,KIcon::Small,16,KIcon::DefaultState,0,true); } else if(pix.width() < 150) { - kbabelPix = KGlobal::iconLoader()->loadIcon("kbabel" + kbabelPix = TDEGlobal::iconLoader()->loadIcon("kbabel" ,KIcon::Desktop,32,KIcon::DefaultState,0,true); } else { - kbabelPix = KGlobal::iconLoader()->loadIcon("kbabel" + kbabelPix = TDEGlobal::iconLoader()->loadIcon("kbabel" ,KIcon::Desktop,48,KIcon::DefaultState,0,true); } diff --git a/kbabel/catalogmanager/catalogmanager.cpp b/kbabel/catalogmanager/catalogmanager.cpp index f8455145..1eaa2c8b 100644 --- a/kbabel/catalogmanager/catalogmanager.cpp +++ b/kbabel/catalogmanager/catalogmanager.cpp @@ -214,7 +214,7 @@ void CatalogManager::init() void CatalogManager::setupActions() { - KGlobal::iconLoader()->addAppDir("kbabel"); + TDEGlobal::iconLoader()->addAppDir("kbabel"); KAction *action; @@ -1169,13 +1169,13 @@ bool CatalogManager::queryClose() void CatalogManager::saveView() { - saveMainWindowSettings( KGlobal::config(), "View"); + saveMainWindowSettings( TDEGlobal::config(), "View"); } void CatalogManager::restoreView() { - applyMainWindowSettings( KGlobal::config(), "View"); + applyMainWindowSettings( TDEGlobal::config(), "View"); KToggleAction * toggle = (KToggleAction*)actionCollection()-> action(KStdAction::stdName(KStdAction::ShowStatusbar)); diff --git a/kbabel/catalogmanager/catalogmanagerview.cpp b/kbabel/catalogmanager/catalogmanagerview.cpp index 6bca24c1..1be2cba8 100644 --- a/kbabel/catalogmanager/catalogmanagerview.cpp +++ b/kbabel/catalogmanager/catalogmanagerview.cpp @@ -221,7 +221,7 @@ CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, TQWidget* p connect( svnhandler, TQT_SIGNAL( signalFilesCommitted( const TQStringList& ) ), this, TQT_SLOT( updateFiles( const TQStringList& ) ) ); - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); restoreView(config); _dictBox->readSettings(_project->config()); @@ -237,7 +237,7 @@ CatalogManagerView::~CatalogManagerView() if(_settings.killCmdOnExit) { - KProcess* proc; + TDEProcess* proc; for ( proc=_pendingProcesses.first(); proc != 0; proc=_pendingProcesses.next() ) { proc->kill(SIGKILL); @@ -715,7 +715,7 @@ void CatalogManagerView::markedStatistics() void CatalogManagerView::showStatistics( CatManListItem *i, TQStringList &childrenList ) { - KLocale *locale = KGlobal::locale(); + KLocale *locale = TDEGlobal::locale(); TQString msg; int totalPackages=0; @@ -1617,18 +1617,18 @@ void CatalogManagerView::slotDirCommand(int index) kdDebug(KBABEL_CATMAN) << cmd << endl; - KProcess* proc = new KShellProcess(); + TDEProcess* proc = new KShellProcess(); _pendingProcesses.append(proc); - connect( proc,TQT_SIGNAL( processExited(KProcess *) ), this - ,TQT_SLOT( processEnded(KProcess*) ) ); - connect( proc,TQT_SIGNAL( receivedStdout(KProcess*,char*,int) ), this - ,TQT_SLOT( showOutput(KProcess*,char*,int) ) ); - connect( proc,TQT_SIGNAL( receivedStderr(KProcess*,char*,int) ), this - ,TQT_SLOT( showOutput(KProcess*,char*,int) ) ); + connect( proc,TQT_SIGNAL( processExited(TDEProcess *) ), this + ,TQT_SLOT( processEnded(TDEProcess*) ) ); + connect( proc,TQT_SIGNAL( receivedStdout(TDEProcess*,char*,int) ), this + ,TQT_SLOT( showOutput(TDEProcess*,char*,int) ) ); + connect( proc,TQT_SIGNAL( receivedStderr(TDEProcess*,char*,int) ), this + ,TQT_SLOT( showOutput(TDEProcess*,char*,int) ) ); *proc << "cd" << item->poFile() << ";" << cmd; - proc->start(KProcess::NotifyOnExit,KProcess::AllOutput); + proc->start(TDEProcess::NotifyOnExit,TDEProcess::AllOutput); } } @@ -1650,18 +1650,18 @@ void CatalogManagerView::slotFileCommand(int index) kdDebug(KBABEL_CATMAN) << cmd << endl; - KProcess* proc = new KShellProcess(); + TDEProcess* proc = new KShellProcess(); _pendingProcesses.append(proc); - connect( proc,TQT_SIGNAL( processExited(KProcess *) ), this - ,TQT_SLOT( processEnded(KProcess*) ) ); - connect( proc,TQT_SIGNAL( receivedStdout(KProcess*,char*,int) ), this - ,TQT_SLOT( showOutput(KProcess*,char*,int) ) ); - connect( proc,TQT_SIGNAL( receivedStderr(KProcess*,char*,int) ), this - ,TQT_SLOT( showOutput(KProcess*,char*,int) ) ); + connect( proc,TQT_SIGNAL( processExited(TDEProcess *) ), this + ,TQT_SLOT( processEnded(TDEProcess*) ) ); + connect( proc,TQT_SIGNAL( receivedStdout(TDEProcess*,char*,int) ), this + ,TQT_SLOT( showOutput(TDEProcess*,char*,int) ) ); + connect( proc,TQT_SIGNAL( receivedStderr(TDEProcess*,char*,int) ), this + ,TQT_SLOT( showOutput(TDEProcess*,char*,int) ) ); *proc << "cd" << parent->poFile() << ";" << cmd; - proc->start(KProcess::NotifyOnExit,KProcess::AllOutput); + proc->start(TDEProcess::NotifyOnExit,TDEProcess::AllOutput); } } @@ -2517,7 +2517,7 @@ void CatalogManagerView::contentsMouseMoveEvent(TQMouseEvent* event) { if(event->state() & Qt::LeftButton) { - const int delay = KGlobalSettings::dndEventDelay(); + const int delay = TDEGlobalSettings::dndEventDelay(); if(TQABS( event->pos().x() - _pressPos.x() ) >= delay || TQABS( event->pos().y() - _pressPos.y() ) >= delay) { @@ -2532,7 +2532,7 @@ void CatalogManagerView::contentsMouseMoveEvent(TQMouseEvent* event) uri.append(TQUriDrag::localFileToUri(item->potFile())); TQUriDrag* drag = new TQUriDrag(uri,this); - TQPixmap icon=KGlobal::iconLoader()->loadIcon("txt",KIcon::Desktop); + TQPixmap icon=TDEGlobal::iconLoader()->loadIcon("txt",KIcon::Desktop); drag->setPixmap(icon,TQPoint(icon.width()/2,icon.height()/2)); drag->drag(); } @@ -2593,13 +2593,13 @@ void CatalogManagerView::deleteDirItem(TQString relDir) -void CatalogManagerView::processEnded(KProcess* proc) +void CatalogManagerView::processEnded(TDEProcess* proc) { _pendingProcesses.removeRef(proc); } -void CatalogManagerView::showOutput(KProcess*, char *buffer, int buflen) +void CatalogManagerView::showOutput(TDEProcess*, char *buffer, int buflen) { const TQCString output(buffer,buflen+1); diff --git a/kbabel/catalogmanager/catalogmanagerview.h b/kbabel/catalogmanager/catalogmanagerview.h index 8a7ea790..1238ed52 100644 --- a/kbabel/catalogmanager/catalogmanagerview.h +++ b/kbabel/catalogmanager/catalogmanagerview.h @@ -365,8 +365,8 @@ protected slots: void slotFileCommand(int); private slots: - void showOutput(KProcess *proc, char *buffer, int buflen); - void processEnded(KProcess *proc); + void showOutput(TDEProcess *proc, char *buffer, int buflen); + void processEnded(TDEProcess *proc); void columnClicked(TQListViewItem * item, const TQPoint & pnt, int c); void slotToggleCVSOrSVNColumn( bool ); @@ -432,7 +432,7 @@ private: bool _stopSearch; int _updateNesting; - TQPtrList _pendingProcesses; + TQPtrList _pendingProcesses; TQTextEdit* _logView; KDialogBase* _logWindow; diff --git a/kbabel/catalogmanager/findinfilesdialog.cpp b/kbabel/catalogmanager/findinfilesdialog.cpp index 65a92c57..f70d9d10 100644 --- a/kbabel/catalogmanager/findinfilesdialog.cpp +++ b/kbabel/catalogmanager/findinfilesdialog.cpp @@ -156,7 +156,7 @@ void FindInFilesDialog::setReplaceOpts(ReplaceOptions options) void FindInFilesDialog::readSettings() { - KConfig* config = KGlobal::config(); + KConfig* config = TDEGlobal::config(); if(isReplaceDialog()) { KConfigGroupSaver cgs(config,"ReplaceDialog"); @@ -201,7 +201,7 @@ void FindInFilesDialog::readSettings() void FindInFilesDialog::saveSettings() { - KConfig* config = KGlobal::config(); + KConfig* config = TDEGlobal::config(); if(isReplaceDialog()) { KConfigGroupSaver cgs(config,"ReplaceDialog"); diff --git a/kbabel/catalogmanager/libcvs/cvsdialog.cpp b/kbabel/catalogmanager/libcvs/cvsdialog.cpp index 7532320a..054e8489 100644 --- a/kbabel/catalogmanager/libcvs/cvsdialog.cpp +++ b/kbabel/catalogmanager/libcvs/cvsdialog.cpp @@ -120,7 +120,7 @@ CVSDialog::CVSDialog( CVS::Command cmd, TQWidget * parent, KSharedConfig* config // The last encoding will be added at the top of the list, when the seetings will be read. encodingList << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" ); encodingList << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( TQTextCodec::codecForLocale()->mimeName() ); - encodingList += KGlobal::charsets()->descriptiveEncodingNames(); + encodingList += TDEGlobal::charsets()->descriptiveEncodingNames(); m_encodingComboBox->insertStringList( encodingList ); connect( oldMessages, TQT_SIGNAL( activated( int ) ), @@ -217,10 +217,10 @@ void CVSDialog::slotExecuteCommand( ) // Nothing to do here. if ( _commandLine.isEmpty( ) ) return; - kdDebug() << "Preparing KProcess" << endl; + kdDebug() << "Preparing TDEProcess" << endl; // Create a new shell process - p = new KProcess; + p = new TDEProcess; p->setUseShell( true, "/bin/sh" ); if ( _cmd == CVS::Commit ) { @@ -239,7 +239,7 @@ void CVSDialog::slotExecuteCommand( ) return; } - m_encoding = KGlobal::charsets()->encodingForName( m_encodingComboBox->currentText() ); + m_encoding = TDEGlobal::charsets()->encodingForName( m_encodingComboBox->currentText() ); TQTextCodec* codec = TQTextCodec::codecForName( m_encoding.utf8() ); if ( !codec ) @@ -282,7 +282,7 @@ void CVSDialog::slotExecuteCommand( ) } // Change the command line to have the real name of the temporary file - _commandLine.replace( "@LOG@FILE@", KProcess::quote( m_tempFile->name() ) ); + _commandLine.replace( "@LOG@FILE@", TDEProcess::quote( m_tempFile->name() ) ); // Update the list of log messages if ( !msg.isEmpty() ) { @@ -298,19 +298,19 @@ void CVSDialog::slotExecuteCommand( ) } } - // Set the KProcess' command line. + // Set the TDEProcess' command line. *p << _commandLine; - connect( p, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), - this, TQT_SLOT ( slotProcessStdout( KProcess*, char*, int ) ) ); - connect( p, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ), - this, TQT_SLOT ( slotProcessStderr( KProcess*, char*, int ) ) ); - connect( p, TQT_SIGNAL( processExited( KProcess* ) ), - this, TQT_SLOT( slotProcessExited( KProcess* ) ) ); + connect( p, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int ) ), + this, TQT_SLOT ( slotProcessStdout( TDEProcess*, char*, int ) ) ); + connect( p, TQT_SIGNAL( receivedStderr( TDEProcess*, char*, int ) ), + this, TQT_SLOT ( slotProcessStderr( TDEProcess*, char*, int ) ) ); + connect( p, TQT_SIGNAL( processExited( TDEProcess* ) ), + this, TQT_SLOT( slotProcessExited( TDEProcess* ) ) ); output->append( i18n( "[ Starting command ]" ) ); - if ( p->start( KProcess::NotifyOnExit, KProcess::Communication( KProcess::AllOutput ) ) ) { + if ( p->start( TDEProcess::NotifyOnExit, TDEProcess::Communication( TDEProcess::AllOutput ) ) ) { // Disable the main button (and the log edit if in commit mode) to // indicate activity. mainBtn->setEnabled( false ); @@ -323,7 +323,7 @@ void CVSDialog::slotExecuteCommand( ) } } -void CVSDialog::slotProcessStdout( KProcess*, char * buffer, int len ) +void CVSDialog::slotProcessStdout( TDEProcess*, char * buffer, int len ) { output->append( TQString::fromLocal8Bit( buffer, len ) ); // Set the cursor's position at the end of the output. @@ -334,7 +334,7 @@ void CVSDialog::slotProcessStdout( KProcess*, char * buffer, int len ) _statusOutput += TQString::fromLocal8Bit( buffer, len ); } -void CVSDialog::slotProcessStderr( KProcess*, char * buffer, int len ) +void CVSDialog::slotProcessStderr( TDEProcess*, char * buffer, int len ) { // If an error occurs while executing the command display stderr in // another color. @@ -345,7 +345,7 @@ void CVSDialog::slotProcessStderr( KProcess*, char * buffer, int len ) output->setCursorPosition( output->lines( ), 0 ); } -void CVSDialog::slotProcessExited( KProcess * p ) +void CVSDialog::slotProcessExited( TDEProcess * p ) { if ( p->exitStatus( ) ) output->append( i18n( "[ Exited with status %1 ]" ).arg( p->exitStatus( ) ) ); diff --git a/kbabel/catalogmanager/libcvs/cvsdialog.h b/kbabel/catalogmanager/libcvs/cvsdialog.h index de609efd..b62cccc9 100644 --- a/kbabel/catalogmanager/libcvs/cvsdialog.h +++ b/kbabel/catalogmanager/libcvs/cvsdialog.h @@ -48,7 +48,7 @@ class TQString; class TQStringList; class TQTextEdit; // Forwarding KDE classes -class KProcess; +class TDEProcess; class KTempFile; class KComboBox; @@ -113,11 +113,11 @@ class CVSDialog : public KDialog /** Slot for executing the CVS Command. */ void slotExecuteCommand( ); /** Slot for processing the stdout of the CVS Command. */ - void slotProcessStdout( KProcess*, char * buffer, int len ); + void slotProcessStdout( TDEProcess*, char * buffer, int len ); /** Slot for processing the stderr of the CVS Command. */ - void slotProcessStderr( KProcess*, char * buffer, int len ); + void slotProcessStderr( TDEProcess*, char * buffer, int len ); /** Slot for post-processing after the CVS command is fninished. */ - void slotProcessExited( KProcess * p ); + void slotProcessExited( TDEProcess * p ); /// Slot for combox having been activated void slotComboActivated( int ); @@ -132,7 +132,7 @@ class CVSDialog : public KDialog TQTextEdit * output; TQCheckBox * autoAddBox; - KProcess * p; + TDEProcess * p; TQString _commandLine; TQString _addCommand; diff --git a/kbabel/catalogmanager/libcvs/cvshandler.cpp b/kbabel/catalogmanager/libcvs/cvshandler.cpp index 1cd78410..d2b6c4eb 100644 --- a/kbabel/catalogmanager/libcvs/cvshandler.cpp +++ b/kbabel/catalogmanager/libcvs/cvshandler.cpp @@ -197,8 +197,8 @@ void CVSHandler::execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQStr return; } - // ### FIXME: instead of making a TQString, use KProcess directly, so that it cares about quoting. - // ### FIXME: use KProcess::setWorkingDirectory instead of using "cd" (therefore allowing to use KProcess without a shell.) + // ### FIXME: instead of making a TQString, use TDEProcess directly, so that it cares about quoting. + // ### FIXME: use TDEProcess::setWorkingDirectory instead of using "cd" (therefore allowing to use TDEProcess without a shell.) // it's a dir TQString command( "cd " + filename + " && cvs " ); switch ( cmd ) { @@ -230,8 +230,8 @@ void CVSHandler::execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQStr return; } - // ### FIXME: instead of making a TQString, use KProcess directly, so that it cares about quoting. - // ### FIXME: use KProcess::setWorkingDirectory instead of using "cd" (therefore allowing to use KProcess without a shell.) + // ### FIXME: instead of making a TQString, use TDEProcess directly, so that it cares about quoting. + // ### FIXME: use TDEProcess::setWorkingDirectory instead of using "cd" (therefore allowing to use TDEProcess without a shell.) TQString command("cd " + (templates ? _potBaseDir : _poBaseDir) + " && cvs "); switch ( cmd ) { case CVS::Update: diff --git a/kbabel/catalogmanager/libsvn/svndialog.cpp b/kbabel/catalogmanager/libsvn/svndialog.cpp index dca25e69..c5f8c24a 100644 --- a/kbabel/catalogmanager/libsvn/svndialog.cpp +++ b/kbabel/catalogmanager/libsvn/svndialog.cpp @@ -213,10 +213,10 @@ void SVNDialog::slotExecuteCommand( ) // Nothing to do here. if ( _commandLine.isEmpty( ) ) return; - kdDebug() << "Preparing KProcess" << endl; + kdDebug() << "Preparing TDEProcess" << endl; // Create a new shell process - p = new KProcess; + p = new TDEProcess; p->setUseShell( true, "/bin/sh" ); if ( _cmd == SVN::Commit ) { @@ -261,7 +261,7 @@ void SVNDialog::slotExecuteCommand( ) } // Change the command line to have the real name of the temporary file - _commandLine.replace( "@LOG@FILE@", KProcess::quote( m_tempFile->name() ) ); + _commandLine.replace( "@LOG@FILE@", TDEProcess::quote( m_tempFile->name() ) ); // Update the list of log messages if ( !msg.isEmpty() ) { @@ -277,19 +277,19 @@ void SVNDialog::slotExecuteCommand( ) } } - // Set the KProcess' command line. + // Set the TDEProcess' command line. *p << _commandLine; - connect( p, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), - this, TQT_SLOT ( slotProcessStdout( KProcess*, char*, int ) ) ); - connect( p, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ), - this, TQT_SLOT ( slotProcessStderr( KProcess*, char*, int ) ) ); - connect( p, TQT_SIGNAL( processExited( KProcess* ) ), - this, TQT_SLOT( slotProcessExited( KProcess* ) ) ); + connect( p, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int ) ), + this, TQT_SLOT ( slotProcessStdout( TDEProcess*, char*, int ) ) ); + connect( p, TQT_SIGNAL( receivedStderr( TDEProcess*, char*, int ) ), + this, TQT_SLOT ( slotProcessStderr( TDEProcess*, char*, int ) ) ); + connect( p, TQT_SIGNAL( processExited( TDEProcess* ) ), + this, TQT_SLOT( slotProcessExited( TDEProcess* ) ) ); output->append( i18n( "[ Starting command ]" ) ); - if ( p->start( KProcess::NotifyOnExit, KProcess::Communication( KProcess::AllOutput ) ) ) { + if ( p->start( TDEProcess::NotifyOnExit, TDEProcess::Communication( TDEProcess::AllOutput ) ) ) { // Disable the main button (and the log edit if in commit mode) to // indicate activity. mainBtn->setEnabled( false ); @@ -302,7 +302,7 @@ void SVNDialog::slotExecuteCommand( ) } } -void SVNDialog::slotProcessStdout( KProcess*, char * buffer, int len ) +void SVNDialog::slotProcessStdout( TDEProcess*, char * buffer, int len ) { output->append( TQString::fromLocal8Bit( buffer, len ) ); // Set the cursor's position at the end of the output. @@ -313,7 +313,7 @@ void SVNDialog::slotProcessStdout( KProcess*, char * buffer, int len ) _statusOutput += TQString::fromLocal8Bit( buffer, len ); } -void SVNDialog::slotProcessStderr( KProcess*, char * buffer, int len ) +void SVNDialog::slotProcessStderr( TDEProcess*, char * buffer, int len ) { // If an error occurs while executing the command display stderr in // another color. @@ -324,7 +324,7 @@ void SVNDialog::slotProcessStderr( KProcess*, char * buffer, int len ) output->setCursorPosition( output->lines( ), 0 ); } -void SVNDialog::slotProcessExited( KProcess * p ) +void SVNDialog::slotProcessExited( TDEProcess * p ) { if ( p->exitStatus( ) ) output->append( i18n( "[ Exited with status %1 ]" ).arg( p->exitStatus( ) ) ); diff --git a/kbabel/catalogmanager/libsvn/svndialog.h b/kbabel/catalogmanager/libsvn/svndialog.h index 4c89a004..4190a172 100644 --- a/kbabel/catalogmanager/libsvn/svndialog.h +++ b/kbabel/catalogmanager/libsvn/svndialog.h @@ -48,7 +48,7 @@ class TQString; class TQStringList; class TQTextEdit; // Forwarding KDE classes -class KProcess; +class TDEProcess; class KTempFile; class KSharedConfig; @@ -112,11 +112,11 @@ class SVNDialog : public KDialog /** Slot for executing the SVN Command. */ void slotExecuteCommand( ); /** Slot for processing the stdout of the SVN Command. */ - void slotProcessStdout( KProcess*, char * buffer, int len ); + void slotProcessStdout( TDEProcess*, char * buffer, int len ); /** Slot for processing the stderr of the SVN Command. */ - void slotProcessStderr( KProcess*, char * buffer, int len ); + void slotProcessStderr( TDEProcess*, char * buffer, int len ); /** Slot for post-processing after the SVN command is fninished. */ - void slotProcessExited( KProcess * p ); + void slotProcessExited( TDEProcess * p ); /// Slot for combox having been activated void slotComboActivated( int ); @@ -131,7 +131,7 @@ class SVNDialog : public KDialog TQTextEdit * output; TQCheckBox * autoAddBox; - KProcess * p; + TDEProcess * p; TQString _commandLine; TQString _addCommand; diff --git a/kbabel/catalogmanager/libsvn/svnhandler.cpp b/kbabel/catalogmanager/libsvn/svnhandler.cpp index bff097fd..a643f18a 100644 --- a/kbabel/catalogmanager/libsvn/svnhandler.cpp +++ b/kbabel/catalogmanager/libsvn/svnhandler.cpp @@ -132,12 +132,12 @@ SVNHandler::FileStatus SVNHandler::fstatus( const TQString& filename ) const if ( !entries.exists() ) return NOT_IN_SVN; - KProcess proc; + TDEProcess proc; SVNOutputCollector out( &proc ); proc << "svn" << "status" << "-v" << "--xml" << info.absFilePath(); - if( !proc.start( KProcess::Block, KProcess::Stdout ) ) + if( !proc.start( TDEProcess::Block, TDEProcess::Stdout ) ) return ERROR_IN_WC; TQDomDocument doc; @@ -290,8 +290,8 @@ void SVNHandler::execSVNCommand( TQWidget* parent, SVN::Command cmd, const TQStr return; } - // ### TODO: instead of making a TQString, use KProcess directly, so that it cares about quoting. - // ### TODO: use KProcess::setWorkingDirectory instead of using "cd" (therefore allowing to use KProcess without a shell.) + // ### TODO: instead of making a TQString, use TDEProcess directly, so that it cares about quoting. + // ### TODO: use TDEProcess::setWorkingDirectory instead of using "cd" (therefore allowing to use TDEProcess without a shell.) TQString command("cd " + (templates ? _potBaseDir : _poBaseDir) + " && svn "); switch ( cmd ) { case SVN::Update: @@ -503,23 +503,23 @@ bool SVNHandler::isConsideredModified( const FileStatus status ) const return status == LOCALLY_MODIFIED || status == NOT_IN_SVN; } -SVNOutputCollector::SVNOutputCollector( KProcess* p ) +SVNOutputCollector::SVNOutputCollector( TDEProcess* p ) : m_process(0) { setProcess( p ); } -void SVNOutputCollector::setProcess( KProcess* p ) +void SVNOutputCollector::setProcess( TDEProcess* p ) { if( m_process ) m_process->disconnect( this ); m_process = p; if( p ) { - connect( p, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), - this, TQT_SLOT(slotGatherStdout(KProcess*, char*, int)) ); - connect( p, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), - this, TQT_SLOT(slotGatherStderr(KProcess*, char*, int)) ); + connect( p, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)), + this, TQT_SLOT(slotGatherStdout(TDEProcess*, char*, int)) ); + connect( p, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), + this, TQT_SLOT(slotGatherStderr(TDEProcess*, char*, int)) ); } m_gatheredOutput.truncate( 0 ); @@ -527,13 +527,13 @@ void SVNOutputCollector::setProcess( KProcess* p ) m_stdoutOutput.truncate( 0 ); } -void SVNOutputCollector::slotGatherStderr( KProcess*, char* data, int len ) +void SVNOutputCollector::slotGatherStderr( TDEProcess*, char* data, int len ) { m_gatheredOutput.append( TQString::fromLocal8Bit( data, len ) ); m_stderrOutput.append( TQString::fromLocal8Bit( data, len ) ); } -void SVNOutputCollector::slotGatherStdout( KProcess*, char* data, int len ) +void SVNOutputCollector::slotGatherStdout( TDEProcess*, char* data, int len ) { m_gatheredOutput.append( TQString::fromLocal8Bit( data, len ) ); m_stdoutOutput.append( TQString::fromLocal8Bit( data, len ) ); diff --git a/kbabel/catalogmanager/libsvn/svnhandler.h b/kbabel/catalogmanager/libsvn/svnhandler.h index 22a1f090..4f2cda5c 100644 --- a/kbabel/catalogmanager/libsvn/svnhandler.h +++ b/kbabel/catalogmanager/libsvn/svnhandler.h @@ -119,22 +119,22 @@ class SVNOutputCollector: public TQObject public: - SVNOutputCollector( KProcess* ); - void setProcess( KProcess* ); + SVNOutputCollector( TDEProcess* ); + void setProcess( TDEProcess* ); const TQString& getOutput() const { return m_gatheredOutput; } const TQString& getStderr() const { return m_stderrOutput; } const TQString& getStdout() const { return m_stdoutOutput; } private slots: - void slotGatherStderr( KProcess*, char*, int ); - void slotGatherStdout( KProcess*, char*, int ); + void slotGatherStderr( TDEProcess*, char*, int ); + void slotGatherStdout( TDEProcess*, char*, int ); private: TQString m_gatheredOutput; TQString m_stderrOutput; TQString m_stdoutOutput; - KProcess* m_process; + TDEProcess* m_process; }; #endif // SVNHANDLER_H diff --git a/kbabel/catalogmanager/markpatterndialog.cpp b/kbabel/catalogmanager/markpatterndialog.cpp index c53b008f..7d134e31 100644 --- a/kbabel/catalogmanager/markpatterndialog.cpp +++ b/kbabel/catalogmanager/markpatterndialog.cpp @@ -140,7 +140,7 @@ void MarkPatternDialog::slotRegexpButtonClicked( ) void MarkPatternDialog::restoreSettings( ) { - KConfig * config = KGlobal::config( ); + KConfig * config = TDEGlobal::config( ); config->setGroup("MarkPatternDialog"); patternList = config->readListEntry("Patterns"); @@ -160,7 +160,7 @@ void MarkPatternDialog::restoreSettings( ) void MarkPatternDialog::saveSettings( ) { - KConfig * config = KGlobal::config( ); + KConfig * config = TDEGlobal::config( ); config->setGroup("MarkPatternDialog"); config->writeEntry("Patterns", patternList); diff --git a/kbabel/catalogmanager/multiroughtransdlg.cpp b/kbabel/catalogmanager/multiroughtransdlg.cpp index 19b257d9..a8e5d4d9 100644 --- a/kbabel/catalogmanager/multiroughtransdlg.cpp +++ b/kbabel/catalogmanager/multiroughtransdlg.cpp @@ -125,7 +125,7 @@ void MultiRoughTransDlg::showAllStatistics() if( tt == 0 ) tt = 1; int nothing=tt-ptc-etc; - KLocale *locale = KGlobal::locale(); + KLocale *locale = TDEGlobal::locale(); TQString statMsg = i18n("Result of the translation:\n" "Edited entries: %1\n" "Exact translations: %2 (%3%)\n" diff --git a/kbabel/common/catalog.cpp b/kbabel/common/catalog.cpp index 58df521f..d2f2f8ac 100644 --- a/kbabel/common/catalog.cpp +++ b/kbabel/common/catalog.cpp @@ -1809,7 +1809,7 @@ TQString Catalog::dateTime() const { case Qt::LocalDate: { - dateTimeString = KGlobal::locale()->formatDateTime( dt ); + dateTimeString = TDEGlobal::locale()->formatDateTime( dt ); break; } case Qt::ISODate: diff --git a/kbabel/common/catalogsettings.cpp b/kbabel/common/catalogsettings.cpp index 24d469ec..d16bc9cc 100644 --- a/kbabel/common/catalogsettings.cpp +++ b/kbabel/common/catalogsettings.cpp @@ -90,7 +90,7 @@ TQString KBabel::GNUPluralForms(const TQString& lang) infile.close(); - KProcess msginit; + TDEProcess msginit; msginit << "msginit"; msginit @@ -103,7 +103,7 @@ TQString KBabel::GNUPluralForms(const TQString& lang) << "--no-translator" << "--no-wrap" ; - msginit.start( KProcess::Block ); + msginit.start( TDEProcess::Block ); TQString res(""); @@ -200,7 +200,7 @@ TQString Defaults::Identity::mailingList() TQString Defaults::Identity::languageCode() { // first try to get the language from KDE settings - KLocale *locale = KGlobal::locale(); + KLocale *locale = TDEGlobal::locale(); TQString lang; if(locale) { diff --git a/kbabel/common/msgfmt.cpp b/kbabel/common/msgfmt.cpp index 11e6969f..3a191a59 100644 --- a/kbabel/common/msgfmt.cpp +++ b/kbabel/common/msgfmt.cpp @@ -56,12 +56,12 @@ Msgfmt::Status Msgfmt::checkSyntax(TQString file,TQString& output, bool gnu) Status stat=Ok; // this method does not return the right retrun values at the moment :-( - KProcess proc; + TDEProcess proc; - connect(&proc,TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), - this,TQT_SLOT(addToOutput(KProcess*,char *, int ))); - connect(&proc,TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), - this,TQT_SLOT(addToOutput(KProcess*,char *, int))); + connect(&proc,TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)), + this,TQT_SLOT(addToOutput(TDEProcess*,char *, int ))); + connect(&proc,TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), + this,TQT_SLOT(addToOutput(TDEProcess*,char *, int))); // remove last output _output=""; @@ -74,7 +74,7 @@ Msgfmt::Status Msgfmt::checkSyntax(TQString file,TQString& output, bool gnu) proc << "-vc"; } - if(!proc.start(KProcess::Block,KProcess::Stderr)) + if(!proc.start(TDEProcess::Block,TDEProcess::Stderr)) { stat=NoExecutable; } @@ -97,21 +97,21 @@ Msgfmt::Status Msgfmt::checkSyntaxInDir(TQString dir,TQString regexp,TQString& o Status stat=Ok; // this method does not return the right return values at the moment :-( - KProcess proc; + TDEProcess proc; proc.setUseShell(true); - connect(&proc,TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), - this,TQT_SLOT(addToOutput(KProcess*,char *, int ))); - connect(&proc,TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), - this,TQT_SLOT(addToOutput(KProcess*,char *, int))); + connect(&proc,TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)), + this,TQT_SLOT(addToOutput(TDEProcess*,char *, int ))); + connect(&proc,TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), + this,TQT_SLOT(addToOutput(TDEProcess*,char *, int))); // remove last output _output=""; proc << "IFS='\n'; msgfmt --statistics -o /dev/null " - "$(find" << KProcess::quote(dir) << "-name" << KProcess::quote(regexp) << ")"; + "$(find" << TDEProcess::quote(dir) << "-name" << TDEProcess::quote(regexp) << ")"; - if(!proc.start(KProcess::Block,KProcess::Stderr)) + if(!proc.start(TDEProcess::Block,TDEProcess::Stderr)) { stat=NoExecutable; } @@ -131,7 +131,7 @@ Msgfmt::Status Msgfmt::checkSyntaxInDir(TQString dir,TQString regexp,TQString& o -void Msgfmt::addToOutput(KProcess*,char *buffer, int buflen) +void Msgfmt::addToOutput(TDEProcess*,char *buffer, int buflen) { TQString newString = TQString::fromLocal8Bit(buffer, buflen); diff --git a/kbabel/common/msgfmt.h b/kbabel/common/msgfmt.h index 35a621ba..b5317751 100644 --- a/kbabel/common/msgfmt.h +++ b/kbabel/common/msgfmt.h @@ -36,7 +36,7 @@ #include #include -class KProcess; +class TDEProcess; class TQString; namespace KBabel @@ -54,7 +54,7 @@ public: Status checkSyntaxInDir(TQString dir,TQString regexp,TQString& output); private slots: - void addToOutput(KProcess*,char *buffer, int buflen); + void addToOutput(TDEProcess*,char *buffer, int buflen); private: static TQString tempSaveName(); diff --git a/kbabel/common/projectsettings.cpp b/kbabel/common/projectsettings.cpp index 1d3efd77..774d1ede 100644 --- a/kbabel/common/projectsettings.cpp +++ b/kbabel/common/projectsettings.cpp @@ -46,7 +46,7 @@ TQString KBabel::Defaults::Spellcheck::ignoreURL() { TQString _ignoreURL; - KStandardDirs * dirs = KGlobal::dirs(); + KStandardDirs * dirs = TDEGlobal::dirs(); if(dirs) { _ignoreURL = dirs->saveLocation("appdata"); @@ -113,7 +113,7 @@ TQString KBabel::Defaults::CatalogManager::ignoreURL() { TQString _ignoreURL; - KStandardDirs * dirs = KGlobal::dirs(); + KStandardDirs * dirs = TDEGlobal::dirs(); if(dirs) { _ignoreURL = dirs->saveLocation("appdata"); diff --git a/kbabel/common/tagextractor.cpp b/kbabel/common/tagextractor.cpp index 4fae0e7b..18fd96f2 100644 --- a/kbabel/common/tagextractor.cpp +++ b/kbabel/common/tagextractor.cpp @@ -42,7 +42,7 @@ using namespace KBabel; TagExtractor::TagExtractor() : RegExpExtractor(TQStringList()) { - KConfig* config = KGlobal::config(); + KConfig* config = TDEGlobal::config(); config->setGroup("Tags"); diff --git a/kbabel/commonui/finddialog.cpp b/kbabel/commonui/finddialog.cpp index 328f9f4a..e4d99b84 100644 --- a/kbabel/commonui/finddialog.cpp +++ b/kbabel/commonui/finddialog.cpp @@ -386,7 +386,7 @@ void FindDialog::setReplaceOpts(ReplaceOptions options) void FindDialog::readSettings() { - KConfig* config = KGlobal::config(); + KConfig* config = TDEGlobal::config(); if(_replaceDlg) { KConfigGroupSaver cgs(config,"ReplaceDialog"); @@ -459,7 +459,7 @@ void FindDialog::readSettings() void FindDialog::saveSettings() { - KConfig* config = KGlobal::config(); + KConfig* config = TDEGlobal::config(); if(_replaceDlg) { KConfigGroupSaver cgs(config,"ReplaceDialog"); diff --git a/kbabel/commonui/projectwizard.cpp b/kbabel/commonui/projectwizard.cpp index 31b4ab86..c2526a4f 100644 --- a/kbabel/commonui/projectwizard.cpp +++ b/kbabel/commonui/projectwizard.cpp @@ -54,7 +54,7 @@ ProjectWizard::ProjectWizard(TQWidget *parent,const char *name) // fill the known language codes KConfig all_languages("all_languages", true, false, "locale"); - TQStringList lang_codes = KGlobal::locale()->allLanguagesTwoAlpha(); + TQStringList lang_codes = TDEGlobal::locale()->allLanguagesTwoAlpha(); for (TQStringList::iterator it = lang_codes.begin(); it != lang_codes.end(); ++it) { diff --git a/kbabel/commonui/roughtransdlg.cpp b/kbabel/commonui/roughtransdlg.cpp index ee35a22a..ccf3735f 100644 --- a/kbabel/commonui/roughtransdlg.cpp +++ b/kbabel/commonui/roughtransdlg.cpp @@ -160,7 +160,7 @@ RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat TQPtrList moduleList = dict->moduleInfos(); - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); KConfigGroupSaver gs(config,"RoughTranslation"); TQStringList selectedList=config->readListEntry("Selected"); if(selectedList.isEmpty()) @@ -212,7 +212,7 @@ RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat RoughTransDlg::~RoughTransDlg() { - KConfig *config=KGlobal::config(); + KConfig *config=TDEGlobal::config(); KConfigGroupSaver gs(config,"RoughTranslation"); config->writeEntry("Selected",dictChooser->selectedDicts()); @@ -667,7 +667,7 @@ void RoughTransDlg::translate() void RoughTransDlg::showStatistics() { int nothing=totalTried-partTransCounter-exactTransCounter; - KLocale *locale = KGlobal::locale(); + KLocale *locale = TDEGlobal::locale(); TQString statMsg = i18n("Result of the translation:\n" "Edited entries: %1\n" "Exact translations: %2 (%3%)\n" diff --git a/kbabel/commonui/toolaction.cpp b/kbabel/commonui/toolaction.cpp index 37f9f671..48650231 100644 --- a/kbabel/commonui/toolaction.cpp +++ b/kbabel/commonui/toolaction.cpp @@ -92,7 +92,7 @@ TQValueList ToolAction::validationTools() { TQValueList result; - TQValueList tools = KDataToolInfo::query("CatalogItem", "application/x-kbabel-catalogitem", KGlobal::instance()); + TQValueList tools = KDataToolInfo::query("CatalogItem", "application/x-kbabel-catalogitem", TDEGlobal::instance()); for( TQValueList::ConstIterator entry = tools.begin(); entry != tools.end(); ++entry ) { diff --git a/kbabel/kbabel/headereditor.cpp b/kbabel/kbabel/headereditor.cpp index 62275cdd..cc692bbd 100644 --- a/kbabel/kbabel/headereditor.cpp +++ b/kbabel/kbabel/headereditor.cpp @@ -84,7 +84,7 @@ HeaderEditor::~HeaderEditor() void HeaderEditor::saveSettings() { - KConfig* config = KGlobal::config(); + KConfig* config = TDEGlobal::config(); KConfigGroupSaver saver(config, "HeaderEditor" ); @@ -93,7 +93,7 @@ void HeaderEditor::saveSettings() void HeaderEditor::restoreSettings() { - KConfig* config = KGlobal::config(); + KConfig* config = TDEGlobal::config(); KConfigGroupSaver saver(config, "HeaderEditor" ); diff --git a/kbabel/kbabel/kbabel.cpp b/kbabel/kbabel/kbabel.cpp index 91e591fb..0abd5eca 100644 --- a/kbabel/kbabel/kbabel.cpp +++ b/kbabel/kbabel/kbabel.cpp @@ -785,7 +785,7 @@ void KBabelMW::setupDynamicActions() // query available tools TQValueList allTools = KDataToolInfo::query - ("CatalogItem", "application/x-kbabel-catalogitem", KGlobal::instance()); + ("CatalogItem", "application/x-kbabel-catalogitem", TDEGlobal::instance()); // skip read-only tools for single items TQValueList modifyTools; @@ -819,7 +819,7 @@ void KBabelMW::setupDynamicActions() // query available tools for whole catalog allTools = KDataToolInfo::query - ("Catalog", "application/x-kbabel-catalog", KGlobal::instance()); + ("Catalog", "application/x-kbabel-catalog", TDEGlobal::instance()); // skip read-only tools entry = allTools.begin(); @@ -1179,7 +1179,7 @@ void KBabelMW::optionsShowStatusbar(bool on) void KBabelMW::optionsEditToolbars() { - saveMainWindowSettings( KGlobal::config(), "View" ); + saveMainWindowSettings( TDEGlobal::config(), "View" ); KEditToolbar dlg(actionCollection()); connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_TQOBJECT(this), TQT_SLOT(newToolbarConfig())); dlg.exec(); @@ -1188,7 +1188,7 @@ void KBabelMW::optionsEditToolbars() void KBabelMW::newToolbarConfig() { createGUI(0); - applyMainWindowSettings( KGlobal::config(), "View" ); + applyMainWindowSettings( TDEGlobal::config(), "View" ); } void KBabelMW::optionsPreferences() diff --git a/kbabel/kbabel/kbabel.kcfg b/kbabel/kbabel/kbabel.kcfg index 0da6949c..eba3f4a6 100644 --- a/kbabel/kbabel/kbabel.kcfg +++ b/kbabel/kbabel/kbabel.kcfg @@ -109,7 +109,7 @@ - KGlobalSettings::generalFont() + TDEGlobalSettings::generalFont()