summaryrefslogtreecommitdiffstats
path: root/kjsembed/jsbuiltin_imp.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 16:20:48 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 16:20:48 -0600
commite63beeb5bdb82987b1e00bc35178667786fbad48 (patch)
treeab77b6ac830b7944d5d1eb9ce8f81feb8fdab948 /kjsembed/jsbuiltin_imp.cpp
parent67557a2b56c0678c22ab1b00c4fd0224c5e9ed99 (diff)
downloadtdebindings-e63beeb5bdb82987b1e00bc35178667786fbad48.tar.gz
tdebindings-e63beeb5bdb82987b1e00bc35178667786fbad48.zip
Fix incorrect conversion
Diffstat (limited to 'kjsembed/jsbuiltin_imp.cpp')
-rw-r--r--kjsembed/jsbuiltin_imp.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kjsembed/jsbuiltin_imp.cpp b/kjsembed/jsbuiltin_imp.cpp
index 19b4e42f..c0f758e2 100644
--- a/kjsembed/jsbuiltin_imp.cpp
+++ b/kjsembed/jsbuiltin_imp.cpp
@@ -61,7 +61,7 @@
namespace KJSEmbed {
namespace Bindings {
-JSBuiltInImp::JSBuiltInImp( JSBuiltIn *builtin, int mid, const TTQString &p )
+JSBuiltInImp::JSBuiltInImp( JSBuiltIn *builtin, int mid, const TQString &p )
: JSProxyImp(builtin->part()->globalExec()), part(builtin->part()), id(mid), param(p)
{
setName( KJS::Identifier( KJS::UString(param) ) );
@@ -71,8 +71,8 @@ JSBuiltInImp::~JSBuiltInImp() {}
KJS::Value JSBuiltInImp::call( KJS::ExecState *exec, KJS::Object &self, const KJS::List &args )
{
- TTQString arg0 = (args.size() > 0) ? args[0].toString(exec).qstring() : TTQString::null;
- TTQString arg1 = (args.size() > 1) ? args[1].toString(exec).qstring() : TTQString::null;
+ TQString arg0 = (args.size() > 0) ? args[0].toString(exec).qstring() : TQString::null;
+ TQString arg1 = (args.size() > 1) ? args[1].toString(exec).qstring() : TQString::null;
if ( id == MethodLoadScript ) {
@@ -85,7 +85,7 @@ KJS::Value JSBuiltInImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ
return KJS::Boolean( ok );
}
else {
- TTQString msg = i18n( "Method retquires 1 or 2 arguments, received %1." ).arg( args.size() );
+ TQString msg = i18n( "Method retquires 1 or 2 arguments, received %1." ).arg( args.size() );
return throwError(exec, msg);
}
}
@@ -109,45 +109,45 @@ KJS::Value JSBuiltInImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ
}
else if ( id == MethodReadLine ) {
- TTQString line = conin()->readLine();
+ TQString line = conin()->readLine();
if ( !line.isNull() )
return KJS::String( line );
}
else if ( id == MethodOpenFile ) {
// #warning "This is leaked!!!!!"
-// TTQFile *f=new TTQFile( arg0 );
+// TQFile *f=new TQFile( arg0 );
// int mode = 0;
-// if ( arg1 == TTQString("ro") )
+// if ( arg1 == TQString("ro") )
// mode = IO_ReadOnly;
-// else if ( arg1 == TTQString("wo") )
+// else if ( arg1 == TQString("wo") )
// mode = IO_WriteOnly;
// if ( !f->open( mode ) )
// return KJS::Boolean(false);
-// Bindings::TextStream *ts = new Bindings::TextStream( part, "file", new TTQTextStream(f) );
+// Bindings::TextStream *ts = new Bindings::TextStream( part, "file", new TQTextStream(f) );
// return KJS::Object( ts );
return KJS::Null();
}
else if ( id == MethodReadFile ) {
- TTQFile f( arg0 );
+ TQFile f( arg0 );
if ( !f.open( IO_ReadOnly ) ) {
- TTQString msg = i18n( "Could not open file '%1'." ).arg(arg0);
+ TQString msg = i18n( "Could not open file '%1'." ).arg(arg0);
return throwError(exec, msg);
}
- TTQString s = f.readAll();
+ TQString s = f.readAll();
return KJS::String( s );
}
else if ( id == MethodWriteFile ) {
- TTQFile f( arg0 );
+ TQFile f( arg0 );
if ( !f.open( IO_WriteOnly ) )
return KJS::Boolean( false );
- TTQTextStream ts( &f );
+ TQTextStream ts( &f );
ts << arg1;
return KJS::Boolean( true );
@@ -171,16 +171,16 @@ KJS::Value JSBuiltInImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ
}
else if ( id == MethodSaxLoadFile ) {
if ( args.size() != 2 ) {
- TTQString msg = i18n( "Method retquires 2 arguments, received %1." ).arg( args.size() );
+ TQString msg = i18n( "Method retquires 2 arguments, received %1." ).arg( args.size() );
return throwError(exec, msg);
}
BuiltIns::SaxHandler sax( exec );
sax.setHandler( args[0].toObject(exec) );
- TTQFile f( arg1 );
- TTQXmlInputSource src( &f );
- TTQXmlSimpleReader reader;
+ TQFile f( arg1 );
+ TQXmlInputSource src( &f );
+ TQXmlSimpleReader reader;
reader.setContentHandler( &sax );
bool ok = reader.parse( src );
@@ -193,11 +193,11 @@ KJS::Value JSBuiltInImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ
else if ( id == MethodDumpCompletion ) {
KJS::Object obj = obj.isValid() ? args[0].toObject(exec) : KJS::Object();
if ( !obj.isValid() ) {
- TTQString msg = i18n( "Method retquires an object." );
+ TQString msg = i18n( "Method retquires an object." );
return throwError(exec, msg,KJS::TypeError);
}
- TTQVariant v = dumpCompletion( exec, obj );
+ TQVariant v = dumpCompletion( exec, obj );
return convertToValue( exec, v ); // FIXME: This will crash if the type is wrong
}
else if ( id == MethodAlert ) {
@@ -205,7 +205,7 @@ KJS::Value JSBuiltInImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ
#ifndef QT_ONLY
KMessageBox::information( 0L, arg0 );
#else // QT_ONLY
- TTQMessageBox::information( 0L, i18n("Information"), arg0 );
+ TQMessageBox::information( 0L, i18n("Information"), arg0 );
#endif // QT_ONLY
return KJS::Undefined();
@@ -216,24 +216,24 @@ KJS::Value JSBuiltInImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ
#ifndef QT_ONLY
answer = KMessageBox::questionYesNo( 0L, arg0 );
#else // QT_ONLY
- answer = TTQMessageBox::question(0L, i18n("Question"), arg0 );
+ answer = TQMessageBox::question(0L, i18n("Question"), arg0 );
#endif // QT_ONLY
return KJS::Number( answer );
}
else if ( id == MethodPrompt ) {
- TTQString text;
+ TQString text;
#ifndef QT_ONLY
text = KInputDialog::getText( arg0, arg0, arg1 );
#else // QT_ONLY
- text = TQInputDialog::getText( arg0, arg0, TTQLineEdit::Normal, arg1 );
+ text = TQInputDialog::getText( arg0, arg0, TQLineEdit::Normal, arg1 );
#endif // QT_ONLY
return KJS::String( text );
}
else if ( id == MethodI18n ) {
- TTQString retString(i18n(arg0.latin1()));
+ TQString retString(i18n(arg0.latin1()));
return KJS::String( retString );
}
else if ( id == MethodImport ) {
@@ -242,11 +242,11 @@ KJS::Value JSBuiltInImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ
// Scan $KDEDIRS/share/apps/$APPNAME/
// Scan $KDEDIRS/share/apps/kjsembed/
KGlobal::dirs()->addResourceType("kjsembed", KStandardDirs::kde_default("data") +"/kjsembed/");
- TTQString fname = KGlobal::dirs ()->findResource ("kjsembed", TTQString(arg0));
+ TQString fname = KGlobal::dirs ()->findResource ("kjsembed", TQString(arg0));
kdDebug(80001) << "Loading: " << fname << endl;
- //TTQString code = part->loadFile(fname);
+ //TQString code = part->loadFile(fname);
return KJS::Boolean( part->runFile(fname, part->globalObject()));
#else // QT_ONLY
@@ -269,7 +269,7 @@ KJS::Value JSBuiltInImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ
kdWarning() << "JSBuiltInImp has no method " << id << endl;
}
- TTQString msg = i18n( "JSBuiltInImp has no method with id '%1'." ).arg( id );
+ TQString msg = i18n( "JSBuiltInImp has no method with id '%1'." ).arg( id );
return throwError(exec, msg,KJS::ReferenceError);
}