diff options
Diffstat (limited to 'kate/modeline')
-rw-r--r-- | kate/modeline/ModelinePlugin.cpp | 22 | ||||
-rw-r--r-- | kate/modeline/ModelinePlugin.h | 4 |
2 files changed, 13 insertions, 13 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; diff --git a/kate/modeline/ModelinePlugin.h b/kate/modeline/ModelinePlugin.h index 3f4b818..2f8e2d6 100644 --- a/kate/modeline/ModelinePlugin.h +++ b/kate/modeline/ModelinePlugin.h @@ -25,7 +25,7 @@ class ModelinePlugin : public Kate::Plugin, Kate::PluginViewInterface Q_OBJECT public: - ModelinePlugin( QObject* parent = 0, const char* name = 0, const QStringList &args = QStringList() ); + ModelinePlugin( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList() ); virtual ~ModelinePlugin(); void addView (Kate::MainWindow *win); @@ -34,7 +34,7 @@ private slots: void applyModeline(); private: - QPtrList<class PluginView> m_views; + TQPtrList<class PluginView> m_views; }; #endif // _ModelinePlugin_H_ |