summaryrefslogtreecommitdiffstats
path: root/kate/modeline
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 17:00:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 17:00:31 +0000
commit395a904bff7b4d6ead445c342f7ac0c5fbf29121 (patch)
tree9829cadb79d2cc7c29a940627fadb28b11e54150 /kate/modeline
parent399f47c376fdf4d19192732a701ea9578d11619d (diff)
downloadtdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.tar.gz
tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.zip
TQt4 port kdeaddons
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1237404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kate/modeline')
-rw-r--r--kate/modeline/ModelinePlugin.cpp14
-rw-r--r--kate/modeline/ModelinePlugin.h3
2 files changed, 9 insertions, 8 deletions
diff --git a/kate/modeline/ModelinePlugin.cpp b/kate/modeline/ModelinePlugin.cpp
index 9184f6a..e3d22a1 100644
--- a/kate/modeline/ModelinePlugin.cpp
+++ b/kate/modeline/ModelinePlugin.cpp
@@ -41,8 +41,8 @@ class PluginView : public KXMLGUIClient
K_EXPORT_COMPONENT_FACTORY( katemodelineplugin, KGenericFactory<ModelinePlugin>( "katemodeline" ) )
-ModelinePlugin::ModelinePlugin( TQObject* parent, const char* name, const TQStringList &args )
- : Kate::Plugin ( (Kate::Application *) parent, name )
+ModelinePlugin::ModelinePlugin( TQObject* tqparent, const char* name, const TQStringList &args )
+ : Kate::Plugin ( (Kate::Application *) tqparent, name )
{
}
@@ -97,25 +97,25 @@ void ModelinePlugin::applyModeline()
options = vim2.cap(1);
} else if( doc->searchText( 0, 0, vim1, &foundAtLine, &foundAtCol, &matchLen ) ) {
options = vim1.cap(1);
- options.replace( TQRegExp( ":" ), " " );
+ options.tqreplace( TQRegExp( ":" ), " " );
}
uint configFlags = doc->configFlags();
kdDebug() << "Found modeline: " << options << endl;
- if( options.find( TQRegExp( "\\bnoet\\b" ) ) >= 0 ) {
+ if( options.tqfind( TQRegExp( "\\bnoet\\b" ) ) >= 0 ) {
kdDebug() << "Clearing replace tabs" << endl;
configFlags &= ~Kate::Document::cfReplaceTabs;
- } else if( options.find( TQRegExp( "\\bet\\b" ) ) >= 0 ) {
+ } else if( options.tqfind( TQRegExp( "\\bet\\b" ) ) >= 0 ) {
kdDebug() << "Setting replace tabs" << endl;
configFlags |= Kate::Document::cfReplaceTabs;
}
TQRegExp ts( "ts=(\\d+)" );
- if( options.find( ts ) >= 0 ) {
+ if( options.tqfind( ts ) >= 0 ) {
uint tabWidth = ts.cap(1).toUInt();
kdDebug() << "Setting tab width " << tabWidth << endl;
view->setTabWidth( tabWidth );
}
TQRegExp tw( "tw=(\\d+)" );
- if( options.find( tw ) >= 0 ) {
+ if( options.tqfind( tw ) >= 0 ) {
uint textWidth = tw.cap(1).toUInt();
kdDebug() << "Setting text width " << textWidth << endl;
doc->setWordWrap( true );
diff --git a/kate/modeline/ModelinePlugin.h b/kate/modeline/ModelinePlugin.h
index 2f8e2d6..c9ff37f 100644
--- a/kate/modeline/ModelinePlugin.h
+++ b/kate/modeline/ModelinePlugin.h
@@ -23,9 +23,10 @@
class ModelinePlugin : public Kate::Plugin, Kate::PluginViewInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
- ModelinePlugin( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList() );
+ ModelinePlugin( TQObject* tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList() );
virtual ~ModelinePlugin();
void addView (Kate::MainWindow *win);