diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
commit | 395a904bff7b4d6ead445c342f7ac0c5fbf29121 (patch) | |
tree | 9829cadb79d2cc7c29a940627fadb28b11e54150 /kate/kjswrapper/plugin_katekjswrapper.cpp | |
parent | 399f47c376fdf4d19192732a701ea9578d11619d (diff) | |
download | tdeaddons-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/kjswrapper/plugin_katekjswrapper.cpp')
-rw-r--r-- | kate/kjswrapper/plugin_katekjswrapper.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/kate/kjswrapper/plugin_katekjswrapper.cpp b/kate/kjswrapper/plugin_katekjswrapper.cpp index 8fc4ae5..4ebac34 100644 --- a/kate/kjswrapper/plugin_katekjswrapper.cpp +++ b/kate/kjswrapper/plugin_katekjswrapper.cpp @@ -53,8 +53,8 @@ void PluginKateKJSWrapperView::removeFromWindow() { win->guiFactory()->removeClient (this); } -PluginKateKJSWrapper::PluginKateKJSWrapper( TQObject* parent, const char* name, const TQStringList& list) - : Kate::Plugin ( (Kate::Application *)parent, name ) { +PluginKateKJSWrapper::PluginKateKJSWrapper( TQObject* tqparent, const char* name, const TQStringList& list) + : Kate::Plugin ( (Kate::Application *)tqparent, name ) { m_views.setAutoDelete(true); m_scriptname=list[0]; m_kateAppBindings=new Kate::JS::Bindings(this); @@ -65,15 +65,15 @@ PluginKateKJSWrapper::PluginKateKJSWrapper( TQObject* parent, const char* name, KJSEmbed::JSFactory *factory=m_part->factory(); /* factories for kate app classes */ - factory->addQObjectPlugin("Kate::Application",m_kateAppBindings); - factory->addQObjectPlugin("Kate::DocumentManager",m_kateAppBindings); - factory->addQObjectPlugin("Kate::MainWindow",m_kateAppBindings); - factory->addQObjectPlugin("Kate::PluginManager",m_kateAppBindings); - factory->addQObjectPlugin("Kate::InitPluginManager",m_kateAppBindings); - factory->addQObjectPlugin("Kate::ProjectManager",m_kateAppBindings); - factory->addQObjectPlugin("Kate::Project",m_kateAppBindings); - factory->addQObjectPlugin("Kate::ViewManager",m_kateAppBindings); - factory->addQObjectPlugin("Kate::View",m_kateAppBindings); + factory->addTQObjectPlugin("Kate::Application",m_kateAppBindings); + factory->addTQObjectPlugin("Kate::DocumentManager",m_kateAppBindings); + factory->addTQObjectPlugin("Kate::MainWindow",m_kateAppBindings); + factory->addTQObjectPlugin("Kate::PluginManager",m_kateAppBindings); + factory->addTQObjectPlugin("Kate::InitPluginManager",m_kateAppBindings); + factory->addTQObjectPlugin("Kate::ProjectManager",m_kateAppBindings); + factory->addTQObjectPlugin("Kate::Project",m_kateAppBindings); + factory->addTQObjectPlugin("Kate::ViewManager",m_kateAppBindings); + factory->addTQObjectPlugin("Kate::View",m_kateAppBindings); /* toplevel objects*/ KJS::Object appobj=m_part->addObject(Kate::application(),"KATE"); js->globalObject().put( js->globalExec(), "addConfigPage", KJS::Object(new Kate::JS::Management(js->globalExec(),Kate::JS::Management::AddConfigPage,this ))); @@ -86,7 +86,7 @@ PluginKateKJSWrapper::PluginKateKJSWrapper( TQObject* parent, const char* name, w->show(); //w->show();*/ kdDebug()<<"m_scriptname="<<m_scriptname<<endl; - m_part->runFile(locate("appdata",TQString("plugins/%1/%2.js").arg(m_scriptname).arg(m_scriptname))); + m_part->runFile(locate("appdata",TQString("plugins/%1/%2.js").tqarg(m_scriptname).tqarg(m_scriptname))); //"/home/jowenn/development/kde/cvs/kdeaddons/kate/kjswrapper/samples/test1.js"); } @@ -343,7 +343,7 @@ void PluginKateKJSWrapper::addView(Kate::MainWindow *win) if (exec->hadException()) kdDebug()<<"void PluginKateKJSWrapper::addView(Kate::MainWindow *win): exec had an exception - 2"<<endl; view->setInstance (new KInstance("kate")); - view->setXMLFile(TQString("plugins/%1/%2.rc").arg(m_scriptname).arg(m_scriptname)); + view->setXMLFile(TQString("plugins/%1/%2.rc").tqarg(m_scriptname).tqarg(m_scriptname)); win->guiFactory()->addClient (view); } @@ -370,18 +370,18 @@ void PluginKateKJSWrapper::applyConfig( KateKJSWrapperConfigPage *p ) #endif } -KateKJSWrapperConfigPage::KateKJSWrapperConfigPage(KJS::Object pageConstructor,PluginKateKJSWrapper* parent, - TQWidget *parentWidget) - : Kate::PluginConfigPage( parentWidget ),m_plugin(parent) +KateKJSWrapperConfigPage::KateKJSWrapperConfigPage(KJS::Object pageConstructor,PluginKateKJSWrapper* tqparent, + TQWidget *tqparentWidget) + : Kate::PluginConfigPage( tqparentWidget ),m_plugin(tqparent) { TQVBoxLayout *l=new TQVBoxLayout(this); l->setAutoAdd(true); l->activate(); - KJS::Interpreter *js = parent->m_part->interpreter(); + KJS::Interpreter *js = tqparent->m_part->interpreter(); KJS::ExecState *exec = js->globalExec(); exec->clearException(); KJS::List param; - param.append(parent->m_part->factory()->createProxy(exec,this,0)); + param.append(tqparent->m_part->factory()->createProxy(exec,this,0)); m_pageObject=pageConstructor.construct(exec,param); } |