diff options
Diffstat (limited to 'kate/textfilter/plugin_katetextfilter.cpp')
-rw-r--r-- | kate/textfilter/plugin_katetextfilter.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/kate/textfilter/plugin_katetextfilter.cpp b/kate/textfilter/plugin_katetextfilter.cpp index b5cd1ac..2d8e446 100644 --- a/kate/textfilter/plugin_katetextfilter.cpp +++ b/kate/textfilter/plugin_katetextfilter.cpp @@ -25,7 +25,7 @@ #include <klocale.h> #include <cassert> #include <kdebug.h> -#include <qstring.h> +#include <tqstring.h> #include <ktexteditor/editinterfaceext.h> #include <kapplication.h> #include <kcompletion.h> @@ -44,7 +44,7 @@ class PluginView : public KXMLGUIClient Kate::MainWindow *win; }; -PluginKateTextFilter::PluginKateTextFilter( QObject* parent, const char* name, const QStringList& ) +PluginKateTextFilter::PluginKateTextFilter( TQObject* parent, const char* name, const TQStringList& ) : Kate::Plugin ( (Kate::Application *)parent, name ), Kate::Command(), m_pFilterShellProcess (NULL) @@ -64,7 +64,7 @@ void PluginKateTextFilter::addView(Kate::MainWindow *win) PluginView *view = new PluginView (); (void) new KAction ( i18n("Filter Te&xt..."), /*"edit_filter",*/ CTRL + Key_Backslash, this, - SLOT( slotEditFilter() ), view->actionCollection(), "edit_filter" ); + TQT_SLOT( slotEditFilter() ), view->actionCollection(), "edit_filter" ); view->setInstance (new KInstance("kate")); view->setXMLFile( "plugins/katetextfilter/ui.rc" ); @@ -87,13 +87,13 @@ void PluginKateTextFilter::removeView(Kate::MainWindow *win) } void -splitString (QString q, char c, QStringList &list) // PCP +splitString (TQString q, char c, TQStringList &list) // PCP { // screw the OnceAndOnlyOnce Principle! int pos; - QString item; + TQString item; while ( (pos = q.find(c)) >= 0) { @@ -106,7 +106,7 @@ splitString (QString q, char c, QStringList &list) // PCP static void // PCP -slipInNewText (Kate::View & view, QString pre, QString marked, QString post, bool reselect) +slipInNewText (Kate::View & view, TQString pre, TQString marked, TQString post, bool reselect) { uint preDeleteLine = 0, preDeleteCol = 0; @@ -149,19 +149,19 @@ slipInNewText (Kate::View & view, QString pre, QString marked, QString post, boo } - static QString // PCP + static TQString // PCP KatePrompt ( - const QString & strTitle, - const QString & strPrompt, - QWidget * that, - QStringList *completionList + const TQString & strTitle, + const TQString & strPrompt, + TQWidget * that, + TQStringList *completionList ) { // TODO: Make this a "memory edit" field with a combo box // containing prior entries - KLineEditDlg dlg(strPrompt, QString::null, that); + KLineEditDlg dlg(strPrompt, TQString::null, that); dlg.setCaption(strTitle); KCompletion *comple=dlg.lineEdit()->completionObject(); comple->setItems(*completionList); @@ -189,7 +189,7 @@ PluginKateTextFilter::slotFilterReceivedStdout (KProcess * pProcess, char * got, // TODO: got a better idea? // while (len--) m_strFilterOutput += *got++; - m_strFilterOutput += QString::fromLocal8Bit( got, len ); + m_strFilterOutput += TQString::fromLocal8Bit( got, len ); // POP_(m_strFilterOutput); } @@ -212,7 +212,7 @@ PluginKateTextFilter::slotFilterProcessExited (KProcess * pProcess) if (!kv) return; KTextEditor::EditInterfaceExt *ext=KTextEditor::editInterfaceExt(kv->getDoc()); if (ext) ext->editBegin(); - QString marked = kv->getDoc()->selection (); + TQString marked = kv->getDoc()->selection (); if (marked.length() > 0) kv -> keyDelete (); kv -> insertText (m_strFilterOutput); @@ -224,9 +224,9 @@ PluginKateTextFilter::slotFilterProcessExited (KProcess * pProcess) static void // PCP -slipInFilter (KShellProcess & shell, Kate::View & view, QString command) +slipInFilter (KShellProcess & shell, Kate::View & view, TQString command) { - QString marked = view.getDoc()->selection (); + TQString marked = view.getDoc()->selection (); if( marked.isEmpty()) return; // POP_(command.latin1 ()); @@ -265,9 +265,9 @@ PluginKateTextFilter::slotEditFilter () // PCP Kate::View * kv (application()->activeMainWindow()->viewManager()->activeView()); if (!kv) return; - QString text ( KatePrompt ( i18n("Filter"), + TQString text ( KatePrompt ( i18n("Filter"), i18n("Enter command to pipe selected text through:"), - (QWidget*) kv, + (TQWidget*) kv, &completionList ) ); @@ -275,7 +275,7 @@ PluginKateTextFilter::slotEditFilter () // PCP runFilter( kv, text ); } -void PluginKateTextFilter::runFilter( Kate::View *kv, const QString &filter ) +void PluginKateTextFilter::runFilter( Kate::View *kv, const TQString &filter ) { m_strFilterOutput = ""; @@ -283,29 +283,29 @@ void PluginKateTextFilter::runFilter( Kate::View *kv, const QString &filter ) { m_pFilterShellProcess = new KShellProcess; - connect ( m_pFilterShellProcess, SIGNAL(wroteStdin(KProcess *)), - this, SLOT(slotFilterCloseStdin (KProcess *))); + connect ( m_pFilterShellProcess, TQT_SIGNAL(wroteStdin(KProcess *)), + this, TQT_SLOT(slotFilterCloseStdin (KProcess *))); - connect ( m_pFilterShellProcess, SIGNAL(receivedStdout(KProcess*,char*,int)), - this, SLOT(slotFilterReceivedStdout(KProcess*,char*,int)) ); + connect ( m_pFilterShellProcess, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), + this, TQT_SLOT(slotFilterReceivedStdout(KProcess*,char*,int)) ); - connect ( m_pFilterShellProcess, SIGNAL(receivedStderr(KProcess*,char*,int)), - this, SLOT(slotFilterReceivedStderr(KProcess*,char*,int)) ); + connect ( m_pFilterShellProcess, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), + this, TQT_SLOT(slotFilterReceivedStderr(KProcess*,char*,int)) ); - connect ( m_pFilterShellProcess, SIGNAL(processExited(KProcess*)), - this, SLOT(slotFilterProcessExited(KProcess*) ) ) ; + connect ( m_pFilterShellProcess, TQT_SIGNAL(processExited(KProcess*)), + this, TQT_SLOT(slotFilterProcessExited(KProcess*) ) ) ; } slipInFilter (*m_pFilterShellProcess, *kv, filter); } //BEGIN Kate::Command methods -QStringList PluginKateTextFilter::cmds() +TQStringList PluginKateTextFilter::cmds() { - return QStringList("textfilter"); + return TQStringList("textfilter"); } -bool PluginKateTextFilter::help( Kate::View *, const QString&, QString &msg ) +bool PluginKateTextFilter::help( Kate::View *, const TQString&, TQString &msg ) { msg = i18n( "<qt><p>Usage: <code>textfilter COMMAND</code></p>" @@ -313,7 +313,7 @@ bool PluginKateTextFilter::help( Kate::View *, const QString&, QString &msg ) return true; } -bool PluginKateTextFilter::exec( Kate::View *v, const QString &cmd, QString &msg ) +bool PluginKateTextFilter::exec( Kate::View *v, const TQString &cmd, TQString &msg ) { if (! v->getDoc()->hasSelection() ) { @@ -321,7 +321,7 @@ bool PluginKateTextFilter::exec( Kate::View *v, const QString &cmd, QString &msg return false; } - QString filter = cmd.section( " ", 1 ).stripWhiteSpace(); + TQString filter = cmd.section( " ", 1 ).stripWhiteSpace(); if ( filter.isEmpty() ) { |