diff options
Diffstat (limited to 'kjsembed/kjsembedpart.cpp')
-rw-r--r-- | kjsembed/kjsembedpart.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/kjsembed/kjsembedpart.cpp b/kjsembed/kjsembedpart.cpp index b39b8813..9e47bc3b 100644 --- a/kjsembed/kjsembedpart.cpp +++ b/kjsembed/kjsembedpart.cpp @@ -89,7 +89,7 @@ namespace KJSEmbed { // KPart // -KJSEmbedPart::KJSEmbedPart( TQObject *parent, const char *name ) +KJSEmbedPart::KJSEmbedPart( TTQObject *parent, const char *name ) : KParts::ReadOnlyPart( parent, name ? name : "kjsembed_part" ), jsConsole(0), jsfactory(0), widgetparent(0), widgetname(name ? name : "kjsembed_part"), deletejs(false) @@ -99,7 +99,7 @@ KJSEmbedPart::KJSEmbedPart( TQObject *parent, const char *name ) createActionClient(); } -KJSEmbedPart::KJSEmbedPart( TQWidget *wparent, const char *wname, TQObject *parent, const char *name ) +KJSEmbedPart::KJSEmbedPart( TTQWidget *wparent, const char *wname, TTQObject *parent, const char *name ) : KParts::ReadOnlyPart( parent, name ? name : (wname?wname:"jsembed_part") ), jsConsole(0), jsfactory(0), widgetparent(wparent), widgetname(wname), deletejs(false) @@ -109,8 +109,8 @@ KJSEmbedPart::KJSEmbedPart( TQWidget *wparent, const char *wname, TQObject *pare createActionClient(); } -KJSEmbedPart::KJSEmbedPart( KJS::Interpreter *jsi, TQWidget *wparent, const char *wname, - TQObject *parent, const char *name ) +KJSEmbedPart::KJSEmbedPart( KJS::Interpreter *jsi, TTQWidget *wparent, const char *wname, + TTQObject *parent, const char *name ) : KParts::ReadOnlyPart( parent, name ? name : (wname?wname:"jsembed_part") ), jsConsole(0), jsfactory(0), builtins(0), widgetparent(wparent), widgetname(wname), js(jsi), deletejs(false) @@ -161,7 +161,7 @@ JSConsoleWidget *KJSEmbedPart::view() { #ifndef QT_ONLY if ( !jsConsole ) { - TQCString name = widgetname ? widgetname : TQCString("jsembed_console"); + TTQCString name = widgetname ? widgetname : TTQCString("jsembed_console"); jsConsole = new JSConsoleWidget( this, widgetparent, name ); setWidget( jsConsole ); jsfactory->addType( jsConsole->className() ); @@ -171,9 +171,9 @@ JSConsoleWidget *KJSEmbedPart::view() return 0L; } -TQStringList KJSEmbedPart::constructorNames() const +TTQStringList KJSEmbedPart::constructorNames() const { - TQStringList classes; + TTQStringList classes; KJS::List cons = constructorList(); KJS::ListIterator it = cons.begin(); @@ -224,9 +224,9 @@ KJS::List KJSEmbedPart::constructorList() const // Version information // -TQCString KJSEmbedPart::versionString() const +TTQCString KJSEmbedPart::versionString() const { - return TQCString(KJSEMBED_VERSION_STRING); + return TTQCString(KJSEMBED_VERSION_STRING); } int KJSEmbedPart::versionMajor() const @@ -243,7 +243,7 @@ int KJSEmbedPart::versionMinor() const // Execute a JS script. // -KJS::Value KJSEmbedPart::evaluate( const TQString &script, const KJS::Value &self ) +KJS::Value KJSEmbedPart::evaluate( const TTQString &script, const KJS::Value &self ) { if ( execute( res, script, self ) ) return res.value(); @@ -251,12 +251,12 @@ KJS::Value KJSEmbedPart::evaluate( const TQString &script, const KJS::Value &sel return KJS::Null(); } -bool KJSEmbedPart::execute( const TQString &script, const KJS::Value &self ) +bool KJSEmbedPart::execute( const TTQString &script, const KJS::Value &self ) { return execute( res, script, self ); } -bool KJSEmbedPart::execute( KJS::Completion &result, const TQString &script, const KJS::Value &self ) +bool KJSEmbedPart::execute( KJS::Completion &result, const TTQString &script, const KJS::Value &self ) { KJS::Value val( self ); result = js->evaluate( script, self.isNull() ? partobj : val ); @@ -269,13 +269,13 @@ bool KJSEmbedPart::openURL( const KURL &url ) // kdDebug(80001) << "KJSEmbedPart: openURL '" << url.url() << "' is javascript" << endl; #ifndef QT_ONLY - TQString cmd = url.url(); + TTQString cmd = url.url(); #else - TQString cmd = url.toString(); + TTQString cmd = url.toString(); #endif - TQString js( "javascript:" ); - cmd = cmd.replace( 0, js.length(), TQString("") ); + TTQString js( "javascript:" ); + cmd = cmd.replace( 0, js.length(), TTQString("") ); // kdDebug(80001) << "KJSEmbedPart: JS command is '" << cmd << "'" << endl; return execute( cmd ); @@ -287,14 +287,14 @@ bool KJSEmbedPart::openURL( const KURL &url ) // Invoke a script file. // -bool KJSEmbedPart::runFile( const TQString &name, const KJS::Value &self ) +bool KJSEmbedPart::runFile( const TTQString &name, const KJS::Value &self ) { kdDebug(80001) << "KJSEmbedPart::runFile(): file is '" << name << "'" << endl; - TQString script = loadFile( name ); + TTQString script = loadFile( name ); return execute( script, self ); } -bool KJSEmbedPart::loadActionSet( const TQString &file ) +bool KJSEmbedPart::loadActionSet( const TTQString &file ) { #ifndef QT_ONLY return xmlclient->load( file ); @@ -304,23 +304,23 @@ bool KJSEmbedPart::loadActionSet( const TQString &file ) #endif // QT_ONLY } -TQString KJSEmbedPart::loadFile( const TQString &src ) +TTQString KJSEmbedPart::loadFile( const TTQString &src ) { - TQString script; + TTQString script; if ( src == "-" ) { - TQTextStream ts( stdin, IO_ReadOnly ); + TTQTextStream ts( stdin, IO_ReadOnly ); script = ts.read(); } else { - TQFile file( src ); + TTQFile file( src ); if ( file.open( IO_ReadOnly ) ) { - script = TQString( file.readAll() ); + script = TTQString( file.readAll() ); } else { kdWarning() << "Could not open file '" << src << "', " << strerror( errno ) << endl; - return TQString::null; + return TTQString::null; } } @@ -337,14 +337,14 @@ TQString KJSEmbedPart::loadFile( const TQString &src ) // Publishing objects. // -KJS::Object KJSEmbedPart::bind( TQObject *obj ) +KJS::Object KJSEmbedPart::bind( TTQObject *obj ) { KJS::Object jsobj = jsfactory->createProxy( js->globalExec(), obj ); JSProxy::toObjectProxy(jsobj.imp() )->setOwner(JSProxy::Native); return jsobj; } -KJS::Object KJSEmbedPart::addObject( TQObject *obj, KJS::Object &parent, const char *name ) +KJS::Object KJSEmbedPart::addObject( TTQObject *obj, KJS::Object &parent, const char *name ) { KJS::Object jsobj = bind( obj ); parent.put( js->globalExec(), name ? name : obj->name(), jsobj ); @@ -352,7 +352,7 @@ KJS::Object KJSEmbedPart::addObject( TQObject *obj, KJS::Object &parent, const c return jsobj; } -KJS::Object KJSEmbedPart::addObject( TQObject *obj, const char *name ) +KJS::Object KJSEmbedPart::addObject( TTQObject *obj, const char *name ) { return addObject( obj, js->globalObject(), name ); } @@ -362,10 +362,10 @@ void KJSEmbedPart::virtual_hook( int /*id*/, void * /*data*/ ) } -static KJS::Object scopeWalker( KJS::ExecState *exec, const KJS::Object &root, const TQString &objectString ) +static KJS::Object scopeWalker( KJS::ExecState *exec, const KJS::Object &root, const TTQString &objectString ) { KJS::Object returnObject = root; - TQStringList objects = TQStringList::split(".", objectString); + TTQStringList objects = TTQStringList::split(".", objectString); for( uint idx = 0; idx < objects.count(); ++idx) { KJS::Identifier id = KJS::Identifier( KJS::UString( objects[idx] )); @@ -376,7 +376,7 @@ static KJS::Object scopeWalker( KJS::ExecState *exec, const KJS::Object &root, c return returnObject; } -KJS::Value KJSEmbedPart::callMethod( const TQString & methodName, const KJS::List & args ) const +KJS::Value KJSEmbedPart::callMethod( const TTQString & methodName, const KJS::List & args ) const { KJS::ExecState *exec = js->globalExec(); KJS::Identifier id = KJS::Identifier( KJS::UString(methodName.latin1() )); @@ -406,7 +406,7 @@ KJS::Value KJSEmbedPart::callMethod( const TQString & methodName, const KJS::Lis return retValue; } -KJS::Value KJSEmbedPart::getValue( const TQString & valueName ) const +KJS::Value KJSEmbedPart::getValue( const TTQString & valueName ) const { KJS::ExecState *exec = js->globalExec(); KJS::Identifier id = KJS::Identifier( KJS::UString(valueName.latin1() )); @@ -414,7 +414,7 @@ KJS::Value KJSEmbedPart::getValue( const TQString & valueName ) const return obj.get(exec, id ); } -void KJSEmbedPart::putValue( const TQString & valueName, const KJS::Value & value ) +void KJSEmbedPart::putValue( const TTQString & valueName, const KJS::Value & value ) { KJS::ExecState *exec = js->globalExec(); KJS::Identifier id = KJS::Identifier( KJS::UString(valueName.latin1() )); @@ -422,18 +422,18 @@ void KJSEmbedPart::putValue( const TQString & valueName, const KJS::Value & valu obj.put(exec, id, value); } -void KJSEmbedPart::putVariant( const TQString & valueName, const TQVariant & value ) +void KJSEmbedPart::putVariant( const TTQString & valueName, const TTQVariant & value ) { KJS::Value val = convertToValue( js->globalExec(), value); putValue( valueName, val ); } -TQVariant KJSEmbedPart::getVariant( const TQString & valueName ) const +TTQVariant KJSEmbedPart::getVariant( const TTQString & valueName ) const { return convertToVariant( js->globalExec(), getValue( valueName ) ); } -bool KJSEmbedPart::hasMethod( const TQString & methodName ) +bool KJSEmbedPart::hasMethod( const TTQString & methodName ) { KJS::ExecState *exec = js->globalExec(); KJS::Identifier id = KJS::Identifier( KJS::UString(methodName.latin1() )); |