From 10308be19ef7fa44699562cc75946e7ea1fdf6b9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 7 Jan 2011 03:45:53 +0000 Subject: Revert automated changes Sorry guys, they are just not ready for prime time Work will continue as always git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- khtml/java/KJAS_GRAMMAR.txt | 4 +- khtml/java/README | 2 +- khtml/java/kjava.jar | Bin 157713 -> 157645 bytes khtml/java/kjavaapplet.cpp | 10 ++--- khtml/java/kjavaapplet.h | 4 +- khtml/java/kjavaappletcontext.cpp | 22 +++++------ khtml/java/kjavaappletcontext.h | 4 +- khtml/java/kjavaappletserver.cpp | 44 ++++++++++----------- khtml/java/kjavaappletserver.h | 4 +- khtml/java/kjavaappletviewer.cpp | 40 +++++++++---------- khtml/java/kjavaappletwidget.cpp | 10 ++--- khtml/java/kjavaappletwidget.h | 2 +- khtml/java/kjavadownloader.h | 2 +- khtml/java/kjavaprocess.cpp | 4 +- khtml/java/kjavaprocess.h | 4 +- khtml/java/kxeventutil.cpp | 6 +-- khtml/java/make-jar | 4 +- .../org/kde/kjas/server/KJASAppletClassLoader.java | 26 ++++++------ .../org/kde/kjas/server/KJASAppletContext.java | 16 ++++---- .../java/org/kde/kjas/server/KJASAppletPanel.java | 10 ++--- khtml/java/org/kde/kjas/server/KJASAppletStub.java | 18 ++++----- .../org/kde/kjas/server/KJASProtocolHandler.java | 8 ++-- .../org/kde/kjas/server/KJASSecurityManager.java | 6 +-- khtml/java/org/kde/kjas/server/StatusListener.java | 4 +- khtml/java/tests/badapplets/BadApplet.java | 2 +- 25 files changed, 128 insertions(+), 128 deletions(-) (limited to 'khtml/java') diff --git a/khtml/java/KJAS_GRAMMAR.txt b/khtml/java/KJAS_GRAMMAR.txt index bd2359f8b..5632f8de8 100644 --- a/khtml/java/KJAS_GRAMMAR.txt +++ b/khtml/java/KJAS_GRAMMAR.txt @@ -15,7 +15,7 @@ KJAS Grammar | | | - | + | | | | @@ -43,7 +43,7 @@ KJAS Grammar -> <1 byte equal to 9 when cast as int> - -> <1 byte equal to 10 when cast as int> + -> <1 byte equal to 10 when cast as int> -> <1 byte equal to 11 when cast as int> diff --git a/khtml/java/README b/khtml/java/README index 69538ed8b..5d64e742f 100644 --- a/khtml/java/README +++ b/khtml/java/README @@ -14,7 +14,7 @@ kjava-classes.zip An *uncompressed* ZIP file containing the .class files support some crappy JVMs. org/kde/kjas/server Java sources for KJAS server process -You can tqfind more information at http://developer.kde.org/language-bindings/java/ +You can find more information at http://developer.kde.org/language-bindings/java/ Richard Moore. rich@kde.org diff --git a/khtml/java/kjava.jar b/khtml/java/kjava.jar index f2a92ac85..afab6884b 100644 Binary files a/khtml/java/kjava.jar and b/khtml/java/kjava.jar differ diff --git a/khtml/java/kjavaapplet.cpp b/khtml/java/kjavaapplet.cpp index fad22f9eb..879c8624e 100644 --- a/khtml/java/kjavaapplet.cpp +++ b/khtml/java/kjavaapplet.cpp @@ -222,27 +222,27 @@ void KJavaApplet::stateChange( const int newStateInt ) { break; case INSTANCIATED: if (ok) { - showtqStatus(i18n("Initializing Applet \"%1\"...").arg(appletName())); + showStatus(i18n("Initializing Applet \"%1\"...").arg(appletName())); } ok = (d->state == CLASS_LOADED); break; case INITIALIZED: ok = (d->state == INSTANCIATED); if (ok) { - showtqStatus(i18n("Starting Applet \"%1\"...").arg(appletName())); + showStatus(i18n("Starting Applet \"%1\"...").arg(appletName())); start(); } break; case STARTED: ok = (d->state == INITIALIZED || d->state == STOPPED); if (ok) { - showtqStatus(i18n("Applet \"%1\" started").arg(appletName())); + showStatus(i18n("Applet \"%1\" started").arg(appletName())); } break; case STOPPED: ok = (d->state == INITIALIZED || d->state == STARTED); if (ok) { - showtqStatus(i18n("Applet \"%1\" stopped").arg(appletName())); + showStatus(i18n("Applet \"%1\" stopped").arg(appletName())); } break; case DESTROYED: @@ -259,7 +259,7 @@ void KJavaApplet::stateChange( const int newStateInt ) { } } -void KJavaApplet::showtqStatus(const TQString &msg) { +void KJavaApplet::showStatus(const TQString &msg) { TQStringList args; args << msg; context->processCmd("showstatus", args); diff --git a/khtml/java/kjavaapplet.h b/khtml/java/kjavaapplet.h index 15d89d4cd..6fe0f7709 100644 --- a/khtml/java/kjavaapplet.h +++ b/khtml/java/kjavaapplet.h @@ -47,7 +47,7 @@ class KJavaAppletContext; class KJavaAppletPrivate; -class KJavaApplet : public TQObject +class KJavaApplet : public QObject { Q_OBJECT @@ -238,7 +238,7 @@ public: signals: void jsEvent (const TQStringList & args); private: - void showtqStatus( const TQString &msg); + void showStatus( const TQString &msg); KJavaAppletPrivate* d; TQMap params; KJavaAppletContext* context; diff --git a/khtml/java/kjavaappletcontext.cpp b/khtml/java/kjavaappletcontext.cpp index 6875ddfe5..76914a5dc 100644 --- a/khtml/java/kjavaappletcontext.cpp +++ b/khtml/java/kjavaappletcontext.cpp @@ -138,27 +138,27 @@ void KJavaAppletContext::received( const TQString& cmd, const TQStringList& arg kdDebug(6100) << "KJavaAppletContext::received, cmd = >>" << cmd << "<<" << endl; kdDebug(6100) << "arg count = " << arg.count() << endl; - if ( cmd == TQString::tqfromLatin1("showstatus") + if ( cmd == TQString::fromLatin1("showstatus") && !arg.empty() ) { TQString tmp = arg.first(); - tmp.tqreplace(TQRegExp("[\n\r]"), ""); + tmp.replace(TQRegExp("[\n\r]"), ""); kdDebug(6100) << "status message = " << tmp << endl; - emit showtqStatus( tmp ); + emit showStatus( tmp ); } - else if ( cmd == TQString::tqfromLatin1( "showurlinframe" ) + else if ( cmd == TQString::fromLatin1( "showurlinframe" ) && arg.count() > 1 ) { kdDebug(6100) << "url = " << arg[0] << ", frame = " << arg[1] << endl; emit showDocument( arg[0], arg[1] ); } - else if ( cmd == TQString::tqfromLatin1( "showdocument" ) + else if ( cmd == TQString::fromLatin1( "showdocument" ) && !arg.empty() ) { kdDebug(6100) << "url = " << arg.first() << endl; emit showDocument( arg.first(), "_top" ); } - else if ( cmd == TQString::tqfromLatin1( "resizeapplet" ) + else if ( cmd == TQString::fromLatin1( "resizeapplet" ) && arg.count() > 2 ) { //arg[1] should be appletID @@ -180,10 +180,10 @@ void KJavaAppletContext::received( const TQString& cmd, const TQStringList& arg tmp->resizeAppletWidget( width, height ); } } - else if (cmd.startsWith(TQString::tqfromLatin1("audioclip_"))) { + else if (cmd.startsWith(TQString::fromLatin1("audioclip_"))) { kdDebug(DEBUGAREA) << "process Audio command (not yet implemented): " << cmd << " " << arg[0] << endl; } - else if ( cmd == TQString::tqfromLatin1( "JS_Event" ) + else if ( cmd == TQString::fromLatin1( "JS_Event" ) && arg.count() > 2 ) { bool ok; @@ -198,7 +198,7 @@ void KJavaAppletContext::received( const TQString& cmd, const TQStringList& arg else kdError(DEBUGAREA) << "parse JS event " << arg[0] << " " << arg[1] << endl; } - else if ( cmd == TQString::tqfromLatin1( "AppletStateNotification" ) ) + else if ( cmd == TQString::fromLatin1( "AppletStateNotification" ) ) { bool ok; const int appletID = arg.first().toInt(&ok); @@ -222,7 +222,7 @@ void KJavaAppletContext::received( const TQString& cmd, const TQStringList& arg } else kdError(DEBUGAREA) << "AppletStateNotification: Applet ID is not numerical" << endl; } - else if ( cmd == TQString::tqfromLatin1( "AppletFailed" ) ) { + else if ( cmd == TQString::fromLatin1( "AppletFailed" ) ) { bool ok; const int appletID = arg.first().toInt(&ok); if (ok) @@ -230,7 +230,7 @@ void KJavaAppletContext::received( const TQString& cmd, const TQStringList& arg KJavaApplet* const applet = d->applets[appletID]; /* TQString errorDetail(arg[1]); - errorDetail.tqreplace(TQRegExp(":\\s*"), ":\n"); + errorDetail.replace(TQRegExp(":\\s*"), ":\n"); KMessageBox::detailedError(0L, i18n("Java error while loading applet."), errorDetail); */ if (applet) diff --git a/khtml/java/kjavaappletcontext.h b/khtml/java/kjavaappletcontext.h index d5d5faa22..ca851a42e 100644 --- a/khtml/java/kjavaappletcontext.h +++ b/khtml/java/kjavaappletcontext.h @@ -42,7 +42,7 @@ class KJavaAppletServer; class KJavaApplet; class KJavaAppletContextPrivate; -class KJavaAppletContext : public TQObject +class KJavaAppletContext : public QObject { Q_OBJECT @@ -109,7 +109,7 @@ signals: /** * Signals the KHMTL Part to show this as the status message. */ - void showtqStatus ( const TQString& txt ); + void showStatus ( const TQString& txt ); /** * Signals the KHTML Part to show a url in a given target diff --git a/khtml/java/kjavaappletserver.cpp b/khtml/java/kjavaappletserver.cpp index 64e2ea2ab..59d0517a2 100644 --- a/khtml/java/kjavaappletserver.cpp +++ b/khtml/java/kjavaappletserver.cpp @@ -448,7 +448,7 @@ void KJavaAppletServer::sendURLData( int loaderID, int code, const TQByteArray& void KJavaAppletServer::removeDataJob( int loaderID ) { - const KIOJobMap::iterator it = d->kiojobs.tqfind( loaderID ); + const KIOJobMap::iterator it = d->kiojobs.find( loaderID ); if (it != d->kiojobs.end()) { it.data()->deleteLater(); d->kiojobs.erase( it ); @@ -502,7 +502,7 @@ void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb ) if (cmd_code == KJAS_PUT_DATA) { // rest of the data is for kio put if (ok) { - KIOJobMap::iterator it = d->kiojobs.tqfind( ID_num ); + KIOJobMap::iterator it = d->kiojobs.find( ID_num ); if (ok && it != d->kiojobs.end()) { TQByteArray qba; qba.setRawData(qb.data() + index, qb.size() - index - 1); @@ -517,7 +517,7 @@ void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb ) //now parse out the arguments while( index < qb_size ) { - int sep_pos = qb.tqfind( 0, index ); + int sep_pos = qb.find( 0, index ); if (sep_pos < 0) { kdError(6100) << "Missing separation byte" << endl; sep_pos = qb_size; @@ -526,24 +526,24 @@ void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb ) args.append( TQString::fromLocal8Bit( qb.data() + index, sep_pos - index ) ); index = sep_pos + 1; //skip the sep } - //here I should tqfind the context and call the method directly + //here I should find the context and call the method directly //instead of emitting signals switch( cmd_code ) { case KJAS_SHOW_DOCUMENT: - cmd = TQString::tqfromLatin1( "showdocument" ); + cmd = TQString::fromLatin1( "showdocument" ); break; case KJAS_SHOW_URLINFRAME: - cmd = TQString::tqfromLatin1( "showurlinframe" ); + cmd = TQString::fromLatin1( "showurlinframe" ); break; case KJAS_SHOW_STATUS: - cmd = TQString::tqfromLatin1( "showstatus" ); + cmd = TQString::fromLatin1( "showstatus" ); break; case KJAS_RESIZE_APPLET: - cmd = TQString::tqfromLatin1( "resizeapplet" ); + cmd = TQString::fromLatin1( "resizeapplet" ); break; case KJAS_GET_URLDATA: @@ -565,7 +565,7 @@ void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb ) case KJAS_DATA_COMMAND: if (ok && !args.empty()) { const int cmd = args.first().toInt( &ok ); - KIOJobMap::iterator it = d->kiojobs.tqfind( ID_num ); + KIOJobMap::iterator it = d->kiojobs.find( ID_num ); if (ok && it != d->kiojobs.end()) it.data()->jobCommand( cmd ); kdDebug(6100) << "KIO Data command: " << ID_num << " " << args.first() << endl; @@ -573,7 +573,7 @@ void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb ) kdError(6100) << "KIO Data command error " << ok << " args:" << args.size() << endl; return; case KJAS_JAVASCRIPT_EVENT: - cmd = TQString::tqfromLatin1( "JS_Event" ); + cmd = TQString::fromLatin1( "JS_Event" ); kdDebug(6100) << "Javascript request: "<< contextID << " code: " << args[0] << endl; break; @@ -581,7 +581,7 @@ void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb ) case KJAS_PUT_MEMBER: case KJAS_CALL_MEMBER: { const int ticket = args[0].toInt(); - JSStack::iterator it = d->jsstack.tqfind(ticket); + JSStack::iterator it = d->jsstack.find(ticket); if (it != d->jsstack.end()) { kdDebug(6100) << "slotJavaRequest: " << ticket << endl; args.pop_front(); @@ -593,24 +593,24 @@ void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb ) return; } case KJAS_AUDIOCLIP_PLAY: - cmd = TQString::tqfromLatin1( "audioclip_play" ); + cmd = TQString::fromLatin1( "audioclip_play" ); kdDebug(6100) << "Audio Play: url=" << args[0] << endl; break; case KJAS_AUDIOCLIP_LOOP: - cmd = TQString::tqfromLatin1( "audioclip_loop" ); + cmd = TQString::fromLatin1( "audioclip_loop" ); kdDebug(6100) << "Audio Loop: url=" << args[0] << endl; break; case KJAS_AUDIOCLIP_STOP: - cmd = TQString::tqfromLatin1( "audioclip_stop" ); + cmd = TQString::fromLatin1( "audioclip_stop" ); kdDebug(6100) << "Audio Stop: url=" << args[0] << endl; break; case KJAS_APPLET_STATE: kdDebug(6100) << "Applet State Notification for Applet " << args[0] << ". New state=" << args[1] << endl; - cmd = TQString::tqfromLatin1( "AppletStateNotification" ); + cmd = TQString::fromLatin1( "AppletStateNotification" ); break; case KJAS_APPLET_FAILED: kdDebug(6100) << "Applet " << args[0] << " Failed: " << args[1] << endl; - cmd = TQString::tqfromLatin1( "AppletFailed" ); + cmd = TQString::fromLatin1( "AppletFailed" ); break; case KJAS_SECURITY_CONFIRM: { if (KSSL::doesSSLWork() && !d->kssl) @@ -670,8 +670,8 @@ void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb ) TQString subject = cert->getSubject() + TQChar('\n'); TQRegExp reg(TQString("/[A-Z]+=")); int pos = 0; - while ((pos = subject.tqfind(reg, pos)) > -1) - subject.tqreplace(pos, 1, TQString("\n ")); + while ((pos = subject.find(reg, pos)) > -1) + subject.replace(pos, 1, TQString("\n ")); text += subject.mid(1); } } @@ -680,7 +680,7 @@ void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb ) KSSLCertChain chain; chain.setChain( certs ); if ( chain.isValid() ) - answer = PermissionDialog( tqApp->activeWindow() ).exec( text, args[0] ); + answer = PermissionDialog( qApp->activeWindow() ).exec( text, args[0] ); } } sl.push_front( TQString(answer) ); @@ -779,7 +779,7 @@ PermissionDialog::PermissionDialog( TQWidget* parent ) TQCString PermissionDialog::exec( const TQString & cert, const TQString & perm ) { TQGuardedPtr dialog = new TQDialog( static_cast(parent()), "PermissionDialog"); - dialog->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, dialog->sizePolicy().hasHeightForWidth() ) ); + dialog->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, dialog->sizePolicy().hasHeightForWidth() ) ); dialog->setModal( true ); dialog->setCaption( i18n("Security Alert") ); @@ -807,7 +807,7 @@ TQCString PermissionDialog::exec( const TQString & cert, const TQString & perm ) TQPushButton* const grant = new TQPushButton( i18n("&Grant All"), dialog, "grant" ); buttonLayout->addWidget( grant ); dialogLayout->addLayout( buttonLayout ); - dialog->resize( dialog->tqminimumSizeHint() ); + dialog->resize( dialog->minimumSizeHint() ); //clearWState( WState_Polished ); connect( no, TQT_SIGNAL( clicked() ), this, TQT_SLOT( clicked() ) ); @@ -827,7 +827,7 @@ PermissionDialog::~PermissionDialog() void PermissionDialog::clicked() { m_button = sender()->name(); - static_cast(sender())->tqparentWidget()->close(); + static_cast(sender())->parentWidget()->close(); } #include "kjavaappletserver.moc" diff --git a/khtml/java/kjavaappletserver.h b/khtml/java/kjavaappletserver.h index 63463b040..08d0f2983 100644 --- a/khtml/java/kjavaappletserver.h +++ b/khtml/java/kjavaappletserver.h @@ -39,7 +39,7 @@ class KJavaAppletContext; class KJavaAppletServerPrivate; class JSStackFrame; -class KJavaAppletServer : public TQObject +class KJavaAppletServer : public QObject { Q_OBJECT @@ -161,7 +161,7 @@ private: }; -class PermissionDialog : public TQObject +class PermissionDialog : public QObject { Q_OBJECT public: diff --git a/khtml/java/kjavaappletviewer.cpp b/khtml/java/kjavaappletviewer.cpp index 2000dd6fa..d4c8e266f 100644 --- a/khtml/java/kjavaappletviewer.cpp +++ b/khtml/java/kjavaappletviewer.cpp @@ -90,7 +90,7 @@ KJavaServerMaintainer::~KJavaServerMaintainer () { KJavaAppletContext * KJavaServerMaintainer::getContext (TQObject * w, const TQString & doc) { ContextMap::key_type key = qMakePair (w, doc); - ContextMap::iterator it = m_contextmap.tqfind (key); + ContextMap::iterator it = m_contextmap.find (key); if (it != m_contextmap.end ()) { ++((*it).second); return (*it).first; @@ -101,7 +101,7 @@ KJavaAppletContext * KJavaServerMaintainer::getContext (TQObject * w, const TQSt } void KJavaServerMaintainer::releaseContext (TQObject * w, const TQString & doc) { - ContextMap::iterator it = m_contextmap.tqfind (qMakePair (w, doc)); + ContextMap::iterator it = m_contextmap.find (qMakePair (w, doc)); if (it != m_contextmap.end () && --(*it).second <= 0) { kdDebug(6100) << "KJavaServerMaintainer::releaseContext" << endl; (*it).first->deleteLater (); @@ -230,7 +230,7 @@ KJavaAppletViewer::KJavaAppletViewer (TQWidget * wparent, const char *, TQStringList::const_iterator it = args.begin(); const TQStringList::const_iterator itEnd = args.end(); for ( ; it != itEnd; ++it) { - const int equalPos = (*it).tqfind("="); + const int equalPos = (*it).find("="); if (equalPos > 0) { const TQString name = (*it).left (equalPos).upper (); TQString value = (*it).right ((*it).length () - equalPos - 1); @@ -245,27 +245,27 @@ KJavaAppletViewer::KJavaAppletViewer (TQWidget * wparent, const char *, baseurl = KURL (KURL (value), TQString (".")).url (); } else if (name == "__KHTML__CODEBASE") khtml_codebase = value; - else if (name_lower == TQString::tqfromLatin1("codebase") || - name_lower == TQString::tqfromLatin1("java_codebase")) { + else if (name_lower == TQString::fromLatin1("codebase") || + name_lower == TQString::fromLatin1("java_codebase")) { if (!value.isEmpty ()) codebase = value; } else if (name == "__KHTML__CLASSID") - //else if (name.lower()==TQString::tqfromLatin1("classid")) + //else if (name.lower()==TQString::fromLatin1("classid")) classid = value; - else if (name_lower == TQString::tqfromLatin1("code") || - name_lower == TQString::tqfromLatin1("java_code")) + else if (name_lower == TQString::fromLatin1("code") || + name_lower == TQString::fromLatin1("java_code")) classname = value; - else if (name_lower == TQString::tqfromLatin1("src")) + else if (name_lower == TQString::fromLatin1("src")) src_param = value; - else if (name_lower == TQString::tqfromLatin1("archive") || - name_lower == TQString::tqfromLatin1("java_archive") || + else if (name_lower == TQString::fromLatin1("archive") || + name_lower == TQString::fromLatin1("java_archive") || name_lower.startsWith ("cache_archive")) applet->setArchives (value); - else if (name_lower == TQString::tqfromLatin1("name")) + else if (name_lower == TQString::fromLatin1("name")) applet->setAppletName (value); - else if (name_lower == TQString::tqfromLatin1("width")) + else if (name_lower == TQString::fromLatin1("width")) width = value.toInt(); - else if (name_lower == TQString::tqfromLatin1("height")) + else if (name_lower == TQString::fromLatin1("height")) height = value.toInt(); if (!name.startsWith ("__KHTML__")) { applet->setParameter (name, value); @@ -277,7 +277,7 @@ KJavaAppletViewer::KJavaAppletViewer (TQWidget * wparent, const char *, applet->setParameter ("CLSID", classid); kdDebug(6100) << "classid=" << classid << classid.startsWith("clsid:")<< endl; if (classid.startsWith ("clsid:")) - // codeBase tqcontains the URL to the plugin page + // codeBase contains the URL to the plugin page khtml_codebase = baseurl; else if (classname.isEmpty () && classid.startsWith ("java:")) classname = classid.mid(5); @@ -327,7 +327,7 @@ KJavaAppletViewer::KJavaAppletViewer (TQWidget * wparent, const char *, info.verifyPath = true; TQDataStream stream(params, IO_WriteOnly); - stream << info << m_view->tqtopLevelWidget()->winId(); + stream << info << m_view->topLevelWidget()->winId(); if (!kapp->dcopClient ()->call( "kded", "kpasswdserver", "checkAuthInfo(KIO::AuthInfo, long int)", params, replyType, reply ) ) { kdWarning() << "Can't communicate with kded_kpasswdserver!" << endl; @@ -342,14 +342,14 @@ KJavaAppletViewer::KJavaAppletViewer (TQWidget * wparent, const char *, /* install event filter for close events */ if (wparent) - wparent->tqtopLevelWidget ()->installEventFilter (this); + wparent->topLevelWidget ()->installEventFilter (this); setInstance (KJavaAppletViewerFactory::instance ()); KParts::Part::setWidget (m_view); connect (applet->getContext(), TQT_SIGNAL(appletLoaded()), this, TQT_SLOT(appletLoaded())); connect (applet->getContext(), TQT_SIGNAL(showDocument(const TQString&, const TQString&)), m_browserextension, TQT_SLOT(showDocument(const TQString&, const TQString&))); - connect (applet->getContext(), TQT_SIGNAL(showtqStatus(const TQString &)), this, TQT_SLOT(infoMessage(const TQString &))); + connect (applet->getContext(), TQT_SIGNAL(showStatus(const TQString &)), this, TQT_SLOT(infoMessage(const TQString &))); connect (applet, TQT_SIGNAL(jsEvent (const TQStringList &)), m_liveconnect, TQT_SLOT(jsEvent (const TQStringList &))); } @@ -391,7 +391,7 @@ bool KJavaAppletViewer::openURL (const KURL & url) { } else applet->setAppletClass (url.url ()); AppletParameterDialog (w).exec (); - applet->setSize (w->tqsizeHint()); + applet->setSize (w->sizeHint()); } if (!m_statusbar_icon) { KStatusBar *sb = m_statusbar->statusBar(); @@ -500,7 +500,7 @@ void KJavaAppletViewerBrowserExtension::restoreState (TQDataStream & stream) { applet->setParameter (key, val); kdDebug(6100) << "restoreState key:" << key << " val:" << val << endl; } - applet->setSize (w->tqsizeHint ()); + applet->setSize (w->sizeHint ()); if (w->isVisible()) w->showApplet (); } diff --git a/khtml/java/kjavaappletwidget.cpp b/khtml/java/kjavaappletwidget.cpp index 2e9597b2d..1299ce7e8 100644 --- a/khtml/java/kjavaappletwidget.cpp +++ b/khtml/java/kjavaappletwidget.cpp @@ -50,7 +50,7 @@ KJavaAppletWidget::KJavaAppletWidget( TQWidget* parent, const char* name ) d->tmplabel = new TQLabel( this ); d->tmplabel->setText( KJavaAppletServer::getAppletLabel() ); - d->tmplabel->tqsetAlignment( Qt::AlignCenter | Qt::WordBreak ); + d->tmplabel->setAlignment( Qt::AlignCenter | Qt::WordBreak ); d->tmplabel->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); d->tmplabel->show(); @@ -98,10 +98,10 @@ void KJavaAppletWidget::setWindow( WId w ) } } -TQSize KJavaAppletWidget::tqsizeHint() const +TQSize KJavaAppletWidget::sizeHint() const { - kdDebug(6100) << "KJavaAppletWidget::tqsizeHint()" << endl; - TQSize rval = QXEmbed::tqsizeHint(); + kdDebug(6100) << "KJavaAppletWidget::sizeHint()" << endl; + TQSize rval = QXEmbed::sizeHint(); if( rval.width() == 0 || rval.height() == 0 ) { @@ -132,7 +132,7 @@ void KJavaAppletWidget::showEvent (TQShowEvent * e) { if (!applet()->isCreated() && !applet()->appletClass().isEmpty()) { // delayed showApplet if (applet()->size().width() <= 0) - applet()->setSize (tqsizeHint()); + applet()->setSize (sizeHint()); showApplet(); } } diff --git a/khtml/java/kjavaappletwidget.h b/khtml/java/kjavaappletwidget.h index f69ee59aa..18f5be341 100644 --- a/khtml/java/kjavaappletwidget.h +++ b/khtml/java/kjavaappletwidget.h @@ -96,7 +96,7 @@ public: */ void showApplet(); - TQSize tqsizeHint() const; + TQSize sizeHint() const; void resize( int, int ); protected slots: diff --git a/khtml/java/kjavadownloader.h b/khtml/java/kjavadownloader.h index f9514304c..d3cf0de41 100644 --- a/khtml/java/kjavadownloader.h +++ b/khtml/java/kjavadownloader.h @@ -40,7 +40,7 @@ namespace KIO { class KJavaDownloaderPrivate; class KJavaUploaderPrivate; -class KJavaKIOJob : public TQObject +class KJavaKIOJob : public QObject { Q_OBJECT public: diff --git a/khtml/java/kjavaprocess.cpp b/khtml/java/kjavaprocess.cpp index 1a04daa71..1c9f1b346 100644 --- a/khtml/java/kjavaprocess.cpp +++ b/khtml/java/kjavaprocess.cpp @@ -282,7 +282,7 @@ bool KJavaProcess::invokeJVM() //load the extra user-defined arguments if( !d->extraArgs.isEmpty() ) { - // BUG HERE: if an argument tqcontains space (-Dname="My name") + // BUG HERE: if an argument contains space (-Dname="My name") // this parsing will fail. Need more sophisticated parsing -- use KShell? const TQStringList args = TQStringList::split( " ", d->extraArgs ); TQStringList::ConstIterator it = args.begin(); @@ -300,7 +300,7 @@ bool KJavaProcess::invokeJVM() TQString argStr; TQTextOStream stream( &argStr ); const TQValueList args = javaProcess->args(); - tqCopy( args.begin(), args.end(), TQTextOStreamIterator( stream, " " ) ); + qCopy( args.begin(), args.end(), TQTextOStreamIterator( stream, " " ) ); kdDebug(6100) << argStr << endl; KProcess::Communication flags = (KProcess::Communication) diff --git a/khtml/java/kjavaprocess.h b/khtml/java/kjavaprocess.h index 9d2f93424..3e877685a 100644 --- a/khtml/java/kjavaprocess.h +++ b/khtml/java/kjavaprocess.h @@ -39,7 +39,7 @@ */ class KJavaProcessPrivate; -class KJavaProcess : public KProcess //TQObject +class KJavaProcess : public KProcess //QObject { Q_OBJECT @@ -125,7 +125,7 @@ public: protected slots: /** * This slot is called whenever something is written to stdin of the process. - * It's called again to make sure we keep emptying out the buffer that tqcontains + * It's called again to make sure we keep emptying out the buffer that contains * the messages we need send. */ void slotWroteData(); diff --git a/khtml/java/kxeventutil.cpp b/khtml/java/kxeventutil.cpp index 01c65e2c5..9afa5a5ac 100644 --- a/khtml/java/kxeventutil.cpp +++ b/khtml/java/kxeventutil.cpp @@ -248,7 +248,7 @@ TQString KXEventUtil::getXConfigureEventInfo(XEvent *xevent) { TQString KXEventUtil::getXConfigureRequestEventInfo(XEvent *xevent) { XConfigureRequestEvent *e = &xevent->xconfigurerequest; - unsigned vm = e->value_tqmask; + unsigned vm = e->value_mask; TQStringList vml; if (vm & CWX) vml.append("CWX"); if (vm & CWY) vml.append("CWY"); @@ -258,7 +258,7 @@ TQString KXEventUtil::getXConfigureRequestEventInfo(XEvent *xevent) { if (vm & CWSibling) vml.append("CWSibling"); if (vm & CWStackMode) vml.append("CWStackMode"); TQString vms = vml.join("|"); - TQString s("window=%1 x=%2 y=%2 width=%3 height=%4 border_width=%5 above=%6 detail=%7 value_tqmask=0x%8=%9"); + TQString s("window=%1 x=%2 y=%2 width=%3 height=%4 border_width=%5 above=%6 detail=%7 value_mask=0x%8=%9"); return s.arg(e->window) .arg(e->x).arg(e->y) @@ -266,7 +266,7 @@ TQString KXEventUtil::getXConfigureRequestEventInfo(XEvent *xevent) { .arg(e->border_width) .arg(e->above) .arg(e->detail) - .arg(e->value_tqmask, 0, 16) + .arg(e->value_mask, 0, 16) .arg(vms); } TQString KXEventUtil::getX11EventInfo( XEvent* e ) diff --git a/khtml/java/make-jar b/khtml/java/make-jar index 2bfe62cbe..a817ec1f3 100755 --- a/khtml/java/make-jar +++ b/khtml/java/make-jar @@ -7,6 +7,6 @@ rm -rf java-build-dir/* mkdir -p java-build-dir/images cp images/*.gif images/*.png java-build-dir/images/ pwd=`pwd`; -javac -d java-build-dir -deprecation -target 1.2 `tqfind org/kde netscape -name '*.java'` \ - && cd java-build-dir && jar c0vf $pwd/kjava.jar images `tqfind org/kde netscape -name *.class` +javac -d java-build-dir -deprecation -target 1.2 `find org/kde netscape -name '*.java'` \ + && cd java-build-dir && jar c0vf $pwd/kjava.jar images `find org/kde netscape -name *.class` diff --git a/khtml/java/org/kde/kjas/server/KJASAppletClassLoader.java b/khtml/java/org/kde/kjas/server/KJASAppletClassLoader.java index 1c7beb833..c6defa848 100644 --- a/khtml/java/org/kde/kjas/server/KJASAppletClassLoader.java +++ b/khtml/java/org/kde/kjas/server/KJASAppletClassLoader.java @@ -109,7 +109,7 @@ public final class KJASAppletClassLoader if (security != null) { security.checkCreateClassLoader(); } - if( loaders.tqcontainsKey( key ) ) + if( loaders.containsKey( key ) ) return (KJASAppletClassLoader) loaders.get( key ); return null; @@ -149,17 +149,17 @@ public final class KJASAppletClassLoader super.addURL(url); } - public void addtqStatusListener(tqStatusListener lsnr) { + public void addStatusListener(StatusListener lsnr) { statusListeners.add(lsnr); } - public void removetqStatusListener(tqStatusListener lsnr) { + public void removeStatusListener(StatusListener lsnr) { statusListeners.remove(lsnr); } - public void showtqStatus(String msg) { + public void showStatus(String msg) { Enumeration en = statusListeners.elements(); while (en.hasMoreElements()) { - tqStatusListener lsnr = (tqStatusListener)en.nextElement(); - lsnr.showtqStatus(msg); + StatusListener lsnr = (StatusListener)en.nextElement(); + lsnr.showStatus(msg); } } @@ -202,7 +202,7 @@ public final class KJASAppletClassLoader void addArchiveName( String jarname ) { - if( !archives.tqcontains( jarname ) ) + if( !archives.contains( jarname ) ) { archives.add( jarname ); } @@ -225,19 +225,19 @@ public final class KJASAppletClassLoader /*************************************************************************** **** Class Loading Methods **************************************************************************/ - public synchronized Class tqfindClass( String name ) throws ClassNotFoundException + public synchronized Class findClass( String name ) throws ClassNotFoundException { Class rval = null; //check the loaded classes - rval = tqfindLoadedClass( name ); + rval = findLoadedClass( name ); if( rval == null ) { try { - rval = super.tqfindClass(name); + rval = super.findClass(name); } catch (ClassFormatError cfe) { Main.debug(name + ": Catched " + cfe + ". Trying to repair..."); rval = loadFixedClass( name ); } catch (Exception ex) { - Main.debug("tqfindClass " + name + " " + ex.getMessage()); + Main.debug("findClass " + name + " " + ex.getMessage()); } } if (rval == null) { @@ -256,7 +256,7 @@ public final class KJASAppletClassLoader private Hashtable loadedClasses = new Hashtable(); private synchronized final Class loadFixedClass(String name) throws ClassNotFoundException { - final String fileName = name.tqreplace('.', '/') + ".class"; + final String fileName = name.replace('.', '/') + ".class"; try { // try to get the class as resource final URL u = getResource(fileName); @@ -316,7 +316,7 @@ public final class KJASAppletClassLoader } } catch (Throwable e) { } - showtqStatus("Loading: " + displayName); + showStatus("Loading: " + displayName); URL url = super.findResource( name ); Main.debug("findResource for " + name + " returns " + url); return url; diff --git a/khtml/java/org/kde/kjas/server/KJASAppletContext.java b/khtml/java/org/kde/kjas/server/KJASAppletContext.java index bb8b0f156..f868b7b64 100644 --- a/khtml/java/org/kde/kjas/server/KJASAppletContext.java +++ b/khtml/java/org/kde/kjas/server/KJASAppletContext.java @@ -104,7 +104,7 @@ public class KJASAppletContext implements AppletContext //do kludges to support mess with parameter table and //the applet variables String key = new String( "ARCHIVE" ); - if (params.tqcontainsKey(key)) { + if (params.containsKey(key)) { String param_archive = (String)params.get(key); if (archives == null) { // There is no 'archive' attribute @@ -128,7 +128,7 @@ public class KJASAppletContext implements AppletContext if( codeBase == null ) { key = new String( "CODEBASE" ); - if( params.tqcontainsKey( key ) ) + if( params.containsKey( key ) ) codeBase = (String) params.get( key ); } @@ -325,26 +325,26 @@ public class KJASAppletContext implements AppletContext //check with the Web Server String str_url = url.toString(); Main.debug( "getImage, url = " + str_url ); - if (Main.cacheImages && images.tqcontainsKey(str_url)) { + if (Main.cacheImages && images.containsKey(str_url)) { Main.debug("Cached: url=" + str_url); } else { if (Main.cacheImages) { - if (!pendingImages.tqcontains(str_url)) { + if (!pendingImages.contains(str_url)) { Main.protocol.sendGetURLDataCmd( myID, str_url ); pendingImages.add(str_url); } } else { Main.protocol.sendGetURLDataCmd( myID, str_url ); } - while( !images.tqcontainsKey( str_url ) && active ) + while( !images.containsKey( str_url ) && active ) { try { Thread.sleep( 200 ); } catch( InterruptedException e ){} } } - if( images.tqcontainsKey( str_url ) ) + if( images.containsKey( str_url ) ) { byte[] data = (byte[]) images.get( str_url ); if( data.length > 0 ) @@ -378,11 +378,11 @@ public class KJASAppletContext implements AppletContext } } - public void showtqStatus( String message ) + public void showStatus( String message ) { if( active && (message != null) ) { - Main.protocol.sendShowtqStatusCmd( myID, message ); + Main.protocol.sendShowStatusCmd( myID, message ); } } public boolean evaluateJavaScript(String script, String appletID, JSObject jso) { diff --git a/khtml/java/org/kde/kjas/server/KJASAppletPanel.java b/khtml/java/org/kde/kjas/server/KJASAppletPanel.java index ba779d107..d7acbdaf9 100644 --- a/khtml/java/org/kde/kjas/server/KJASAppletPanel.java +++ b/khtml/java/org/kde/kjas/server/KJASAppletPanel.java @@ -17,7 +17,7 @@ import java.net.URL; * A panel which embeds the applet and shows some * information during class loading. */ -public class KJASAppletPanel extends javax.swing.JPanel implements tqStatusListener { +public class KJASAppletPanel extends javax.swing.JPanel implements StatusListener { private final static int LOADING = 1; private final static int RUNNING = 2; private final static int FAILED = 3; @@ -45,10 +45,10 @@ public class KJASAppletPanel extends javax.swing.JPanel implements tqStatusListe validate(); } - public void showtqStatus(String msg) { + public void showStatus(String msg) { this.msg = msg; if (status != RUNNING) - tqrepaint(); + repaint(); } public void paint(Graphics g) { @@ -88,12 +88,12 @@ public class KJASAppletPanel extends javax.swing.JPanel implements tqStatusListe fail_img = getToolkit().createImage(url); status = FAILED; msg = "Applet Failed."; - tqrepaint(); + repaint(); } void showFailed(String message) { showFailed(); - showtqStatus(message); + showStatus(message); } public void stopAnimation() { diff --git a/khtml/java/org/kde/kjas/server/KJASAppletStub.java b/khtml/java/org/kde/kjas/server/KJASAppletStub.java index c84013e7c..e090183d7 100644 --- a/khtml/java/org/kde/kjas/server/KJASAppletStub.java +++ b/khtml/java/org/kde/kjas/server/KJASAppletStub.java @@ -194,7 +194,7 @@ public final class KJASAppletStub else app.setBounds( 0, 0, panel.getSize().width, panel.getSize().height ); app.init(); - loader.removetqStatusListener(panel); + loader.removeStatusListener(panel); // stop the loading... animation panel.stopAnimation(); app.setVisible(true); @@ -203,7 +203,7 @@ public final class KJASAppletStub active = true; app.start(); frame.validate(); - app.tqrepaint(); + app.repaint(); break; case STOPPED: active = false; @@ -290,7 +290,7 @@ public final class KJASAppletStub docBase = _docBase; active = false; appletName = _appletName; - className = _className.tqreplace( '/', '.' ); + className = _className.replace( '/', '.' ); appletSize = _appletSize; params = _params; windowName = _windowName; @@ -305,7 +305,7 @@ public final class KJASAppletStub { fixedClassName = _className.substring(0, _className.length()-5); } - className = fixedClassName.tqreplace('/', '.'); + className = fixedClassName.replace('/', '.'); appletClass = null; me = this; @@ -321,7 +321,7 @@ public final class KJASAppletStub } private void setFailed(String why) { - loader.removetqStatusListener(panel); + loader.removeStatusListener(panel); panel.stopAnimation(); panel.showFailed(); Main.protocol.sendAppletFailed(context.getID(), appletID, why); @@ -358,7 +358,7 @@ public final class KJASAppletStub else frame.setBounds( 0, 0, 50, 50 ); frame.setVisible(true); - loader.addtqStatusListener(panel); + loader.addStatusListener(panel); runThread = new RunThread(); runThread.start(); } @@ -520,7 +520,7 @@ public final class KJASAppletStub } return ret; } - private Method tqfindMethod(Class c, String name, Class [] argcls) { + private Method findMethod(Class c, String name, Class [] argcls) { try { Method[] methods = c.getMethods(); for (int i = 0; i < methods.length; i++) { @@ -719,8 +719,8 @@ public final class KJASAppletStub String type; Class [] argcls = new Class[args.size()]; for (int i = 0; i < args.size(); i++) - argcls[i] = name.getClass(); // String for now, will be updated by tqfindMethod - Method m = tqfindMethod(c, (String) name, argcls); + argcls[i] = name.getClass(); // String for now, will be updated by findMethod + Method m = findMethod(c, (String) name, argcls); Main.debug("Found Method: " + m); if (m != null) { Object [] argobj = new Object[args.size()]; diff --git a/khtml/java/org/kde/kjas/server/KJASProtocolHandler.java b/khtml/java/org/kde/kjas/server/KJASProtocolHandler.java index ac79770a0..f8b50a91d 100644 --- a/khtml/java/org/kde/kjas/server/KJASProtocolHandler.java +++ b/khtml/java/org/kde/kjas/server/KJASProtocolHandler.java @@ -22,7 +22,7 @@ public class KJASProtocolHandler private static final int InitAppletCode = 7; private static final int ShowDocumentCode = 8; private static final int ShowURLInFrameCode = 9; - private static final int ShowtqStatusCode = 10; + private static final int ShowStatusCode = 10; private static final int ResizeAppletCode = 11; private static final int GetURLDataCode = 12; private static final int URLDataCode = 13; @@ -586,9 +586,9 @@ public class KJASProtocolHandler signals.write( bytes, 0, bytes.length ); } - public void sendShowtqStatusCmd( String contextID, String msg ) + public void sendShowStatusCmd( String contextID, String msg ) { - Main.debug( "sendShowtqStatusCmd, contextID = " + contextID + " msg = " + msg ); + Main.debug( "sendShowStatusCmd, contextID = " + contextID + " msg = " + msg ); byte [] msg_bytes = msg.getBytes(); int length = contextID.length() + msg_bytes.length + 4; @@ -598,7 +598,7 @@ public class KJASProtocolHandler byte [] tmp_bytes = getPaddedLengthBytes( length ); System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); index += tmp_bytes.length; - bytes[index++] = (byte) ShowtqStatusCode; + bytes[index++] = (byte) ShowStatusCode; bytes[index++] = sep; tmp_bytes = contextID.getBytes(); diff --git a/khtml/java/org/kde/kjas/server/KJASSecurityManager.java b/khtml/java/org/kde/kjas/server/KJASSecurityManager.java index ec5d69710..0525bba0c 100644 --- a/khtml/java/org/kde/kjas/server/KJASSecurityManager.java +++ b/khtml/java/org/kde/kjas/server/KJASSecurityManager.java @@ -82,9 +82,9 @@ public class KJASSecurityManager extends SecurityManager Main.debug("Certificates " + signers.size() + " for " + perm); // Check granted/denied permission - if ( grantAllPermissions.tqcontains(signers) ) + if ( grantAllPermissions.contains(signers) ) return; - if ( rejectAllPermissions.tqcontains(signers) ) + if ( rejectAllPermissions.contains(signers) ) throw se; Permissions permissions = (Permissions) grantedPermissions.get(signers); if (permissions != null && permissions.implies(perm)) @@ -168,7 +168,7 @@ public class KJASSecurityManager extends SecurityManager // try to cast ... KJASAppletClassLoader loader = (KJASAppletClassLoader)contextClassLoader; // ok. cast succeeded. Now get the codebase of the loader - // because it tqcontains the host name + // because it contains the host name URL codebase = loader.getCodeBase(); URL docbase = loader.getDocBase(); Main.debug("* Class Loader docbase=" + docbase + " codebase=" + codebase); diff --git a/khtml/java/org/kde/kjas/server/StatusListener.java b/khtml/java/org/kde/kjas/server/StatusListener.java index a4f133ab1..be17c2b29 100644 --- a/khtml/java/org/kde/kjas/server/StatusListener.java +++ b/khtml/java/org/kde/kjas/server/StatusListener.java @@ -1,5 +1,5 @@ package org.kde.kjas.server; -public interface tqStatusListener { - public void showtqStatus(String message); +public interface StatusListener { + public void showStatus(String message); } \ No newline at end of file diff --git a/khtml/java/tests/badapplets/BadApplet.java b/khtml/java/tests/badapplets/BadApplet.java index 7d3275325..c8217d256 100644 --- a/khtml/java/tests/badapplets/BadApplet.java +++ b/khtml/java/tests/badapplets/BadApplet.java @@ -67,7 +67,7 @@ public class BadApplet extends JApplet { } }); - //do tqlayout *********************************************************** + //do layout *********************************************************** getContentPane().setLayout( new BorderLayout() ); FileSystemTests.setLayout( new FlowLayout( FlowLayout.LEFT ) ); -- cgit v1.2.1