Update various qt function definitions and static methods for tqt3

pull/1/head
Timothy Pearson 13 years ago
parent 7e7a6b6965
commit 3fda03faf1

@ -81,7 +81,7 @@
2004-06-29 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Java methods now generated for qCompress and qUncompress methods - Michal Ceresna
* Java methods now generated for qCompress and tqUncompress methods - Michal Ceresna
reported that the methods missing from the QtJava api.
2004-06-25 Richard Dale <Richard_Dale@tipitina.demon.co.uk>

@ -142,7 +142,7 @@ $allowed_k_dcop_accesors_re = join("|", @allowed_k_dcop_accesors);
QT_NO_REMOTE => 'QT_NO_REMOTE',
QT_ACCESSIBILITY_SUPPORT => 'QT_ACCESSIBILITY_SUPPORT',
Q_WS_X11 => 'Q_WS_X11',
Q_DISABLE_COPY => 'Q_DISABLE_COPY',
TQ_DISABLE_COPY => 'TQ_DISABLE_COPY',
Q_WS_QWS => 'undef',
Q_WS_MAC => 'undef',
Q_OBJECT => <<'CODE',
@ -499,7 +499,7 @@ LOOP:
$p =~ s/QT_MOC_COMPAT//;
$p =~ s/Q_EXPORT_CODECS_BIG5//;
$p =~ s/QT_COMPAT / /;
$p =~ s/Q_DISABLE_COPY\((\w+)\)/$1(const $1 &);\n$1 &operator=(const $1 &);/;
$p =~ s/TQ_DISABLE_COPY\((\w+)\)/$1(const $1 &);\n$1 &operator=(const $1 &);/;
$p =~ s/TQWIDGETSIZE_MAX/32767/; # Qt/E uses this #define as an enum value - yuck!
$p =~ s/Q_SIGNALS/signals/;
$p =~ s/ASYNC/void/;
@ -861,7 +861,7 @@ sub identifyDecl
\s*(class|struct|union|namespace) # 2 struct type
(?:\s*TQ[A-Z_]*EXPORT[A-Z_]*)?
(?:\s*Q[A-Z_]*EXPORT[A-Z_]*)?
(?:\s*Q_PACKED)?
(?:\s*TQ_PACKED)?
(?:\s*Q_REFCOUNT)?
\s+([\w_]+ # 3 name
(?:<[\w_ :,]+?>)? # maybe explicit template

@ -2279,7 +2279,7 @@ BEGIN
'Q_INT8' => 'char',
'Q_LONG&' => 'long',
'Q_LONG' => 'long',
'Q_PACKED*' => 'void*',
'TQ_PACKED*' => 'void*',
'Q_UINT16&' => 'unsigned short',
'Q_UINT16' => 'unsigned short',
'Q_UINT32&' => 'unsigned int',

@ -48,7 +48,7 @@
#include "tqpointarray.h"
#endif // QT_H
#if !defined( QT_MODULE_CANVAS ) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_CANVAS )
#if !defined( TQT_MODULE_CANVAS ) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_CANVAS )
#define TQM_EXPORT_CANVAS
#define TQM_TEMPLATE_EXTERN_CANVAS
#else
@ -344,7 +344,7 @@ private:
friend void qt_unview(TQCanvas* c);
#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
#if defined(TQ_DISABLE_COPY) // Disabled copy constructor and operator=
TQCanvas( const TQCanvas & );
TQCanvas &operator=( const TQCanvas & );
#endif
@ -384,7 +384,7 @@ private slots:
void updateContentsSize();
private:
#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
#if defined(TQ_DISABLE_COPY) // Disabled copy constructor and operator=
TQCanvasView( const TQCanvasView & );
TQCanvasView &operator=( const TQCanvasView & );
#endif
@ -408,7 +408,7 @@ public:
void setOffset(int x, int y) { hotx = x; hoty = y; }
private:
#if defined(Q_DISABLE_COPY)
#if defined(TQ_DISABLE_COPY)
TQCanvasPixmap( const TQCanvasPixmap & );
TQCanvasPixmap &operator=( const TQCanvasPixmap & );
#endif
@ -454,7 +454,7 @@ public:
{ return (uint)framecount; }
private:
#if defined(Q_DISABLE_COPY)
#if defined(TQ_DISABLE_COPY)
TQCanvasPixmapArray( const TQCanvasPixmapArray & );
TQCanvasPixmapArray &operator=( const TQCanvasPixmapArray & );
#endif
@ -520,7 +520,7 @@ public:
void draw(TQPainter& painter);
private:
#if defined(Q_DISABLE_COPY)
#if defined(TQ_DISABLE_COPY)
TQCanvasSprite( const TQCanvasSprite & );
TQCanvasSprite &operator=( const TQCanvasSprite & );
#endif
@ -776,7 +776,7 @@ protected:
virtual void draw(TQPainter&);
private:
#if defined(Q_DISABLE_COPY)
#if defined(TQ_DISABLE_COPY)
TQCanvasText( const TQCanvasText & );
TQCanvasText &operator=( const TQCanvasText & );
#endif

@ -72,7 +72,7 @@ private:
uint nulltimer : 1;
private: // Disabled copy constructor and operator=
#if defined(Q_DISABLE_COPY)
#if defined(TQ_DISABLE_COPY)
TQTimer( const TQTimer & );
TQTimer &operator=( const TQTimer & );
#endif

@ -764,13 +764,13 @@ public class Qt implements QtSupport {
*/
public static native TQDataStream op_write(TQDataStream arg1, TQCursor arg2);
public static native TQDataStream op_read(TQDataStream arg1, TQCursor arg2);
public static native String qAppName();
public static native String tqAppName();
// void qAddPostRoutine(QtCleanUpFunction arg1); >>>> NOT CONVERTED
// void qRemovePostRoutine(QtCleanUpFunction arg1); >>>> NOT CONVERTED
public static native byte[] qCompress(char[] data, int nbytes);
public static native byte[] qUncompress(char[] data, int nbytes);
public static native byte[] tqUncompress(char[] data, int nbytes);
public static native byte[] qCompress(byte[] data);
public static native byte[] qUncompress(byte[] data);
public static native byte[] tqUncompress(byte[] data);
public static native TQTextStream op_write(TQTextStream arg1, TQDomNode arg2);
public static native TQWMatrix op_mult(TQWMatrix arg1, TQWMatrix arg2);
/** **************************************************
@ -964,7 +964,7 @@ public class Qt implements QtSupport {
public static native TQTextStream op_read(TQTextStream arg1, TQMainWindow arg2);
// TQDataStream& op_read(TQDataStream& arg1,TQGVector& arg2); >>>> NOT CONVERTED
// TQDataStream& op_write(TQDataStream& arg1,const TQGVector& arg2); >>>> NOT CONVERTED
public static native int qRound(double d);
public static native int tqRound(double d);
public static native String qVersion();
public static native boolean qSysInfo(int[] wordSize, boolean[] bigEndian);
public static native boolean qSharedBuild();

@ -1005,7 +1005,7 @@ Java_org_kde_qt_Qt_qAppName(JNIEnv* env, jclass cls)
{
const char* _qstring;
(void) cls;
_qstring = ::qAppName();
_qstring = ::tqAppName();
return QtSupport::fromCharString(env, (char *) _qstring);
}
@ -1631,7 +1631,7 @@ Java_org_kde_qt_Qt_qRound(JNIEnv* env, jclass cls, jdouble d)
{
(void) cls;
(void) env;
jint xret = (jint) ::qRound((double) d);
jint xret = (jint) ::tqRound((double) d);
return xret;
}
@ -1698,7 +1698,7 @@ Java_org_kde_qt_Qt_qUncompress___3B(JNIEnv* env, jclass cls, jbyteArray data)
TQByteArray _qbyteArray;
(void) cls;
static TQByteArray* _qbyteArray_data = 0;
_qbyteArray = ::qUncompress((const TQByteArray&)*(TQByteArray*) QtSupport::toTQByteArray(env, data, &_qbyteArray_data));
_qbyteArray = ::tqUncompress((const TQByteArray&)*(TQByteArray*) QtSupport::toTQByteArray(env, data, &_qbyteArray_data));
return QtSupport::fromTQByteArray(env, &_qbyteArray);
}
@ -1708,7 +1708,7 @@ Java_org_kde_qt_Qt_qUncompress___3CI(JNIEnv* env, jclass cls, jcharArray data, j
TQByteArray _qbyteArray;
(void) cls;
static TQByteArray* _qbytearray_data = 0;
_qbyteArray = ::qUncompress((const uchar*) QtSupport::toUcharArray(env, data, &_qbytearray_data), (int) nbytes);
_qbyteArray = ::tqUncompress((const uchar*) QtSupport::toUcharArray(env, data, &_qbytearray_data), (int) nbytes);
return QtSupport::fromTQByteArray(env, &_qbyteArray);
}

@ -217,7 +217,7 @@ void Uic::embed( TQTextStream& out, const char* project, const TQStringList& ima
out << indent << "end" << endl;
out << indent << endl;
#ifndef QT_NO_IMAGE_COLLECTION_COMPRESSION
out << indent << "baunzip = qUncompress( @@embed_images[name][0].pack(\"C*\")," << endl;
out << indent << "baunzip = tqUncompress( @@embed_images[name][0].pack(\"C*\")," << endl;
out << indent << " @@embed_images[name][0].length )" << endl;
out << indent << "img = TQt::Image.new( baunzip.data," << endl;
out << indent << " @@embed_images[name][1]," << endl;

@ -62,13 +62,13 @@ static TQByteArray unzipXPM( TQString data, ulong& length )
r += l - 'a' + 10;
ba[ i ] = r;
}
// qUncompress() expects the first 4 bytes to be the expected length of the
// tqUncompress() expects the first 4 bytes to be the expected length of the
// uncompressed data
ba[0] = ( length & 0xff000000 ) >> 24;
ba[1] = ( length & 0x00ff0000 ) >> 16;
ba[2] = ( length & 0x0000ff00 ) >> 8;
ba[3] = ( length & 0x000000ff );
TQByteArray baunzip = qUncompress( ba, baSize );
TQByteArray baunzip = tqUncompress( ba, baSize );
delete[] ba;
return baunzip;
}

@ -117,7 +117,7 @@ int main( int argc, char * argv[] )
} else if ( opt == "version" ) {
fprintf( stderr,
"QtRuby User Interface Compiler v%s for Qt version %s\n", RBUIC_VERSION,
QT_VERSION_STR );
TQT_VERSION_STR );
exit( 1 );
} else if ( opt == "help" ) {
break;

@ -48,8 +48,8 @@
#include <ruby.h>
#ifndef QT_VERSION_STR
#define QT_VERSION_STR "Unknown"
#ifndef TQT_VERSION_STR
#define TQT_VERSION_STR "Unknown"
#endif
#undef free
@ -2507,7 +2507,7 @@ findAllMethods(int argc, VALUE * argv, VALUE /*self*/)
&& qstrcmp(qt_Smoke->methodNames[methodRef.name], "operator!=") != 0 \
&& qstrcmp(qt_Smoke->methodNames[methodRef.name], "operator--") != 0 \
&& qstrcmp(qt_Smoke->methodNames[methodRef.name], "operator++") != 0 \
&& qstrncmp(qt_Smoke->methodNames[methodRef.name], "operator ", strlen("operator ")) != 0 \
&& tqstrncmp(qt_Smoke->methodNames[methodRef.name], "operator ", strlen("operator ")) != 0 \
&& ( (flags == 0 && (methodRef.flags & (Smoke::mf_static|Smoke::mf_enum|Smoke::mf_protected)) == 0) \
|| ( flags == Smoke::mf_static \
&& (methodRef.flags & Smoke::mf_enum) == 0 \
@ -2516,7 +2516,7 @@ findAllMethods(int argc, VALUE * argv, VALUE /*self*/)
|| ( flags == Smoke::mf_protected \
&& (methodRef.flags & Smoke::mf_static) == 0 \
&& (methodRef.flags & Smoke::mf_protected) == Smoke::mf_protected ) ) ) { \
if (qstrncmp(qt_Smoke->methodNames[methodRef.name], "operator", strlen("operator")) == 0) { \
if (tqstrncmp(qt_Smoke->methodNames[methodRef.name], "operator", strlen("operator")) == 0) { \
if (op_re.search(qt_Smoke->methodNames[methodRef.name]) != -1) { \
rb_ary_push(result, rb_str_new2(op_re.cap(1) + op_re.cap(2))); \
} else { \
@ -2797,7 +2797,7 @@ create_qt_class(VALUE /*self*/, VALUE package_value)
static VALUE
version(VALUE /*self*/)
{
return rb_str_new2(QT_VERSION_STR);
return rb_str_new2(TQT_VERSION_STR);
}
static VALUE

@ -1748,7 +1748,7 @@ void marshall_TQPairintint(Marshall *m) {
#include <tqtoolbar.h>
#include <tqtabbar.h>
#if QT_VERSION >= 0x030200
#if TQT_VERSION >= 0x030200
DEF_LIST_MARSHALLER( TQPtrListTQNetworkOperation, TQPtrList<TQNetworkOperation>, TQNetworkOperation, TQPtrListStdIterator<TQNetworkOperation> )
DEF_LIST_MARSHALLER( TQPtrListTQToolBar, TQPtrList<TQToolBar>, TQToolBar, TQPtrListStdIterator<TQToolBar> )
DEF_LIST_MARSHALLER( TQPtrListTQTab, TQPtrList<TQTab>, TQTab, TQPtrListStdIterator<TQTab> )
@ -1934,7 +1934,7 @@ TypeHandler Qt_handlers[] = {
{ "TQMap<TQString,TQString>&", marshall_TQMapTQStringTQString },
{ "TQMap<TQString,TQVariant>", marshall_TQMapTQStringTQVariant },
{ "TQMap<TQString,TQVariant>&", marshall_TQMapTQStringTQVariant },
#if QT_VERSION >= 0x030200
#if TQT_VERSION >= 0x030200
{ "TQWidgetList", marshall_TQWidgetList },
{ "TQWidgetList*", marshall_TQWidgetList },
{ "TQWidgetList&", marshall_TQWidgetList },

@ -82,7 +82,7 @@ namespace QtCSharp {
mastermap.Add ("Q_INT32", "int");
mastermap.Add ("Q_INT8", "char");
mastermap.Add ("Q_LONG", "long");
mastermap.Add ("Q_PACKED", "uint");
mastermap.Add ("TQ_PACKED", "uint");
mastermap.Add ("Q_UINT16", "ushort");
mastermap.Add ("Q_UINT32", "uint");
mastermap.Add ("Q_UINT8", "char");

@ -105,7 +105,7 @@ sub grab_qglobal_symbols
$qtdefs{$1} = 1;
}
print "Found ". scalar( keys %qtdefs )." predefined symbol".((scalar( keys %qtdefs ) -1)?"s":"")." in qglobal.h\n" unless ($opt_q or !(keys %qtdefs));
while( $symbols =~/^#\s*define\s*QT_MODULE_(\S+)\s*$/gm )
while( $symbols =~/^#\s*define\s*TQT_MODULE_(\S+)\s*$/gm )
{
$qtundefs{"QT_NO_$1"} = 1;
}

@ -105,7 +105,7 @@ sub grab_qglobal_symbols
$qtdefs{$1} = 1;
}
print "Found ". scalar( keys %qtdefs )." predefined symbol".((scalar( keys %qtdefs ) -1)?"s":"")." in qglobal.h\n" unless ($opt_q or !(keys %qtdefs));
while( $symbols =~/^#\s*define\s*QT_MODULE_(\S+)\s*$/gm )
while( $symbols =~/^#\s*define\s*TQT_MODULE_(\S+)\s*$/gm )
{
$qtundefs{"QT_NO_$1"} = 1;
}

Loading…
Cancel
Save