diff options
Diffstat (limited to 'kalyptus/kalyptusCxxToKimono.pm')
-rw-r--r-- | kalyptus/kalyptusCxxToKimono.pm | 552 |
1 files changed, 276 insertions, 276 deletions
diff --git a/kalyptus/kalyptusCxxToKimono.pm b/kalyptus/kalyptusCxxToKimono.pm index 7eedd967..77e0af85 100644 --- a/kalyptus/kalyptusCxxToKimono.pm +++ b/kalyptus/kalyptusCxxToKimono.pm @@ -70,19 +70,19 @@ BEGIN # Mapping for iterproto, when making up the munged method names %mungedTypeMap = ( - 'QString' => '$', - 'QString*' => '$', - 'QString&' => '$', - 'QCString' => '$', - 'QCString*' => '$', - 'QCString&' => '$', + 'TQString' => '$', + 'TQString*' => '$', + 'TQString&' => '$', + 'TQCString' => '$', + 'TQCString*' => '$', + 'TQCString&' => '$', 'char*' => '$', - 'QCOORD*' => '?', - 'QRgb*' => '?', + 'TQCOORD*' => '?', + 'TQRgb*' => '?', 'Q_UINT64' => '$', 'Q_INT64' => '$', 'Q_LLONG' => '$', - 'quint64' => '$', + 'tquint64' => '$', 'qint64' => '$', 'long long' => '$', 'qulonglong' => '$', @@ -105,47 +105,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', 'qint16' => 'short', 'Q_INT32' => 'int', @@ -155,11 +155,11 @@ BEGIN 'qint8' => 'char', 'Q_LONG' => 'long', 'Q_UINT16' => 'ushort', - 'quint16' => 'ushort', + 'tquint16' => 'ushort', 'Q_UINT32' => 'uint', - 'quint32' => 'uint', + 'tquint32' => 'uint', 'Q_UINT8' => 'uchar', - 'quint8' => 'uchar', + 'tquint8' => 'uchar', 'Q_ULONG' => 'long', 'qreal' => 'double', 'pid_t' => 'int', @@ -170,18 +170,18 @@ BEGIN 'signed long int' => 'long', 'unsigned long int' => 'ulong', 'unsigned short int' => 'ushort', - 'Qt::Alignment' => 'int', - 'Qt::Orientations' => 'int', - 'Qt::DockWidgetAreas' => 'int', - 'Qt::DropActions' => 'int', - 'Qt::ImageConversionFlags' => 'int', - 'Qt::ItemFlags' => 'int', - 'Qt::KeyboardModifiers' => 'int', - 'Qt::MatchFlags' => 'int', - 'Qt::MouseButtons' => 'int', - 'Qt::ToolBarAreas' => 'int', - 'Qt::WindowFlags' => 'int', - 'Qt::WindowStates' => 'int', + 'TQt::Alignment' => 'int', + 'TQt::Orientations' => 'int', + 'TQt::DockWidgetAreas' => 'int', + 'TQt::DropActions' => 'int', + 'TQt::ImageConversionFlags' => 'int', + 'TQt::ItemFlags' => 'int', + 'TQt::KeyboardModifiers' => 'int', + 'TQt::MatchFlags' => 'int', + 'TQt::MouseButtons' => 'int', + 'TQt::ToolBarAreas' => 'int', + 'TQt::WindowFlags' => 'int', + 'TQt::WindowStates' => 'int', 'AutoFormatting' => 'int', 'DirtyFlags' => 'int', 'EditTriggers' => 'int', @@ -199,27 +199,27 @@ BEGIN 'Permissions' => 'int', 'PrintDialogOptions' => 'int', 'ProcessEventsFlags' => 'int', - 'QDir::Filters' => 'int', - 'QDir::SortFlags' => 'int', - 'QFile::Permissions' => 'int', - 'QGL::FormatOptions' => 'int', - 'QIODevice::OpenMode' => 'int', - 'QImageReader::ImageReaderError' => 'int', - 'QItemSelectionModel::SelectionFlags' => 'int', - 'QPaintEngine::DirtyFlags' => 'int', - 'QPainter::RenderHints' => 'int', - 'QSql::ParamType' => 'int', - 'QTextDocument::FindFlags' => 'int', + 'TQDir::Filters' => 'int', + 'TQDir::SortFlags' => 'int', + 'TQFile::Permissions' => 'int', + 'TQGL::FormatOptions' => 'int', + 'TQIODevice::OpenMode' => 'int', + 'TQImageReader::ImageReaderError' => 'int', + 'TQItemSelectionModel::SelectionFlags' => 'int', + 'TQPaintEngine::DirtyFlags' => 'int', + 'TQPainter::RenderHints' => 'int', + 'TQSql::ParamType' => 'int', + 'TQTextDocument::FindFlags' => 'int', 'Q_PID' => 'int', - 'Qt::DropActions' => 'int', - 'Qt::ImageConversionFlags' => 'int', - 'Qt::ItemFlags' => 'int', - 'Qt::KeyboardModifiers' => 'int', - 'Qt::MatchFlags' => 'int', - 'Qt::MouseButtons' => 'int', - 'Qt::ToolBarAreas' => 'int', - 'Qt::WindowFlags' => 'int', - 'Qt::WindowStates' => 'int', + 'TQt::DropActions' => 'int', + 'TQt::ImageConversionFlags' => 'int', + 'TQt::ItemFlags' => 'int', + 'TQt::KeyboardModifiers' => 'int', + 'TQt::MatchFlags' => 'int', + 'TQt::MouseButtons' => 'int', + 'TQt::ToolBarAreas' => 'int', + 'TQt::WindowFlags' => 'int', + 'TQt::WindowStates' => 'int', 'RenderFlags' => 'int', 'RenderHints' => 'int', 'SortFlags' => 'int', @@ -227,14 +227,14 @@ BEGIN 'Sections' => 'int', 'Filters' => 'int', 'SortFlags' => 'int', - 'QDir::Filters' => 'int', - 'QDir::SortFlags' => 'int', - 'QStyle::State' => 'int', - 'QValidator::State' => 'int', - 'QAbstractSpinBox::StepEnabled' => 'int', - 'QDockWidget::DockWidgetFeatures' => 'int', - 'QStyle::SubControls' => 'int', - 'QSocket::State' => 'int', + 'TQDir::Filters' => 'int', + 'TQDir::SortFlags' => 'int', + 'TQStyle::State' => 'int', + 'TQValidator::State' => 'int', + 'TQAbstractSpinBox::StepEnabled' => 'int', + 'TQDockWidget::DockWidgetFeatures' => 'int', + 'TQStyle::SubControls' => 'int', + 'TQSocket::State' => 'int', ); %operatorNames = @@ -271,7 +271,7 @@ BEGIN $qapplicationExtras = <<EOF; /* Constructor #1 */ - public QApplication(string[] argv) : this((Type) null) { + public TQApplication(string[] argv) : this((Type) null) { Qyoto.Init_qyoto(); CreateProxy(); CreateSignalProxy(); @@ -281,19 +281,19 @@ BEGIN args[0] = System.Reflection.Assembly.GetExecutingAssembly().Location; argv.CopyTo(args, 1); - NewQApplication(args); + NewTQApplication(args); } - private void NewQApplication(string[] argv) { - ProxyQApplication().NewQApplication(argv.Length, argv); + private void NewTQApplication(string[] argv) { + ProxyTQApplication().NewTQApplication(argv.Length, argv); } - [SmokeMethod("QApplication(int&, char**)")] - private void NewQApplication(int argc, string[] argv) { - ProxyQApplication().NewQApplication(argc, argv); + [SmokeMethod("TQApplication(int&, char**)")] + private void NewTQApplication(int argc, string[] argv) { + ProxyTQApplication().NewTQApplication(argc, argv); } /* end Constructor #1 */ /* Constructor #2 */ - public QApplication(string[] argv, bool GUIenabled) : this((Type) null) { + public TQApplication(string[] argv, bool GUIenabled) : this((Type) null) { Qyoto.Init_qyoto(); CreateProxy(); CreateSignalProxy(); @@ -303,19 +303,19 @@ BEGIN args[0] = System.Reflection.Assembly.GetExecutingAssembly().Location; argv.CopyTo(args, 1); - NewQApplication(args,GUIenabled); + NewTQApplication(args,GUIenabled); } - private void NewQApplication(string[] argv, bool GUIenabled) { - ProxyQApplication().NewQApplication(argv.Length, argv,GUIenabled); + private void NewTQApplication(string[] argv, bool GUIenabled) { + ProxyTQApplication().NewTQApplication(argv.Length, argv,GUIenabled); } - [SmokeMethod("QApplication(int&, char**, bool)")] - private void NewQApplication(int argc, string[] argv, bool GUIenabled) { - ProxyQApplication().NewQApplication(argc, argv,GUIenabled); + [SmokeMethod("TQApplication(int&, char**, bool)")] + private void NewTQApplication(int argc, string[] argv, bool GUIenabled) { + ProxyTQApplication().NewTQApplication(argc, argv,GUIenabled); } /* end Constructor #2 */ /* Constructor #3 */ - public QApplication(string[] argv, int arg3) : this((Type) null) { + public TQApplication(string[] argv, int arg3) : this((Type) null) { Qyoto.Init_qyoto(); CreateProxy(); CreateSignalProxy(); @@ -325,14 +325,14 @@ BEGIN args[0] = System.Reflection.Assembly.GetExecutingAssembly().Location; argv.CopyTo(args, 1); - NewQApplication(args,arg3); + NewTQApplication(args,arg3); } - private void NewQApplication(string[] argv, int arg3) { - ProxyQApplication().NewQApplication(argv.Length,argv,arg3); + private void NewTQApplication(string[] argv, int arg3) { + ProxyTQApplication().NewTQApplication(argv.Length,argv,arg3); } - [SmokeMethod("QApplication(int&, char**, QApplication::Type)")] - private void NewQApplication(int argc, string[] argv, int arg3) { - ProxyQApplication().NewQApplication(argc,argv,arg3); + [SmokeMethod("TQApplication(int&, char**, TQApplication::Type)")] + private void NewTQApplication(int argc, string[] argv, int arg3) { + ProxyTQApplication().NewTQApplication(argc,argv,arg3); } /* end Constructor #3 */ @@ -342,16 +342,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 @@ -395,7 +395,7 @@ EOF public const int IO_TimeOutError = 7; public const int IO_UnspecifiedError= 8; - public static QApplication qApp = null; + public static TQApplication qApp = null; public static string SIGNAL(string signal) { return "2"+ signal; @@ -453,7 +453,7 @@ EOF // public native bool truncate( int pos); // public native int begin(); // public native int end(); -// public native QPoint at(int index); +// public native TQPoint at(int index); EOF @@ -468,9 +468,9 @@ EOF EOF $quridragExtras = <<EOF; -// public static native bool decode(QMimeSourceInterface e, ArrayList i); -// public static native bool decodeToUnicodeUris(QMimeSourceInterface e, ArrayList i); -// public static native bool decodeLocalFiles(QMimeSourceInterface e, ArrayList i); +// public static native bool decode(TQMimeSourceInterface e, ArrayList i); +// public static native bool decodeToUnicodeUris(TQMimeSourceInterface e, ArrayList i); +// public static native bool decodeLocalFiles(TQMimeSourceInterface e, ArrayList i); EOF @@ -526,7 +526,7 @@ sub cplusplusToCSharp 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 "bool"; @@ -547,7 +547,7 @@ sub cplusplusToCSharp return "out 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*\*/ @@ -565,23 +565,23 @@ sub cplusplusToCSharp || 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 "StringBuilder" - } 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 "DateTime" } elsif ( kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QDateTime\s*\*/ || kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_QDate\s*\*/ ) { return "DateTime" - } elsif ( $cplusplusType =~ /QPaintDevice/ ) { - return "IQPaintDevice" + } elsif ( $cplusplusType =~ /TQPaintDevice/ ) { + return "ITQPaintDevice" } elsif ( kalyptusDataDict::ctypemap($cplusplusType) =~ /qt_([^\*\s]*)(.*)$/ and !$skippedClasses{$className}) { if ( defined interfaceForClass($1) ) { return interfaceForClass($1); @@ -653,10 +653,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); @@ -693,44 +693,44 @@ 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' || - $className eq 'QLatin1String' || + # Don't generate standard bindings for TQString, this class is handled as a native type + $className eq 'TQString' || + $className eq 'TQConstString' || + $className eq 'TQCString' || + $className eq 'TQLatin1String' || # 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 'QBitArray' || - $className eq 'QWExtra' || - $className eq 'QTLWExtra' || - ($className eq 'QAbstractUndoItem' and $main::qt4) || - ($className eq 'QDebug' and $main::qt4) || - ($className eq 'QNoDebug' and $main::qt4) || - ($className eq 'QObjectData' and $main::qt4) || - ($className eq 'QSysInfo' and $main::qt4) || - ($className eq 'QPNGImageWriter' and $main::qt4) || - ($className eq 'QPNGImagePacker' and $main::qt4) || - ($className eq 'QTextCodec::ConverterState' and $main::qt4) || - ($className eq 'QTextLayout::Selection' and $main::qt4) || - ($className eq 'QTextStreamManipulator' and $main::qt4) || + $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 'TQBitArray' || + $className eq 'TQWExtra' || + $className eq 'TQTLWExtra' || + ($className eq 'TQAbstractUndoItem' and $main::qt4) || + ($className eq 'TQDebug' and $main::qt4) || + ($className eq 'TQNoDebug' and $main::qt4) || + ($className eq 'TQObjectData' and $main::qt4) || + ($className eq 'TQSysInfo' and $main::qt4) || + ($className eq 'TQPNGImageWriter' and $main::qt4) || + ($className eq 'TQPNGImagePacker' and $main::qt4) || + ($className eq 'TQTextCodec::ConverterState' and $main::qt4) || + ($className eq 'TQTextLayout::Selection' and $main::qt4) || + ($className eq 'TQTextStreamManipulator' and $main::qt4) || ($className eq 'iterator' and $main::qt4) || - $className eq 'QMetaEnum::Item' || - $className eq 'QWidgetContainerPlugin' || - $className eq 'QGArray::array_data' || + $className eq 'TQMetaEnum::Item' || + $className eq 'TQWidgetContainerPlugin' || + $className eq 'TQGArray::array_data' || $className eq 'KBookmarkMenu::DynMenuInfo' || $className eq 'KCompletionMatches' || $className eq 'KDEDesktopMimeType::Service' || @@ -785,37 +785,37 @@ sub preParseClass $className eq 'KURL::List' || $className eq 'KWin::Info' || $className eq 'TerminalInterface' || - $className eq 'QForeachContainerBase' || # Qt4 - $className eq 'QInputMethodEvent::Attribute' || # Qt4 - $className eq 'QAbstractTextDocumentLayout::PaintContext' || # Qt4 - $className eq 'QAbstractTextDocumentLayout::Selection' || # Qt4 - $className eq 'QBrushData' || # Qt4 - $className eq 'QIPv6Address' || # Qt4 - $className eq 'QImageTextKeyLang' || # Qt4 - $className eq 'QMap' || # Qt4 - $className eq 'QMap::const_iterator' || # Qt4 - $className eq 'QMap::iterator' || # Qt4 - $className eq 'QMapData' || # Qt4 - $className eq 'QMapData::Node' || # Qt4 - $className eq 'QSharedData' || # Qt4 - $className eq 'QPainterPath::Element' || # Qt4 - $className eq 'QThreadStorageData' || # Qt4 - $className eq 'QVFbHeader' || # Qt4 - $className eq 'QStyleOptionQ3DockWindow' || # Qt4 - $className eq 'QStyleOptionQ3ListView' || # Qt4 - $className eq 'QStyleOptionQ3ListViewItem' || # Qt4 - $className eq 'QStyleOptionQ3ListView' || # Qt4 - $className eq 'QTextLayout::FormatRange' || # Qt4 - $className eq 'QVFbKeyData' || # Qt4 - $className eq 'QVariant::Handler' || # Qt4 - $className eq 'QVariant::PrivateShared' || # Qt4 - $className eq 'QVectorData' || # Qt4 - $className eq 'QWidgetData' || # Qt4 + $className eq 'TQForeachContainerBase' || # Qt4 + $className eq 'TQInputMethodEvent::Attribute' || # Qt4 + $className eq 'TQAbstractTextDocumentLayout::PaintContext' || # Qt4 + $className eq 'TQAbstractTextDocumentLayout::Selection' || # Qt4 + $className eq 'TQBrushData' || # Qt4 + $className eq 'TQIPv6Address' || # Qt4 + $className eq 'TQImageTextKeyLang' || # Qt4 + $className eq 'TQMap' || # Qt4 + $className eq 'TQMap::const_iterator' || # Qt4 + $className eq 'TQMap::iterator' || # Qt4 + $className eq 'TQMapData' || # Qt4 + $className eq 'TQMapData::Node' || # Qt4 + $className eq 'TQSharedData' || # Qt4 + $className eq 'TQPainterPath::Element' || # Qt4 + $className eq 'TQThreadStorageData' || # Qt4 + $className eq 'TQVFbHeader' || # Qt4 + $className eq 'TQStyleOptionQ3DockWindow' || # Qt4 + $className eq 'TQStyleOptionQ3ListView' || # Qt4 + $className eq 'TQStyleOptionQ3ListViewItem' || # Qt4 + $className eq 'TQStyleOptionQ3ListView' || # Qt4 + $className eq 'TQTextLayout::FormatRange' || # Qt4 + $className eq 'TQVFbKeyData' || # Qt4 + $className eq 'TQVariant::Handler' || # Qt4 + $className eq 'TQVariant::PrivateShared' || # Qt4 + $className eq 'TQVectorData' || # Qt4 + $className eq 'TQWidgetData' || # Qt4 $className =~ /.*Private$/ || # Ignore any classes which aren't for public consumption $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'); @@ -849,7 +849,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; @@ -937,8 +937,8 @@ 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} =~ /^QUrl/ and $name eq 'operator==') - || ($classNode->{astNodeName} eq 'QUriDrag' and $name =~ /^decode$|decodeLocalFiles|decodeToUnicodeUris/) + || ($classNode->{astNodeName} =~ /^TQUrl/ and $name eq 'operator==') + || ($classNode->{astNodeName} eq 'TQUriDrag' and $name =~ /^decode$|decodeLocalFiles|decodeToUnicodeUris/) || ($name eq 'virtual_hook') || ($name =~ /_KShared_/) || ($name eq 'qObject') @@ -951,27 +951,27 @@ sub preParseClass || ($name eq 'staticMetaObject') || ($name eq 'type') || ($classNode->{astNodeName} eq 'KTar' and $name eq 'writeFile_impl') - || ($classNode->{astNodeName} eq 'QApplication' and $name eq 'QApplication') + || ($classNode->{astNodeName} eq 'TQApplication' and $name eq 'TQApplication') # Assume only Qt classes have tr() and trUtf8() in their Q_OBJECT macro || ($classNode->{astNodeName} !~ /^Q/ and $name eq 'tr') || ($classNode->{astNodeName} !~ /^Q/ and $name eq 'trUtf8') || ($main::qt4 - && ( ($classNode->{astNodeName} eq 'QWidgetListItem' and $name eq 'operator=') - || ($classNode->{astNodeName} eq 'QColormap' and $name eq 'operator=') - || ($classNode->{astNodeName} eq 'QMatrix' and $name eq 'operator*=') - || ($classNode->{astNodeName} eq 'QListWidget' and $name eq 'setItemPosition') - || ($classNode->{astNodeName} eq 'QFontMetricsF' and $name eq 'operator=') - || ($classNode->{astNodeName} eq 'QFontMetricsF' and $name eq 'QFontMetricsF' - and $#{$m->{ParamList}} == 0 && $m->{ParamList}[0]->{ArgType} eq 'const QFontMetrics&') - || ($classNode->{astNodeName} eq 'QHttp' and $name eq 'supportedOperations') - || ($classNode->{astNodeName} eq 'QRectF' and $name eq 'setX') - || ($classNode->{astNodeName} eq 'QRectF' and $name eq 'setY') - || ($classNode->{astNodeName} eq 'QTextObject' and $name eq 'formatType') - || ($classNode->{astNodeName} eq 'QUrl' and $name eq 'QUrl' - and $#{$m->{ParamList}} == 0 && $m->{ParamList}[0]->{ArgType} eq 'QUrlPrivate&') - || ($classNode->{astNodeName} eq 'QGlobalSpace' and $name eq 'operator<<' and $m->{ParamList}[0]->{ArgType} =~ /QDebug/) - || ($classNode->{astNodeName} eq 'QGlobalSpace' and $#{$m->{ParamList}} > 0 and $name =~ /operator/ and $m->{ParamList}[1]->{ArgType} =~ /QVariant::Type/) + && ( ($classNode->{astNodeName} eq 'TQWidgetListItem' and $name eq 'operator=') + || ($classNode->{astNodeName} eq 'TQColormap' and $name eq 'operator=') + || ($classNode->{astNodeName} eq 'TQMatrix' and $name eq 'operator*=') + || ($classNode->{astNodeName} eq 'TQListWidget' and $name eq 'setItemPosition') + || ($classNode->{astNodeName} eq 'TQFontMetricsF' and $name eq 'operator=') + || ($classNode->{astNodeName} eq 'TQFontMetricsF' and $name eq 'TQFontMetricsF' + and $#{$m->{ParamList}} == 0 && $m->{ParamList}[0]->{ArgType} eq 'const TQFontMetrics&') + || ($classNode->{astNodeName} eq 'TQHttp' and $name eq 'supportedOperations') + || ($classNode->{astNodeName} eq 'TQRectF' and $name eq 'setX') + || ($classNode->{astNodeName} eq 'TQRectF' and $name eq 'setY') + || ($classNode->{astNodeName} eq 'TQTextObject' and $name eq 'formatType') + || ($classNode->{astNodeName} eq 'TQUrl' and $name eq 'TQUrl' + and $#{$m->{ParamList}} == 0 && $m->{ParamList}[0]->{ArgType} eq 'TQUrlPrivate&') + || ($classNode->{astNodeName} eq 'TQGlobalSpace' and $name eq 'operator<<' and $m->{ParamList}[0]->{ArgType} =~ /TQDebug/) + || ($classNode->{astNodeName} eq 'TQGlobalSpace' and $#{$m->{ParamList}} > 0 and $name =~ /operator/ and $m->{ParamList}[1]->{ArgType} =~ /TQVariant::Type/) || ($#{$m->{ParamList}} > 0 and $m->{ParamList}[0]->{ArgType} =~ /Private/) || ($m->{ReturnType} =~ /iterator/) || ($m->{ReturnType} =~ /QT3_SUPPORT/) ) ) @@ -990,12 +990,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&' # ) { @@ -1003,8 +1003,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++; @@ -1037,7 +1037,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" ) { @@ -1091,14 +1091,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.) @@ -1107,9 +1107,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 ); @@ -1171,7 +1171,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; } @@ -1210,7 +1210,7 @@ sub writeClassDoc if ( $className eq 'Qt' ) { ; } 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 "using System.Collections;\n"; } @@ -1313,37 +1313,37 @@ sub writeClassDoc if ( $className eq 'Qt' and ! $main::qt4 ) { print CLASS $qtExtras; - } elsif ( $className eq 'QApplication' and ! $main::qt4 ) { + } elsif ( $className eq 'TQApplication' and ! $main::qt4 ) { print CLASS $qapplicationExtras; - } elsif ( $className eq 'QBitmap' ) { + } elsif ( $className eq 'TQBitmap' ) { print CLASS $qbitmapExtras; - } elsif ( $className eq 'QByteArray' and ! $main::qt4) { + } elsif ( $className eq 'TQByteArray' and ! $main::qt4) { print CLASS $qbytearrayExtras; - } 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 'QSizePolicy' ) { + } elsif ( $className eq 'TQSizePolicy' ) { print CLASS $qsizepolicyExtras; - } elsif ( $className eq 'QUriDrag' ) { + } elsif ( $className eq 'TQUriDrag' ) { print CLASS $quridragExtras; } elsif ( $className eq 'KApplication' ) { print CLASS $kapplicationExtras; @@ -1352,7 +1352,7 @@ sub writeClassDoc } - if ( is_kindof($node, "QObject") ) { + if ( is_kindof($node, "TQObject") ) { print CLASS "\t\tprotected new void CreateSignalProxy() {\n"; print CLASS "\t\t\tSignalInvocation realProxy = new SignalInvocation(typeof(I" . $csharpClassName . "Signals), this);\n"; print CLASS "\t\t\tQ_EMIT = (I" . $csharpClassName . "Signals) realProxy.GetTransparentProxy();\n"; @@ -1497,7 +1497,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"; @@ -1513,7 +1513,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; @@ -1545,7 +1545,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)"; @@ -1748,8 +1748,8 @@ sub generateMethod($$$$$$$) @heritage = kdocAstUtil::heritage($mainClassNode); my $mainClassName = join( "::", @heritage ); - # The csharpClassName might be 'QWidget', while currentClassName is 'QRangeControl' - # and the QRangeControl methods are being copied into QWidget. + # The csharpClassName might be 'TQWidget', while currentClassName is 'TQRangeControl' + # and the TQRangeControl methods are being copied into TQWidget. my $csharpClassName = $mainClassNode->{astNodeName}; my $currentClassName = $classNode->{astNodeName}; @@ -1800,18 +1800,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"; @@ -1865,7 +1865,7 @@ sub generateMethod($$$$$$$) checkImportsForObject( $argType, $addImport ); } - if ( $name eq 'QApplication' or ($csharpClassName eq 'KCmdLineArgs' and $name eq 'init' and scalar(@csharpArgList) > 1) ) { + if ( $name eq 'TQApplication' or ($csharpClassName eq 'KCmdLineArgs' and $name eq 'init' and scalar(@csharpArgList) > 1) ) { # Junk the 'int argc' parameter shift @csharpArgTypeList; shift @csharpArgList; @@ -1927,8 +1927,8 @@ sub generateMethod($$$$$$$) } } else { - if ($name eq 'find' and $csharpClassName eq 'QButtonGroup') { - # Can't override a static method find() in QWidget + if ($name eq 'find' and $csharpClassName eq 'TQButtonGroup') { + # Can't override a static method find() in TQWidget $name = "findButton"; } elsif ( $name eq 'null' ) { $name = "nil"; @@ -1936,7 +1936,7 @@ sub generateMethod($$$$$$$) $name = "formElement"; } elsif ( $name eq 'wait' and $csharpClassName eq 'KProcess' ) { $name = "waitThread"; - } elsif ( $name eq 'icon' and $csharpClassName eq 'QMessageBox' ) { + } elsif ( $name eq 'icon' and $csharpClassName eq 'TQMessageBox' ) { $name = "iconId"; } elsif ( $name eq 'icon' and $csharpClassName eq 'KURLBarItemDialog' ) { $name = "iconName"; @@ -1977,7 +1977,7 @@ sub generateMethod($$$$$$$) $methodCode .= "\t\tpublic $csharpClassName($csharpparams) : this((Type) null) {\n"; $methodCode .= "\t\t\tCreateProxy();\n"; - if ( is_kindof($classNode, "QObject") ) { + if ( is_kindof($classNode, "TQObject") ) { $methodCode .= "\t\t\tCreateSignalProxy();\n"; } @@ -2011,7 +2011,7 @@ sub generateMethod($$$$$$$) || $name eq 'operator>>' ) { # In C# an operator method must be in the same class as its first operand, - # so any operator methods in QGlobalSpace must be left as ordinary method + # so any operator methods in TQGlobalSpace must be left as ordinary method # calls. eg op_write() # 'operator<<' and 'operator>>' can only have int types as the second # arg in C#, so convert them to op_read() and op_write() calls @@ -2063,13 +2063,13 @@ sub generateMethod($$$$$$$) if ($name =~ /^xForm$/ ) { $csharpReturnType = "Object"; } elsif ($csharpSignature eq "layout()" and $csharpReturnType ne 'void') { - $altReturnType = "QLayout"; - } elsif ($csharpSignature eq "defaultFactory()" and $csharpReturnType eq 'QSqlEditorFactory') { - $csharpReturnType = "QEditorFactory"; + $altReturnType = "TQLayout"; + } elsif ($csharpSignature eq "defaultFactory()" and $csharpReturnType eq 'TQSqlEditorFactory') { + $csharpReturnType = "TQEditorFactory"; } elsif ($csharpSignature eq "statusBar()") { - $altReturnType = "QStatusBar"; + $altReturnType = "TQStatusBar"; } elsif ($csharpSignature eq "menuBar()") { - $altReturnType = "QMenuBar"; + $altReturnType = "TQMenuBar"; } elsif ($csharpSignature =~ /^bits|^scanLine/) { $csharpReturnType = "byte[]"; } elsif ($csharpSignature eq "at()" and $csharpClassName eq 'KFilterDev') { @@ -2089,7 +2089,7 @@ sub generateMethod($$$$$$$) $name = lc($1) . $2; } - if ($classNode->{astNodeName} eq 'QIODevice' and $name eq 'State') { + if ($classNode->{astNodeName} eq 'TQIODevice' and $name eq 'State') { $name = 'state'; } } @@ -2311,8 +2311,8 @@ sub generateAllMethods($$$$$$) my $className = join( "::", kdocAstUtil::heritage($classNode) ); my $csharpClassName = $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 csharpClassName. Hence, for QWidget current - # classname might be QPaintDevice, as its methods are needed in QWidget. + # parents must be copied into the code for csharpClassName. 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}; @@ -2563,7 +2563,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; @@ -2626,7 +2626,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 (!defined kalyptusDataDict::interfacemap($name)) { @@ -2733,8 +2733,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 ) { @@ -2988,7 +2988,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}, "; } @@ -3494,9 +3494,9 @@ sub printCSharpdocComment($$$$) $line =~ s/(const )?QC?StringList(\s*&)?/ArrayList/g; } $line =~ s/NodeList|KTrader::OfferList/ArrayList/g; - $line =~ s/(const )?QDate(Time)?(\s*&)?/DateTime/g; - $line =~ s/(const )?QTime([^r])/DateTime$1/g; - $line =~ s/QString::null/null/g; + $line =~ s/(const )?TQDate(Time)?(\s*&)?/DateTime/g; + $line =~ s/(const )?TQTime([^r])/DateTime$1/g; + $line =~ s/TQString::null/null/g; $line =~ s/(const )?QC?String(\s*&)?/string/g; $line =~ s/(const )?KCmdLineOptions\s*(\w+)\[\]/string[][] $2/; $line =~ s/KCmdLineLastOption//g; @@ -3558,7 +3558,7 @@ sub printCSharpdocComment($$$$) 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</return>\n"; } @@ -3580,7 +3580,7 @@ sub printCSharpdocComment($$$$) 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; while ($text =~ /((::)|(->))(.)/) { @@ -3597,10 +3597,10 @@ sub printCSharpdocComment($$$$) $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; |