[PATCH] 2.0 Beta doesn't compile on qt ...

Help
Jim
2010-01-14
2013-05-14
  • Jim
    Jim
    2010-01-14

    I couldn't get it to work on my Ubuntu 8.04 workstation; it was choking on the QT_BEGIN_NAMESPACE tags.  A quick Internet search revealed that it's not present on qt's less than 4.4.  Patch is below.

    diff --git a/aboutform.h b/aboutform.h
    index 32f3c53..68da55c 100644
    --- a/aboutform.h
    +++ b/aboutform.h
    @@ -3,6 +3,14 @@
    
     #include <qvariant.h>
    
    +/* QT_BEGIN_NAMESPACE and QT_END_NAMESPACE weren't introduced into QT right away... */
    +#ifndef QT_BEGIN_NAMESPACE
    +#define QT_BEGIN_NAMESPACE
    +#endif
    +
    +#ifndef QT_END_NAMESPACE
    +#define QT_END_NAMESPACE
    +#endif
    
     #include <Qt3Support/Q3MimeSourceFactory>
     #include <QtCore/QVariant>
    diff --git a/addfieldform.h b/addfieldform.h
    index 333eb35..f40f620 100644
    --- a/addfieldform.h
    +++ b/addfieldform.h
    @@ -3,6 +3,14 @@
    
     #include <qvariant.h>
    
    +/* QT_BEGIN_NAMESPACE and QT_END_NAMESPACE weren't introduced into QT right away... */
    +#ifndef QT_BEGIN_NAMESPACE
    +#define QT_BEGIN_NAMESPACE
    +#endif
    +
    +#ifndef QT_END_NAMESPACE
    +#define QT_END_NAMESPACE
    +#endif
    
     #include <Qt3Support/Q3MimeSourceFactory>
     #include <QtCore/QVariant>
    diff --git a/addfieldtypeform.h b/addfieldtypeform.h
    index cee2911..d70d4c1 100644
    --- a/addfieldtypeform.h
    +++ b/addfieldtypeform.h
    @@ -3,6 +3,14 @@
    
     #include <qvariant.h>
    
    +/* QT_BEGIN_NAMESPACE and QT_END_NAMESPACE weren't introduced into QT right away... */
    +#ifndef QT_BEGIN_NAMESPACE
    +#define QT_BEGIN_NAMESPACE
    +#endif
    +
    +#ifndef QT_END_NAMESPACE
    +#define QT_END_NAMESPACE
    +#endif
    
     #include <Qt3Support/Q3MimeSourceFactory>
     #include <QtCore/QVariant>
    diff --git a/choosetableform.h b/choosetableform.h
    index 26f82a5..b601b6e 100644
    --- a/choosetableform.h
    +++ b/choosetableform.h
    @@ -3,6 +3,14 @@
    
     #include <qvariant.h>
    
    +/* QT_BEGIN_NAMESPACE and QT_END_NAMESPACE weren't introduced into QT right away... */
    +#ifndef QT_BEGIN_NAMESPACE
    +#define QT_BEGIN_NAMESPACE
    +#endif
    +
    +#ifndef QT_END_NAMESPACE
    +#define QT_END_NAMESPACE
    +#endif
    
     #include <Qt3Support/Q3MimeSourceFactory>
     #include <QtCore/QVariant>
    diff --git a/createindexform.h b/createindexform.h
    index 51e9933..a37b0fd 100644
    --- a/createindexform.h
    +++ b/createindexform.h
    @@ -3,6 +3,14 @@
    
     #include <qvariant.h>
    
    +/* QT_BEGIN_NAMESPACE and QT_END_NAMESPACE weren't introduced into QT right away... */
    +#ifndef QT_BEGIN_NAMESPACE
    +#define QT_BEGIN_NAMESPACE
    +#endif
    +
    +#ifndef QT_END_NAMESPACE
    +#define QT_END_NAMESPACE
    +#endif
    
     #include <Qt3Support/Q3GroupBox>
     #include <Qt3Support/Q3MimeSourceFactory>
    diff --git a/createtableform.h b/createtableform.h
    index 4cee548..aaac8f1 100644
    --- a/createtableform.h
    +++ b/createtableform.h
    @@ -3,6 +3,14 @@
    
     #include <qvariant.h>
    
    +/* QT_BEGIN_NAMESPACE and QT_END_NAMESPACE weren't introduced into QT right away... */
    +#ifndef QT_BEGIN_NAMESPACE
    +#define QT_BEGIN_NAMESPACE
    +#endif
    +
    +#ifndef QT_END_NAMESPACE
    +#define QT_END_NAMESPACE
    +#endif
    
     #include <Qt3Support/Q3GroupBox>
     #include <Qt3Support/Q3Header>
    diff --git a/deleteindexform.h b/deleteindexform.h
    index 6e2b405..3207b45 100644
    --- a/deleteindexform.h
    +++ b/deleteindexform.h
    @@ -3,6 +3,14 @@
    
     #include <qvariant.h>
    
    +/* QT_BEGIN_NAMESPACE and QT_END_NAMESPACE weren't introduced into QT right away... */
    +#ifndef QT_BEGIN_NAMESPACE
    +#define QT_BEGIN_NAMESPACE
    +#endif
    +
    +#ifndef QT_END_NAMESPACE
    +#define QT_END_NAMESPACE
    +#endif
    
     #include <Qt3Support/Q3MimeSourceFactory>
     #include <QtCore/QVariant>
    diff --git a/deletetableform.h b/deletetableform.h
    index 8754077..2afb2f8 100644
    --- a/deletetableform.h
    +++ b/deletetableform.h
    @@ -3,6 +3,14 @@
    
     #include <qvariant.h>
    
    +/* QT_BEGIN_NAMESPACE and QT_END_NAMESPACE weren't introduced into QT right away... */
    +#ifndef QT_BEGIN_NAMESPACE
    +#define QT_BEGIN_NAMESPACE
    +#endif
    +
    +#ifndef QT_END_NAMESPACE
    +#define QT_END_NAMESPACE
    +#endif
    
     #include <Qt3Support/Q3MimeSourceFactory>
     #include <QtCore/QVariant>
    diff --git a/editfieldform.h b/editfieldform.h
    index 992e53f..9c96daf 100644
    --- a/editfieldform.h
    +++ b/editfieldform.h
    @@ -3,6 +3,14 @@
    
     #include <qvariant.h>
    
    +/* QT_BEGIN_NAMESPACE and QT_END_NAMESPACE weren't introduced into QT right away... */
    +#ifndef QT_BEGIN_NAMESPACE
    +#define QT_BEGIN_NAMESPACE
    +#endif
    +
    +#ifndef QT_END_NAMESPACE
    +#define QT_END_NAMESPACE
    +#endif
    
     #include <Qt3Support/Q3MimeSourceFactory>
     #include <QtCore/QVariant>
    diff --git a/editform.h b/editform.h
    index 294804c..dd38fb7 100644
    --- a/editform.h
    +++ b/editform.h
    @@ -3,6 +3,14 @@
    
     #include <qvariant.h>
    
    +/* QT_BEGIN_NAMESPACE and QT_END_NAMESPACE weren't introduced into QT right away... */
    +#ifndef QT_BEGIN_NAMESPACE
    +#define QT_BEGIN_NAMESPACE
    +#endif
    +
    +#ifndef QT_END_NAMESPACE
    +#define QT_END_NAMESPACE
    +#endif
    
     #include <Qt3Support/Q3Frame>
     #include <Qt3Support/Q3MimeSourceFactory>
    diff --git a/editformwindow.h b/editformwindow.h
    index 7bab2b7..36e53d5 100644
    --- a/editformwindow.h
    +++ b/editformwindow.h
    @@ -3,6 +3,14 @@
    
     #include <qvariant.h>
    
    +/* QT_BEGIN_NAMESPACE and QT_END_NAMESPACE weren't introduced into QT right away... */
    +#ifndef QT_BEGIN_NAMESPACE
    +#define QT_BEGIN_NAMESPACE
    +#endif
    +
    +#ifndef QT_END_NAMESPACE
    +#define QT_END_NAMESPACE
    +#endif
    
     #include <Qt3Support/Q3MainWindow>
     #include <Qt3Support/Q3MimeSourceFactory>
    diff --git a/edittableform.h b/edittableform.h
    index 1eec7cf..d7667ef 100644
    --- a/edittableform.h
    +++ b/edittableform.h
    @@ -3,6 +3,14 @@
    
     #include <qvariant.h>
    
    +/* QT_BEGIN_NAMESPACE and QT_END_NAMESPACE weren't introduced into QT right away... */
    +#ifndef QT_BEGIN_NAMESPACE
    +#define QT_BEGIN_NAMESPACE
    +#endif
    +
    +#ifndef QT_END_NAMESPACE
    +#define QT_END_NAMESPACE
    +#endif
    
     #include <Qt3Support/Q3Header>
     #include <Qt3Support/Q3ListView>
    diff --git a/exporttablecsvform.h b/exporttablecsvform.h
    index a356a12..f881ba0 100644
    --- a/exporttablecsvform.h
    +++ b/exporttablecsvform.h
    @@ -3,6 +3,14 @@
    
     #include <qvariant.h>
    
    +/* QT_BEGIN_NAMESPACE and QT_END_NAMESPACE weren't introduced into QT right away... */
    +#ifndef QT_BEGIN_NAMESPACE
    +#define QT_BEGIN_NAMESPACE
    +#endif
    +
    +#ifndef QT_END_NAMESPACE
    +#define QT_END_NAMESPACE
    +#endif
    
     #include <Qt3Support/Q3MimeSourceFactory>
     #include <QtCore/QVariant>
    diff --git a/findform.h b/findform.h
    index 67aa291..85f8fab 100644
    --- a/findform.h
    +++ b/findform.h
    @@ -3,6 +3,14 @@
    
     #include <qvariant.h>
    
    +/* QT_BEGIN_NAMESPACE and QT_END_NAMESPACE weren't introduced into QT right away... */
    +#ifndef QT_BEGIN_NAMESPACE
    +#define QT_BEGIN_NAMESPACE
    +#endif
    +
    +#ifndef QT_END_NAMESPACE
    +#define QT_END_NAMESPACE
    +#endif
    
     #include <Qt3Support/Q3Header>
     #include <Qt3Support/Q3ListView>
    diff --git a/form1.h b/form1.h
    index 1fa6e10..8f4681f 100644
    --- a/form1.h
    +++ b/form1.h
    @@ -3,6 +3,14 @@
    
     #include <qvariant.h>
    
    +/* QT_BEGIN_NAMESPACE and QT_END_NAMESPACE weren't introduced into QT right away... */
    +#ifndef QT_BEGIN_NAMESPACE
    +#define QT_BEGIN_NAMESPACE
    +#endif
    +
    +#ifndef QT_END_NAMESPACE
    +#define QT_END_NAMESPACE
    +#endif
    
     #include <Qt3Support/Q3Header>
     #include <Qt3Support/Q3ListView>
    diff --git a/importcsvform.h b/importcsvform.h
    index 62ebbc3..dfe3961 100644
    --- a/importcsvform.h
    +++ b/importcsvform.h
    @@ -3,6 +3,14 @@
    
     #include <qvariant.h>
    
    +/* QT_BEGIN_NAMESPACE and QT_END_NAMESPACE weren't introduced into QT right away... */
    +#ifndef QT_BEGIN_NAMESPACE
    +#define QT_BEGIN_NAMESPACE
    +#endif
    +
    +#ifndef QT_END_NAMESPACE
    +#define QT_END_NAMESPACE
    +#endif
    
     #include <Qt3Support/Q3Header>
     #include <Qt3Support/Q3MimeSourceFactory>
    diff --git a/preferencesform.h b/preferencesform.h
    index c6782ca..71128eb 100644
    --- a/preferencesform.h
    +++ b/preferencesform.h
    @@ -3,6 +3,14 @@
    
     #include <qvariant.h>
    
    +/* QT_BEGIN_NAMESPACE and QT_END_NAMESPACE weren't introduced into QT right away... */
    +#ifndef QT_BEGIN_NAMESPACE
    +#define QT_BEGIN_NAMESPACE
    +#endif
    +
    +#ifndef QT_END_NAMESPACE
    +#define QT_END_NAMESPACE
    +#endif
    
     #include <Qt3Support/Q3MimeSourceFactory>
     #include <QtCore/QVariant>
    diff --git a/renametableform.h b/renametableform.h
    index 482fa5b..fb9e288 100644
    --- a/renametableform.h
    +++ b/renametableform.h
    @@ -3,6 +3,14 @@
    
     #include <qvariant.h>
    
    +/* QT_BEGIN_NAMESPACE and QT_END_NAMESPACE weren't introduced into QT right away... */
    +#ifndef QT_BEGIN_NAMESPACE
    +#define QT_BEGIN_NAMESPACE
    +#endif
    +
    +#ifndef QT_END_NAMESPACE
    +#define QT_END_NAMESPACE
    +#endif
    
     #include <Qt3Support/Q3MimeSourceFactory>
     #include <QtCore/QVariant>
    diff --git a/sqllogform.h b/sqllogform.h
    index 23811c6..df4607b 100644
    --- a/sqllogform.h
    +++ b/sqllogform.h
    @@ -3,6 +3,14 @@
    
     #include <qvariant.h>
    
    +/* QT_BEGIN_NAMESPACE and QT_END_NAMESPACE weren't introduced into QT right away... */
    +#ifndef QT_BEGIN_NAMESPACE
    +#define QT_BEGIN_NAMESPACE
    +#endif
    +
    +#ifndef QT_END_NAMESPACE
    +#define QT_END_NAMESPACE
    +#endif
    
     #include <Qt3Support/Q3MimeSourceFactory>
     #include <Qt3Support/Q3TextEdit>
    
     
  • Thanks for the contribution. I committed the changes, but I have no way to test them under Qt 4.4 easily. Can you update from SVN and attempt the build?

    Regards,
    Mauricio