summaryrefslogtreecommitdiffstats
path: root/kate/textfilter
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:22:56 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:22:56 +0000
commit7346aee26bf190a7e70333c40fab4caca847cd27 (patch)
tree4b019b434f88dcc3eeaafe1d3f26240b4c4718e8 /kate/textfilter
parent23a3d3aa5b44cbdf305495919866d9dbf4f6da54 (diff)
downloadtdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.tar.gz
tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kate/textfilter')
-rw-r--r--kate/textfilter/plugin_katetextfilter.cpp64
-rw-r--r--kate/textfilter/plugin_katetextfilter.h18
2 files changed, 41 insertions, 41 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() )
{
diff --git a/kate/textfilter/plugin_katetextfilter.h b/kate/textfilter/plugin_katetextfilter.h
index 1b27b89..2d5678d 100644
--- a/kate/textfilter/plugin_katetextfilter.h
+++ b/kate/textfilter/plugin_katetextfilter.h
@@ -18,7 +18,7 @@
#ifndef _PLUGIN_KANT_TEXTFILTER_H
#define _PLUGIN_KANT_TEXTFILTER_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kate/plugin.h>
#include <kate/application.h>
@@ -35,24 +35,24 @@ class PluginKateTextFilter : public Kate::Plugin, public Kate::PluginViewInterfa
Q_OBJECT
public:
- PluginKateTextFilter( QObject* parent = 0, const char* name = 0, const QStringList& = QStringList() );
+ PluginKateTextFilter( TQObject* parent = 0, const char* name = 0, const TQStringList& = TQStringList() );
virtual ~PluginKateTextFilter();
void addView (Kate::MainWindow *win);
void removeView (Kate::MainWindow *win);
// Kate::Command
- QStringList cmds ();
- bool exec (Kate::View *view, const QString &cmd, QString &msg);
- bool help (Kate::View *view, const QString &cmd, QString &msg);
+ TQStringList cmds ();
+ bool exec (Kate::View *view, const TQString &cmd, TQString &msg);
+ bool help (Kate::View *view, const TQString &cmd, TQString &msg);
private:
- void runFilter( Kate::View *kv, const QString & filter );
+ void runFilter( Kate::View *kv, const TQString & filter );
private:
- QString m_strFilterOutput;
+ TQString m_strFilterOutput;
KShellProcess * m_pFilterShellProcess;
- QPtrList<class PluginView> m_views;
- QStringList completionList;
+ TQPtrList<class PluginView> m_views;
+ TQStringList completionList;
public slots:
void slotEditFilter ();
void slotFilterReceivedStdout (KProcess * pProcess, char * got, int len);