diff options
Diffstat (limited to 'kalyptus')
-rw-r--r-- | kalyptus/ChangeLog | 2 | ||||
-rw-r--r-- | kalyptus/kalyptus | 48 | ||||
-rw-r--r-- | kalyptus/kalyptusCxxToCSharp.pm | 4 | ||||
-rw-r--r-- | kalyptus/kalyptusCxxToJNI.pm | 38 | ||||
-rw-r--r-- | kalyptus/kalyptusCxxToJava.pm | 24 | ||||
-rw-r--r-- | kalyptus/kalyptusCxxToKimono.pm | 25 | ||||
-rw-r--r-- | kalyptus/kalyptusCxxToSmoke.pm | 13 | ||||
-rw-r--r-- | kalyptus/kalyptusDataDict.pm | 18 |
8 files changed, 72 insertions, 100 deletions
diff --git a/kalyptus/ChangeLog b/kalyptus/ChangeLog index f1729b0d..73c69c35 100644 --- a/kalyptus/ChangeLog +++ b/kalyptus/ChangeLog @@ -119,7 +119,7 @@ 2004-05-25 Richard Dale <Richard_Dale@tipitina.demon.co.uk> - * Added the correct macro expansion for Q_OBJECT with Qt/E 2.3.x + * Added the correct macro expansion for TQ_OBJECT with Qt/E 2.3.x * kalyptus can now generate the SMOKE library for Qt Embedded 2004-05-22 Richard Dale <Richard_Dale@tipitina.demon.co.uk> diff --git a/kalyptus/kalyptus b/kalyptus/kalyptus index a132a0bd..e95873ba 100644 --- a/kalyptus/kalyptus +++ b/kalyptus/kalyptus @@ -131,10 +131,9 @@ $allowed_k_dcop_accesors_re = join("|", @allowed_k_dcop_accesors); _STYLE_PLATINUM => '', _STYLE_SGI => '', _STYLE_WINDOWS => '', - QT_STATIC_CONST => 'static const', - Q_EXPORT => '', - Q_EXPORT_CODECS_BIG5 => '', - Q_REFCOUNT => '', + TQ_EXPORT => '', + TQ_EXPORT_CODECS_BIG5 => '', + TQ_REFCOUNT => '', TQM_EXPORT_CANVAS => '', TQM_EXPORT_DNS => '', TQM_EXPORT_ICONVIEW => '', @@ -143,11 +142,11 @@ $allowed_k_dcop_accesors_re = join("|", @allowed_k_dcop_accesors); TQM_EXPORT_WORKSPACE => '', TQT_NO_REMOTE => 'TQT_NO_REMOTE', QT_ACCESSIBILITY_SUPPORT => 'QT_ACCESSIBILITY_SUPPORT', - Q_WS_X11 => 'Q_WS_X11', + TQ_WS_X11 => 'TQ_WS_X11', TQ_DISABLE_COPY => 'TQ_DISABLE_COPY', - Q_WS_QWS => 'undef', - Q_WS_MAC => 'undef', - Q_OBJECT => <<'CODE', + TQ_WS_QWS => 'undef', + TQ_WS_MAC => 'undef', + TQ_OBJECT => <<'CODE', public: virtual TQMetaObject *metaObject() const; virtual const char *className() const; @@ -376,7 +375,7 @@ sub parseFiles || croak "Can't preprocess $currentfile"; } else { - open( INPUT, "tqt-replace-stream $currentfile |" ) + open( INPUT, "$currentfile" ) || croak "Can't read from $currentfile"; } @@ -468,7 +467,7 @@ sub readSourceLine =head2 readCxxLine Reads a C++ source line, skipping comments, blank lines, - preprocessor tokens and the Q_OBJECT macro + preprocessor tokens and the TQ_OBJECT macro =cut @@ -496,7 +495,7 @@ LOOP: } } - if ( $p =~ /^\s*Q_OBJECT/ ) { + if ( $p =~ /^\s*TQ_OBJECT/ ) { if ($qt_embedded) { push @inputqueue, @qte_codeqobject; } elsif ($qt4) { @@ -508,14 +507,12 @@ LOOP: } # Hack, waiting for real handling of preprocessor defines $p =~ s/QT_MODULE\(\w+\)//; - $p =~ s/QT_STATIC_CONST/static const/; $p =~ s/QT_WEAK_SYMBOL//; $p =~ s/QT_MOC_COMPAT//; - $p =~ s/Q_EXPORT_CODECS_BIG5//; + $p =~ s/TQ_EXPORT_CODECS_BIG5//; $p =~ s/QT_COMPAT / /; $p =~ s/TQ_DISABLE_COPY\((\w+)\)/$1(const $1 &);\n$1 &operator=(const $1 &);/; $p =~ s/TQWIDGETSIZE_MAX/32767/; # Qt/E uses this #define as an enum value - yuck! - $p =~ s/Q_SIGNALS/signals/; $p =~ s/ASYNC/void/; $p =~ s/[A-Z_]*_EXPORT_DEPRECATED//; $p =~ s/[A-Z_]*_EXPORT\s/ /; @@ -545,7 +542,7 @@ LOOP: next if ( $p =~ /^\s*$/s ); # blank lines -# || $p =~ /^\s*Q_OBJECT/ # TQObject macro +# || $p =~ /^\s*TQ_OBJECT/ # TQObject macro # ); # @@ -558,7 +555,7 @@ LOOP: || $p =~ /^\s*Q_GADGET/ || $p =~ /^\s*TQ_OVERRIDE/ # and TQ_OVERRIDE || $p =~ /^\s*TQ_SETS/ - || $p =~ /^\s*Q_DUMMY_COMPARISON_OPERATOR/ + || $p =~ /^\s*TQ_DUMMY_COMPARISON_OPERATOR/ || $p =~ /^\s*K_SYCOCATYPE/ # and K_SYCOCA stuff || $p =~ /^\s*K_SYCOCAFACTORY/ # || $p =~ /^\s*KSVG_/ # and KSVG stuff ;) @@ -589,13 +586,13 @@ LOOP: else { # Skip platform-specific stuff, or #if 0 stuff # or #else of something we parsed (e.g. for TQKeySequence) - if ( $p =~ m/^#\s*ifdef\s*Q_WS_/ or - $p =~ m/^#\s*if\s+defined\(Q_WS_/ or + if ( $p =~ m/^#\s*ifdef\s*TQ_WS_/ or + $p =~ m/^#\s*if\s+defined\(TQ_WS_/ or ($p =~ m/^#\s*ifdef\s+_WS_QWS_/ and $qt_embedded) or ($p =~ m/^#\s*ifndef\s+TQT_NO_MIMECLIPBOARD/ and $qt_embedded) or ($p =~ m/^#\s*if\s+defined\(_WS_X11_/ and $qt_embedded) or - ($p =~ m/^#\s*if\s+defined\(Q_WS_X11_/ and $qt_embedded) or - ($p =~ m/^#\s*if\s+defined\(Q_WS_WIN_/ and $qt_embedded) or + ($p =~ m/^#\s*if\s+defined\(TQ_WS_X11_/ and $qt_embedded) or + ($p =~ m/^#\s*if\s+defined\(TQ_WS_WIN_/ and $qt_embedded) or ($p =~ m/^#\s*if\s+defined\(_WS_MAC_/ and $qt_embedded) or ($p =~ m/^#\s*if\s+defined\(Q_INCOMPATIBLE_3_0_ADDONS/ and $qt_embedded) or $p =~ m/^#\s*ifndef\s+TQT_NO_STL/ or @@ -803,7 +800,7 @@ sub identifyDecl my $skipBlock = 0; my $isDeprecated = 0; - if ( $decl =~ s/KDE_DEPRECATED// ) { + if ( $decl =~ s/TDE_DEPRECATED// ) { $isDeprecated = 1; } # Doc comment @@ -877,7 +874,7 @@ sub identifyDecl (?:\s*TQ[A-Z_]*EXPORT[A-Z_]*)? (?:\s*Q[A-Z_]*EXPORT[A-Z_]*)? (?:\s*TQ_PACKED)? - (?:\s*Q_REFCOUNT)? + (?:\s*TQ_REFCOUNT)? \s+([\w_]+ # 3 name (?:<[\w_ :,]+?>)? # maybe explicit template # (eat chars between <> non-hungry) @@ -955,7 +952,10 @@ sub identifyDecl \( (.*?) \) # parameters \s*((?:const)?)\s* (?:throw\s*\(.*?\))? - \s*((?:=\s*0(?:L?))?)\s* # Pureness. is "0L" allowed? + \s*((?:=\s*(?: + 0(?:L?)| # Pureness. is "0L" allowed? + default # Default method + ))?) \s*[;{]+/xs ) { # rest my $tpn = $1; # type + name @@ -967,7 +967,7 @@ sub identifyDecl } my $const = $3 eq "" ? 0 : 1; - my $pure = $4 eq "" ? 0 : 1; + my $pure = $4 eq "" ? 0 : ($4 =~ "default" ? 0 : 1); $tpn =~ s/\s+/ /g; $tpn =~ s/operator\s+([^\w])/operator$1/g; $params =~ s/\s+/ /g; diff --git a/kalyptus/kalyptusCxxToCSharp.pm b/kalyptus/kalyptusCxxToCSharp.pm index 6c8ce4cb..d077fb59 100644 --- a/kalyptus/kalyptusCxxToCSharp.pm +++ b/kalyptus/kalyptusCxxToCSharp.pm @@ -117,7 +117,7 @@ sub cplusplusToCSharp return "IntPtr"; } elsif ( $cplusplusType =~ /^TQUuid/ ) { return "IntPtr"; - } elsif ( $cplusplusType =~ /^Q_REFCOUNT/ ) { + } elsif ( $cplusplusType =~ /^TQ_REFCOUNT/ ) { return "IntPtr"; } elsif ( $cplusplusType =~ /^EventRef/ ) { return "IntPtr"; @@ -223,7 +223,7 @@ sub cplusplusToPInvoke return "RawObject"; } elsif ( $cplusplusType =~ /^TQUuid/ ) { return "RawObject"; - } elsif ( $cplusplusType =~ /^Q_REFCOUNT/ ) { + } elsif ( $cplusplusType =~ /^TQ_REFCOUNT/ ) { return "RawObject"; } elsif ( $cplusplusType =~ /^EventRef/ ) { return "RawObject"; diff --git a/kalyptus/kalyptusCxxToJNI.pm b/kalyptus/kalyptusCxxToJNI.pm index 1b2ba385..6653fae0 100644 --- a/kalyptus/kalyptusCxxToJNI.pm +++ b/kalyptus/kalyptusCxxToJNI.pm @@ -439,7 +439,7 @@ EOF $qtExtras = <<EOF; /** This member allows a typecast of an instance which wraps a Qt instance, to a more specialized type. Invokes the private qtjava.dynamicCast() - via reflection, as that method isn't part of the public Qt api */ + via reflection, as that method isn't part of the public TQt api */ public static QtSupport dynamicCast(String type, QtSupport source) { Method method = null; @@ -447,7 +447,7 @@ EOF method = qtjava.class.getDeclaredMethod( "dynamicCast", new Class[] { String.class, QtSupport.class } ); } catch (NoSuchMethodException e1) { - Qt.tqWarning("No such method : qtjava.dynamicCast()"); + TQt.tqWarning("No such method : qtjava.dynamicCast()"); } try { @@ -455,10 +455,10 @@ EOF Object result = method.invoke(qtjava.class, new Object[] { type, source } ); return (QtSupport) result; } catch (InvocationTargetException e) { - Qt.tqWarning("Invocation failed : qtjava.dynamicCast()"); + TQt.tqWarning("Invocation failed : qtjava.dynamicCast()"); return null; } catch (IllegalAccessException e) { - Qt.tqWarning("Invocation failed : qtjava.dynamicCast()"); + TQt.tqWarning("Invocation failed : qtjava.dynamicCast()"); return null; } } @@ -536,12 +536,12 @@ EOF } /** Prepend a '2' to a signal string and remove any spaces */ - public static String SIGNAL(String signal) { + public static String TQ_SIGNAL(String signal) { return "2" + sqeezeOut(signal, ' '); } /** Prepend a '1' to a slot string and remove any spaces */ - public static String SLOT(String slot) { + public static String TQ_SLOT(String slot) { return "1" + sqeezeOut(slot, ' '); } @@ -1326,7 +1326,7 @@ JNIEXPORT jobject JNICALL Java_org_trinitydesktop_qt_QPointArray_at(JNIEnv * env, jobject obj, jint index) { TQPoint _p= ((TQPointArrayJBridge*) QtSupport::getQt(env, obj))->at((uint) index); - return (jobject) QtSupport::objectForQtKey(env, (void *)new TQPoint(_p.x(),_p.y()), "org.trinitydesktop.qt.TQPoint", TRUE); + return (jobject) QtSupport::objectForQtKey(env, (void *)new TQPoint(_p.x(),_p.y()), "org.trinitydesktop.qt.TQPoint", true); } EOF @@ -1698,7 +1698,7 @@ static TQCString* _qstring__version = 0; } JNIEXPORT void JNICALL -Java_org_trinitydesktop_koala_TDECmdLineArgs_init___3Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Z(JNIEnv* env, jclass cls, jobjectArray args, jstring _appname, jstring programName, jstring _description, jstring _version, jboolean noKApp) +Java_org_trinitydesktop_koala_TDECmdLineArgs_init___3Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Z(JNIEnv* env, jclass cls, jobjectArray args, jstring _appname, jstring programName, jstring _description, jstring _version, jboolean noTDEApp) { (void) cls; static TQCString* _qstring__appname = 0; @@ -1706,7 +1706,7 @@ static TQCString* _qstring_programName = 0; static TQCString* _qstring__description = 0; static TQCString* _qstring__version = 0; int argc = (int) env->GetArrayLength(args); - TDECmdLineArgsJBridge::init(argc+1, (char**) QtSupport::toArgv(env, args), (const char*) QtSupport::toCharString(env, _appname, &_qstring__appname), (const char*) QtSupport::toCharString(env, programName, &_qstring_programName), (const char*) QtSupport::toCharString(env, _description, &_qstring__description), (const char*) QtSupport::toCharString(env, _version, &_qstring__version), (bool) noKApp); + TDECmdLineArgsJBridge::init(argc+1, (char**) QtSupport::toArgv(env, args), (const char*) QtSupport::toCharString(env, _appname, &_qstring__appname), (const char*) QtSupport::toCharString(env, programName, &_qstring_programName), (const char*) QtSupport::toCharString(env, _description, &_qstring__description), (const char*) QtSupport::toCharString(env, _version, &_qstring__version), (bool) noTDEApp); return; } @@ -1720,11 +1720,11 @@ Java_org_trinitydesktop_koala_TDECmdLineArgs_init___3Ljava_lang_String_2Lorg_tri } JNIEXPORT void JNICALL -Java_org_trinitydesktop_koala_TDECmdLineArgs_init___3Ljava_lang_String_2Lorg_trinitydesktop_koala_TDEAboutData_2Z(JNIEnv* env, jclass cls, jobjectArray args, jobject about, jboolean noKApp) +Java_org_trinitydesktop_koala_TDECmdLineArgs_init___3Ljava_lang_String_2Lorg_trinitydesktop_koala_TDEAboutData_2Z(JNIEnv* env, jclass cls, jobjectArray args, jobject about, jboolean noTDEApp) { (void) cls; int argc = (int) env->GetArrayLength(args); - TDECmdLineArgsJBridge::init(argc+1, (char**) QtSupport::toArgv(env, args), (const TDEAboutData*) QtSupport::getQt(env, about), (bool) noKApp); + TDECmdLineArgsJBridge::init(argc+1, (char**) QtSupport::toArgv(env, args), (const TDEAboutData*) QtSupport::getQt(env, about), (bool) noTDEApp); return; } @@ -2625,7 +2625,7 @@ sub preParseClass || ($name eq 'qt_cast') || ($name eq 'qt_property') || ($name eq 'staticMetaObject') - # Assume only Qt classes have tr() and trUtf8() in their Q_OBJECT macro + # Assume only Qt classes have tr() and trUtf8() in their TQ_OBJECT macro || ($classNode->{astNodeName} !~ /^Q/ and $name eq 'tr') || ($classNode->{astNodeName} !~ /^Q/ and $name eq 'trUtf8') || $name eq 'trUtf8' @@ -2886,7 +2886,7 @@ sub writeClassDoc # Special case these two classes as they have methods that use ArrayList added as 'extras' print CLASS "import java.util.ArrayList;\n"; } - print CLASS "import org.trinitydesktop.qt.Qt;\n"; + print CLASS "import org.trinitydesktop.qt.TQt;\n"; } if ( kalyptusDataDict::interfacemap($javaClassName) ne () ) { @@ -3914,7 +3914,7 @@ sub generateMethod($$$$$$$$$) $javaReturnType = "byte[]"; } elsif ($javaSignature eq "at()" and $javaClassName eq 'KFilterDev') { $javaReturnType = "long"; - } elsif ($javaSignature =~ /copyTo/ and $javaClassName eq "KDesktopFile" ) { + } elsif ($javaSignature =~ /copyTo/ and $javaClassName eq "TDEDesktopFile" ) { $altReturnType = "TDEConfig"; } @@ -4254,7 +4254,7 @@ sub generateAllMethods($$$$$$$$) if ($main::qt_embedded) { $jniCode .= "\n\tif (QtSupport::allocatedInJavaWorld(env, obj) && ((TQPopupMenu*)($className*)QtSupport::getQt(env, obj))->parentWidget() == 0) {\n"; } else { - $jniCode .= "\n\tif (QtSupport::allocatedInJavaWorld(env, obj) && ((TQPopupMenu*)($className*)QtSupport::getQt(env, obj))->parentWidget(FALSE) == 0) {\n"; + $jniCode .= "\n\tif (QtSupport::allocatedInJavaWorld(env, obj) && ((TQPopupMenu*)($className*)QtSupport::getQt(env, obj))->parentWidget(false) == 0) {\n"; } } elsif ( is_kindof($classNode, 'TQListViewItem') ) { $jniCode .= "\n\tif (QtSupport::allocatedInJavaWorld(env, obj) && ((TQListViewItem*)($className*)QtSupport::getQt(env, obj))->parent() == 0 && ((TQListViewItem*)($className*)QtSupport::getQt(env, obj))->listView() == 0) {\n"; @@ -4268,7 +4268,7 @@ sub generateAllMethods($$$$$$$$) if ($main::qt_embedded) { $jniCode .= "\n\tif (QtSupport::allocatedInJavaWorld(env, obj) && ((TQWidget*)($className*)QtSupport::getQt(env, obj))->parentWidget() == 0) {\n"; } else { - $jniCode .= "\n\tif (QtSupport::allocatedInJavaWorld(env, obj) && ((TQWidget*)($className*)QtSupport::getQt(env, obj))->parentWidget(TRUE) == 0) {\n"; + $jniCode .= "\n\tif (QtSupport::allocatedInJavaWorld(env, obj) && ((TQWidget*)($className*)QtSupport::getQt(env, obj))->parentWidget(true) == 0) {\n"; } } elsif ( $classNode->{astNodeName} =~ /^TQObject$/ || defined kdocAstUtil::findOverride( $rootnode, $classNode, "parent" ) ) { $jniCode .= "\n\tif (QtSupport::allocatedInJavaWorld(env, obj) && (($className*)QtSupport::getQt(env, obj))->parent() == 0) {\n"; @@ -5473,9 +5473,9 @@ sub printJavadocComment($$$$) $line =~ s/const char/String/g; $line =~ s/const (\w+)\&/$1/g; $line =~ s/bool/boolean/g; - $line =~ s/SLOT\(\s*([^\)]*)\) ?\)/SLOT("$1)")/g; - $line =~ s/SIGNAL\(\s*([^\)]*)\) ?\)/SIGNAL("$1)")/g; - $line =~ s/Q_OBJECT\n//g; + $line =~ s/TQ_SLOT\(\s*([^\)]*)\) ?\)/TQ_SLOT("$1)")/g; + $line =~ s/TQ_SIGNAL\(\s*([^\)]*)\) ?\)/TQ_SIGNAL("$1)")/g; + $line =~ s/TQ_OBJECT\n//g; $line =~ s/class\s+([\w]+)\s*:\s*public/public class $1 implements/g; $line =~ s/public\s*(slots)?:\n/public /g; $line =~ s/([^0-9"]\s*)\*(\s*[^0-9"-])/$1$2/g; diff --git a/kalyptus/kalyptusCxxToJava.pm b/kalyptus/kalyptusCxxToJava.pm index 59a5444d..4df92568 100644 --- a/kalyptus/kalyptusCxxToJava.pm +++ b/kalyptus/kalyptusCxxToJava.pm @@ -234,7 +234,7 @@ EOF $qtExtras = <<EOF; /** This member allows a typecast of an instance which wraps a Qt instance, to a more specialized type. Invokes the private qtjava.dynamicCast() - via reflection, as that method isn't part of the public Qt api */ + via reflection, as that method isn't part of the public TQt api */ public static QtSupport dynamicCast(String type, QtSupport source) { Method method = null; @@ -242,7 +242,7 @@ EOF method = qtjava.class.getDeclaredMethod( "dynamicCast", new Class[] { String.class, QtSupport.class } ); } catch (NoSuchMethodException e1) { - Qt.tqWarning("No such method : qtjava.dynamicCast()"); + TQt.tqWarning("No such method : qtjava.dynamicCast()"); } try { @@ -250,10 +250,10 @@ EOF Object result = method.invoke(qtjava.class, new Object[] { type, source } ); return (QtSupport) result; } catch (InvocationTargetException e) { - Qt.tqWarning("Invocation failed : qtjava.dynamicCast()"); + TQt.tqWarning("Invocation failed : qtjava.dynamicCast()"); return null; } catch (IllegalAccessException e) { - Qt.tqWarning("Invocation failed : qtjava.dynamicCast()"); + TQt.tqWarning("Invocation failed : qtjava.dynamicCast()"); return null; } } @@ -331,12 +331,12 @@ EOF } /** Prepend a '2' to a signal string and remove any spaces */ - public static String SIGNAL(String signal) { + public static String TQ_SIGNAL(String signal) { return "2" + sqeezeOut(signal, ' '); } /** Prepend a '1' to a slot string and remove any spaces */ - public static String SLOT(String slot) { + public static String TQ_SLOT(String slot) { return "1" + sqeezeOut(slot, ' '); } @@ -903,7 +903,7 @@ sub preParseClass || ($name eq 'qt_property') || ($name eq 'staticMetaObject') || ($classNode->{astNodeName} eq 'KTar' and $name eq 'writeFile_impl') - # Assume only Qt classes have tr() and trUtf8() in their Q_OBJECT macro + # Assume only Qt classes have tr() and trUtf8() in their TQ_OBJECT macro || ($classNode->{astNodeName} !~ /^Q/ and $name eq 'tr') || ($classNode->{astNodeName} !~ /^Q/ and $name eq 'trUtf8') || $m->{Deprecated} ) { @@ -1175,7 +1175,7 @@ sub writeClassDoc # Special case these two classes as they have methods that use ArrayList added as 'extras' print CLASS "import java.util.ArrayList;\n"; } - print CLASS "import org.trinitydesktop.qt.Qt;\n"; + print CLASS "import org.trinitydesktop.qt.TQt;\n"; } if ( kalyptusDataDict::interfacemap($javaClassName) ne () ) { @@ -1979,7 +1979,7 @@ sub generateMethod($$$$$$$) $javaReturnType = "byte[]"; } elsif ($javaSignature eq "at()" and $javaClassName eq 'KFilterDev') { $javaReturnType = "long"; - } elsif ($javaSignature =~ /copyTo/ and $javaClassName eq "KDesktopFile" ) { + } elsif ($javaSignature =~ /copyTo/ and $javaClassName eq "TDEDesktopFile" ) { $altReturnType = "TDEConfig"; } @@ -3315,9 +3315,9 @@ sub printJavadocComment($$$$) $line =~ s/const char/String/g; $line =~ s/const (\w+)\&/$1/g; $line =~ s/bool/boolean/g; - $line =~ s/SLOT\(\s*([^\)]*)\) ?\)/SLOT("$1)")/g; - $line =~ s/SIGNAL\(\s*([^\)]*)\) ?\)/SIGNAL("$1)")/g; - $line =~ s/Q_OBJECT\n//g; + $line =~ s/TQ_SLOT\(\s*([^\)]*)\) ?\)/TQ_SLOT("$1)")/g; + $line =~ s/TQ_SIGNAL\(\s*([^\)]*)\) ?\)/TQ_SIGNAL("$1)")/g; + $line =~ s/TQ_OBJECT\n//g; $line =~ s/class\s+([\w]+)\s*:\s*public/public class $1 implements/g; $line =~ s/public\s*(slots)?:\n/public /g; $line =~ s/([^0-9"]\s*)\*(\s*[^0-9"-])/$1$2/g; diff --git a/kalyptus/kalyptusCxxToKimono.pm b/kalyptus/kalyptusCxxToKimono.pm index 089cec92..69429eb0 100644 --- a/kalyptus/kalyptusCxxToKimono.pm +++ b/kalyptus/kalyptusCxxToKimono.pm @@ -82,10 +82,7 @@ BEGIN 'TQ_UINT64' => '$', 'TQ_INT64' => '$', 'TQ_LLONG' => '$', - 'tquint64' => '$', - 'qint64' => '$', 'long long' => '$', - 'qulonglong' => '$', ); # Yes some of this is in kalyptusDataDict's ctypemap @@ -147,21 +144,13 @@ BEGIN 'TQStyle::SCFlags' => 'int', 'TQStyle::SFlags' => 'int', 'TQ_INT16' => 'short', - 'qint16' => 'short', 'TQ_INT32' => 'int', - 'qint32' => 'int', - 'qint32&' => 'int&', 'TQ_INT8' => 'char', - 'qint8' => 'char', 'TQ_LONG' => 'long', 'TQ_UINT16' => 'ushort', - 'tquint16' => 'ushort', 'TQ_UINT32' => 'uint', - 'tquint32' => 'uint', 'TQ_UINT8' => 'uchar', - 'tquint8' => 'uchar', 'TQ_ULONG' => 'long', - 'qreal' => 'double', 'pid_t' => 'int', 'size_t' => 'int', 'pid_t' => 'int', @@ -397,11 +386,11 @@ EOF public static TQApplication tqApp = null; - public static string SIGNAL(string signal) { + public static string TQ_SIGNAL(string signal) { return "2"+ signal; } - public static string SLOT(string slot) { + public static string TQ_SLOT(string slot) { return "1" + slot; } EOF @@ -952,7 +941,7 @@ sub preParseClass || ($name eq 'type') || ($classNode->{astNodeName} eq 'KTar' and $name eq 'writeFile_impl') || ($classNode->{astNodeName} eq 'TQApplication' and $name eq 'TQApplication') - # Assume only Qt classes have tr() and trUtf8() in their Q_OBJECT macro + # Assume only Qt classes have tr() and trUtf8() in their TQ_OBJECT macro || ($classNode->{astNodeName} !~ /^Q/ and $name eq 'tr') || ($classNode->{astNodeName} !~ /^Q/ and $name eq 'trUtf8') @@ -2074,7 +2063,7 @@ sub generateMethod($$$$$$$) $csharpReturnType = "byte[]"; } elsif ($csharpSignature eq "at()" and $csharpClassName eq 'KFilterDev') { $csharpReturnType = "long"; - } elsif ($csharpSignature =~ /copyTo/ and $csharpClassName eq "KDesktopFile" ) { + } elsif ($csharpSignature =~ /copyTo/ and $csharpClassName eq "TDEDesktopFile" ) { $altReturnType = "TDEConfig"; } @@ -3508,9 +3497,9 @@ sub printCSharpdocComment($$$$) $line =~ s/const char/string/g; $line =~ s/const (\w+)\&/$1/g; $line =~ s/bool/bool/g; - $line =~ s/SLOT\(\s*([^\)]*)\) ?\)/SLOT("$1)")/g; - $line =~ s/SIGNAL\(\s*([^\)]*)\) ?\)/SIGNAL("$1)")/g; - $line =~ s/Q_OBJECT\n//g; + $line =~ s/TQ_SLOT\(\s*([^\)]*)\) ?\)/TQ_SLOT("$1)")/g; + $line =~ s/TQ_SIGNAL\(\s*([^\)]*)\) ?\)/TQ_SIGNAL("$1)")/g; + $line =~ s/TQ_OBJECT\n//g; $line =~ s/public\s*(slots)?:\n/public /g; $line =~ s/([^0-9"]\s*)\*(\s*[^0-9"-])/$1$2/g; $line =~ s/^(\s*)\*/$1/g; diff --git a/kalyptus/kalyptusCxxToSmoke.pm b/kalyptus/kalyptusCxxToSmoke.pm index a33f74a7..3ea44e58 100644 --- a/kalyptus/kalyptusCxxToSmoke.pm +++ b/kalyptus/kalyptusCxxToSmoke.pm @@ -75,10 +75,7 @@ BEGIN 'TQ_UINT64' => '$', 'TQ_INT64' => '$', 'TQ_LLONG' => '$', - 'tquint64' => '$', - 'qint64' => '$', 'long long' => '$', - 'qulonglong' => '$', ); # Yes some of this is in kalyptusDataDict's ctypemap @@ -141,21 +138,13 @@ BEGIN 'TQStyle::SCFlags' => 'int', 'TQStyle::SFlags' => 'int', 'TQ_INT16' => 'short', - 'qint16' => 'short', 'TQ_INT32' => 'int', - 'qint32' => 'int', - 'qint32&' => 'int&', 'TQ_INT8' => 'char', - 'qint8' => 'char', 'TQ_LONG' => 'long', 'TQ_UINT16' => 'ushort', - 'tquint16' => 'ushort', 'TQ_UINT32' => 'uint', - 'tquint32' => 'uint', 'TQ_UINT8' => 'uchar', - 'tquint8' => 'uchar', 'TQ_ULONG' => 'long', - 'qreal' => 'double', 'pid_t' => 'int', 'size_t' => 'int', 'pid_t' => 'int', @@ -637,7 +626,7 @@ sub preParseClass || ($name eq 'hack_strchr') || ($name eq 'hack_strstr') ) ) - # Assume only Qt classes have tr() and trUtf8() in their Q_OBJECT macro + # Assume only Qt classes have tr() and trUtf8() in their TQ_OBJECT macro || ($classNode->{astNodeName} !~ /^Q/ and $name eq 'tr') || ($classNode->{astNodeName} !~ /^Q/ and $name eq 'trUtf8') diff --git a/kalyptus/kalyptusDataDict.pm b/kalyptus/kalyptusDataDict.pm index 6f3e7535..ecd1dce6 100644 --- a/kalyptus/kalyptusDataDict.pm +++ b/kalyptus/kalyptusDataDict.pm @@ -805,7 +805,7 @@ BEGIN 'KDateTable*' => 'tde_KDateTable*', 'KDateValidator*' => 'tde_KDateValidator*', 'KDateWidget*' => 'tde_KDateWidget*', -'KDesktopFile*' => 'tde_KDesktopFile*' , +'TDEDesktopFile*' => 'tde_TDEDesktopFile*' , 'KDevApi*' => 'tde_KDevApi*', 'KDevAppFrontend*' => 'tde_KDevAppFrontend*', 'KDevCompilerOptions*' => 'tde_KDevCompilerOptions*', @@ -1055,7 +1055,7 @@ BEGIN 'KPrintDialogPage*' => 'tde_KPrintDialogPage*', 'KPrinter*' => 'tde_KPrinter*', 'KPrinterWrapper*' => 'tde_KPrinterWrapper*', -'KProcIO*' => 'tde_KProcIO*' , +'TDEProcIO*' => 'tde_TDEProcIO*' , 'TDEProcess&' => 'tde_TDEProcess*' , 'TDEProcess*' => 'tde_TDEProcess*' , 'TDEProcessController*' => 'tde_TDEProcessController*', @@ -1137,8 +1137,8 @@ BEGIN 'TDEShortcuts' => 'tde_TDEShortcuts*', 'TDEShortcuts*' => 'tde_TDEShortcuts*', 'KShred*' => 'tde_KShred*', -'KSimpleConfig&' => 'tde_KSimpleConfig*' , -'KSimpleConfig*' => 'tde_KSimpleConfig*', +'TDESimpleConfig&' => 'tde_TDESimpleConfig*' , +'TDESimpleConfig*' => 'tde_TDESimpleConfig*', 'KSimpleFileFilter*' => 'tde_KSimpleFileFilter*', 'KSpell*' => 'tde_KSpell*', 'KSpellConfig&' => 'tde_KSpellConfig*' , @@ -1231,7 +1231,7 @@ BEGIN 'KURLPropsPlugin*' => 'tde_KURLPropsPlugin*', 'KURLRequester*' => 'tde_KURLRequester*', 'KURLRequesterDlg*' => 'tde_KURLRequesterDlg*', -'KUniqueApplication*' => 'tde_KUniqueApplication*', +'TDEUniqueApplication*' => 'tde_TDEUniqueApplication*', 'KUnixSocketAddress*' => 'tde_KUnixSocketAddress*', 'KValueSelector*' => 'tde_KValueSelector*', 'KWin*' => 'tde_KWin*', @@ -1866,10 +1866,6 @@ BEGIN 'TQMultiLineEdit*' => 'qt_QMultiLineEdit*', 'TQMultiLineEditRow*' => 'qt_QMultiLineEditRow*', 'TQMutex*' => 'qt_QMutex*', -'TQNPInstance*' => 'qt_QNPInstance*', -'TQNPStream*' => 'qt_QNPStream*', -'TQNPWidget*' => 'qt_QNPWidget*', -'TQNPlugin*' => 'qt_QNPlugin*', 'TQNetworkOperation*' => 'qt_QNetworkOperation*' , 'TQNetworkProtocol*' => 'qt_QNetworkProtocol*' , 'TQNetworkProtocol::Operation' => 'int' , @@ -2257,8 +2253,6 @@ BEGIN 'TQXmlParseException*' => 'qt_QXmlParseException*', 'TQXmlReader*' => 'qt_QXmlReader*', 'TQXmlSimpleReader*' => 'qt_QXmlSimpleReader*' , -'TQXtApplication*' => 'qt_QXtApplication*', -'TQXtWidget*' => 'qt_QXtWidget*', 'TQ_INT16&' => 'short', 'TQ_INT16' => 'short', 'TQ_INT32&' => 'int', @@ -2277,7 +2271,7 @@ BEGIN 'TQ_UINT8*' => 'unsigned char*' , 'TQ_ULONG&' => 'long', 'TQ_ULONG' => 'long', -'Qt*' => 'qt_Qt*' , +'TQt*' => 'qt_Qt*' , 'TQt::ArrowType' => 'int' , 'TQt::BackgroundMode' => 'int', 'TQt::DateFormat' => 'int', |