summaryrefslogtreecommitdiffstats
path: root/kalyptus/kalyptusCxxToJava.pm
diff options
context:
space:
mode:
Diffstat (limited to 'kalyptus/kalyptusCxxToJava.pm')
-rw-r--r--kalyptus/kalyptusCxxToJava.pm384
1 files changed, 192 insertions, 192 deletions
diff --git a/kalyptus/kalyptusCxxToJava.pm b/kalyptus/kalyptusCxxToJava.pm
index 524b5f0f..fa518cf1 100644
--- a/kalyptus/kalyptusCxxToJava.pm
+++ b/kalyptus/kalyptusCxxToJava.pm
@@ -71,18 +71,18 @@ BEGIN
# Mapping for iterproto, when making up the munged method names
%mungedTypeMap = (
- 'QString' => '$',
- 'QString*' => '$',
- 'QString&' => '$',
- 'QCString' => '$',
- 'QCString*' => '$',
- 'QCString&' => '$',
- 'QByteArray' => '$',
- 'QByteArray&' => '$',
- 'QByteArray*' => '$',
+ 'TQString' => '$',
+ 'TQString*' => '$',
+ 'TQString&' => '$',
+ 'TQCString' => '$',
+ 'TQCString*' => '$',
+ 'TQCString&' => '$',
+ 'TQByteArray' => '$',
+ 'TQByteArray&' => '$',
+ 'TQByteArray*' => '$',
'char*' => '$',
- 'QCOORD*' => '?',
- 'QRgb*' => '?',
+ 'TQCOORD*' => '?',
+ 'TQRgb*' => '?',
);
# Yes some of this is in kalyptusDataDict's ctypemap
@@ -102,47 +102,47 @@ BEGIN
'unsigned long' => 'ulong',
# Anything that is not known is mapped to void*, so no need for those here anymore
-# 'QWSEvent*' => 'void*',
-# 'QDiskFont*' => 'void*',
+# 'TQWSEvent*' => 'void*',
+# 'TQDiskFont*' => 'void*',
# 'XEvent*' => 'void*',
# 'FILE*' => 'void*',
-# 'QUnknownInterface*' => 'void*',
+# 'TQUnknownInterface*' => 'void*',
# 'GDHandle' => 'void*',
# '_NPStream*' => 'void*',
-# 'QTextFormat*' => 'void*',
-# 'QTextDocument*' => 'void*',
-# 'QTextCursor*' => 'void*',
-# 'QTextParag**' => 'void*',
-# 'QTextParag*' => 'void*',
-# 'QRemoteInterface*' => 'void*',
-# 'QSqlRecordPrivate*' => 'void*',
-# 'QTSMFI' => 'void*', # QTextStream's QTSManip
+# 'TQTextFormat*' => 'void*',
+# 'TQTextDocument*' => 'void*',
+# 'TQTextCursor*' => 'void*',
+# 'TQTextParag**' => 'void*',
+# 'TQTextParag*' => 'void*',
+# 'TQRemoteInterface*' => 'void*',
+# 'TQSqlRecordPrivate*' => 'void*',
+# 'TQTSMFI' => 'void*', # TQTextStream's TQTSManip
# 'const GUID&' => 'void*',
-# 'QWidgetMapper*' => 'void*',
+# 'TQWidgetMapper*' => 'void*',
# 'MSG*' => 'void*',
-# 'const QSqlFieldInfoList&' => 'void*', # QSqlRecordInfo - TODO (templates)
+# 'const TQSqlFieldInfoList&' => 'void*', # TQSqlRecordInfo - TODO (templates)
- 'QStyleHintReturn*' => 'void*',
- 'QPtrCollection::Item' => 'void*', # to avoid a warning
+ 'TQStyleHintReturn*' => 'void*',
+ 'TQPtrCollection::Item' => 'void*', # to avoid a warning
'mode_t' => 'long',
- 'QProcess::PID' => 'long',
- 'size_type' => 'int', # QSqlRecordInfo
- 'Qt::ComparisonFlags' => 'uint',
- 'Qt::ToolBarDock' => 'int', # compat thing, Qt shouldn't use it
- 'QIODevice::Offset' => 'ulong',
+ 'TQProcess::PID' => 'long',
+ 'size_type' => 'int', # TQSqlRecordInfo
+ 'TQt::ComparisonFlags' => 'uint',
+ 'TQt::ToolBarDock' => 'int', # compat thing, Qt shouldn't use it
+ 'TQIODevice::Offset' => 'ulong',
'WState' => 'int',
'WId' => 'ulong',
- 'QRgb' => 'uint',
+ 'TQRgb' => 'uint',
'ksocklen_t' => 'uint',
- 'QCOORD' => 'int',
- 'QTSMFI' => 'int',
- 'Qt::WState' => 'int',
- 'Qt::WFlags' => 'int',
- 'Qt::HANDLE' => 'uint',
- 'QEventLoop::ProcessEventsFlags' => 'uint',
- 'QStyle::SCFlags' => 'int',
- 'QStyle::SFlags' => 'int',
+ 'TQCOORD' => 'int',
+ 'TQTSMFI' => 'int',
+ 'TQt::WState' => 'int',
+ 'TQt::WFlags' => 'int',
+ 'TQt::HANDLE' => 'uint',
+ 'TQEventLoop::ProcessEventsFlags' => 'uint',
+ 'TQStyle::SCFlags' => 'int',
+ 'TQStyle::SFlags' => 'int',
'Q_INT16' => 'short',
'Q_INT32' => 'int',
'Q_INT64' => 'long',
@@ -207,16 +207,16 @@ EOF
$qbitmapExtras = <<EOF;
-// public QBitmap(QPixmap arg1) {
+// public TQBitmap(TQPixmap arg1) {
// super((Class) null);
-// newQBitmap(arg1);
+// newTQBitmap(arg1);
// }
-// private native void newQBitmap(QPixmap arg1);
-// public QBitmap(QImage arg1) {
+// private native void newTQBitmap(TQPixmap arg1);
+// public TQBitmap(TQImage arg1) {
// super((Class) null);
-// newQBitmap(arg1);
+// newTQBitmap(arg1);
// }
-// private native void newQBitmap(QImage arg1);
+// private native void newTQBitmap(TQImage arg1);
EOF
@@ -259,47 +259,47 @@ EOF
}
/*
- public static native QColor color0();
- public static native QColor color1();
- public static native QColor black();
- public static native QColor white();
- public static native QColor darkGray();
- public static native QColor gray();
- public static native QColor lightGray();
- public static native QColor red();
- public static native QColor green();
- public static native QColor blue();
- public static native QColor cyan();
- public static native QColor magenta();
- public static native QColor yellow();
- public static native QColor darkRed();
- public static native QColor darkGreen();
- public static native QColor darkBlue();
- public static native QColor darkCyan();
- public static native QColor darkMagenta();
- public static native QColor darkYellow();
+ public static native TQColor color0();
+ public static native TQColor color1();
+ public static native TQColor black();
+ public static native TQColor white();
+ public static native TQColor darkGray();
+ public static native TQColor gray();
+ public static native TQColor lightGray();
+ public static native TQColor red();
+ public static native TQColor green();
+ public static native TQColor blue();
+ public static native TQColor cyan();
+ public static native TQColor magenta();
+ public static native TQColor yellow();
+ public static native TQColor darkRed();
+ public static native TQColor darkGreen();
+ public static native TQColor darkBlue();
+ public static native TQColor darkCyan();
+ public static native TQColor darkMagenta();
+ public static native TQColor darkYellow();
// Global cursors
- public static native QCursor arrowCursor(); // standard arrow cursor
- public static native QCursor upArrowCursor(); // upwards arrow
- public static native QCursor crossCursor(); // crosshair
- public static native QCursor waitCursor(); // hourglass/watch
- public static native QCursor ibeamCursor(); // ibeam/text entry
- public static native QCursor sizeVerCursor(); // vertical resize
- public static native QCursor sizeHorCursor(); // horizontal resize
- public static native QCursor sizeBDiagCursor(); // diagonal resize (/)
- public static native QCursor sizeFDiagCursor(); // diagonal resize (\)
- public static native QCursor sizeAllCursor(); // all directions resize
- public static native QCursor blankCursor(); // blank/invisible cursor
- public static native QCursor splitVCursor(); // vertical bar with left-right
+ public static native TQCursor arrowCursor(); // standard arrow cursor
+ public static native TQCursor upArrowCursor(); // upwards arrow
+ public static native TQCursor crossCursor(); // crosshair
+ public static native TQCursor waitCursor(); // hourglass/watch
+ public static native TQCursor ibeamCursor(); // ibeam/text entry
+ public static native TQCursor sizeVerCursor(); // vertical resize
+ public static native TQCursor sizeHorCursor(); // horizontal resize
+ public static native TQCursor sizeBDiagCursor(); // diagonal resize (/)
+ public static native TQCursor sizeFDiagCursor(); // diagonal resize (\)
+ public static native TQCursor sizeAllCursor(); // all directions resize
+ public static native TQCursor blankCursor(); // blank/invisible cursor
+ public static native TQCursor splitVCursor(); // vertical bar with left-right
// arrows
- public static native QCursor splitHCursor(); // horizontal bar with up-down
+ public static native TQCursor splitHCursor(); // horizontal bar with up-down
// arrows
- public static native QCursor pointingHandCursor(); // pointing hand
- public static native QCursor forbiddenCursor(); // forbidden cursor (slashed circle)
+ public static native TQCursor pointingHandCursor(); // pointing hand
+ public static native TQCursor forbiddenCursor(); // forbidden cursor (slashed circle)
*/
-// public static native QApplication qApp();
+// public static native TQApplication qApp();
public static native void qDebug(String message);
public static void qDebug(String pattern, Object[] arguments) {
@@ -340,7 +340,7 @@ EOF
return "1" + sqeezeOut(slot, ' ');
}
- /** Convert from a UTF-8 string to Unicode - the java equivalent to QString::fromUtf8() */
+ /** Convert from a UTF-8 string to Unicode - the java equivalent to TQString::fromUtf8() */
public String fromUtf8(byte[] bytes) {
String result = null;
@@ -445,14 +445,14 @@ EOF
// public native boolean truncate( int pos);
// public native int begin();
// public native int end();
-// public native QPoint at(int index);
+// public native TQPoint at(int index);
EOF
$quridragExtras = <<EOF;
-// public static native boolean decode(QMimeSourceInterface e, ArrayList i);
-// public static native boolean decodeToUnicodeUris(QMimeSourceInterface e, ArrayList i);
-// public static native boolean decodeLocalFiles(QMimeSourceInterface e, ArrayList i);
+// public static native boolean decode(TQMimeSourceInterface e, ArrayList i);
+// public static native boolean decodeToUnicodeUris(TQMimeSourceInterface e, ArrayList i);
+// public static native boolean decodeLocalFiles(TQMimeSourceInterface e, ArrayList i);
EOF
@@ -532,7 +532,7 @@ sub cplusplusToJava
my $className = $cplusplusType;
$className =~ s/[*&]//;
- if ( $cplusplusType =~ /void\*|KHTMLPart::PageSecurity|QFileInfoList|QValueList<QIconDragItem>|QValueList<QCString>|QValueList<QVariant>|QValueList<QPixmap>|QValueListConstIterator<QString>|QMap|EditMode|QPtrList<QPixmap>|QPtrList<QPoint>|QTextFormat|QTextCursor|QTextDocument|QNetworkProtocolFactoryBase|QDomNodePrivate|QSqlDriverCreatorBase|QSqlFieldInfoList|QObjectUserData|QUObject|QTextParag|QWidgetMapper|QMemArray<int>|QBitArray|QLayoutIterator|QAuBucket|QUnknownInterface|QConnectionList/ ) {
+ if ( $cplusplusType =~ /void\*|KHTMLPart::PageSecurity|TQFileInfoList|TQValueList<TQIconDragItem>|TQValueList<TQCString>|TQValueList<TQVariant>|TQValueList<TQPixmap>|TQValueListConstIterator<TQString>|TQMap|EditMode|TQPtrList<TQPixmap>|TQPtrList<TQPoint>|TQTextFormat|TQTextCursor|TQTextDocument|TQNetworkProtocolFactoryBase|TQDomNodePrivate|TQSqlDriverCreatorBase|TQSqlFieldInfoList|TQObjectUserData|TQUObject|TQTextParag|TQWidgetMapper|TQMemArray<int>|TQBitArray|TQLayoutIterator|TQAuBucket|TQUnknownInterface|TQConnectionList/ ) {
return ""; # Unsupported type
} elsif ( $cplusplusType =~ /bool/ && kalyptusDataDict::ctypemap($cplusplusType) eq "int" ) {
return "boolean";
@@ -551,7 +551,7 @@ sub cplusplusToJava
return "short[]";
} elsif ( $cplusplusType =~ /KCmdLineOptions/ ) {
return "String[][]";
- } elsif ( $cplusplusType =~ /char\s*\*\*/ || $cplusplusType =~ /QStringList/|| $cplusplusType =~ /QStrList/) {
+ } elsif ( $cplusplusType =~ /char\s*\*\*/ || $cplusplusType =~ /TQStringList/|| $cplusplusType =~ /TQStrList/) {
return "String[]";
} elsif ( kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QUrlInfoValueList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QVariantValueList\s*\*/
@@ -569,24 +569,24 @@ sub cplusplusToJava
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_StyleSheetList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_MediaList\s*\*/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /kde_OfferList\s*\*/
- || $cplusplusType =~ /QMemArray<QRect>/
+ || $cplusplusType =~ /TQMemArray<TQRect>/
|| kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QCanvasItemList\s*\*/ ) {
return "ArrayList"
} elsif ( $cplusplusType =~ /uchar\s*\*/ ) {
return "char[]";
} elsif ( $cplusplusType =~ /QC?String/ and !$isConst ) {
return "StringBuffer"
- } elsif ( $cplusplusType =~ /(DOM::)?DOMString/ || $cplusplusType =~ /QString/ || $cplusplusType =~ /QCString/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /^(const )?char\s*\*/ ) {
+ } elsif ( $cplusplusType =~ /(DOM::)?DOMString/ || $cplusplusType =~ /TQString/ || $cplusplusType =~ /TQCString/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /^(const )?char\s*\*/ ) {
return "String"
- } elsif ( $cplusplusType =~ /QChar\s*[&\*]?/ || $cplusplusType =~ /^char$/ ) {
+ } elsif ( $cplusplusType =~ /TQChar\s*[&\*]?/ || $cplusplusType =~ /^char$/ ) {
return "char"
} elsif ( kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QTime\s*\*/ ) {
return "Date"
} elsif ( kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QDateTime\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QDate\s*\*/ ) {
return "Calendar"
- } elsif ( $cplusplusType =~ /QPaintDevice/ ) {
- return "QPaintDeviceInterface"
- } elsif ( $cplusplusType =~ /QByteArray/ ) {
+ } elsif ( $cplusplusType =~ /TQPaintDevice/ ) {
+ return "TQPaintDeviceInterface"
+ } elsif ( $cplusplusType =~ /TQByteArray/ ) {
return "byte[]"
} elsif ( kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_([^\*\s]*)(.*)$/ and !$skippedClasses{$className}) {
if ( kalyptusDataDict::interfacemap($1) ne () ) {
@@ -644,10 +644,10 @@ sub writeDoc
mkpath( $outputdir ) unless -f $outputdir;
- # Define QPtrCollection::Item, for resolveType
- unless ( kdocAstUtil::findRef( $rootnode, "QPtrCollection::Item" ) ) {
- my $cNode = kdocAstUtil::findRef( $rootnode, "QPtrCollection" );
- warn "QPtrCollection not found" if (!$cNode);
+ # Define TQPtrCollection::Item, for resolveType
+ unless ( kdocAstUtil::findRef( $rootnode, "TQPtrCollection::Item" ) ) {
+ my $cNode = kdocAstUtil::findRef( $rootnode, "TQPtrCollection" );
+ warn "TQPtrCollection not found" if (!$cNode);
my $node = Ast::New( 'Item' );
$node->AddProp( "NodeType", "Forward" );
$node->AddProp( "Source", $cNode->{Source} ) if ($cNode);
@@ -684,33 +684,33 @@ sub preParseClass
if( $#{$classNode->{Kids}} < 0 ||
$classNode->{Access} eq "private" ||
- $classNode->{Access} eq "protected" || # e.g. QPixmap::QPixmapData
+ $classNode->{Access} eq "protected" || # e.g. TQPixmap::TQPixmapData
exists $classNode->{Tmpl} ||
- # Don't generate standard bindings for QString, this class is handled as a native type
- $className eq 'QString' ||
- $className eq 'QConstString' ||
- $className eq 'QCString' ||
+ # Don't generate standard bindings for TQString, this class is handled as a native type
+ $className eq 'TQString' ||
+ $className eq 'TQConstString' ||
+ $className eq 'TQCString' ||
# Don't map classes which are really arrays
- $className eq 'QStringList' ||
- $className eq 'QCanvasItemList' ||
- $className eq 'QWidgetList' ||
- $className eq 'QObjectList' ||
- $className eq 'QStrList' ||
+ $className eq 'TQStringList' ||
+ $className eq 'TQCanvasItemList' ||
+ $className eq 'TQWidgetList' ||
+ $className eq 'TQObjectList' ||
+ $className eq 'TQStrList' ||
# Those are template related
- $className eq 'QTSManip' || # cause compiler errors with several gcc versions
- $className eq 'QIconFactory' ||
- $className eq 'QGDict' ||
- $className eq 'QGList' ||
- $className eq 'QGVector' ||
- $className eq 'QStrIList' ||
- $className eq 'QStrIVec' ||
- $className eq 'QByteArray' ||
- $className eq 'QBitArray' ||
- $className eq 'QWExtra' ||
- $className eq 'QTLWExtra' ||
- $className eq 'QMetaEnum::Item' ||
- $className eq 'QWidgetContainerPlugin' ||
- $className eq 'QGArray::array_data' ||
+ $className eq 'TQTSManip' || # cause compiler errors with several gcc versions
+ $className eq 'TQIconFactory' ||
+ $className eq 'TQGDict' ||
+ $className eq 'TQGList' ||
+ $className eq 'TQGVector' ||
+ $className eq 'TQStrIList' ||
+ $className eq 'TQStrIVec' ||
+ $className eq 'TQByteArray' ||
+ $className eq 'TQBitArray' ||
+ $className eq 'TQWExtra' ||
+ $className eq 'TQTLWExtra' ||
+ $className eq 'TQMetaEnum::Item' ||
+ $className eq 'TQWidgetContainerPlugin' ||
+ $className eq 'TQGArray::array_data' ||
$className eq 'KBookmarkMenu::DynMenuInfo' ||
$className eq 'KCompletionMatches' ||
$className eq 'KDEDesktopMimeType::Service' ||
@@ -769,7 +769,7 @@ sub preParseClass
$className =~ /.*Impl$/ ||
$className =~ /.*Internal.*/ ||
# $classNode->{Deprecated} ||
- $classNode->{NodeType} eq 'union' # Skip unions for now, e.g. QPDevCmdParam
+ $classNode->{NodeType} eq 'union' # Skip unions for now, e.g. TQPDevCmdParam
) {
print STDERR "Skipping $className\n" if ($debug);
print STDERR "Skipping union $className\n" if ( $classNode->{NodeType} eq 'union');
@@ -803,7 +803,7 @@ sub preParseClass
my $name = $m->{astNodeName};
if( $m->{NodeType} eq "method" ) {
- if ( $m->{ReturnType} eq 'typedef' # QFile's EncoderFn/DecoderFn callback, very badly parsed
+ if ( $m->{ReturnType} eq 'typedef' # TQFile's EncoderFn/DecoderFn callback, very badly parsed
) {
$m->{NodeType} = 'deleted';
next;
@@ -891,7 +891,7 @@ sub preParseClass
|| ($classNode->{astNodeName} eq 'KSimpleFileFilter' and $name eq 'nameFilters')
|| ($classNode->{astNodeName} eq 'KTabWidget' and $name eq 'isTabReorderingEnabled')
|| ($classNode->{astNodeName} eq 'KTabWidget' and $name eq 'hoverCloseButton')
- || ($classNode->{astNodeName} eq 'QUriDrag' and $name =~ /^decode$|decodeLocalFiles|decodeToUnicodeUris/)
+ || ($classNode->{astNodeName} eq 'TQUriDrag' and $name =~ /^decode$|decodeLocalFiles|decodeToUnicodeUris/)
|| ($name eq 'virtual_hook')
|| ($name =~ /_KShared_/)
|| ($name eq 'qObject')
@@ -920,12 +920,12 @@ sub preParseClass
}
if ( $arg->{ArgType} eq '...' # refuse a method with variable arguments
- or $arg->{ArgType} eq 'image_io_handler' # QImage's callback
- or $arg->{ArgType} eq 'DecoderFn' # QFile's callback
- or $arg->{ArgType} eq 'EncoderFn' # QFile's callback
- or $arg->{ArgType} =~ /bool \(\*\)\(QObject/ # QMetaObject's ctor
- or $arg->{ArgType} eq 'QtStaticMetaObjectFunction' # QMetaObjectCleanUp's ctor with func pointer
- or $arg->{ArgType} eq 'const QTextItem&' # ref to a private class in 3.2.0b1
+ or $arg->{ArgType} eq 'image_io_handler' # TQImage's callback
+ or $arg->{ArgType} eq 'DecoderFn' # TQFile's callback
+ or $arg->{ArgType} eq 'EncoderFn' # TQFile's callback
+ or $arg->{ArgType} =~ /bool \(\*\)\(TQObject/ # TQMetaObject's ctor
+ or $arg->{ArgType} eq 'QtStaticMetaObjectFunction' # TQMetaObjectCleanUp's ctor with func pointer
+ or $arg->{ArgType} eq 'const TQTextItem&' # ref to a private class in 3.2.0b1
or $arg->{ArgType} eq 'FILE*' # won't be able to handle that I think
or $arg->{ArgType} eq 'const KKeyNative&' #
) {
@@ -933,8 +933,8 @@ sub preParseClass
}
else
{
- # Resolve type in full, e.g. for QSessionManager::RestartHint
- # (QSessionManagerJBridge doesn't inherit QSessionManager)
+ # Resolve type in full, e.g. for TQSessionManager::RestartHint
+ # (TQSessionManagerJBridge doesn't inherit TQSessionManager)
$arg->{ArgType} = kalyptusDataDict::resolveType($arg->{ArgType}, $classNode, $rootnode);
registerType( $arg->{ArgType} );
$argId++;
@@ -967,7 +967,7 @@ sub preParseClass
}
elsif( $m->{NodeType} eq 'var' ) {
my $varType = $m->{Type};
- # We are interested in public static vars, like QColor::blue
+ # We are interested in public static vars, like TQColor::blue
if ( $varType =~ s/static\s+// && $m->{Access} ne 'private'
&& $className."::".$m->{astNodeName} ne "KSpell::modalListText" )
{
@@ -1021,14 +1021,14 @@ sub preParseClass
$methodNode->AddProp( "Access", "public" );
}
- # If we have a private pure virtual, then the class can't be instanciated (e.g. QCanvasItem)
- # Same if the class has only private constructors (e.g. QInputDialog)
+ # If we have a private pure virtual, then the class can't be instanciated (e.g. TQCanvasItem)
+ # Same if the class has only private constructors (e.g. TQInputDialog)
$classNode->AddProp( "CanBeInstanciated", $hasPublicProtectedConstructor
# && !$hasPrivatePureVirtual
- && (!$classNode->{Pure} or $classNode->{astNodeName} eq 'QValidator')
+ && (!$classNode->{Pure} or $classNode->{astNodeName} eq 'TQValidator')
&& !($classNode->{NodeType} eq 'namespace')
&& ($classNode->{astNodeName} !~ /^DrawContentsEvent$|^MouseEvent$|^MouseDoubleClickEvent$|^MouseMoveEvent$|^MouseReleaseEvent$|^MousePressEvent$/)
- && ($classNode->{astNodeName} !~ /QMetaObject|QDragObject|Slave|CopyJob|KMdiChildFrm|KNamedCommand/) );
+ && ($classNode->{astNodeName} !~ /TQMetaObject|TQDragObject|Slave|CopyJob|KMdiChildFrm|KNamedCommand/) );
# We will derive from the class only if it has public or protected constructors.
# (_Even_ if it has pure virtuals. But in that case the *.cpp class can't be instantiated either.)
@@ -1037,9 +1037,9 @@ sub preParseClass
# We need a public dtor to destroy the object --- ### aren't protected dtors ok too ??
$classNode->AddProp( "HasPublicDestructor", $hasPublicDestructor );
- # Hack for QAsyncIO. We don't implement the "if a class has no explicit copy ctor,
+ # Hack for TQAsyncIO. We don't implement the "if a class has no explicit copy ctor,
# then all of its member variables must be copiable, otherwise the class isn't copiable".
- $hasPrivateCopyConstructor = 1 if ( $className eq 'QAsyncIO' );
+ $hasPrivateCopyConstructor = 1 if ( $className eq 'TQAsyncIO' );
# Remember if this class can't be copied - it means all its descendants can't either
$classNode->AddProp( "CanBeCopied", !$hasPrivateCopyConstructor );
@@ -1123,7 +1123,7 @@ sub writeClassDoc
my @ancestor_nodes = ();
Iter::Ancestors( $node, $rootnode, undef, undef, sub {
my ( $ances, $name, $type, $template ) = @_;
- if ( $name ne "QMemArray" and $name ne "QSqlFieldInfoList" ) {
+ if ( $name ne "TQMemArray" and $name ne "TQSqlFieldInfoList" ) {
push @ancestor_nodes, $ances;
push @ancestors, $name;
}
@@ -1171,7 +1171,7 @@ sub writeClassDoc
print CLASS "import java.text.MessageFormat;\n";
print CLASS "import java.lang.reflect.*;\n";
} else {
- if ( $className eq 'QListView' or $className eq 'QListViewItem' or $className eq 'QUriDrag' ) {
+ if ( $className eq 'TQListView' or $className eq 'TQListViewItem' or $className eq 'TQUriDrag' ) {
# Special case these two classes as they have methods that use ArrayList added as 'extras'
print CLASS "import java.util.ArrayList;\n";
}
@@ -1290,33 +1290,33 @@ sub writeClassDoc
if ( $className eq 'Qt' ) {
print CLASS $qtExtras;
- } elsif ( $className eq 'QApplication' ) {
+ } elsif ( $className eq 'TQApplication' ) {
print CLASS $qapplicationExtras;
- } elsif ( $className eq 'QBitmap' ) {
+ } elsif ( $className eq 'TQBitmap' ) {
print CLASS $qbitmapExtras;
- } elsif ( $className eq 'QDropEvent' ) {
+ } elsif ( $className eq 'TQDropEvent' ) {
print CLASS $qdropeventExtras;
- } elsif ( $className eq 'QDragObject' ) {
+ } elsif ( $className eq 'TQDragObject' ) {
print CLASS $qdragobjectExtras;
- } elsif ( $className eq 'QObject' ) {
+ } elsif ( $className eq 'TQObject' ) {
print CLASS $qobjectExtras;
- } elsif ( $className eq 'QListView' ) {
+ } elsif ( $className eq 'TQListView' ) {
print CLASS $qlistviewExtras;
- } elsif ( $className eq 'QListViewItem' ) {
+ } elsif ( $className eq 'TQListViewItem' ) {
print CLASS $qlistviewitemExtras;
- } elsif ( $className eq 'QMimeSource' ) {
+ } elsif ( $className eq 'TQMimeSource' ) {
print CLASS $qmimesourceExtras;
- } elsif ( $className eq 'QWidget' ) {
+ } elsif ( $className eq 'TQWidget' ) {
print CLASS $qwidgetExtras;
- } elsif ( $className eq 'QPaintDevice' ) {
+ } elsif ( $className eq 'TQPaintDevice' ) {
print CLASS $qpaintdeviceExtras;
- } elsif ( $className eq 'QPixmap' ) {
+ } elsif ( $className eq 'TQPixmap' ) {
print CLASS $qpixmapExtras;
- } elsif ( $className eq 'QIODevice' ) {
+ } elsif ( $className eq 'TQIODevice' ) {
print CLASS $qiodeviceExtras;
- } elsif ( $className eq 'QPointArray' ) {
+ } elsif ( $className eq 'TQPointArray' ) {
print CLASS $qpointarrayExtras;
- } elsif ( $className eq 'QUriDrag' ) {
+ } elsif ( $className eq 'TQUriDrag' ) {
print CLASS $quridragExtras;
} elsif ( $className eq 'KApplication' ) {
print CLASS $kapplicationExtras;
@@ -1450,7 +1450,7 @@ sub coerce_type($$$$) {
} else {
if ( $unionfield eq 's_class'
or ( $unionfield eq 's_voidp' and $type ne 'void*' )
- or $type eq 'QString' ) { # hack
+ or $type eq 'TQString' ) { # hack
$type =~ s/^const\s+//;
if($new) {
$code .= "(void*)new $type($var);\n";
@@ -1466,7 +1466,7 @@ sub coerce_type($$$$) {
}
# Generate the list of args casted to their real type, e.g.
-# (QObject*)x[1].s_class,(QEvent*)x[2].s_class,x[3].s_int
+# (TQObject*)x[1].s_class,(TQEvent*)x[2].s_class,x[3].s_int
sub makeCastedArgList
{
my @castedList;
@@ -1498,7 +1498,7 @@ sub makeCastedArgList
} else {
if ( $unionfield eq 's_class'
or ( $unionfield eq 's_voidp' and $type ne 'void*' )
- or $type eq 'QString' ) { # hack
+ or $type eq 'TQString' ) { # hack
$cast = "*($type *)";
} else {
$cast = "($type)";
@@ -1694,8 +1694,8 @@ sub generateMethod($$$$$$$)
@heritage = kdocAstUtil::heritage($mainClassNode);
my $mainClassName = join( "::", @heritage );
- # The javaClassName might be 'QWidget', while currentClassName is 'QRangeControl'
- # and the QRangeControl methods are being copied into QWidget.
+ # The javaClassName might be 'TQWidget', while currentClassName is 'TQRangeControl'
+ # and the TQRangeControl methods are being copied into TQWidget.
my $javaClassName = $mainClassNode->{astNodeName};
my $currentClassName = $classNode->{astNodeName};
@@ -1755,18 +1755,18 @@ sub generateMethod($$$$$$$)
# # Skip internal methods, which return unknown types
# # Hmm, the C# bindings have a list of those too.
-# return if ( $returnType =~ m/QGfx\s*\*/ );
+# return if ( $returnType =~ m/TQGfx\s*\*/ );
# return if ( $returnType eq 'CGContextRef' );
-# return if ( $returnType eq 'QWSDisplay *' );
+# return if ( $returnType eq 'TQWSDisplay *' );
# # This stuff needs callback, or **
# return if ( $name eq 'defineIOHandler' or $name eq 'qt_init_internal' );
# # Skip casting operators, but not == < etc.
# return if ( $name =~ /operator \w+/ );
-# # QFile's EncoderFn/DecoderFn
+# # TQFile's EncoderFn/DecoderFn
# return if ( $name =~ /set[ED][ne]codingFunction/ );
-# # How to implement this? (QXmlDefaultHandler/QXmlEntityResolver::resolveEntity, needs A*&)
-# return if ( $name eq 'resolveEntity' and $className =~ /^QXml/ );
-# return if ( $className eq 'QBitArray' && $m->{Access} eq 'protected' );
+# # How to implement this? (TQXmlDefaultHandler/TQXmlEntityResolver::resolveEntity, needs A*&)
+# return if ( $name eq 'resolveEntity' and $className =~ /^TQXml/ );
+# return if ( $className eq 'TQBitArray' && $m->{Access} eq 'protected' );
#print STDERR "Tests passed, generating.\n";
@@ -1816,7 +1816,7 @@ sub generateMethod($$$$$$$)
checkImportsForObject( $argType, $addImport );
}
- if ( $name eq 'QApplication' or ($javaClassName eq 'KCmdLineArgs' and $name eq 'init' and scalar(@javaArgList) > 1) ) {
+ if ( $name eq 'TQApplication' or ($javaClassName eq 'KCmdLineArgs' and $name eq 'init' and scalar(@javaArgList) > 1) ) {
# Junk the 'int argc' parameter
shift @javaArgTypeList;
shift @javaArgList;
@@ -1877,8 +1877,8 @@ sub generateMethod($$$$$$$)
}
} else {
- if ($name eq 'find' and $javaClassName eq 'QButtonGroup') {
- # Can't override a static method find() in QWidget
+ if ($name eq 'find' and $javaClassName eq 'TQButtonGroup') {
+ # Can't override a static method find() in TQWidget
$name = "findButton";
} elsif ( $name eq 'null' ) {
$name = "nil";
@@ -1888,7 +1888,7 @@ sub generateMethod($$$$$$$)
$name = "waitThread";
} elsif ( $name eq 'finalize' and $javaClassName eq 'KMD5' ) {
$name = "finalizeDigest";
- } elsif ( $name eq 'icon' and $javaClassName eq 'QMessageBox' ) {
+ } elsif ( $name eq 'icon' and $javaClassName eq 'TQMessageBox' ) {
$name = "iconId";
} elsif ( $name eq 'icon' and $javaClassName eq 'KURLBarItemDialog' ) {
$name = "iconName";
@@ -1968,13 +1968,13 @@ sub generateMethod($$$$$$$)
if ($name =~ /^xForm$/ ) {
$javaReturnType = "Object";
} elsif ($javaSignature eq "layout()" and $javaReturnType ne 'void') {
- $altReturnType = "QLayout";
- } elsif ($javaSignature eq "defaultFactory()" and $javaReturnType eq 'QSqlEditorFactory') {
- $javaReturnType = "QEditorFactory";
+ $altReturnType = "TQLayout";
+ } elsif ($javaSignature eq "defaultFactory()" and $javaReturnType eq 'TQSqlEditorFactory') {
+ $javaReturnType = "TQEditorFactory";
} elsif ($javaSignature eq "statusBar()") {
- $altReturnType = "QStatusBar";
+ $altReturnType = "TQStatusBar";
} elsif ($javaSignature eq "menuBar()") {
- $altReturnType = "QMenuBar";
+ $altReturnType = "TQMenuBar";
} elsif ($javaSignature =~ /^bits|^scanLine/) {
$javaReturnType = "byte[]";
} elsif ($javaSignature eq "at()" and $javaClassName eq 'KFilterDev') {
@@ -2118,8 +2118,8 @@ sub generateAllMethods($$$$$$)
my $className = join( "::", kdocAstUtil::heritage($classNode) );
my $javaClassName = $mainClassNode->{astNodeName};
# If the C++ class had multiple inheritance, then the code for all but one of the
- # parents must be copied into the code for javaClassName. Hence, for QWidget current
- # classname might be QPaintDevice, as its methods are needed in QWidget.
+ # parents must be copied into the code for javaClassName. Hence, for TQWidget current
+ # classname might be TQPaintDevice, as its methods are needed in TQWidget.
my $currentClassName = join( ".", kdocAstUtil::heritage($classNode) );
my $sourcename = $classNode->{Source}->{astNodeName};
@@ -2369,7 +2369,7 @@ sub registerType($$) {
return;
}
- die if $type eq 'QTextEdit::UndoRedoInfo::Type';
+ die if $type eq 'TQTextEdit::UndoRedoInfo::Type';
die if $type eq '';
my $realType = $type;
@@ -2432,7 +2432,7 @@ sub direct_superclass_list($)
Iter::Ancestors( $classNode, $rootnode, undef, undef, sub {
( $direct_ancestor, $name ) = @_;
- if ($name =~ /QMemArray|QSqlFieldInfoList/) {
+ if ($name =~ /TQMemArray|TQSqlFieldInfoList/) {
# Template classes, give up for now..
$has_ancestor = 1;
} elsif (kalyptusDataDict::interfacemap($name) eq "") {
@@ -2539,8 +2539,8 @@ sub prepareCaseDict($) {
$ok = 0 if ( $ok && $m->{Flags} =~ "p" );
# Bugfix for Qt-3.0.4: those methods are NOT implemented (report sent).
- $ok = 0 if ( $ok && $className eq 'QLineEdit' && ( $name eq 'setPasswordChar' || $name eq 'passwordChar' ) );
- $ok = 0 if ( $ok && $className eq 'QWidgetItem' && $name eq 'widgetSizeHint' );
+ $ok = 0 if ( $ok && $className eq 'TQLineEdit' && ( $name eq 'setPasswordChar' || $name eq 'passwordChar' ) );
+ $ok = 0 if ( $ok && $className eq 'TQWidgetItem' && $name eq 'widgetSizeHint' );
if ( !$ok )
{
@@ -2794,7 +2794,7 @@ sub writeSmokeDataFile($) {
# First write the name
# print OUT "\t{ \"$type\", ";
# Then write the classId (and find out the typeid at the same time)
- if(exists $classidx{$realType}) { # this one first, we want t_class for QBlah*
+ if(exists $classidx{$realType}) { # this one first, we want t_class for TQBlah*
$typeId = 't_class';
# print OUT "$classidx{$realType}, ";
}
@@ -3300,11 +3300,11 @@ sub printJavadocComment($$$$)
$line =~ s/(const )?QC?StringList(\s*&)?/ArrayList/g;
}
$line =~ s/NodeList|KTrader::OfferList/ArrayList/g;
- $line =~ s/(const )?QDate(Time)?(\s*&)?/Calendar/g;
- $line =~ s/(const )?QTime([^r])/Date$1/g;
- $line =~ s/QString::null/null/g;
+ $line =~ s/(const )?TQDate(Time)?(\s*&)?/Calendar/g;
+ $line =~ s/(const )?TQTime([^r])/Date$1/g;
+ $line =~ s/TQString::null/null/g;
$line =~ s/(const )?QC?String(\s*&)?/String/g;
- $line =~ s/QByteArray/byte[]/g;
+ $line =~ s/TQByteArray/byte[]/g;
$line =~ s/(const )?KCmdLineOptions\s*(\w+)\[\]/String[][] $2/;
$line =~ s/KCmdLineLastOption//g;
$line =~ s/virtual //g;
@@ -3366,7 +3366,7 @@ sub printJavadocComment($$$$)
if ( defined $docnode->{Returns} ) {
my $text = $docnode->{Returns};
- $text =~ s/QString::null/null/g;
+ $text =~ s/TQString::null/null/g;
$returntext .= "\t\t\@return $text\n";
}
@@ -3388,7 +3388,7 @@ sub printJavadocComment($$$$)
if ( defined $docnode->{See} ) {
foreach my $text ( @{$docnode->{See}} ) {
- next if ($text =~ /QString|^\s*and\s*$|^\s*$|^[^\w]*$/);
+ next if ($text =~ /TQString|^\s*and\s*$|^\s*$|^[^\w]*$/);
$text =~ s/KIO:://g;
$text =~ s/KParts:://g;
$text =~ s/bool/boolean/g;
@@ -3407,10 +3407,10 @@ sub printJavadocComment($$$$)
$returntext =~ s/KIO#([A-Z])/$1/g;
$returntext =~ s/KParts#([A-Z])/$1/g;
$returntext =~ s/const\s+(\w+)\s*\&/$1/g;
- $returntext =~ s/QChar/char/g;
- $returntext =~ s/QStringList/ArrayList/g;
+ $returntext =~ s/TQChar/char/g;
+ $returntext =~ s/TQStringList/ArrayList/g;
$returntext =~ s/([Aa]) ArrayList/$1n ArrayList/g;
- $returntext =~ s/QString/String/g;
+ $returntext =~ s/TQString/String/g;
$returntext =~ s/KCmdLineOptions/String[][]/;
$returntext =~ s!\\note!<b>Note:<\b>!g;
$returntext =~ s!\\(code|verbatim)!<pre>!g;