[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bindings
Subject: [Kde-bindings] Patch for building QtRuby 1.4.9 with windows msvc6
From: Richard Dale <rdale () foton ! es>
Date: 2007-06-26 15:50:34
Message-ID: 200706261650.35203.rdale () foton ! es
[Download RAW message or body]
Kenichi Matsumoto has successfully built QtRuby 1.4.9 with msvc6, see here:
http://www.jzkey.com/qtruby/
Which is really good news.
However, the patch he has made to the marshalling code (please find attached)
is pretty extensive and I wonder if we can make the same code build on all
platforms.
-- Richard
["qtruby149msvc.diff" (text/x-diff)]
Index: ruby/qtruby/tools/rbuic/ui4.h
===================================================================
--- ruby/qtruby/tools/rbuic/ui4.h (.../qtruby) (revision 18)
+++ ruby/qtruby/tools/rbuic/ui4.h (.../qtruby4/msvc) (revision 18)
@@ -127,7 +127,12 @@
/*******************************************************************************
** Declarations
*/
-
+// this makes VC to refer DLL resource.
+#ifdef QDESIGNER_UILIB_EXPORT
+#undef QDESIGNER_UILIB_EXPORT
+#define QDESIGNER_UILIB_EXPORT
+#endif
+
class QDESIGNER_UILIB_EXPORT DomUI {
public:
DomUI();
Index: ruby/qtruby/src/marshall_complex.h
===================================================================
--- ruby/qtruby/src/marshall_complex.h (.../qtruby) (revision 18)
+++ ruby/qtruby/src/marshall_complex.h (.../qtruby4/msvc) (revision 18)
@@ -7,36 +7,38 @@
* *
***************************************************************************/
-template <>
-static void marshall_from_ruby<long long>(Marshall *m)
+struct marshall_from_ruby<int64_t>{
+ static void f( Marshall *m)
{
VALUE obj = *(m->var());
- m->item().s_voidp = new long long;
- *(long long *)m->item().s_voidp = ruby_to_primitive<long long>(obj);
+ m->item().s_voidp = new int64_t;
+ *(int64_t *)m->item().s_voidp = ruby_to_primitive<int64_t>::f(obj);
m->next();
if(m->cleanup() && m->type().isConst()) {
- delete (long long int *) m->item().s_voidp;
+ delete (int64_t *) m->item().s_voidp;
}
}
-template <>
-static void marshall_from_ruby<unsigned long long>(Marshall *m)
+};
+struct marshall_from_ruby<uint64_t>{
+ static void f( Marshall *m)
{
VALUE obj = *(m->var());
- m->item().s_voidp = new unsigned long long;
- *(long long *)m->item().s_voidp = ruby_to_primitive<unsigned long long>(obj);
+ m->item().s_voidp = new uint64_t;
+ *(int64_t *)m->item().s_voidp = ruby_to_primitive<uint64_t>::f(obj);
m->next();
if(m->cleanup() && m->type().isConst()) {
- delete (long long int *) m->item().s_voidp;
+ delete (int64_t *) m->item().s_voidp;
}
}
-template <>
-static void marshall_from_ruby<int *>(Marshall *m)
+};
+struct marshall_from_ruby<int *>{
+ static void f( Marshall *m)
{
VALUE rv = *(m->var());
int *i = new int;
@@ -62,8 +64,9 @@
}
}
-template <>
-static void marshall_to_ruby<int *>(Marshall *m)
+};
+struct marshall_to_ruby<int *>{
+ static void f( Marshall *m)
{
int *ip = (int*)m->item().s_voidp;
VALUE rv = *(m->var());
@@ -78,8 +81,9 @@
*ip = NUM2INT(*(m->var()));
}
-template <>
-static void marshall_from_ruby<bool *>(Marshall *m)
+};
+struct marshall_from_ruby<bool *>{
+ static void f( Marshall *m)
{
VALUE rv = *(m->var());
bool * b = new bool;
@@ -102,8 +106,9 @@
}
}
-template <>
-static void marshall_to_ruby<bool *>(Marshall *m)
+};
+struct marshall_to_ruby<bool *>{
+ static void f( Marshall *m)
{
bool *ip = (bool*)m->item().s_voidp;
if(!ip) {
@@ -116,3 +121,4 @@
*ip = *(m->var()) == Qtrue ? true : false;
}
+};
Index: ruby/qtruby/src/handlers.cpp
===================================================================
--- ruby/qtruby/src/handlers.cpp (.../qtruby) (revision 18)
+++ ruby/qtruby/src/handlers.cpp (.../qtruby4/msvc) (revision 18)
@@ -44,6 +44,7 @@
#if QT_VERSION >= 0x40200
#include <QtGui/qgraphicsitem.h>
#include <QtGui/qgraphicsscene.h>
+#include <QtGui/qgraphicsitem.h>
#include <QtGui/qstandarditemmodel.h>
#include <QtGui/qundostack.h>
#endif
@@ -56,6 +57,12 @@
#include <QtXml/qxmlstream.h>
#endif
+#ifdef _MSC_VER
+#include "vc_stdint.h"
+#else
+#include "stdint.h"
+#endif
+
#include "smoke.h"
#undef DEBUG
@@ -704,78 +711,79 @@
#include "marshall_basetypes.h"
template <class T>
-static void marshall_it(Marshall *m)
-{
+struct marshall_it{
+ static void f(Marshall *m)
+ {
switch(m->action()) {
case Marshall::FromVALUE:
- marshall_from_ruby<T>(m);
+ marshall_from_ruby<T>::f(m);
break;
case Marshall::ToVALUE:
- marshall_to_ruby<T>( m );
+ marshall_to_ruby<T>::f( m );
break;
default:
m->unsupported();
break;
}
-}
-
+ }
+};
void
marshall_basetype(Marshall *m)
{
switch(m->type().elem()) {
case Smoke::t_bool:
- marshall_it<bool>(m);
+ marshall_it<bool>::f(m);
break;
case Smoke::t_char:
- marshall_it<signed char>(m);
+ marshall_it<signed char>::f(m);
break;
case Smoke::t_uchar:
- marshall_it<unsigned char>(m);
+ marshall_it<unsigned char>::f(m);
break;
case Smoke::t_short:
- marshall_it<short>(m);
+ marshall_it<short>::f(m);
break;
case Smoke::t_ushort:
- marshall_it<unsigned short>(m);
+ marshall_it<unsigned short>::f(m);
break;
case Smoke::t_int:
- marshall_it<int>(m);
+ marshall_it<int>::f(m);
break;
case Smoke::t_uint:
- marshall_it<unsigned int>(m);
+ marshall_it<unsigned int>::f(m);
break;
case Smoke::t_long:
- marshall_it<long>(m);
+ marshall_it<long>::f(m);
break;
case Smoke::t_ulong:
- marshall_it<unsigned long>(m);
+ marshall_it<unsigned long>::f(m);
break;
case Smoke::t_float:
- marshall_it<float>(m);
+ marshall_it<float>::f(m);
break;
case Smoke::t_double:
- marshall_it<double>(m);
+ marshall_it<double>::f(m);
break;
case Smoke::t_enum:
- marshall_it<SmokeEnumWrapper>(m);
+ marshall_it<SmokeEnumWrapper>::f(m);
break;
case Smoke::t_class:
- marshall_it<SmokeClassWrapper>(m);
+ marshall_it<SmokeClassWrapper>::f(m);
break;
default:
@@ -791,7 +799,7 @@
}
void marshall_ucharP(Marshall *m) {
- marshall_it<unsigned char *>(m);
+ marshall_it<unsigned char *>::f(m);
}
static void marshall_doubleR(Marshall *m) {
@@ -1176,7 +1184,8 @@
}
template <class Item, class ItemList, const char *ItemSTR >
-void marshall_ItemList(Marshall *m) {
+struct marshall_ItemList{
+ static void f(Marshall *m) {
switch(m->action()) {
case Marshall::FromVALUE:
{
@@ -1266,8 +1275,8 @@
m->unsupported();
break;
}
-}
-
+ }
+};
void marshall_QListInt(Marshall *m) {
switch(m->action()) {
case Marshall::FromVALUE:
@@ -2095,8 +2104,8 @@
}
}
-#define DEF_LIST_MARSHALLER(ListIdent,ItemList,Item) namespace { char \
ListIdent##STR[] = #Item; }; \
- Marshall::HandlerFn marshall_##ListIdent = \
marshall_ItemList<Item,ItemList,ListIdent##STR>; +#define \
DEF_LIST_MARSHALLER(ListIdent,ItemList,Item) namespace { extern const char \
ListIdent##STR[] = #Item; }; \ + Marshall::HandlerFn marshall_##ListIdent = \
marshall_ItemList<Item,ItemList,ListIdent##STR>::f;
DEF_LIST_MARSHALLER( QAbstractButtonList, QList<QAbstractButton*>, QAbstractButton )
DEF_LIST_MARSHALLER( QActionGroupList, QList<QActionGroup*>, QActionGroup )
@@ -2122,7 +2131,8 @@
#endif
template <class Item, class ItemList, const char *ItemSTR >
-void marshall_ValueListItem(Marshall *m) {
+struct marshall_ValueListItem{
+ static void f(Marshall *m) {
switch(m->action()) {
case Marshall::FromVALUE:
{
@@ -2228,11 +2238,11 @@
m->unsupported();
break;
}
-}
+ }
+};
+#define DEF_VALUELIST_MARSHALLER(ListIdent,ItemList,Item) namespace {extern const \
char ListIdent##STR[] = #Item; }; \ + Marshall::HandlerFn marshall_##ListIdent = \
marshall_ValueListItem<Item,ItemList,ListIdent##STR>::f;
-#define DEF_VALUELIST_MARSHALLER(ListIdent,ItemList,Item) namespace { char \
ListIdent##STR[] = #Item; }; \
- Marshall::HandlerFn marshall_##ListIdent = \
marshall_ValueListItem<Item,ItemList,ListIdent##STR>;
-
DEF_VALUELIST_MARSHALLER( QColorVector, QVector<QColor>, QColor )
DEF_VALUELIST_MARSHALLER( QFileInfoList, QFileInfoList, QFileInfo )
DEF_VALUELIST_MARSHALLER( QHostAddressList, QList<QHostAddress>, QHostAddress )
@@ -2261,35 +2271,35 @@
DEF_VALUELIST_MARSHALLER( QVariantVector, QVector<QVariant>, QVariant )
#if QT_VERSION >= 0x40300
-DEF_VALUELIST_MARSHALLER( QSslCertificateList, QList<QSslCertificate>, \
QSslCertificate )
-DEF_VALUELIST_MARSHALLER( QSslCipherList, QList<QSslCipher>, QSslCipher )
-DEF_VALUELIST_MARSHALLER( QSslErrorList, QList<QSslError>, QSslError )
+//DEF_VALUELIST_MARSHALLER( QSslCertificateList, QList<QSslCertificate>, \
QSslCertificate ) +//DEF_VALUELIST_MARSHALLER( QSslCipherList, QList<QSslCipher>, \
QSslCipher ) +//DEF_VALUELIST_MARSHALLER( QSslErrorList, QList<QSslError>, QSslError \
) DEF_VALUELIST_MARSHALLER( QXmlStreamEntityDeclarations, \
QVector<QXmlStreamEntityDeclaration>, QXmlStreamEntityDeclaration ) \
DEF_VALUELIST_MARSHALLER( QXmlStreamNamespaceDeclarations, \
QVector<QXmlStreamNamespaceDeclaration>, QXmlStreamNamespaceDeclaration ) \
DEF_VALUELIST_MARSHALLER( QXmlStreamNotationDeclarations, \
QVector<QXmlStreamNotationDeclaration>, QXmlStreamNotationDeclaration ) #endif
TypeHandler Qt_handlers[] = {
- { "bool*", marshall_it<bool *> },
- { "bool&", marshall_it<bool *> },
+ { "bool*", marshall_it<bool *>::f },
+ { "bool&", marshall_it<bool *>::f },
{ "char**", marshall_charP_array },
- { "char*",marshall_it<char *> },
- { "DOM::DOMTimeStamp", marshall_it<long long> },
+ { "char*",marshall_it<char *>::f },
+ { "DOM::DOMTimeStamp", marshall_it<int64_t>::f },
{ "double*", marshall_doubleR },
{ "double&", marshall_doubleR },
- { "int*", marshall_it<int *> },
- { "int&", marshall_it<int *> },
- { "KIO::filesize_t", marshall_it<long long> },
- { "long long int", marshall_it<long long> },
- { "long long int&", marshall_it<long long> },
+ { "int*", marshall_it<int *>::f },
+ { "int&", marshall_it<int *>::f },
+ { "KIO::filesize_t", marshall_it<int64_t>::f },
+ { "int64_t int", marshall_it<int64_t>::f },
+ { "int64_t int&", marshall_it<int64_t>::f },
{ "QDBusVariant", marshall_QDBusVariant },
{ "QDBusVariant&", marshall_QDBusVariant },
{ "QFileInfoList", marshall_QFileInfoList },
{ "QGradiantStops", marshall_QPairqrealQColor },
{ "QGradiantStops&", marshall_QPairqrealQColor },
- { "qint32&", marshall_it<int *> },
- { "qint64", marshall_it<long long> },
- { "qint64&", marshall_it<long long> },
+ { "qint32&", marshall_it<int *>::f },
+ { "qint64", marshall_it<int64_t>::f },
+ { "qint64&", marshall_it<int64_t>::f },
{ "QList<int>", marshall_QListInt },
{ "QList<int>&", marshall_QListInt },
{ "QList<QAbstractButton*>", marshall_QAbstractButtonList },
@@ -2336,8 +2346,8 @@
{ "QList<QVariant>&", marshall_QVariantList },
{ "QList<QWidget*>", marshall_QWidgetPtrList },
{ "QList<QWidget*>&", marshall_QWidgetPtrList },
- { "qlonglong", marshall_it<long long> },
- { "qlonglong&", marshall_it<long long> },
+ { "qlonglong", marshall_it<int64_t>::f },
+ { "qlonglong&", marshall_it<int64_t>::f },
{ "QMap<int,QVariant>", marshall_QMapintQVariant },
{ "QMap<int,QVariant>", marshall_QMapIntQVariant },
{ "QMap<int,QVariant>&", marshall_QMapIntQVariant },
@@ -2350,7 +2360,7 @@
{ "QObjectList", marshall_QObjectList },
{ "QObjectList&", marshall_QObjectList },
{ "QPair<int,int>&", marshall_QPairintint },
- { "Q_PID", marshall_it<Q_PID> },
+ { "Q_PID", marshall_it<Q_PID>::f },
{ "qreal*", marshall_doubleR },
{ "qreal&", marshall_doubleR },
{ "QRgb*", marshall_QRgb_array },
@@ -2360,10 +2370,10 @@
{ "QString", marshall_QString },
{ "QString*", marshall_QString },
{ "QString&", marshall_QString },
- { "quint64", marshall_it<unsigned long long> },
- { "quint64&", marshall_it<unsigned long long> },
- { "qulonglong", marshall_it<unsigned long long> },
- { "qulonglong&", marshall_it<unsigned long long> },
+ { "quint64", marshall_it<uint64_t>::f },
+ { "quint64&", marshall_it<uint64_t>::f },
+ { "qulonglong", marshall_it<uint64_t>::f },
+ { "qulonglong&", marshall_it<uint64_t>::f },
{ "QVariantList&", marshall_QVariantList },
{ "QVector<int>", marshall_QVectorint },
{ "QVector<int>&", marshall_QVectorint },
@@ -2397,13 +2407,13 @@
{ "QwtArray<double>&", marshall_QVectorqreal },
{ "QwtArray<int>", marshall_QVectorint },
{ "QwtArray<int>&", marshall_QVectorint },
- { "signed int&", marshall_it<int *> },
+ { "signed int&", marshall_it<int *>::f },
{ "uchar*", marshall_ucharP },
- { "unsigned long long int", marshall_it<long long> },
- { "unsigned long long int&", marshall_it<long long> },
+ { "uint64_t int", marshall_it<int64_t>::f },
+ { "uint64_t int&", marshall_it<int64_t>::f },
{ "void", marshall_void },
{ "void**", marshall_voidP_array },
- { "WId", marshall_it<WId> },
+ { "WId", marshall_it<WId>::f },
#if QT_VERSION >= 0x40200
{ "QList<QGraphicsItem*>", marshall_QGraphicsItemList },
{ "QList<QGraphicsItem*>&", marshall_QGraphicsItemList },
@@ -2414,11 +2424,11 @@
#endif
#if QT_VERSION >= 0x40300
{ "QList<QMdiSubWindow*>", marshall_QMdiSubWindowList },
- { "QList<QSslCertificate>", marshall_QSslCertificateList },
- { "QList<QSslCertificate>&", marshall_QSslCertificateList },
- { "QList<QSslCipher>", marshall_QSslCipherList },
- { "QList<QSslCipher>&", marshall_QSslCipherList },
- { "QList<QSslError>&", marshall_QSslErrorList },
+// { "QList<QSslCertificate>", marshall_QSslCertificateList },
+// { "QList<QSslCertificate>&", marshall_QSslCertificateList },
+// { "QList<QSslCipher>", marshall_QSslCipherList },
+// { "QList<QSslCipher>&", marshall_QSslCipherList },
+// { "QList<QSslError>&", marshall_QSslErrorList },
{ "QXmlStreamEntityDeclarations", marshall_QXmlStreamEntityDeclarations },
{ "QXmlStreamNamespaceDeclarations", marshall_QXmlStreamNamespaceDeclarations },
{ "QXmlStreamNotationDeclarations", marshall_QXmlStreamNotationDeclarations },
Index: ruby/qtruby/src/vc_stdint.h
===================================================================
--- ruby/qtruby/src/vc_stdint.h (.../qtruby) (revision 0)
+++ ruby/qtruby/src/vc_stdint.h (.../qtruby4/msvc) (revision 18)
@@ -0,0 +1,11 @@
+#pragma once
+typedef signed __int64 int64_t;
+typedef signed int int32_t;
+typedef signed short int16_t;
+typedef signed char int8_t;
+
+typedef unsigned __int64 uint64_t;
+typedef unsigned int uint32_t;
+typedef unsigned short uint16_t;
+typedef unsigned char uint8_t;
+
Index: ruby/qtruby/src/marshall_primitives.h
===================================================================
--- ruby/qtruby/src/marshall_primitives.h (.../qtruby) (revision 18)
+++ ruby/qtruby/src/marshall_primitives.h (.../qtruby4/msvc) (revision 18)
@@ -7,8 +7,8 @@
* *
***************************************************************************/
-template <>
-static bool ruby_to_primitive<bool>(VALUE v)
+struct ruby_to_primitive<bool>{
+ static bool f( VALUE v)
{
if (TYPE(v) == T_OBJECT) {
// A Qt::Boolean has been passed as a value
@@ -19,62 +19,72 @@
}
}
-template <>
-static VALUE primitive_to_ruby<bool>(bool sv)
+};
+struct primitive_to_ruby<bool>{
+ static VALUE f( bool sv)
{
return sv ? Qtrue : Qfalse;
}
-template <>
-static signed char ruby_to_primitive<signed char>(VALUE v)
+};
+struct ruby_to_primitive<signed char>{
+ static signed char f( VALUE v)
{
return NUM2CHR(v);
}
-template <>
-static VALUE primitive_to_ruby<signed char>(signed char sv)
+};
+struct primitive_to_ruby<signed char>{
+ static VALUE f( signed char sv)
{
return CHR2FIX(sv);
}
-template <>
-static unsigned char ruby_to_primitive<unsigned char>(VALUE v)
+};
+struct ruby_to_primitive<unsigned char>{
+ static unsigned char f( VALUE v)
{
return NUM2CHR(v);
}
-template <>
-static VALUE primitive_to_ruby<unsigned char>(unsigned char sv)
+};
+struct primitive_to_ruby<unsigned char>{
+ static VALUE f( unsigned char sv)
{
return CHR2FIX(sv);
}
-template <>
-static short ruby_to_primitive<short>(VALUE v)
+};
+struct ruby_to_primitive<short>{
+ static short f( VALUE v)
{
return (short)NUM2INT(v);
}
-template <>
-static VALUE primitive_to_ruby<short>(short sv)
+};
+struct primitive_to_ruby<short>{
+ static VALUE f( short sv)
{
return INT2NUM(sv);
}
-template <>
-static unsigned short ruby_to_primitive<unsigned short>(VALUE v)
+};
+struct ruby_to_primitive<unsigned short>{
+ static unsigned short f( VALUE v)
{
return (unsigned short)NUM2UINT(v);
}
-template <>
-static VALUE primitive_to_ruby<unsigned short>(unsigned short sv)
+};
+struct primitive_to_ruby<unsigned short>{
+ static VALUE f( unsigned short sv)
{
return UINT2NUM((unsigned int) sv);
}
-template <>
-static int ruby_to_primitive<int>(VALUE v)
+};
+struct ruby_to_primitive<int>{
+ static int f( VALUE v)
{
if (TYPE(v) == T_OBJECT) {
return (int)NUM2INT(rb_funcall(qt_internal_module, rb_intern("get_qinteger"), 1, \
v)); @@ -83,14 +93,16 @@
}
}
-template <>
-static VALUE primitive_to_ruby<int>(int sv)
+};
+struct primitive_to_ruby<int>{
+ static VALUE f( int sv)
{
return INT2NUM(sv);
}
-template <>
-static unsigned int ruby_to_primitive<unsigned int>(VALUE v)
+};
+struct ruby_to_primitive<unsigned int>{
+ static unsigned int f( VALUE v)
{
if (TYPE(v) == T_OBJECT) {
return (unsigned int) NUM2UINT(rb_funcall(qt_internal_module, \
rb_intern("get_qinteger"), 1, v)); @@ -99,14 +111,16 @@
}
}
-template <>
-static VALUE primitive_to_ruby<unsigned int>(unsigned int sv)
+};
+struct primitive_to_ruby<unsigned int>{
+ static VALUE f( unsigned int sv)
{
return UINT2NUM(sv);
}
-template <>
-static long ruby_to_primitive<long>(VALUE v)
+};
+struct ruby_to_primitive<long>{
+ static long f( VALUE v)
{
if (TYPE(v) == T_OBJECT) {
return (long) NUM2LONG(rb_funcall(qt_internal_module, rb_intern("get_qinteger"), \
1, v)); @@ -115,14 +129,16 @@
}
}
-template <>
-static VALUE primitive_to_ruby<long>(long sv)
+};
+struct primitive_to_ruby<long>{
+ static VALUE f( long sv)
{
return INT2NUM(sv);
}
-template <>
-static unsigned long ruby_to_primitive<unsigned long>(VALUE v)
+};
+struct ruby_to_primitive<unsigned long>{
+ static unsigned long f( VALUE v)
{
if (TYPE(v) == T_OBJECT) {
return (unsigned long) NUM2ULONG(rb_funcall(qt_internal_module, \
rb_intern("get_qinteger"), 1, v)); @@ -131,71 +147,86 @@
}
}
-template <>
-static VALUE primitive_to_ruby<unsigned long>(unsigned long sv)
+};
+struct primitive_to_ruby<unsigned long>{
+ static VALUE f( unsigned long sv)
{
return INT2NUM(sv);
}
-template <>
-static long long ruby_to_primitive<long long>(VALUE v)
+};
+struct ruby_to_primitive<__int64>{
+ static __int64 f( VALUE v)
{
return NUM2LL(v);
}
-template <>
-static VALUE primitive_to_ruby<long long>(long long sv)
+};
+struct primitive_to_ruby<__int64>{
+ static VALUE f( __int64 sv)
{
return LL2NUM(sv);
}
-template <>
-static unsigned long long ruby_to_primitive<unsigned long long>(VALUE v)
+};
+struct ruby_to_primitive<unsigned __int64>{
+ static unsigned __int64 f( VALUE v)
{
return rb_num2ull(v);
}
-template <>
-static VALUE primitive_to_ruby<unsigned long long>(unsigned long long sv)
+};
+struct primitive_to_ruby<unsigned __int64>{
+ static VALUE f( unsigned __int64 sv)
{
return rb_ull2inum(sv);
}
-template <>
-static float ruby_to_primitive<float>(VALUE v)
+};
+struct ruby_to_primitive<float>{
+ static float f( VALUE v)
{
return (float) NUM2DBL(v);
}
-template <>
-static VALUE primitive_to_ruby<float>(float sv)
+};
+struct primitive_to_ruby<float>{
+ static VALUE f( float sv)
{
return rb_float_new((double) sv);
}
-template <>
-static double ruby_to_primitive<double>(VALUE v)
+};
+struct ruby_to_primitive<double>{
+ static double f( VALUE v)
{
return (double) NUM2DBL(v);
}
-template <>
-static VALUE primitive_to_ruby<double>(double sv)
+};
+struct primitive_to_ruby<double>{
+ static VALUE f( double sv)
{
return rb_float_new((double) sv);
}
-template <>
-static char* ruby_to_primitive<char *>(VALUE rv)
+};
+struct ruby_to_primitive<char *>{
+ static char* f( VALUE rv)
{
if(rv == Qnil)
return 0;
-
- return StringValuePtr(rv);
+
+ int len = RSTRING(rv)->len;
+ char* mem = (char*) malloc(len+1);
+ memcpy(mem, StringValuePtr(rv), len);
+ mem[len] ='\0';
+ return (char*) mem;
}
-template <>
-static unsigned char* ruby_to_primitive<unsigned char *>(VALUE rv)
+};
+struct ruby_to_primitive<unsigned char *>{
+ static unsigned char* f( VALUE rv)
{
if(rv == Qnil)
return 0;
@@ -207,19 +238,21 @@
return (unsigned char*) mem;
}
-template <>
-static VALUE primitive_to_ruby<int*>(int* sv)
+};
+struct primitive_to_ruby<int*>{
+ static VALUE f( int* sv)
{
if(!sv) {
return Qnil;
}
- return primitive_to_ruby<int>(*sv);
+ return primitive_to_ruby<int>::f(*sv);
}
#if defined(Q_OS_WIN32)
-template <>
-static WId ruby_to_primitive<WId>(VALUE v)
+};
+struct ruby_to_primitive<WId>{
+ static WId f( VALUE v)
{
if(v == Qnil)
return 0;
@@ -227,14 +260,16 @@
return (WId) NUM2ULONG(v);
}
-template <>
-static VALUE primitive_to_ruby<WId>(WId sv)
+};
+struct primitive_to_ruby<WId>{
+ static VALUE f( WId sv)
{
return ULONG2NUM((unsigned long) sv);
}
-template <>
-static Q_PID ruby_to_primitive<Q_PID>(VALUE v)
+};
+struct ruby_to_primitive<Q_PID>{
+ static Q_PID f( VALUE v)
{
if(v == Qnil)
return 0;
@@ -242,9 +277,11 @@
return (Q_PID) NUM2ULONG(v);
}
-template <>
-static VALUE primitive_to_ruby<Q_PID>(Q_PID sv)
+};
+struct primitive_to_ruby<Q_PID>{
+ static VALUE f( Q_PID sv)
{
return ULONG2NUM((unsigned long) sv);
}
+};
#endif
Index: ruby/qtruby/src/Qt.cpp
===================================================================
--- ruby/qtruby/src/Qt.cpp (.../qtruby) (revision 18)
+++ ruby/qtruby/src/Qt.cpp (.../qtruby4/msvc) (revision 18)
@@ -64,6 +64,7 @@
#endif
#include <ruby.h>
+#undef read
#ifndef QT_VERSION_STR
#define QT_VERSION_STR "Unknown"
@@ -82,8 +83,8 @@
#define QTRUBY_VERSION "1.4.7"
// Don't use kdemacros.h/KDE_EXPORT here as it needs to be free of KDE dependencies
-extern Q_DECL_EXPORT Smoke *qt_Smoke;
-extern Q_DECL_EXPORT void init_qt_Smoke();
+extern Q_DECL_IMPORT Smoke *qt_Smoke;
+extern Q_DECL_IMPORT void init_qt_Smoke();
extern void smokeruby_mark(void * ptr);
extern void smokeruby_free(void * ptr);
extern VALUE qchar_to_s(VALUE self);
@@ -133,7 +134,7 @@
};
#define logger logger_backend
-void rb_str_catf(VALUE self, const char *format, ...) __attribute__ ((format \
(printf, 2, 3))); +void rb_str_catf(VALUE self, const char *format, ...);// \
__attribute__ ((format (printf, 2, 3)));
static VALUE (*_new_kde)(int, VALUE *, VALUE) = 0;
static VALUE (*_kconfigskeletonitem_immutable)(VALUE) = 0;
@@ -909,13 +910,13 @@
case QVariant::Color:
{
- QColor c = value.value<QColor>();
+ QColor c = qVariantValue<QColor>( value );
return QString(" %1=#<Qt::Color:0x0 %2>").arg(name).arg(c.name());
}
case QVariant::Cursor:
{
- QCursor c = value.value<QCursor>();
+ QCursor c = qVariantValue<QCursor>( value);
return QString(" %1=#<Qt::Cursor:0x0 shape=%2>").arg(name).arg(c.shape());
}
@@ -926,7 +927,7 @@
case QVariant::Font:
{
- QFont f = value.value<QFont>();
+ QFont f = qVariantValue<QFont>(value);
return QString( " %1=#<Qt::Font:0x0 family=%2, pointSize=%3, weight=%4, italic=%5, \
bold=%6, underline=%7, strikeOut=%8>")
.arg(name)
.arg(f.family())
@@ -1006,7 +1007,7 @@
case QVariant::SizePolicy:
{
- QSizePolicy s = value.value<QSizePolicy>();
+ QSizePolicy s = qVariantValue<QSizePolicy>(value);
return QString(" %1=#<Qt::SizePolicy:0x0 horizontalPolicy=%2, verticalPolicy=%3>")
.arg(name)
.arg(s.horizontalPolicy())
Index: ruby/qtruby/src/extconf.rb
===================================================================
--- ruby/qtruby/src/extconf.rb (.../qtruby) (revision 18)
+++ ruby/qtruby/src/extconf.rb (.../qtruby4/msvc) (revision 18)
@@ -2,10 +2,17 @@
dir_config('smoke')
dir_config('qt')
+
+if(CONFIG["build"] =~ /win/)
+#For Windows the Qt library names end in '4':
+ $LOCAL_LIBS += '-lsmokeqt -lQtCore4 -lQtGui4 -lQtNetwork4 -lQtOpenGL4 -lQtSql4 \
-lQtXml4' + if(CONFIG["build"] =~ /mswin32/)
+ $LOCAL_LIBS.gsub!(/-l/, "")
+ $LOCAL_LIBS.gsub!(/ |$/, ".lib ")
+ $CFLAGS += ' -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_SQL_LIB -DQT_SVG_LIB \
-DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB \
-DQT_THREAD_SUPPORT' + end
+else
# For Linux, BSD*, Mac OS X etc:
-$LOCAL_LIBS += '-lsmokeqt -lQtCore -lQtGui -lQtNetwork -lQtOpenGL -lQtSql -lQtXml \
-lstdc++'
-
-# For Windows the Qt library names end in '4':
-# $LOCAL_LIBS += '-lsmokeqt -lQtCore4 -lQtGui4 -lQtNetwork4 -lQtOpenGL4 -lQtSql4 \
-lQtXml4 -lstdc++'
-
+ $LOCAL_LIBS += '-lsmokeqt -lQtCore -lQtGui -lQtNetwork -lQtOpenGL -lQtSql -lQtXml \
-lstdc++' +end
create_makefile("qtruby4")
Index: ruby/qtruby/src/marshall_basetypes.h
===================================================================
--- ruby/qtruby/src/marshall_basetypes.h (.../qtruby) (revision 18)
+++ ruby/qtruby/src/marshall_basetypes.h (.../qtruby4/msvc) (revision 18)
@@ -7,50 +7,55 @@
* *
***************************************************************************/
-template <class T> T* smoke_ptr(Marshall *m) { return (T*) m->item().s_voidp; }
+template <class T> struct smoke_ptr{static T* f(Marshall *m) { return (T*) \
m->item().s_voidp; }}; +struct smoke_ptr<bool> { static bool* f(Marshall *m) { return \
&m->item().s_bool; }}; +struct smoke_ptr<signed char> { static signed char* \
f(Marshall *m) { return &m->item().s_char; }}; +struct smoke_ptr<unsigned char> { \
static unsigned char* f(Marshall *m) { return &m->item().s_uchar; }}; +struct \
smoke_ptr<short> { static short* f(Marshall *m) { return &m->item().s_short; }}; \
+struct smoke_ptr<unsigned short> { static unsigned short* f(Marshall *m) { return \
&m->item().s_ushort; }}; +struct smoke_ptr<int> { static int* f(Marshall *m) { return \
&m->item().s_int; }}; +struct smoke_ptr<unsigned int> { static unsigned int* \
f(Marshall *m) { return &m->item().s_uint; }}; +struct smoke_ptr<long> { static long* \
f(Marshall *m) { return &m->item().s_long; }}; +struct smoke_ptr<unsigned long> { \
static unsigned long* f(Marshall *m) { return &m->item().s_ulong; }}; +struct \
smoke_ptr<float> { static float* f(Marshall *m) { return &m->item().s_float; }}; \
+struct smoke_ptr<double> { static double* f(Marshall *m) { return \
&m->item().s_double; }}; +struct smoke_ptr<void> { static void* f(Marshall *m) { \
return m->item().s_voidp; }};
-template<> bool* smoke_ptr<bool>(Marshall *m) { return &m->item().s_bool; }
-template<> signed char* smoke_ptr<signed char>(Marshall *m) { return \
&m->item().s_char; }
-template<> unsigned char* smoke_ptr<unsigned char>(Marshall *m) { return \
&m->item().s_uchar; }
-template<> short* smoke_ptr<short>(Marshall *m) { return &m->item().s_short; }
-template<> unsigned short* smoke_ptr<unsigned short>(Marshall *m) { return \
&m->item().s_ushort; }
-template<> int* smoke_ptr<int>(Marshall *m) { return &m->item().s_int; }
-template<> unsigned int* smoke_ptr<unsigned int>(Marshall *m) { return \
&m->item().s_uint; }
-template<> long* smoke_ptr<long>(Marshall *m) { return &m->item().s_long; }
-template<> unsigned long* smoke_ptr<unsigned long>(Marshall *m) { return \
&m->item().s_ulong; }
-template<> float* smoke_ptr<float>(Marshall *m) { return &m->item().s_float; }
-template<> double* smoke_ptr<double>(Marshall *m) { return &m->item().s_double; }
-template<> void* smoke_ptr<void>(Marshall *m) { return m->item().s_voidp; }
+template <class T> struct ruby_to_primitive{};
+template <class T> struct primitive_to_ruby{};
-template <class T> T ruby_to_primitive(VALUE);
-template <class T> VALUE primitive_to_ruby(T);
+#include "marshall_primitives.h"
template <class T>
-static void marshall_from_ruby(Marshall *m)
-{
- VALUE obj = *(m->var());
- (*smoke_ptr<T>(m)) = ruby_to_primitive<T>(obj);
-}
+struct marshall_from_ruby{
+ static void f(Marshall *m)
+ {
+ VALUE obj = *(m->var());
+ (*smoke_ptr<T>::f(m)) = ruby_to_primitive<T>::f(obj);
+ }
+};
template <class T>
-static void marshall_to_ruby(Marshall *m)
-{
- *(m->var()) = primitive_to_ruby<T>( *smoke_ptr<T>(m) );
-}
+struct marshall_to_ruby{
+ static void f(Marshall *m)
+ {
+ *(m->var()) = primitive_to_ruby<T>::f( *smoke_ptr<T>::f(m) );
+ }
+};
-#include "marshall_primitives.h"
#include "marshall_complex.h"
// Special case marshallers
-template <>
-static void marshall_from_ruby<char *>(Marshall *m)
+struct marshall_from_ruby<char *>{
+ static void f( Marshall *m)
{
- m->item().s_voidp = ruby_to_primitive<char*>(*(m->var()));
+ m->item().s_voidp = ruby_to_primitive<char*>::f(*(m->var()));
}
-template <>
-static void marshall_from_ruby<SmokeEnumWrapper>(Marshall *m)
+};
+struct marshall_from_ruby<SmokeEnumWrapper>{
+ static void f( Marshall *m)
{
VALUE v = *(m->var());
@@ -64,16 +69,18 @@
}
-template <>
-static void marshall_to_ruby<SmokeEnumWrapper>(Marshall *m)
+};
+struct marshall_to_ruby<SmokeEnumWrapper>{
+ static void f( Marshall *m)
{
long val = m->item().s_enum;
*(m->var()) = rb_funcall(qt_internal_module, rb_intern("create_qenum"),
2, INT2NUM(val), rb_str_new2( m->type().name()) );
}
-template <>
-static void marshall_from_ruby<SmokeClassWrapper>(Marshall *m)
+};
+struct marshall_from_ruby<SmokeClassWrapper>{
+ static void f( Marshall *m)
{
VALUE v = *(m->var());
@@ -118,8 +125,9 @@
return;
}
-template <>
-static void marshall_to_ruby<SmokeClassWrapper>(Marshall *m)
+};
+struct marshall_to_ruby<SmokeClassWrapper>{
+ static void f( Marshall *m)
{
if(m->item().s_voidp == 0) {
*(m->var()) = Qnil;
@@ -163,8 +171,9 @@
*(m->var()) = obj;
}
-template <>
-static void marshall_to_ruby<char *>(Marshall *m)
+};
+struct marshall_to_ruby<char *>{
+ static void f( Marshall *m)
{
char *sv = (char*)m->item().s_voidp;
VALUE obj;
@@ -179,8 +188,10 @@
*(m->var()) = obj;
}
-template <>
-static void marshall_to_ruby<unsigned char *>(Marshall *m)
+};
+struct marshall_to_ruby<unsigned char *>{
+ static void f( Marshall *m)
{
m->unsupported();
}
+};
\ No newline at end of file
Index: kalyptus/kalyptusCxxToSmoke.pm
===================================================================
--- kalyptus/kalyptusCxxToSmoke.pm (.../qtruby) (revision 18)
+++ kalyptus/kalyptusCxxToSmoke.pm (.../qtruby4/msvc) (revision 18)
@@ -1399,7 +1399,10 @@
if($flags =~ "p") { # pure virtual
$methodCode .= "\t${libname}_Smoke->binding->callMethod($idx, (void*)$this, x, true \
/*pure virtual*/);\n";
- } else {
+ } elsif($returnType =~ /QMetaObject\*/){
+ #QuickHack: when metaObject returns NULL, some qt-builtin debug output \
crashes. + $methodCode .= "\tif(${libname}_Smoke->binding->callMethod($idx, \
(void*)$this, x) && x[0].s_class) "; + } else{
$methodCode .= "\tif(${libname}_Smoke->binding->callMethod($idx, (void*)$this, x)) \
"; }
@@ -1639,7 +1642,10 @@
$varName = $ch . $2;
$methodCode .= "$varName = @castedArgList[0..$#argTypeList];\n";
} else {
- $methodCode .= "$className\::$name(@castedArgList[0..$#argTypeList]);\n";
+ #hack for vc6, it claims using "foo::bar" instead \
"hoge::foo::bar" + my $vc6_classname = $className;
+ $vc6_classname =~ s/^.*:://;
+ $methodCode .= "$vc6_classname\::$name(@castedArgList[0..$#argTypeList]);\n";
}
} elsif ($name =~ /^operator\s?\W+/) {
( my $op = $name ) =~ s/^operator(.*)$/$1/;
@@ -2898,10 +2904,10 @@
# print OUT " void init_${libname}_Smoke();\n";
# print OUT "}\n";
print OUT "\n";
- print OUT "Smoke* qt_Smoke = 0L;\n";
+ print OUT "__declspec(dllexport) Smoke* qt_Smoke = 0L;\n";
print OUT "\n";
print OUT "// Create the Smoke instance encapsulating all the above.\n";
- print OUT "void init_${libname}_Smoke() {\n";
+ print OUT "__declspec(dllexport) void init_${libname}_Smoke() {\n";
print OUT " qt_Smoke = new Smoke(\n";
print OUT " ${libname}_classes, ".$#classlist.",\n";
print OUT " ${libname}_methods, $methodCount,\n";
Index: smoke/qt/smokeqt.pro
===================================================================
--- smoke/qt/smokeqt.pro (.../qtruby) (revision 18)
+++ smoke/qt/smokeqt.pro (.../qtruby4/msvc) (revision 18)
@@ -9,6 +9,9 @@
INCLUDEPATH += .
INCLUDEPATH += ..
+QMAKE_CFLAGS = -nologo -Zm900
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+
# Add a 'qdbus' option if building with QtDBus:
CONFIG += uitools
Index: smoke/qt/mkmk2.rb
===================================================================
--- smoke/qt/mkmk2.rb (.../qtruby) (revision 0)
+++ smoke/qt/mkmk2.rb (.../qtruby4/msvc) (revision 18)
@@ -0,0 +1,24 @@
+mkmk = %w(
+@srcdir@ .
+@qtextscintilla@ no
+@qtdbus@ no
+@qwt@ no
+@KDE_HAVE_GL@ yes
+@qt_includes@ g:/qt/4.30/include
+@top_srcdir@ ../..
+)
+
+
+conf = Hash.new
+Hash[ *mkmk ].each{|key, value|
+ conf[ Regexp.new(key) ] = value.gsub(/"/,"")
+}
+File.open("generate.pl","w"){|of|
+ IO.foreach( "generate.pl.in" ){|line|
+ l = line.dup
+ conf.each{|key, value|
+ line.gsub!(key, value )
+ }
+ of.puts line
+ }
+}
\ No newline at end of file
Index: smoke/qt/header_list
===================================================================
--- smoke/qt/header_list (.../qtruby) (revision 18)
+++ smoke/qt/header_list (.../qtruby4/msvc) (revision 18)
@@ -1,332 +1,297 @@
-qabstracteventdispatcher.h
-qabstractfileengine.h
-qabstractitemmodel.h
-qalgorithms.h
-qbasictimer.h
-qbitarray.h
-qbuffer.h
-qbytearray.h
-qbytearraymatcher.h
-qcache.h
-qchar.h
-qconfig-dist.h
-qconfig.h
-qconfig-large.h
-qconfig-medium.h
-qconfig-minimal.h
-qconfig-small.h
-qcoreapplication.h
-qcoreevent.h
-qdatastream.h
-qdatetime.h
-qdebug.h
-qdir.h
-qeventloop.h
-qfactoryinterface.h
-qfeatures.h
-qfile.h
-qfileinfo.h
-qfilesystemwatcher.h
-qfsfileengine.h
-qglobal.h
-qiodevice.h
-qiterator.h
-qlibrary.h
-qlibraryinfo.h
-qline.h
-qlocale.h
-qmap.h
-qmetaobject.h
-qmetatype.h
-qmimedata.h
-qmutex.h
-qnamespace.h
-qobjectcleanuphandler.h
-qobjectdefs.h
-qobject.h
-qpair.h
-qplugin.h
-qpluginloader.h
-qpointer.h
-qpoint.h
-qprocess.h
-qqueue.h
-qreadwritelock.h
-qrect.h
-qregexp.h
-qsemaphore.h
-qsettings.h
-qshareddata.h
-qsignalmapper.h
-qsize.h
-qsocketnotifier.h
-qstack.h
-qstring.h
-qstringlist.h
-qstringmatcher.h
-qtemporaryfile.h
-qtextcodec.h
-qtextcodecplugin.h
-qtextstream.h
-qthread.h
-qthreadstorage.h
-qtimeline.h
-qtimer.h
-qtranslator.h
-qurl.h
-quuid.h
-qvariant.h
-qvarlengtharray.h
-qvector.h
-qwaitcondition.h
-qabstractbutton.h
-qabstractitemdelegate.h
-qabstractitemview.h
-qabstractpagesetupdialog.h
-qabstractprintdialog.h
-qabstractproxymodel.h
-qabstractscrollarea.h
-qabstractslider.h
-qabstractspinbox.h
-qabstracttextdocumentlayout.h
-qaccessiblebridge.h
-qaccessible.h
-qaccessibleobject.h
-qaccessibleplugin.h
-qaccessiblewidget.h
-qactiongroup.h
-qaction.h
-qapplication.h
-qbitmap.h
-qboxlayout.h
-qbrush.h
-qbuttongroup.h
-qcalendarwidget.h
-qcheckbox.h
-qcleanlooksstyle.h
-qclipboard.h
-qcolordialog.h
-qcolor.h
-qcolormap.h
-qcombobox.h
-qcommonstyle.h
-qcompleter.h
-qcursor.h
-qdatawidgetmapper.h
-qdatetimeedit.h
-qdesktopservices.h
-qdesktopwidget.h
-qdial.h
-qdialogbuttonbox.h
-qdialog.h
-qdirmodel.h
-qdockwidget.h
-qdrag.h
-qdrawutil.h
-qerrormessage.h
-qevent.h
-qfiledialog.h
-qfocusframe.h
-qfontcombobox.h
-qfontdatabase.h
-qfontdialog.h
-qfont.h
-qfontinfo.h
-qfontmetrics.h
-qframe.h
-qgraphicsitemanimation.h
-qgraphicsitem.h
-qgraphicssceneevent.h
-qgraphicsscene.h
-qgraphicssvgitem.h
-qgraphicsview.h
-qgridlayout.h
-qgroupbox.h
-qhboxlayout.h
-qheaderview.h
-qiconengine.h
-qiconengineplugin.h
-qicon.h
-qimage.h
-qimageiohandler.h
-qimagereader.h
-qimagewriter.h
-qinputcontextfactory.h
-qinputcontext.h
-qinputcontextplugin.h
-qinputdialog.h
-qitemdelegate.h
-qitemeditorfactory.h
-qitemselectionmodel.h
-qkeysequence.h
-qlabel.h
-qlayout.h
-qlayoutitem.h
-qlcdnumber.h
-qlineedit.h
-qlistview.h
-qlistwidget.h
-qmacstyle_mac.h
-qmainwindow.h
-qmatrix.h
-qmenubar.h
-qmenudata.h
-qmenu.h
-qmessageboxex.h
-qmessagebox.h
-qmime.h
-qmovie.h
-qpagesetupdialog.h
-qpaintdevice.h
-qpaintengine.h
-qpainter.h
-qpainterpath.h
-qpalette.h
-qpen.h
-qpictureformatplugin.h
-qpicture.h
-qpixmapcache.h
-qpixmap.h
-qplastiquestyle.h
-qpolygon.h
-qprintdialog.h
-qprintengine.h
-qprinter.h
-qprogressbar.h
-qprogressdialog.h
-qproxymodel.h
-qpushbutton.h
-qradiobutton.h
-qregion.h
-qrgb.h
-qrubberband.h
-qscrollarea.h
-qscrollbar.h
-qsessionmanager.h
-qshortcut.h
-qsizegrip.h
-qsizepolicy.h
-qslider.h
-qsortfilterproxymodel.h
-qsound.h
-qspinbox.h
-qsplashscreen.h
-qsplitter.h
-qstackedlayout.h
-qstackedwidget.h
-qstandarditemmodel.h
-qstatusbar.h
-qstringlistmodel.h
-qstylefactory.h
-qstyle.h
-qstyleoption.h
-qstylepainter.h
-qstyleplugin.h
-qsyntaxhighlighter.h
-qsystemtrayicon.h
-qtabbar.h
-qtableview.h
-qtablewidget.h
-qtabwidget.h
-qtextbrowser.h
-qtextcursor.h
-qtextdocumentfragment.h
-qtextdocument.h
-qtextedit.h
-qtextformat.h
-qtextlayout.h
-qtextlist.h
-qtextobject.h
-qtextoption.h
-qtexttable.h
-qtoolbar.h
-qtoolbox.h
-qtoolbutton.h
-qtooltip.h
-qtreeview.h
-qtreewidget.h
-qtreewidgetitemiterator.h
-qundogroup.h
-qundostack.h
-qundoview.h
-qvalidator.h
-qvboxlayout.h
-qvfbhdr.h
-qwhatsthis.h
-qwidgetaction.h
-qwidget.h
-qwindowdefs.h
-qwindowsstyle.h
-qwindowsxpstyle.h
-qwmatrix.h
-qworkspace.h
-qx11embed_x11.h
-qx11info_x11.h
-qabstractsocket.h
-qftp.h
-qhostaddress.h
-qhostinfo.h
-qhttp.h
-qnetworkinterface.h
-qnetworkproxy.h
-qtcpserver.h
-qtcpsocket.h
-qudpsocket.h
-qurlinfo.h
-qglcolormap.h
-qglframebufferobject.h
-qgl.h
-qglpixelbuffer.h
-qiconset.h
-qsqldatabase.h
-qsqldriver.h
-qsqldriverplugin.h
-qsqlerror.h
-qsqlfield.h
-qsql.h
-qsqlindex.h
-qsqlquery.h
-qsqlquerymodel.h
-qsqlrecord.h
-qsqlrelationaldelegate.h
-qsqlrelationaltablemodel.h
-qsqlrelation.h
-qsqlresult.h
-qsqltablemodel.h
-qsvgrenderer.h
-qsvgwidget.h
-quiloader.h
-qdom.h
-qxml.h
-qdbusabstractadaptor.h
-qdbusabstractinterface.h
-qdbusargument.h
-qdbusconnection.h
-qdbusconnectioninterface.h
-qdbuserror.h
-qdbusextratypes.h
-qdbusinterface.h
-qdbusmacros.h
-qdbusmessage.h
-qdbusmetatype.h
-qdbusreply.h
-qdbusserver.h
-qcryptographichash.h
-qdiriterator.h
-qdbuscontext.h
-qaccessible2.h
-qcolumnview.h
-qfileiconprovider.h
-qmdiarea.h
-qmdisubwindow.h
-qtransform.h
-qwizard.h
-qauthenticator.h
-qssl.h
-qsslcertificate.h
-qsslcipher.h
-qsslerror.h
-qsslkey.h
-qsslsocket.h
-qsvggenerator.h
-qxmlstream.h
+QtCore/qabstracteventdispatcher.h
+QtCore/qabstractfileengine.h
+QtCore/qabstractitemmodel.h
+QtCore/qalgorithms.h
+QtCore/qbasictimer.h
+QtCore/qbitarray.h
+QtCore/qbuffer.h
+QtCore/qbytearray.h
+QtCore/qbytearraymatcher.h
+QtCore/qcache.h
+QtCore/qchar.h
+QtCore/qconfig-dist.h
+QtCore/qconfig.h
+QtCore/qconfig-large.h
+QtCore/qconfig-medium.h
+QtCore/qconfig-minimal.h
+QtCore/qconfig-small.h
+QtCore/qcoreapplication.h
+QtCore/qcoreevent.h
+QtCore/qdatastream.h
+QtCore/qdatetime.h
+QtCore/qdebug.h
+QtCore/qdir.h
+QtCore/qeventloop.h
+QtCore/qfactoryinterface.h
+QtCore/qfeatures.h
+QtCore/qfile.h
+QtCore/qfileinfo.h
+QtCore/qfsfileengine.h
+QtCore/qglobal.h
+QtCore/qiodevice.h
+QtCore/qiterator.h
+QtCore/qlibrary.h
+QtCore/qlibraryinfo.h
+QtCore/qline.h
+QtCore/qlocale.h
+QtCore/qmap.h
+QtCore/qmetaobject.h
+QtCore/qmetatype.h
+QtCore/qmimedata.h
+QtCore/qmutex.h
+QtCore/qnamespace.h
+QtCore/qobjectcleanuphandler.h
+QtCore/qobjectdefs.h
+QtCore/qobject.h
+QtCore/qpair.h
+QtCore/qplugin.h
+QtCore/qpluginloader.h
+QtCore/qpointer.h
+QtCore/qpoint.h
+QtCore/qprocess.h
+QtCore/qqueue.h
+QtCore/qreadwritelock.h
+QtCore/qrect.h
+QtCore/qregexp.h
+QtCore/qsemaphore.h
+QtCore/qsettings.h
+QtCore/qshareddata.h
+QtCore/qsignalmapper.h
+QtCore/qsize.h
+QtCore/qsocketnotifier.h
+QtCore/qstack.h
+QtCore/qstring.h
+QtCore/qstringlist.h
+QtCore/qstringmatcher.h
+QtCore/qtemporaryfile.h
+QtCore/qtextcodec.h
+QtCore/qtextcodecplugin.h
+QtCore/qtextstream.h
+QtCore/qthread.h
+QtCore/qthreadstorage.h
+QtCore/qtimeline.h
+QtCore/qtimer.h
+QtCore/qtranslator.h
+QtCore/qurl.h
+QtCore/quuid.h
+QtCore/qvariant.h
+QtCore/qvarlengtharray.h
+QtCore/qvector.h
+QtCore/qwaitcondition.h
+QtGui/qabstractbutton.h
+QtGui/qabstractitemdelegate.h
+QtGui/qabstractitemview.h
+QtGui/qabstractpagesetupdialog.h
+QtGui/qabstractprintdialog.h
+QtGui/qabstractproxymodel.h
+QtGui/qabstractscrollarea.h
+QtGui/qabstractslider.h
+QtGui/qabstractspinbox.h
+QtGui/qabstracttextdocumentlayout.h
+QtGui/qaccessiblebridge.h
+QtGui/qaccessible.h
+QtGui/qaccessibleobject.h
+QtGui/qaccessibleplugin.h
+QtGui/qaccessiblewidget.h
+QtGui/qactiongroup.h
+QtGui/qaction.h
+QtGui/qapplication.h
+QtGui/qbitmap.h
+QtGui/qboxlayout.h
+QtGui/qbrush.h
+QtGui/qbuttongroup.h
+QtGui/qcalendarwidget.h
+QtGui/qcheckbox.h
+QtGui/qcleanlooksstyle.h
+QtGui/qclipboard.h
+QtGui/qcolordialog.h
+QtGui/qcolor.h
+QtGui/qcolormap.h
+QtGui/qcombobox.h
+QtGui/qcommonstyle.h
+QtGui/qcompleter.h
+QtGui/qcursor.h
+QtGui/qdatawidgetmapper.h
+QtGui/qdatetimeedit.h
+QtGui/qdesktopservices.h
+QtGui/qdesktopwidget.h
+QtGui/qdial.h
+QtGui/qdialogbuttonbox.h
+QtGui/qdialog.h
+QtGui/qdirmodel.h
+QtGui/qdockwidget.h
+QtGui/qdrag.h
+QtGui/qdrawutil.h
+QtGui/qerrormessage.h
+QtGui/qevent.h
+QtGui/qfiledialog.h
+QtGui/qfocusframe.h
+QtGui/qfontcombobox.h
+QtGui/qfontdatabase.h
+QtGui/qfontdialog.h
+QtGui/qfont.h
+QtGui/qfontinfo.h
+QtGui/qfontmetrics.h
+QtGui/qframe.h
+QtGui/qgraphicsitemanimation.h
+QtGui/qgraphicsitem.h
+QtGui/qgraphicssceneevent.h
+QtGui/qgraphicsscene.h
+QtGui/qgraphicsview.h
+QtGui/qgridlayout.h
+QtGui/qgroupbox.h
+QtGui/qhboxlayout.h
+QtGui/qheaderview.h
+QtGui/qiconengine.h
+QtGui/qiconengineplugin.h
+QtGui/qicon.h
+QtGui/qimage.h
+QtGui/qimageiohandler.h
+QtGui/qimagereader.h
+QtGui/qimagewriter.h
+QtGui/qinputcontextfactory.h
+QtGui/qinputcontext.h
+QtGui/qinputcontextplugin.h
+QtGui/qinputdialog.h
+QtGui/qitemdelegate.h
+QtGui/qitemeditorfactory.h
+QtGui/qitemselectionmodel.h
+QtGui/qkeysequence.h
+QtGui/qlabel.h
+QtGui/qlayout.h
+QtGui/qlayoutitem.h
+QtGui/qlcdnumber.h
+QtGui/qlineedit.h
+QtGui/qlistview.h
+QtGui/qlistwidget.h
+QtGui/qmacstyle.h
+QtGui/qmainwindow.h
+QtGui/qmatrix.h
+QtGui/qmenubar.h
+QtGui/qmenudata.h
+QtGui/qmenu.h
+QtGui/qmessageboxex.h
+QtGui/qmessagebox.h
+QtGui/qmime.h
+QtGui/qmovie.h
+QtGui/qpagesetupdialog.h
+QtGui/qpaintdevice.h
+QtGui/qpaintengine.h
+QtGui/qpainter.h
+QtGui/qpainterpath.h
+QtGui/qpalette.h
+QtGui/qpen.h
+QtGui/qpictureformatplugin.h
+QtGui/qpicture.h
+QtGui/qpixmapcache.h
+QtGui/qpixmap.h
+QtGui/qplastiquestyle.h
+QtGui/qpolygon.h
+QtGui/qprintdialog.h
+QtGui/qprintengine.h
+QtGui/qprinter.h
+QtGui/qprogressbar.h
+QtGui/qprogressdialog.h
+QtGui/qproxymodel.h
+QtGui/qpushbutton.h
+QtGui/qradiobutton.h
+QtGui/qregion.h
+QtGui/qrgb.h
+QtGui/qrubberband.h
+QtGui/qscrollarea.h
+QtGui/qscrollbar.h
+QtGui/qsessionmanager.h
+QtGui/qshortcut.h
+QtGui/qsizegrip.h
+QtGui/qsizepolicy.h
+QtGui/qslider.h
+QtGui/qsortfilterproxymodel.h
+QtGui/qsound.h
+QtGui/qspinbox.h
+QtGui/qsplashscreen.h
+QtGui/qsplitter.h
+QtGui/qstackedlayout.h
+QtGui/qstackedwidget.h
+QtGui/qstandarditemmodel.h
+QtGui/qstatusbar.h
+QtGui/qstringlistmodel.h
+QtGui/qstylefactory.h
+QtGui/qstyle.h
+QtGui/qstyleoption.h
+QtGui/qstylepainter.h
+QtGui/qstyleplugin.h
+QtGui/qsyntaxhighlighter.h
+QtGui/qsystemtrayicon.h
+QtGui/qtabbar.h
+QtGui/qtableview.h
+QtGui/qtablewidget.h
+QtGui/qtabwidget.h
+QtGui/qtextbrowser.h
+QtGui/qtextcursor.h
+QtGui/qtextdocumentfragment.h
+QtGui/qtextdocument.h
+QtGui/qtextedit.h
+QtGui/qtextformat.h
+QtGui/qtextlayout.h
+QtGui/qtextlist.h
+QtGui/qtextobject.h
+QtGui/qtextoption.h
+QtGui/qtexttable.h
+QtGui/qtoolbar.h
+QtGui/qtoolbox.h
+QtGui/qtoolbutton.h
+QtGui/qtooltip.h
+QtGui/qtreeview.h
+QtGui/qtreewidget.h
+QtGui/qtreewidgetitemiterator.h
+QtGui/qundogroup.h
+QtGui/qundostack.h
+QtGui/qundoview.h
+QtGui/qvalidator.h
+QtGui/qvboxlayout.h
+QtGui/qvfbhdr.h
+QtGui/qwhatsthis.h
+QtGui/qwidgetaction.h
+QtGui/qwidget.h
+QtGui/qwindowdefs.h
+QtGui/qwindowsstyle.h
+QtGui/qwindowsxpstyle.h
+QtGui/qwmatrix.h
+QtGui/qworkspace.h
+QtGui/qx11info_x11.h
+QtNetwork/qabstractsocket.h
+QtNetwork/qftp.h
+QtNetwork/qhostaddress.h
+QtNetwork/qhostinfo.h
+QtNetwork/qhttp.h
+QtNetwork/qnetworkinterface.h
+QtNetwork/qnetworkproxy.h
+QtNetwork/qtcpserver.h
+QtNetwork/qtcpsocket.h
+QtNetwork/qudpsocket.h
+QtNetwork/qurlinfo.h
+QtOpenGL/qglcolormap.h
+QtOpenGL/qglframebufferobject.h
+QtOpenGL/qgl.h
+QtOpenGL/qglpixelbuffer.h
+Qt/qiconset.h
+QtSql/qsqldatabase.h
+QtSql/qsqldriver.h
+QtSql/qsqldriverplugin.h
+QtSql/qsqlerror.h
+QtSql/qsqlfield.h
+QtSql/qsql.h
+QtSql/qsqlindex.h
+QtSql/qsqlquery.h
+QtSql/qsqlquerymodel.h
+QtSql/qsqlrecord.h
+QtSql/qsqlrelationaldelegate.h
+QtSql/qsqlrelationaltablemodel.h
+QtSql/qsqlrelation.h
+QtSql/qsqlresult.h
+QtSql/qsqltablemodel.h
+QtSvg/qsvgrenderer.h
+QtSvg/qsvgwidget.h
+QtUiTools/quiloader.h
+QtXml/qdom.h
+QtXml/qxml.h
Index: smoke/qt/mkmk.rb
===================================================================
--- smoke/qt/mkmk.rb (.../qtruby) (revision 0)
+++ smoke/qt/mkmk.rb (.../qtruby4/msvc) (revision 18)
@@ -0,0 +1,44 @@
+mkmk = %w(
+@qt_test_threshold@ 15
+@CXX@ cl
+@qt_includes@ g:/qt/4.30/include
+@all_includes@ -Ig:/qt/4.30/include
+@all_libraries@ ""
+
+@CXXFLAGS@ ""
+
+@LIB_QTCORE@ qtcore4.lib
+@LIB_QTGUI@ qtgui4.lib
+@LIB_QTNETWORK@ qtnetwork4.lib
+@LIB_QTXML@ qtxml4.lib
+@LIB_QTSQL@ qtsql4.lib
+@LIB_QTOPENGL@ qtopengl4.lib
+
+@LIBPNG@ ""
+@LIBJPEG@ ""
+@LIBSM@ ""
+@LIBSOCKET@ ""
+@LIBDL@ ""
+@LIBRESOLV@ ""
+@LIB_X11@ ""
+@X_PRE_LIBS@ ""
+)
+
+
+conf = Hash.new
+Hash[ *mkmk ].each{|key, value|
+ conf[ Regexp.new(key) ] = value.gsub(/"/,"")
+}
+
+File.open("qtguess.pl","w"){|of|
+ IO.foreach( "qtguess.pl.in" ){|line|
+ l = line.dup
+ conf.each{|key, value|
+ line.gsub!(key, value )
+ }
+ line.gsub!(/-D__cplusplus -dM/,"");
+ line.gsub!(/gettmpfile\(\)/,'"tmp"')
+ line.gsub!(Regexp.new("/dev/null"),'NUL')
+ of.puts line
+ }
+}
_______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic