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/kjswrapper/plugin_katekjswrapper.cpp | 54 +++++++++++++++---------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'kate/kjswrapper/plugin_katekjswrapper.cpp') diff --git a/kate/kjswrapper/plugin_katekjswrapper.cpp b/kate/kjswrapper/plugin_katekjswrapper.cpp index c3e54b7..8fc4ae5 100644 --- a/kate/kjswrapper/plugin_katekjswrapper.cpp +++ b/kate/kjswrapper/plugin_katekjswrapper.cpp @@ -29,12 +29,12 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include //END includes K_EXPORT_COMPONENT_FACTORY( katekjswrapperplugin, KGenericFactory( "katekjswrapper" ) ) @@ -44,7 +44,7 @@ PluginKateKJSWrapperView::~PluginKateKJSWrapperView() { void PluginKateKJSWrapperView::removeFromWindow() { kdDebug()<<"PluginKateKJSWrapperView::removeFromWindow"< >::iterator it=toolviews.begin();it!=toolviews.end();it=toolviews.begin()) { + for (TQValueList >::iterator it=toolviews.begin();it!=toolviews.end();it=toolviews.begin()) { kdDebug()<<"removeFromWindow: removing a toolview"<guiFactory()->removeClient (this); } -PluginKateKJSWrapper::PluginKateKJSWrapper( QObject* parent, const char* name, const QStringList& list) +PluginKateKJSWrapper::PluginKateKJSWrapper( TQObject* parent, const char* name, const TQStringList& list) : Kate::Plugin ( (Kate::Application *)parent, name ) { m_views.setAutoDelete(true); m_scriptname=list[0]; @@ -86,7 +86,7 @@ PluginKateKJSWrapper::PluginKateKJSWrapper( QObject* parent, const char* name, c w->show(); //w->show();*/ kdDebug()<<"m_scriptname="<runFile(locate("appdata",QString("plugins/%1/%2.js").arg(m_scriptname).arg(m_scriptname))); + m_part->runFile(locate("appdata",TQString("plugins/%1/%2.js").arg(m_scriptname).arg(m_scriptname))); //"/home/jowenn/development/kde/cvs/kdeaddons/kate/kjswrapper/samples/test1.js"); } @@ -104,7 +104,7 @@ uint PluginKateKJSWrapper::configPages () const { if (! (m_configPageFactories.isNull() || (m_configPageFactories.type()==KJS::NullType))) { KJS::Object constrs=m_configPageFactories.toObject(exec); if (!exec->hadException()) { - if (QString(constrs.classInfo()->className)=="Array") { + if (TQString(constrs.classInfo()->className)=="Array") { kdDebug()<<"config page constructor array detected"<hadException()) { @@ -125,7 +125,7 @@ static KJS::Object getObj(KJS::Interpreter *js, KJS::Value mightBeArray, int id) KJS::Object constrs=mightBeArray.toObject(exec); KJS::Value constr; if (!exec->hadException()) { - if (QString(constrs.classInfo()->className)=="Array") { + if (TQString(constrs.classInfo()->className)=="Array") { kdDebug()<<"config page constructor array detected"<globalExec()); } -QString PluginKateKJSWrapper::configPageName(uint id) const { +TQString PluginKateKJSWrapper::configPageName(uint id) const { if (id>=configPages()) return ""; KJS::Interpreter *js = m_part->interpreter(); KJS::Object constr=getObj(js,m_configPageFactories,id); KJS::Value o=constr.get(js->globalExec(),KJS::Identifier("name")); - QString retVal( o.toString(js->globalExec()).qstring() ); + TQString retVal( o.toString(js->globalExec()).qstring() ); kdDebug()<<"=============================================================================================="<=configPages()) return ""; KJS::Interpreter *js = m_part->interpreter(); KJS::Object constr=getObj(js,m_configPageFactories,id); KJS::Value o=constr.get(js->globalExec(),KJS::Identifier("fullName")); - QString retVal( o.toString(js->globalExec()).qstring() ); + TQString retVal( o.toString(js->globalExec()).qstring() ); kdDebug()<<"=============================================================================================="<=configPages()) return 0; @@ -197,8 +197,8 @@ Kate::PluginConfigPage* PluginKateKJSWrapper::configPage (uint id, /* KateKJSWrapperConfigPage* p = new KateKJSWrapperConfigPage(this, w); //init - connect( p, SIGNAL(configPageApplyRequest(KateKJSWrapperConfigPage*)), - this, SLOT(applyConfig(KateKJSWrapperConfigPage*)) ); + connect( p, TQT_SIGNAL(configPageApplyRequest(KateKJSWrapperConfigPage*)), + this, TQT_SLOT(applyConfig(KateKJSWrapperConfigPage*)) ); return (Kate::PluginConfigPage*);*/ } @@ -223,13 +223,13 @@ static KMDI::ToolViewAccessor *createToolView(KJSEmbed::JSFactory *factory,KJS:: exec->clearException(); } } - QString viewName; + TQString viewName; KJS::Value viewNameV=viewConstructor.get(exec,KJS::Identifier("name")); if (exec->hadException()) { viewName="kjs_unknown"; exec->clearException(); } else { - viewName=QString( viewNameV.toString(exec).qstring() ); + viewName=TQString( viewNameV.toString(exec).qstring() ); if (exec->hadException()) { viewName="kjs_unknown"; exec->clearException(); @@ -247,7 +247,7 @@ static KMDI::ToolViewAccessor *createToolView(KJSEmbed::JSFactory *factory,KJS:: return 0; } KMDI::ToolViewAccessor *tva=winN->toolViewManager()->addToolView((KDockWidget::DockPosition)dockPos,tv, - tv->icon()?(*(tv->icon())):QPixmap(),tv->caption()); + tv->icon()?(*(tv->icon())):TQPixmap(),tv->caption()); kdDebug()<<"****************************************************************************************"<win=win; - connect(win,SIGNAL(destroyed()),this,SLOT(slotWindowDestroyed())); + connect(win,TQT_SIGNAL(destroyed()),this,TQT_SLOT(slotWindowDestroyed())); m_views.insert(win,view); KJS::Interpreter *js = m_part->interpreter(); KJS::ExecState *exec = js->globalExec(); @@ -302,7 +302,7 @@ void PluginKateKJSWrapper::addView(Kate::MainWindow *win) if (! (m_toolViewConstructors.isNull() || (m_toolViewConstructors.type()==KJS::NullType))) { KJS::Object constrs=m_toolViewConstructors.toObject(exec); if (!exec->hadException()) { - if (QString(constrs.classInfo()->className)=="Array") { + if (TQString(constrs.classInfo()->className)=="Array") { kdDebug()<<"Toolview constructor array detected"<hadException()) { @@ -317,7 +317,7 @@ void PluginKateKJSWrapper::addView(Kate::MainWindow *win) } else { KMDI::ToolViewAccessor *w=createToolView(m_part->factory(),js,win,view->winObj,constrO); if (w) { - view->toolviews.append(QGuardedPtr(w)); + view->toolviews.append(TQGuardedPtr(w)); } exec->clearException(); } @@ -330,7 +330,7 @@ void PluginKateKJSWrapper::addView(Kate::MainWindow *win) } else { KMDI::ToolViewAccessor *w=createToolView(m_part->factory(),js,win,view->winObj,constrs); if (w) { - view->toolviews.append(QGuardedPtr(w)); + view->toolviews.append(TQGuardedPtr(w)); } exec->clearException(); } @@ -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"<setInstance (new KInstance("kate")); - view->setXMLFile(QString("plugins/%1/%2.rc").arg(m_scriptname).arg(m_scriptname)); + view->setXMLFile(TQString("plugins/%1/%2.rc").arg(m_scriptname).arg(m_scriptname)); win->guiFactory()->addClient (view); } @@ -371,10 +371,10 @@ void PluginKateKJSWrapper::applyConfig( KateKJSWrapperConfigPage *p ) } KateKJSWrapperConfigPage::KateKJSWrapperConfigPage(KJS::Object pageConstructor,PluginKateKJSWrapper* parent, - QWidget *parentWidget) + TQWidget *parentWidget) : Kate::PluginConfigPage( parentWidget ),m_plugin(parent) { - QVBoxLayout *l=new QVBoxLayout(this); + TQVBoxLayout *l=new TQVBoxLayout(this); l->setAutoAdd(true); l->activate(); KJS::Interpreter *js = parent->m_part->interpreter(); @@ -386,7 +386,7 @@ KateKJSWrapperConfigPage::KateKJSWrapperConfigPage(KJS::Object pageConstructor,P } -static void callJS(KJSEmbed::KJSEmbedPart *p,KJS::Object o,const QString& funcName){ +static void callJS(KJSEmbed::KJSEmbedPart *p,KJS::Object o,const TQString& funcName){ KJS::Interpreter *js = p->interpreter(); KJS::ExecState *exec = js->globalExec(); KJS::List param; @@ -426,7 +426,7 @@ void KateKJSWrapperConfigPage::defaults() } -Kate::JS::ToolView::ToolView(KJS::Object constr, KJS::ExecState *exec, KJSEmbed::JSFactory *factory, KJS::List parameters, const char *name):QVBox(0,name) { +Kate::JS::ToolView::ToolView(KJS::Object constr, KJS::ExecState *exec, KJSEmbed::JSFactory *factory, KJS::List parameters, const char *name):TQVBox(0,name) { parameters.append(factory->createProxy(exec,this)); handler=constr.construct(exec,parameters); -- cgit v1.2.1