diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
commit | 560378aaca1784ba19806a0414a32b20c744de39 (patch) | |
tree | ce0dfd7c3febf2a1adc7603d1019a8be2083c415 /khtml/java/org | |
parent | d4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff) | |
download | tdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip |
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khtml/java/org')
7 files changed, 44 insertions, 44 deletions
diff --git a/khtml/java/org/kde/kjas/server/KJASAppletClassLoader.java b/khtml/java/org/kde/kjas/server/KJASAppletClassLoader.java index c6defa848..1c7beb833 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.containsKey( key ) ) + if( loaders.tqcontainsKey( key ) ) return (KJASAppletClassLoader) loaders.get( key ); return null; @@ -149,17 +149,17 @@ public final class KJASAppletClassLoader super.addURL(url); } - public void addStatusListener(StatusListener lsnr) { + public void addtqStatusListener(tqStatusListener lsnr) { statusListeners.add(lsnr); } - public void removeStatusListener(StatusListener lsnr) { + public void removetqStatusListener(tqStatusListener lsnr) { statusListeners.remove(lsnr); } - public void showStatus(String msg) { + public void showtqStatus(String msg) { Enumeration en = statusListeners.elements(); while (en.hasMoreElements()) { - StatusListener lsnr = (StatusListener)en.nextElement(); - lsnr.showStatus(msg); + tqStatusListener lsnr = (tqStatusListener)en.nextElement(); + lsnr.showtqStatus(msg); } } @@ -202,7 +202,7 @@ public final class KJASAppletClassLoader void addArchiveName( String jarname ) { - if( !archives.contains( jarname ) ) + if( !archives.tqcontains( jarname ) ) { archives.add( jarname ); } @@ -225,19 +225,19 @@ public final class KJASAppletClassLoader /*************************************************************************** **** Class Loading Methods **************************************************************************/ - public synchronized Class findClass( String name ) throws ClassNotFoundException + public synchronized Class tqfindClass( String name ) throws ClassNotFoundException { Class rval = null; //check the loaded classes - rval = findLoadedClass( name ); + rval = tqfindLoadedClass( name ); if( rval == null ) { try { - rval = super.findClass(name); + rval = super.tqfindClass(name); } catch (ClassFormatError cfe) { Main.debug(name + ": Catched " + cfe + ". Trying to repair..."); rval = loadFixedClass( name ); } catch (Exception ex) { - Main.debug("findClass " + name + " " + ex.getMessage()); + Main.debug("tqfindClass " + 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.replace('.', '/') + ".class"; + final String fileName = name.tqreplace('.', '/') + ".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) { } - showStatus("Loading: " + displayName); + showtqStatus("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 f868b7b64..bb8b0f156 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.containsKey(key)) { + if (params.tqcontainsKey(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.containsKey( key ) ) + if( params.tqcontainsKey( 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.containsKey(str_url)) { + if (Main.cacheImages && images.tqcontainsKey(str_url)) { Main.debug("Cached: url=" + str_url); } else { if (Main.cacheImages) { - if (!pendingImages.contains(str_url)) { + if (!pendingImages.tqcontains(str_url)) { Main.protocol.sendGetURLDataCmd( myID, str_url ); pendingImages.add(str_url); } } else { Main.protocol.sendGetURLDataCmd( myID, str_url ); } - while( !images.containsKey( str_url ) && active ) + while( !images.tqcontainsKey( str_url ) && active ) { try { Thread.sleep( 200 ); } catch( InterruptedException e ){} } } - if( images.containsKey( str_url ) ) + if( images.tqcontainsKey( str_url ) ) { byte[] data = (byte[]) images.get( str_url ); if( data.length > 0 ) @@ -378,11 +378,11 @@ public class KJASAppletContext implements AppletContext } } - public void showStatus( String message ) + public void showtqStatus( String message ) { if( active && (message != null) ) { - Main.protocol.sendShowStatusCmd( myID, message ); + Main.protocol.sendShowtqStatusCmd( 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 d7acbdaf9..ba779d107 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 StatusListener { +public class KJASAppletPanel extends javax.swing.JPanel implements tqStatusListener { 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 StatusListene validate(); } - public void showStatus(String msg) { + public void showtqStatus(String msg) { this.msg = msg; if (status != RUNNING) - repaint(); + tqrepaint(); } public void paint(Graphics g) { @@ -88,12 +88,12 @@ public class KJASAppletPanel extends javax.swing.JPanel implements StatusListene fail_img = getToolkit().createImage(url); status = FAILED; msg = "Applet Failed."; - repaint(); + tqrepaint(); } void showFailed(String message) { showFailed(); - showStatus(message); + showtqStatus(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 e090183d7..c84013e7c 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.removeStatusListener(panel); + loader.removetqStatusListener(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.repaint(); + app.tqrepaint(); break; case STOPPED: active = false; @@ -290,7 +290,7 @@ public final class KJASAppletStub docBase = _docBase; active = false; appletName = _appletName; - className = _className.replace( '/', '.' ); + className = _className.tqreplace( '/', '.' ); appletSize = _appletSize; params = _params; windowName = _windowName; @@ -305,7 +305,7 @@ public final class KJASAppletStub { fixedClassName = _className.substring(0, _className.length()-5); } - className = fixedClassName.replace('/', '.'); + className = fixedClassName.tqreplace('/', '.'); appletClass = null; me = this; @@ -321,7 +321,7 @@ public final class KJASAppletStub } private void setFailed(String why) { - loader.removeStatusListener(panel); + loader.removetqStatusListener(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.addStatusListener(panel); + loader.addtqStatusListener(panel); runThread = new RunThread(); runThread.start(); } @@ -520,7 +520,7 @@ public final class KJASAppletStub } return ret; } - private Method findMethod(Class c, String name, Class [] argcls) { + private Method tqfindMethod(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 findMethod - Method m = findMethod(c, (String) name, argcls); + argcls[i] = name.getClass(); // String for now, will be updated by tqfindMethod + Method m = tqfindMethod(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 f8b50a91d..ac79770a0 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 ShowStatusCode = 10; + private static final int ShowtqStatusCode = 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 sendShowStatusCmd( String contextID, String msg ) + public void sendShowtqStatusCmd( String contextID, String msg ) { - Main.debug( "sendShowStatusCmd, contextID = " + contextID + " msg = " + msg ); + Main.debug( "sendShowtqStatusCmd, 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) ShowStatusCode; + bytes[index++] = (byte) ShowtqStatusCode; 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 0525bba0c..ec5d69710 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.contains(signers) ) + if ( grantAllPermissions.tqcontains(signers) ) return; - if ( rejectAllPermissions.contains(signers) ) + if ( rejectAllPermissions.tqcontains(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 contains the host name + // because it tqcontains 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 be17c2b29..a4f133ab1 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 StatusListener { - public void showStatus(String message); +public interface tqStatusListener { + public void showtqStatus(String message); }
\ No newline at end of file |