Update kalyptus according to tdebindings

bug/266/move-to-usr
Slávek Banko 11 years ago
parent 55d10eedc1
commit a2f400d544

@ -68,21 +68,21 @@ mv SlaveInterface.cpp Slave.cpp
mv SlaveInterface.java Slave.java mv SlaveInterface.java Slave.java
# Edit and Compile the generated java # Edit and Compile the generated java
cd kdejava/koala/org/kde/koala cd tdejava/koala/org/trinitydesktop/koala
make make
# Build C++ JNI .h header files # Build C++ JNI .h header files
cd qtjava/javalib/org/kde/qt cd qtjava/javalib/org/trinitydesktop/qt
for FILE in *.class ; do NAME=`echo $FILE | sed 's/.class//'`; echo $NAME; javah -classpath '../../..' org.kde.qt.$NAME ; done for FILE in *.class ; do NAME=`echo $FILE | sed 's/.class//'`; echo $NAME; javah -classpath '../../..' org.trinitydesktop.qt.$NAME ; done
for FILE in org_kde* ; do NAME=`echo $FILE | sed -e 's/org_kde_qt_//'`; echo $NAME; mv $FILE $NAME; done for FILE in org_trinitydesktop* ; do NAME=`echo $FILE | sed -e 's/org_trinitydesktop_qt_//'`; echo $NAME; mv $FILE $NAME; done
cd kdejava/koala/org/kde/koala cd tdejava/koala/org/trinitydesktop/koala
for FILE in *.class ; do NAME=`echo $FILE | sed 's/.class//'`; echo $NAME; javah -classpath '../../..:../../../../../qtjava/javalib/qtjava.jar' org.kde.koala.$NAME ; done for FILE in *.class ; do NAME=`echo $FILE | sed 's/.class//'`; echo $NAME; javah -classpath '../../..:../../../../../qtjava/javalib/qtjava.jar' org.trinitydesktop.koala.$NAME ; done
for FILE in org_kde* ; do NAME=`echo $FILE | sed -e 's/org_kde_koala_//'`; echo $NAME; mv $FILE $NAME; done for FILE in org_trinitydesktop* ; do NAME=`echo $FILE | sed -e 's/org_trinitydesktop_koala_//'`; echo $NAME; mv $FILE $NAME; done
# Copy headers to kdejava/koala/kdejava # Copy headers to tdejava/koala/tdejava
# Check that the JNI .h function names match the .cpp ones # Check that the JNI .h function names match the .cpp ones
cd kdejava/koala/org/kde/koala cd tdejava/koala/org/trinitydesktop/koala
grep ^Java_ *.cpp | sed -e 's/^[^:]*:\([^(]*\).*/\1/' | grep -v '[/]' | sort | uniq > cpp.fns grep ^Java_ *.cpp | sed -e 's/^[^:]*:\([^(]*\).*/\1/' | grep -v '[/]' | sort | uniq > cpp.fns
grep Java_ *.h | awk '{ print $4 }' | grep -v '[/]' | sort | uniq > h.fns grep Java_ *.h | awk '{ print $4 }' | grep -v '[/]' | sort | uniq > h.fns
kompare h.fns cpp.fns kompare h.fns cpp.fns

@ -535,20 +535,14 @@ LOOP:
# ); # );
# #
next if ( $p =~ /^\s*Q_ENUMS/ # ignore Q_ENUMS next if ( $p =~ /^\s*TQ_ENUMS/ # ignore TQ_ENUMS
|| $p =~ /^\s*TQ_ENUMS/ # and TQ_ENUMS
|| $p =~ /^\s*TQ_OBJECT/ # and TQ_OBJECT || $p =~ /^\s*TQ_OBJECT/ # and TQ_OBJECT
|| $p =~ /^\s*Q_FLAGS/ # and Q_FLAGS || $p =~ /^\s*Q_FLAGS/ # and Q_FLAGS
|| $p =~ /^\s*TQ_FLAGS/ # and TQ_FLAGS
|| $p =~ /^\s*Q_DECLARE_FLAGS/ # and Q_DECLARE_FLAGS || $p =~ /^\s*Q_DECLARE_FLAGS/ # and Q_DECLARE_FLAGS
|| $p =~ /^\s*TQ_DECLARE_FLAGS/ # and TQ_DECLARE_FLAGS
|| ( !$qt4 && $p =~ /^\s*Q_PROPERTY/ ) # and Q_PROPERTY
|| ( !$qt4 && $p =~ /^\s*TQ_PROPERTY/ ) # and TQ_PROPERTY || ( !$qt4 && $p =~ /^\s*TQ_PROPERTY/ ) # and TQ_PROPERTY
|| $p =~ /^\s*TQDOC_PROPERTY/ || $p =~ /^\s*TQDOC_PROPERTY/
|| $p =~ /^\s*Q_GADGET/ || $p =~ /^\s*Q_GADGET/
|| $p =~ /^\s*Q_OVERRIDE/ # and Q_OVERRIDE
|| $p =~ /^\s*TQ_OVERRIDE/ # and TQ_OVERRIDE || $p =~ /^\s*TQ_OVERRIDE/ # and TQ_OVERRIDE
|| $p =~ /^\s*Q_SETS/
|| $p =~ /^\s*TQ_SETS/ || $p =~ /^\s*TQ_SETS/
|| $p =~ /^\s*Q_DUMMY_COMPARISON_OPERATOR/ || $p =~ /^\s*Q_DUMMY_COMPARISON_OPERATOR/
|| $p =~ /^\s*K_SYCOCATYPE/ # and K_SYCOCA stuff || $p =~ /^\s*K_SYCOCATYPE/ # and K_SYCOCA stuff
@ -733,10 +727,7 @@ sub readDecl
$declNodeType = "c"; $declNodeType = "c";
return $l; return $l;
} }
elsif ( $l =~ /Q_PROPERTY/ ) { # property elsif ( $l =~ /TQ_PROPERTY/ ) { # property
return $l;
}
elsif ( $l =~ /TQ_PROPERTY/ ) { # property
return $l; return $l;
} }
@ -818,17 +809,12 @@ sub identifyDecl
elsif ( $declNodeType eq "k" ) { elsif ( $declNodeType eq "k" ) {
$cNode->AddProp( "DcopExported", 1 ); $cNode->AddProp( "DcopExported", 1 );
} }
# properties # properties
elsif ( $decl =~ s/Q_PROPERTY// ) { elsif ( $decl =~ s/TQ_PROPERTY// ) {
print "Property: <$1>\n" if $debug; print "Property: <$1>\n" if $debug;
$newNode = newProperty( $decl ); $newNode = newProperty( $decl );
} }
elsif ( $decl =~ s/TQ_PROPERTY// ) {
print "Property: <$1>\n" if $debug;
$newNode = newProperty( $decl );
}
# Typedef struct/class # Typedef struct/class
elsif ( $decl =~ /^\s*typedef elsif ( $decl =~ /^\s*typedef
\s+(struct|union|class|enum) \s+(struct|union|class|enum)

@ -320,15 +320,15 @@ sub writeClassDoc
my $typeName = $node->{astNodeName}."*"; my $typeName = $node->{astNodeName}."*";
if ( kalyptusDataDict::ctypemap($typeName) eq "" ) { if ( kalyptusDataDict::ctypemap($typeName) eq "" ) {
$typeprefix = ($typeName =~ /^Q/ ? "qt_" : "kde_"); $typeprefix = ($typeName =~ /^Q/ ? "qt_" : "tde_");
kalyptusDataDict::setctypemap($typeName, $typeprefix.$node->{astNodeName}."*"); kalyptusDataDict::setctypemap($typeName, $typeprefix.$node->{astNodeName}."*");
print "'$typeName' => '$typeprefix$typeName',\n"; print "'$typeName' => '$typeprefix$typeName',\n";
} elsif ( kalyptusDataDict::ctypemap($typeName) =~ /^qt_/ ) { } elsif ( kalyptusDataDict::ctypemap($typeName) =~ /^qt_/ ) {
$typeprefix = "qt_"; $typeprefix = "qt_";
} elsif ( kalyptusDataDict::ctypemap($typeName) =~ /^kde_/ ) { } elsif ( kalyptusDataDict::ctypemap($typeName) =~ /^tde_/ ) {
$typeprefix = "kde_"; $typeprefix = "tde_";
} else { } else {
$typeprefix = "kde_"; $typeprefix = "tde_";
} }
my $file = "$outputdir/".join("__", kdocAstUtil::heritage($node)).".cs"; my $file = "$outputdir/".join("__", kdocAstUtil::heritage($node)).".cs";

@ -131,14 +131,14 @@ BEGIN
'TQEventLoop::ProcessEventsFlags' => 'uint', 'TQEventLoop::ProcessEventsFlags' => 'uint',
'TQStyle::SCFlags' => 'int', 'TQStyle::SCFlags' => 'int',
'TQStyle::SFlags' => 'int', 'TQStyle::SFlags' => 'int',
'Q_INT16' => 'short', 'TQ_INT16' => 'short',
'Q_INT32' => 'int', 'TQ_INT32' => 'int',
'Q_INT8' => 'char', 'TQ_INT8' => 'char',
'Q_LONG' => 'long', 'TQ_LONG' => 'long',
'Q_UINT16' => 'ushort', 'TQ_UINT16' => 'ushort',
'Q_UINT32' => 'uint', 'TQ_UINT32' => 'uint',
'Q_UINT8' => 'uchar', 'TQ_UINT8' => 'uchar',
'Q_ULONG' => 'long', 'TQ_ULONG' => 'long',
); );
} }
@ -836,7 +836,7 @@ sub registerType($$) {
} }
# Apply typedefs, and store the resulting type. # Apply typedefs, and store the resulting type.
# For instance, if $type was Q_UINT16&, realType will be ushort # For instance, if $type was TQ_UINT16&, realType will be ushort
$allTypes{$type}{realType} = applyTypeDef( $realType ); $allTypes{$type}{realType} = applyTypeDef( $realType );
# In the first phase we only create entries into allTypes. # In the first phase we only create entries into allTypes.

File diff suppressed because it is too large Load Diff

@ -143,18 +143,18 @@ BEGIN
'TQEventLoop::ProcessEventsFlags' => 'uint', 'TQEventLoop::ProcessEventsFlags' => 'uint',
'TQStyle::SCFlags' => 'int', 'TQStyle::SCFlags' => 'int',
'TQStyle::SFlags' => 'int', 'TQStyle::SFlags' => 'int',
'TQ_INT16' => 'short', 'TTQ_INT16' => 'short',
'TQ_INT32' => 'int', 'TTQ_INT32' => 'int',
'TQ_INT64' => 'long', 'TTQ_INT64' => 'long',
'TQ_INT8' => 'char', 'TTQ_INT8' => 'char',
'TQ_LONG' => 'long', 'TTQ_LONG' => 'long',
'TQ_LLONG' => 'long', 'TTQ_LLONG' => 'long',
'TQ_ULLONG' => 'long', 'TQ_ULLONG' => 'long',
'TQ_UINT16' => 'ushort', 'TTQ_UINT16' => 'ushort',
'TQ_UINT32' => 'uint', 'TTQ_UINT32' => 'uint',
'TQ_UINT64' => 'long', 'TTQ_UINT64' => 'long',
'TQ_UINT8' => 'uchar', 'TTQ_UINT8' => 'uchar',
'TQ_ULONG' => 'long', 'TTQ_ULONG' => 'long',
'pid_t' => 'int', 'pid_t' => 'int',
'size_t' => 'int', 'size_t' => 'int',
'pid_t' => 'int', 'pid_t' => 'int',
@ -517,9 +517,9 @@ sub javaImport($)
} elsif ( cplusplusToJava($classname_ptr) =~ /^[a-z]/ ) { } elsif ( cplusplusToJava($classname_ptr) =~ /^[a-z]/ ) {
return ""; return "";
} elsif ( $classname =~ /^Q/ ) { } elsif ( $classname =~ /^Q/ ) {
return "org.kde.qt." . $classname; return "org.trinitydesktop.qt." . $classname;
} else { } else {
return "org.kde.koala." . $classname; return "org.trinitydesktop.koala." . $classname;
} }
} }
@ -557,18 +557,18 @@ sub cplusplusToJava
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QVariantValueList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QVariantValueList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QIconDragItemValueList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QIconDragItemValueList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QPixmapValueList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QPixmapValueList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_QCStringList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /tde_QCStringList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QObjectList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QObjectList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QDomNodeList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QDomNodeList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QWidgetList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QWidgetList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_KURLList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /tde_KURLList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_TDEMainWindow\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /tde_TDEMainWindow\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_KFileItemList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /tde_KFileItemList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_KFileViewItemList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /tde_KFileViewItemList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_DOMNodeList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /tde_DOMNodeList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_StyleSheetList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /tde_StyleSheetList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_MediaList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /tde_MediaList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_OfferList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /tde_OfferList\s*\*/
|| $cplusplusType =~ /TQMemArray<TQRect>/ || $cplusplusType =~ /TQMemArray<TQRect>/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QCanvasItemList\s*\*/ ) { || kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QCanvasItemList\s*\*/ ) {
return "ArrayList" return "ArrayList"
@ -594,7 +594,7 @@ sub cplusplusToJava
} else { } else {
return $1; return $1;
} }
} elsif ( kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_([^\*\s]*)(.*)$/ and !$skippedClasses{$className}) { } elsif ( kalyptusDataDict::ctypemap($cplusplusType) =~ /tde_([^\*\s]*)(.*)$/ and !$skippedClasses{$className}) {
if ( kalyptusDataDict::interfacemap($1) ne () ) { if ( kalyptusDataDict::interfacemap($1) ne () ) {
return $1."Interface"; return $1."Interface";
} else { } else {
@ -1101,8 +1101,8 @@ sub writeClassDoc
# my $fileName = join( "__", kdocAstUtil::heritage($node) ); # my $fileName = join( "__", kdocAstUtil::heritage($node) );
print "Enter: $className\n" if $debug; print "Enter: $className\n" if $debug;
my $typeprefix = ($className =~ /^Q/ ? "qt_" : "kde_"); my $typeprefix = ($className =~ /^Q/ ? "qt_" : "tde_");
my $packagename = ($typeprefix eq 'qt_' ? "org.kde.qt" : "org.kde.koala"); my $packagename = ($typeprefix eq 'qt_' ? "org.trinitydesktop.qt" : "org.trinitydesktop.koala");
# Write out the *.java file # Write out the *.java file
my $classFile = "$outputdir/$fileName.java"; my $classFile = "$outputdir/$fileName.java";
@ -1114,7 +1114,7 @@ sub writeClassDoc
print CLASS "package $packagename;\n\n"; print CLASS "package $packagename;\n\n";
print CLASS "import java.lang.reflect.Proxy;\n"; print CLASS "import java.lang.reflect.Proxy;\n";
print CLASS "import org.kde.qt.SmokeInvocation;\n"; print CLASS "import org.trinitydesktop.qt.SmokeInvocation;\n";
my %javaMethods = (); my %javaMethods = ();
my %addImport = (); my %addImport = ();
@ -1175,7 +1175,7 @@ sub writeClassDoc
# Special case these two classes as they have methods that use ArrayList added as 'extras' # 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 java.util.ArrayList;\n";
} }
print CLASS "import org.kde.qt.Qt;\n"; print CLASS "import org.trinitydesktop.qt.Qt;\n";
} }
if ( kalyptusDataDict::interfacemap($javaClassName) ne () ) { if ( kalyptusDataDict::interfacemap($javaClassName) ne () ) {
@ -1221,7 +1221,7 @@ sub writeClassDoc
$ancestor =~ s/^.*:://; $ancestor =~ s/^.*:://;
$classdec .= "$ancestor "; $classdec .= "$ancestor ";
if ( $typeprefix ne 'qt_' and $ancestor =~ /^Q/ ) { if ( $typeprefix ne 'qt_' and $ancestor =~ /^Q/ ) {
print CLASS "import org.kde.qt.$ancestor;\n"; print CLASS "import org.trinitydesktop.qt.$ancestor;\n";
} }
last; last;
} }
@ -2155,7 +2155,7 @@ sub generateAllMethods($$$$$$)
# } # }
} }
$addImport->{"org.kde.qt.QtSupport"} = 1; $addImport->{"org.trinitydesktop.qt.QtSupport"} = 1;
# Do all enums first, anonymous ones and then named enums # Do all enums first, anonymous ones and then named enums
Iter::MembersByType ( $classNode, undef, Iter::MembersByType ( $classNode, undef,
@ -2391,7 +2391,7 @@ sub registerType($$) {
} }
# Apply typedefs, and store the resulting type. # Apply typedefs, and store the resulting type.
# For instance, if $type was Q_UINT16&, realType will be ushort # For instance, if $type was TQ_UINT16&, realType will be ushort
$allTypes{$type}{realType} = applyTypeDef( $realType ); $allTypes{$type}{realType} = applyTypeDef( $realType );
# In the first phase we only create entries into allTypes. # In the first phase we only create entries into allTypes.
@ -3397,8 +3397,8 @@ sub printJavadocComment($$$$)
$text =~ s/\./#/g; $text =~ s/\./#/g;
$text =~ s/\(\)//g; $text =~ s/\(\)//g;
$text =~ s/^\s*([a-z].*)/#$1/g; $text =~ s/^\s*([a-z].*)/#$1/g;
$text =~ s/^\s*Q/org.kde.qt.Q/g; $text =~ s/^\s*Q/org.trinitydesktop.qt.Q/g;
# $text =~ s/^\s*K/org.kde.koala.K/g; # $text =~ s/^\s*K/org.trinitydesktop.koala.K/g;
$returntext .= "\t\t\@see $text\n"; $returntext .= "\t\t\@see $text\n";
} }
} }

@ -79,9 +79,9 @@ BEGIN
'char*' => '$', 'char*' => '$',
'TQCOORD*' => '?', 'TQCOORD*' => '?',
'TQRgb*' => '?', 'TQRgb*' => '?',
'Q_UINT64' => '$', 'TQ_UINT64' => '$',
'Q_INT64' => '$', 'TQ_INT64' => '$',
'Q_LLONG' => '$', 'TQ_LLONG' => '$',
'tquint64' => '$', 'tquint64' => '$',
'qint64' => '$', 'qint64' => '$',
'long long' => '$', 'long long' => '$',
@ -146,21 +146,21 @@ BEGIN
'TQEventLoop::ProcessEventsFlags' => 'uint', 'TQEventLoop::ProcessEventsFlags' => 'uint',
'TQStyle::SCFlags' => 'int', 'TQStyle::SCFlags' => 'int',
'TQStyle::SFlags' => 'int', 'TQStyle::SFlags' => 'int',
'Q_INT16' => 'short', 'TQ_INT16' => 'short',
'qint16' => 'short', 'qint16' => 'short',
'Q_INT32' => 'int', 'TQ_INT32' => 'int',
'qint32' => 'int', 'qint32' => 'int',
'qint32&' => 'int&', 'qint32&' => 'int&',
'Q_INT8' => 'char', 'TQ_INT8' => 'char',
'qint8' => 'char', 'qint8' => 'char',
'Q_LONG' => 'long', 'TQ_LONG' => 'long',
'Q_UINT16' => 'ushort', 'TQ_UINT16' => 'ushort',
'tquint16' => 'ushort', 'tquint16' => 'ushort',
'Q_UINT32' => 'uint', 'TQ_UINT32' => 'uint',
'tquint32' => 'uint', 'tquint32' => 'uint',
'Q_UINT8' => 'uchar', 'TQ_UINT8' => 'uchar',
'tquint8' => 'uchar', 'tquint8' => 'uchar',
'Q_ULONG' => 'long', 'TQ_ULONG' => 'long',
'qreal' => 'double', 'qreal' => 'double',
'pid_t' => 'int', 'pid_t' => 'int',
'size_t' => 'int', 'size_t' => 'int',
@ -553,18 +553,18 @@ sub cplusplusToCSharp
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QVariantValueList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QVariantValueList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QIconDragItemValueList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QIconDragItemValueList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QPixmapValueList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QPixmapValueList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_QCStringList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /tde_QCStringList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QObjectList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QObjectList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QDomNodeList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QDomNodeList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QWidgetList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QWidgetList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_KURLList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /tde_KURLList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_TDEMainWindow\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /tde_TDEMainWindow\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_KFileItemList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /tde_KFileItemList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_KFileViewItemList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /tde_KFileViewItemList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_DOMNodeList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /tde_DOMNodeList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_StyleSheetList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /tde_StyleSheetList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_MediaList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /tde_MediaList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_OfferList\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /tde_OfferList\s*\*/
|| $cplusplusType =~ /TQMemArray<TQRect>/ || $cplusplusType =~ /TQMemArray<TQRect>/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QCanvasItemList\s*\*/ ) { || kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QCanvasItemList\s*\*/ ) {
return "ArrayList" return "ArrayList"
@ -588,7 +588,7 @@ sub cplusplusToCSharp
} else { } else {
return $1; return $1;
} }
} elsif ( kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_([^\*\s]*)(.*)$/ and !$skippedClasses{$className}) { } elsif ( kalyptusDataDict::ctypemap($cplusplusType) =~ /tde_([^\*\s]*)(.*)$/ and !$skippedClasses{$className}) {
if ( defined interfaceForClass($1) ) { if ( defined interfaceForClass($1) ) {
return interfaceForClass($1); return interfaceForClass($1);
} else { } else {
@ -1150,7 +1150,7 @@ sub writeClassDoc
# my $fileName = join( "__", kdocAstUtil::heritage($node) ); # my $fileName = join( "__", kdocAstUtil::heritage($node) );
print "Enter: $className\n" if $debug; print "Enter: $className\n" if $debug;
my $typeprefix = ($className =~ /^Q/ ? "qt_" : "kde_"); my $typeprefix = ($className =~ /^Q/ ? "qt_" : "tde_");
my $packagename = ($typeprefix eq 'qt_' ? "Qt" : "KDE"); my $packagename = ($typeprefix eq 'qt_' ? "Qt" : "KDE");
# Write out the *.csharp file # Write out the *.csharp file
@ -2585,7 +2585,7 @@ sub registerType($$) {
} }
# Apply typedefs, and store the resulting type. # Apply typedefs, and store the resulting type.
# For instance, if $type was Q_UINT16&, realType will be ushort # For instance, if $type was TQ_UINT16&, realType will be ushort
$allTypes{$type}{realType} = applyTypeDef( $realType ); $allTypes{$type}{realType} = applyTypeDef( $realType );
# In the first phase we only create entries into allTypes. # In the first phase we only create entries into allTypes.

@ -72,9 +72,9 @@ BEGIN
'char*' => '$', 'char*' => '$',
'TQCOORD*' => '?', 'TQCOORD*' => '?',
'TQRgb*' => '?', 'TQRgb*' => '?',
'Q_UINT64' => '$', 'TQ_UINT64' => '$',
'Q_INT64' => '$', 'TQ_INT64' => '$',
'Q_LLONG' => '$', 'TQ_LLONG' => '$',
'tquint64' => '$', 'tquint64' => '$',
'qint64' => '$', 'qint64' => '$',
'long long' => '$', 'long long' => '$',
@ -140,21 +140,21 @@ BEGIN
'TQEventLoop::ProcessEventsFlags' => 'uint', 'TQEventLoop::ProcessEventsFlags' => 'uint',
'TQStyle::SCFlags' => 'int', 'TQStyle::SCFlags' => 'int',
'TQStyle::SFlags' => 'int', 'TQStyle::SFlags' => 'int',
'Q_INT16' => 'short', 'TQ_INT16' => 'short',
'qint16' => 'short', 'qint16' => 'short',
'Q_INT32' => 'int', 'TQ_INT32' => 'int',
'qint32' => 'int', 'qint32' => 'int',
'qint32&' => 'int&', 'qint32&' => 'int&',
'Q_INT8' => 'char', 'TQ_INT8' => 'char',
'qint8' => 'char', 'qint8' => 'char',
'Q_LONG' => 'long', 'TQ_LONG' => 'long',
'Q_UINT16' => 'ushort', 'TQ_UINT16' => 'ushort',
'tquint16' => 'ushort', 'tquint16' => 'ushort',
'Q_UINT32' => 'uint', 'TQ_UINT32' => 'uint',
'tquint32' => 'uint', 'tquint32' => 'uint',
'Q_UINT8' => 'uchar', 'TQ_UINT8' => 'uchar',
'tquint8' => 'uchar', 'tquint8' => 'uchar',
'Q_ULONG' => 'long', 'TQ_ULONG' => 'long',
'qreal' => 'double', 'qreal' => 'double',
'pid_t' => 'int', 'pid_t' => 'int',
'size_t' => 'int', 'size_t' => 'int',
@ -919,13 +919,13 @@ my $fhn =1; # static
map { for my $incl (keys %{$_->[2]}){ $includes{$incl}++ } } @code; map { for my $incl (keys %{$_->[2]}){ $includes{$incl}++ } } @code;
# Hack - some Qt/KDE headers need other headers included, but omit suitable #includes # Hack - some Qt/KDE headers need other headers included, but omit suitable #includes
if (defined $includes{"ntqregexp.h"} || defined $includes{"ntqcstring.h"}) { if (defined $includes{"qregexp.h"} || defined $includes{"qcstring.h"}) {
print $fh "#include <ntqregexp.h>\n"; print $fh "#include <qregexp.h>\n";
delete $includes{"ntqregexp.h"}; delete $includes{"qregexp.h"};
} }
if (defined $includes{"ntqmime.h"}) { if (defined $includes{"qmime.h"}) {
print $fh "#include <ntqurl.h>\n"; print $fh "#include <qurl.h>\n";
delete $includes{"ntqurl.h"}; delete $includes{"qurl.h"};
} }
if (defined $includes{"tdeshortcut.h"}) { if (defined $includes{"tdeshortcut.h"}) {
print $fh "#include <tdeshortcut.h>\n"; print $fh "#include <tdeshortcut.h>\n";
@ -946,9 +946,9 @@ my $fhn =1; # static
print $fh "#include <$incl>\n"; print $fh "#include <$incl>\n";
} }
if ( $main::qt4 if ( $main::qt4
and ( defined $includes{"ntqtreewidget.h"} and ( defined $includes{"qtreewidget.h"}
or defined $includes{"ntqlistwidget.h"} or defined $includes{"qlistwidget.h"}
or defined $includes{"ntqtablewidget.h"} ) ) or defined $includes{"qtablewidget.h"} ) )
{ {
print $fh "#include \"qwidgetitemdata_p.h\"\n"; print $fh "#include \"qwidgetitemdata_p.h\"\n";
} }
@ -1893,7 +1893,7 @@ sub registerType($$) {
} }
# Apply typedefs, and store the resulting type. # Apply typedefs, and store the resulting type.
# For instance, if $type was Q_UINT16&, realType will be ushort # For instance, if $type was TQ_UINT16&, realType will be ushort
$allTypes{$type}{realType} = applyTypeDef( $realType ); $allTypes{$type}{realType} = applyTypeDef( $realType );
# In the first phase we only create entries into allTypes. # In the first phase we only create entries into allTypes.
@ -2469,7 +2469,7 @@ sub writeSmokeDataFile($) {
die "'Method index' for enum $sig not found" unless defined $xmethIndex; die "'Method index' for enum $sig not found" unless defined $xmethIndex;
my $typeId = findTypeEntry( $fullEnumName )->{index}; my $typeId = findTypeEntry( $fullEnumName )->{index};
die "enum has no {case} value in $className: $fullEnumName" unless defined $classNode->{case}{$fullEnumName}; die "enum has no {case} value in $className: $fullEnumName" unless defined $classNode->{case}{$fullEnumName};
print OUT "\t{$classIndex, $xmethIndex, 0, 0, Smoke::mf_static, $typeId, $classNode->{case}{$fullEnumName}},\t//$methodCount $fullEnumName (enum)\n"; print OUT "\t{$classIndex, $xmethIndex, 0, 0, Smoke::mf_static|Smoke::mf_enum, $typeId, $classNode->{case}{$fullEnumName}},\t//$methodCount $fullEnumName (enum)\n";
$allMethods{$sig} = $methodCount; $allMethods{$sig} = $methodCount;
print STDERR "Added entry for " . $sig . " into \$allMethods\n" if ($debug); print STDERR "Added entry for " . $sig . " into \$allMethods\n" if ($debug);
$methods[$methodCount] = { $methods[$methodCount] = {
@ -2568,6 +2568,12 @@ sub writeSmokeDataFile($) {
my $methodFlags = '0'; my $methodFlags = '0';
# Make no distinction between a static method in an ordinary class, or a method in a namespace # Make no distinction between a static method in an ordinary class, or a method in a namespace
$methodFlags .= "|Smoke::mf_static" if $m->{Flags} =~ "s" or $classNode->{NodeType} eq 'namespace'; $methodFlags .= "|Smoke::mf_static" if $m->{Flags} =~ "s" or $classNode->{NodeType} eq 'namespace';
$methodFlags .= "|Smoke::mf_const" if $m->{Flags} =~ "c"; # useful?? probably not
$methodFlags .= "|Smoke::mf_copyctor" if $m->{Flags} =~ "x";
$methodFlags .= "|Smoke::mf_internal" if $m->{Flags} =~ "i";
$methodFlags .= "|Smoke::mf_ctor" if $methName eq $className;
$methodFlags .= "|Smoke::mf_dtor" if $m->{ReturnType} eq '~';
$methodFlags .= "|Smoke::mf_protected" if $m->{Access} =~ /protected/;
$methodFlags =~ s/0\|//; # beautify $methodFlags =~ s/0\|//; # beautify
print OUT "\t{$classIndex, $methodIndex, $arglist, $argcnt, $methodFlags, $retTypeIndex, $case},\t//$methodCount $className\::$sig"; print OUT "\t{$classIndex, $methodIndex, $arglist, $argcnt, $methodFlags, $retTypeIndex, $case},\t//$methodCount $className\::$sig";

@ -82,14 +82,14 @@ BEGIN
'TQStyle::SFlags' => 'int', 'TQStyle::SFlags' => 'int',
'TQStyleOption&' => 'int&', 'TQStyleOption&' => 'int&',
'const TQStyleOption&' => 'const int&', 'const TQStyleOption&' => 'const int&',
'Q_INT16' => 'short', 'TQ_INT16' => 'short',
'Q_INT32' => 'int', 'TQ_INT32' => 'int',
'Q_INT8' => 'char', 'TQ_INT8' => 'char',
'Q_LONG' => 'long', 'TQ_LONG' => 'long',
'Q_UINT16' => 'ushort', 'TQ_UINT16' => 'ushort',
'Q_UINT32' => 'uint', 'TQ_UINT32' => 'uint',
'Q_UINT8' => 'uchar', 'TQ_UINT8' => 'uchar',
'Q_ULONG' => 'long', 'TQ_ULONG' => 'long',
); );
# Page footer # Page footer
@ -776,15 +776,15 @@ sub writeClassDoc
my $typeName = $node->{astNodeName}."*"; my $typeName = $node->{astNodeName}."*";
if ( kalyptusDataDict::ctypemap($typeName) eq "" ) { if ( kalyptusDataDict::ctypemap($typeName) eq "" ) {
$typeprefix = ($typeName =~ /^Q/ ? "qt_" : "kde_"); $typeprefix = ($typeName =~ /^Q/ ? "qt_" : "tde_");
kalyptusDataDict::setctypemap($typeName, $typeprefix.$node->{astNodeName}."*"); kalyptusDataDict::setctypemap($typeName, $typeprefix.$node->{astNodeName}."*");
print "'$typeName' => '$typeprefix$typeName',\n"; print "'$typeName' => '$typeprefix$typeName',\n";
} elsif ( kalyptusDataDict::ctypemap($typeName) =~ /^qt_/ ) { } elsif ( kalyptusDataDict::ctypemap($typeName) =~ /^qt_/ ) {
$typeprefix = "qt_"; $typeprefix = "qt_";
} elsif ( kalyptusDataDict::ctypemap($typeName) =~ /^kde_/ ) { } elsif ( kalyptusDataDict::ctypemap($typeName) =~ /^tde_/ ) {
$typeprefix = "kde_"; $typeprefix = "tde_";
} else { } else {
$typeprefix = "kde_"; $typeprefix = "tde_";
} }
my $basefile = "$typeprefix".join("__", kdocAstUtil::heritage($node)).".i"; my $basefile = "$typeprefix".join("__", kdocAstUtil::heritage($node)).".i";

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save