summaryrefslogtreecommitdiffstats
path: root/kate/modeline/ModelinePlugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kate/modeline/ModelinePlugin.cpp')
-rw-r--r--kate/modeline/ModelinePlugin.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/kate/modeline/ModelinePlugin.cpp b/kate/modeline/ModelinePlugin.cpp
index b288856..9184f6a 100644
--- a/kate/modeline/ModelinePlugin.cpp
+++ b/kate/modeline/ModelinePlugin.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kgenericfactory.h>
#include <klocale.h>
#include <kaction.h>
@@ -41,7 +41,7 @@ class PluginView : public KXMLGUIClient
K_EXPORT_COMPONENT_FACTORY( katemodelineplugin, KGenericFactory<ModelinePlugin>( "katemodeline" ) )
-ModelinePlugin::ModelinePlugin( QObject* parent, const char* name, const QStringList &args )
+ModelinePlugin::ModelinePlugin( TQObject* parent, const char* name, const TQStringList &args )
: Kate::Plugin ( (Kate::Application *) parent, name )
{
}
@@ -56,7 +56,7 @@ void ModelinePlugin::addView(Kate::MainWindow *win)
PluginView *view = new PluginView ();
new KAction( i18n("Apply Modeline"), 0,
- this, SLOT(applyModeline()),
+ this, TQT_SLOT(applyModeline()),
view->actionCollection(), "edit_apply_modeline" );
view->setInstance (new KInstance("kate"));
@@ -87,34 +87,34 @@ void ModelinePlugin::applyModeline()
Kate::Document* doc = application()->documentManager()->activeDocument();
Kate::View* view = application()->activeMainWindow()->viewManager()->activeView();
if( !doc || !view ) return;
- static QRegExp vim1( "\\b(?:vi:|vim:|ex:)[ \\t](.*)" );
- static QRegExp vim2( "\\b(?:vi:|vim:|ex:)[ \\t]set (.*):" );
+ static TQRegExp vim1( "\\b(?:vi:|vim:|ex:)[ \\t](.*)" );
+ static TQRegExp vim2( "\\b(?:vi:|vim:|ex:)[ \\t]set (.*):" );
uint foundAtLine;
uint foundAtCol;
uint matchLen;
- QString options;
+ TQString options;
if( doc->searchText( 0, 0, vim2, &foundAtLine, &foundAtCol, &matchLen ) ) {
options = vim2.cap(1);
} else if( doc->searchText( 0, 0, vim1, &foundAtLine, &foundAtCol, &matchLen ) ) {
options = vim1.cap(1);
- options.replace( QRegExp( ":" ), " " );
+ options.replace( TQRegExp( ":" ), " " );
}
uint configFlags = doc->configFlags();
kdDebug() << "Found modeline: " << options << endl;
- if( options.find( QRegExp( "\\bnoet\\b" ) ) >= 0 ) {
+ if( options.find( TQRegExp( "\\bnoet\\b" ) ) >= 0 ) {
kdDebug() << "Clearing replace tabs" << endl;
configFlags &= ~Kate::Document::cfReplaceTabs;
- } else if( options.find( QRegExp( "\\bet\\b" ) ) >= 0 ) {
+ } else if( options.find( TQRegExp( "\\bet\\b" ) ) >= 0 ) {
kdDebug() << "Setting replace tabs" << endl;
configFlags |= Kate::Document::cfReplaceTabs;
}
- QRegExp ts( "ts=(\\d+)" );
+ TQRegExp ts( "ts=(\\d+)" );
if( options.find( ts ) >= 0 ) {
uint tabWidth = ts.cap(1).toUInt();
kdDebug() << "Setting tab width " << tabWidth << endl;
view->setTabWidth( tabWidth );
}
- QRegExp tw( "tw=(\\d+)" );
+ TQRegExp tw( "tw=(\\d+)" );
if( options.find( tw ) >= 0 ) {
uint textWidth = tw.cap(1).toUInt();
kdDebug() << "Setting text width " << textWidth << endl;