From 7346aee26bf190a7e70333c40fab4caca847cd27 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:22:56 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kate/modeline/ModelinePlugin.cpp | 22 +++++++++++----------- kate/modeline/ModelinePlugin.h | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'kate/modeline') 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 +#include #include #include #include @@ -41,7 +41,7 @@ class PluginView : public KXMLGUIClient K_EXPORT_COMPONENT_FACTORY( katemodelineplugin, KGenericFactory( "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 m_views; + TQPtrList m_views; }; #endif // _ModelinePlugin_H_ -- cgit v1.2.3