summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2018-09-24 17:03:23 +0200
committerSlávek Banko <slavek.banko@axis.cz>2018-09-24 17:03:23 +0200
commitff63338d189a49a16b29a503ba23727cfa7e2e66 (patch)
treec6e82e67044286fe4471e97c8f079a2d205f979a
parent02964eb384e1b5a73a198d04262497607d81e38f (diff)
downloadtqt3-ff63338d.tar.gz
tqt3-ff63338d.zip
Always build with a clean namespace
QT_CLEAN_NAMESPACE constant is no more needed This may theoretically affect applications created for Qt1 and Qt2, but such applications require further modifications as well. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--doc/html/porting.html4
-rw-r--r--doc/html/qcstring-h.html14
-rw-r--r--doc/html/qcursor-h.html13
-rw-r--r--doc/html/qglobal-h.html32
-rw-r--r--doc/html/qwindowdefs-h.html6
-rw-r--r--doc/porting3.doc4
-rw-r--r--examples/demo/opengl/glinfo_x11.cpp2
-rw-r--r--plugins/src/imageformats/jpeg/main.cpp3
-rw-r--r--plugins/src/imageformats/mng/main.cpp4
-rw-r--r--plugins/src/imageformats/png/main.cpp3
-rw-r--r--src/kernel/ntqcursor.h13
-rw-r--r--src/kernel/ntqobjectdefs.h6
-rw-r--r--src/kernel/ntqwindowdefs.h6
-rw-r--r--src/kernel/qapplication_x11.cpp3
-rw-r--r--src/kernel/qjpegio.cpp4
-rw-r--r--src/kernel/qmngio.cpp4
-rw-r--r--src/kernel/qsound_x11.cpp2
-rw-r--r--src/kernel/qtkdeintegration_x11.cpp1
-rw-r--r--src/tools/ntqcstring.h14
-rw-r--r--src/tools/ntqglobal.h32
-rw-r--r--tools/msg2tqm/msg2tqm.cpp4
-rw-r--r--tools/tqvfb/qanimationwriter.cpp1
22 files changed, 4 insertions, 171 deletions
diff --git a/doc/html/porting.html b/doc/html/porting.html
index 8c0a3e10..e5ca3376 100644
--- a/doc/html/porting.html
+++ b/doc/html/porting.html
@@ -217,9 +217,7 @@ previously disabled, please check these macro variables:
<li> <tt>CHECK_NULL</tt> becomes <tt>QT_CHECK_NULL</tt>
<li> <tt>CHECK_MATH</tt> becomes <tt>QT_CHECK_MATH</tt>
</ul>
-<p> The name of some debugging macro functions has been changed as well
-but source compatibility should not be affected if the macro variable
-<tt>QT_CLEAN_NAMESPACE</tt> is not defined:
+<p> The name of some debugging macro functions has been changed:
<p> <ul>
<li> <tt>ASSERT</tt> becomes <tt>Q_ASSERT</tt>
<li> <tt>CHECK_PTR</tt> becomes <tt>TQ_CHECK_PTR</tt>
diff --git a/doc/html/qcstring-h.html b/doc/html/qcstring-h.html
index c38665f6..d7980c3b 100644
--- a/doc/html/qcstring-h.html
+++ b/doc/html/qcstring-h.html
@@ -117,20 +117,6 @@ Q_EXPORT int tqstricmp( const char *, const char * );
Q_EXPORT int tqstrnicmp( const char *, const char *, uint len );
-#ifndef QT_CLEAN_NAMESPACE
-Q_EXPORT inline uint cstrlen( const char *str )
-{ return (uint)strlen(str); }
-
-Q_EXPORT inline char *cstrcpy( char *dst, const char *src )
-{ return strcpy(dst,src); }
-
-Q_EXPORT inline int cstrcmp( const char *str1, const char *str2 )
-{ return strcmp(str1,str2); }
-
-Q_EXPORT inline int cstrncmp( const char *str1, const char *str2, uint len )
-{ return strncmp(str1,str2,len); }
-#endif
-
// tqChecksum: Internet checksum
diff --git a/doc/html/qcursor-h.html b/doc/html/qcursor-h.html
index 0c99af9e..848d624b 100644
--- a/doc/html/qcursor-h.html
+++ b/doc/html/qcursor-h.html
@@ -158,19 +158,6 @@ private:
};
-#if !defined(QT_CLEAN_NAMESPACE)
-// CursorShape is defined in X11/X.h
-#ifdef CursorShape
-#define X_CursorShape CursorShape
-#undef CursorShape
-#endif
-typedef TQt::CursorShape TQCursorShape;
-#ifdef X_CursorShape
-#define CursorShape X_CursorShape
-#endif
-#endif
-
-
/*****************************************************************************
TQCursor stream functions
*****************************************************************************/
diff --git a/doc/html/qglobal-h.html b/doc/html/qglobal-h.html
index 8a2d9e5d..f5bdb6be 100644
--- a/doc/html/qglobal-h.html
+++ b/doc/html/qglobal-h.html
@@ -734,16 +734,6 @@ inline int tqRound( double d )
// Size-dependent types (architechture-dependent byte order)
//
-#if !defined(QT_CLEAN_NAMESPACE)
-// source compatibility with TQt 1.x
-typedef signed char INT8; // 8 bit signed
-typedef unsigned char UINT8; // 8 bit unsigned
-typedef short INT16; // 16 bit signed
-typedef unsigned short UINT16; // 16 bit unsigned
-typedef int INT32; // 32 bit signed
-typedef unsigned int UINT32; // 32 bit unsigned
-#endif
-
typedef signed char TQ_INT8; // 8 bit signed
typedef unsigned char TQ_UINT8; // 8 bit unsigned
typedef short TQ_INT16; // 16 bit signed
@@ -1020,28 +1010,6 @@ Q_EXPORT void tqFatal( const char *, ... ) // print fatal message and exit
Q_EXPORT void tqSystemWarning( const char *, int code = -1 );
-#if !defined(QT_CLEAN_NAMESPACE) // compatibility with TQt 1
-
-Q_EXPORT void debug( const char *, ... ) // print debug message
-#if defined(Q_CC_GNU) &amp;&amp; !defined(__INSURE__)
- __attribute__ ((format (printf, 1, 2)))
-#endif
-;
-
-Q_EXPORT void warning( const char *, ... ) // print warning message
-#if defined(Q_CC_GNU) &amp;&amp; !defined(__INSURE__)
- __attribute__ ((format (printf, 1, 2)))
-#endif
-;
-
-Q_EXPORT void fatal( const char *, ... ) // print fatal message and exit
-#if defined(Q_CC_GNU) &amp;&amp; !defined(__INSURE__)
- __attribute__ ((format (printf, 1, 2)))
-#endif
-;
-
-#endif // QT_CLEAN_NAMESPACE
-
#if !defined(Q_ASSERT)
# if defined(QT_CHECK_STATE)
diff --git a/doc/html/qwindowdefs-h.html b/doc/html/qwindowdefs-h.html
index 7b3d22c8..4ff4fd5e 100644
--- a/doc/html/qwindowdefs-h.html
+++ b/doc/html/qwindowdefs-h.html
@@ -224,12 +224,6 @@ typedef void (*TQtCleanUpFunction)();
Q_EXPORT void tqAddPostRoutine( TQtCleanUpFunction );
Q_EXPORT void tqRemovePostRoutine( TQtCleanUpFunction );
-#if !defined(QT_CLEAN_NAMESPACE)
-// source compatibility with TQt 2.x
-typedef TQtCleanUpFunction Q_CleanUpFunction;
-#endif
-
-
#endif // TQWINDOWDEFS_H
</pre>
<!-- eof -->
diff --git a/doc/porting3.doc b/doc/porting3.doc
index c3d192b8..dd58db96 100644
--- a/doc/porting3.doc
+++ b/doc/porting3.doc
@@ -165,9 +165,7 @@ previously disabled, please check these macro variables:
\i \c CHECK_MATH becomes \c QT_CHECK_MATH
\endlist
-The name of some debugging macro functions has been changed as well
-but source compatibility should not be affected if the macro variable
-\c QT_CLEAN_NAMESPACE is not defined:
+The name of some debugging macro functions has been changed:
\list
\i \c ASSERT becomes \c Q_ASSERT
diff --git a/examples/demo/opengl/glinfo_x11.cpp b/examples/demo/opengl/glinfo_x11.cpp
index 33227c9a..e0a93a16 100644
--- a/examples/demo/opengl/glinfo_x11.cpp
+++ b/examples/demo/opengl/glinfo_x11.cpp
@@ -7,8 +7,6 @@
**
*****************************************************************************/
-#define QT_CLEAN_NAMESPACE // avoid clashes with Xmd.h
-
#include <ntqstringlist.h>
#include <ntqgl.h>
#include "glinfo.h"
diff --git a/plugins/src/imageformats/jpeg/main.cpp b/plugins/src/imageformats/jpeg/main.cpp
index ef8fd9dd..516244c0 100644
--- a/plugins/src/imageformats/jpeg/main.cpp
+++ b/plugins/src/imageformats/jpeg/main.cpp
@@ -1,6 +1,3 @@
-#ifndef QT_CLEAN_NAMESPACE
-#define QT_CLEAN_NAMESPACE
-#endif
#include <ntqimageformatplugin.h>
#ifndef QT_NO_IMAGEFORMATPLUGIN
diff --git a/plugins/src/imageformats/mng/main.cpp b/plugins/src/imageformats/mng/main.cpp
index 4b09c899..62e159a3 100644
--- a/plugins/src/imageformats/mng/main.cpp
+++ b/plugins/src/imageformats/mng/main.cpp
@@ -1,7 +1,3 @@
-#ifndef QT_CLEAN_NAMESPACE
-#define QT_CLEAN_NAMESPACE
-#endif
-
#include <ntqimageformatplugin.h>
#ifndef QT_NO_IMAGEFORMATPLUGIN
diff --git a/plugins/src/imageformats/png/main.cpp b/plugins/src/imageformats/png/main.cpp
index 91101194..fff20761 100644
--- a/plugins/src/imageformats/png/main.cpp
+++ b/plugins/src/imageformats/png/main.cpp
@@ -1,6 +1,3 @@
-#ifndef QT_CLEAN_NAMESPACE
-#define QT_CLEAN_NAMESPACE
-#endif
#include <ntqimageformatplugin.h>
#ifndef QT_NO_IMAGEFORMATPLUGIN
diff --git a/src/kernel/ntqcursor.h b/src/kernel/ntqcursor.h
index 70c91e95..a285637c 100644
--- a/src/kernel/ntqcursor.h
+++ b/src/kernel/ntqcursor.h
@@ -122,19 +122,6 @@ private:
};
-#if !defined(QT_CLEAN_NAMESPACE)
-// CursorShape is defined in X11/X.h
-#ifdef CursorShape
-#define X_CursorShape CursorShape
-#undef CursorShape
-#endif
-typedef TQt::CursorShape TQCursorShape;
-#ifdef X_CursorShape
-#define CursorShape X_CursorShape
-#endif
-#endif
-
-
/*****************************************************************************
TQCursor stream functions
*****************************************************************************/
diff --git a/src/kernel/ntqobjectdefs.h b/src/kernel/ntqobjectdefs.h
index a3c2ac4d..a8dce070 100644
--- a/src/kernel/ntqobjectdefs.h
+++ b/src/kernel/ntqobjectdefs.h
@@ -142,12 +142,6 @@ private: \
#define SIGNAL(a) "2"#a
#endif
-#ifndef QT_CLEAN_NAMESPACE
-#define METHOD_CODE 0 // member type codes
-#define SLOT_CODE 1
-#define SIGNAL_CODE 2
-#endif
-
#define TQMETHOD_CODE 0 // member type codes
#define TQSLOT_CODE 1
#define TQSIGNAL_CODE 2
diff --git a/src/kernel/ntqwindowdefs.h b/src/kernel/ntqwindowdefs.h
index 54b18b65..6d57f214 100644
--- a/src/kernel/ntqwindowdefs.h
+++ b/src/kernel/ntqwindowdefs.h
@@ -188,10 +188,4 @@ typedef void (*TQtCleanUpFunction)();
Q_EXPORT void tqAddPostRoutine( TQtCleanUpFunction );
Q_EXPORT void tqRemovePostRoutine( TQtCleanUpFunction );
-#if !defined(QT_CLEAN_NAMESPACE)
-// source compatibility with TQt 2.x
-typedef TQtCleanUpFunction Q_CleanUpFunction;
-#endif
-
-
#endif // TQWINDOWDEFS_H
diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp
index 8e859349..08402bb1 100644
--- a/src/kernel/qapplication_x11.cpp
+++ b/src/kernel/qapplication_x11.cpp
@@ -44,9 +44,6 @@
// provide a proper alternative for others. See also the exports in
// qapplication_win.cpp which suggest a unification.
-// ### needed for solaris-g++ in beta5
-#define QT_CLEAN_NAMESPACE
-
#include "qplatformdefs.h"
// POSIX Large File Support redefines open -> open64
diff --git a/src/kernel/qjpegio.cpp b/src/kernel/qjpegio.cpp
index a6503fcb..037acad5 100644
--- a/src/kernel/qjpegio.cpp
+++ b/src/kernel/qjpegio.cpp
@@ -38,10 +38,6 @@
**
**********************************************************************/
-#ifndef QT_CLEAN_NAMESPACE
-#define QT_CLEAN_NAMESPACE
-#endif
-
#include "ntqimage.h"
#ifndef QT_NO_IMAGEIO_JPEG
diff --git a/src/kernel/qmngio.cpp b/src/kernel/qmngio.cpp
index a7ab00e0..fa3f9bd5 100644
--- a/src/kernel/qmngio.cpp
+++ b/src/kernel/qmngio.cpp
@@ -38,10 +38,6 @@
**
**********************************************************************/
-#ifndef QT_CLEAN_NAMESPACE
-#define QT_CLEAN_NAMESPACE
-#endif
-
#include "ntqdatetime.h"
#ifndef QT_NO_IMAGEIO_MNG
diff --git a/src/kernel/qsound_x11.cpp b/src/kernel/qsound_x11.cpp
index 9c2a0dae..01a2b86b 100644
--- a/src/kernel/qsound_x11.cpp
+++ b/src/kernel/qsound_x11.cpp
@@ -38,8 +38,6 @@
**
**********************************************************************/
-#define QT_CLEAN_NAMESPACE
-
#include "ntqsound.h"
#ifndef QT_NO_SOUND
diff --git a/src/kernel/qtkdeintegration_x11.cpp b/src/kernel/qtkdeintegration_x11.cpp
index b61920fc..f49181f7 100644
--- a/src/kernel/qtkdeintegration_x11.cpp
+++ b/src/kernel/qtkdeintegration_x11.cpp
@@ -1,7 +1,6 @@
/* This file is licensed under the terms of the GPL v2 or v3, as it has been publicly released by
OpenSUSE as part of their GPLed TQt library disribution */
-#define QT_CLEAN_NAMESPACE
#include "qtkdeintegration_x11_p.h"
#include <ntqcolordialog.h>
diff --git a/src/tools/ntqcstring.h b/src/tools/ntqcstring.h
index 0bcdffa5..e60e0969 100644
--- a/src/tools/ntqcstring.h
+++ b/src/tools/ntqcstring.h
@@ -81,20 +81,6 @@ Q_EXPORT int tqstricmp( const char *, const char * );
Q_EXPORT int tqstrnicmp( const char *, const char *, uint len );
-#ifndef QT_CLEAN_NAMESPACE
-Q_EXPORT inline uint cstrlen( const char *str )
-{ return (uint)strlen(str); }
-
-Q_EXPORT inline char *cstrcpy( char *dst, const char *src )
-{ return strcpy(dst,src); }
-
-Q_EXPORT inline int cstrcmp( const char *str1, const char *str2 )
-{ return strcmp(str1,str2); }
-
-Q_EXPORT inline int cstrncmp( const char *str1, const char *str2, uint len )
-{ return strncmp(str1,str2,len); }
-#endif
-
// tqChecksum: Internet checksum
diff --git a/src/tools/ntqglobal.h b/src/tools/ntqglobal.h
index db41468f..f7613a2a 100644
--- a/src/tools/ntqglobal.h
+++ b/src/tools/ntqglobal.h
@@ -702,16 +702,6 @@ inline int tqRound( double d )
// Size-dependent types (architechture-dependent byte order)
//
-#if !defined(QT_CLEAN_NAMESPACE)
-// source compatibility with TQt 1.x
-typedef signed char INT8; // 8 bit signed
-typedef unsigned char UINT8; // 8 bit unsigned
-typedef short INT16; // 16 bit signed
-typedef unsigned short UINT16; // 16 bit unsigned
-typedef int INT32; // 32 bit signed
-typedef unsigned int UINT32; // 32 bit unsigned
-#endif
-
typedef signed char TQ_INT8; // 8 bit signed
typedef unsigned char TQ_UINT8; // 8 bit unsigned
typedef short TQ_INT16; // 16 bit signed
@@ -989,28 +979,6 @@ Q_EXPORT void tqFatal( const char *, ... ) // print fatal message and exit
Q_EXPORT void tqSystemWarning( const char *, int code = -1 );
-#if !defined(QT_CLEAN_NAMESPACE) // compatibility with TQt 1
-
-Q_EXPORT void debug( const char *, ... ) // print debug message
-#if defined(Q_CC_GNU) && !defined(__INSURE__)
- __attribute__ ((format (printf, 1, 2)))
-#endif
-;
-
-Q_EXPORT void warning( const char *, ... ) // print warning message
-#if defined(Q_CC_GNU) && !defined(__INSURE__)
- __attribute__ ((format (printf, 1, 2)))
-#endif
-;
-
-Q_EXPORT void fatal( const char *, ... ) // print fatal message and exit
-#if defined(Q_CC_GNU) && !defined(__INSURE__)
- __attribute__ ((format (printf, 1, 2)))
-#endif
-;
-
-#endif // QT_CLEAN_NAMESPACE
-
#if !defined(Q_ASSERT)
# if defined(QT_CHECK_STATE)
diff --git a/tools/msg2tqm/msg2tqm.cpp b/tools/msg2tqm/msg2tqm.cpp
index 5bacda17..1f9688a6 100644
--- a/tools/msg2tqm/msg2tqm.cpp
+++ b/tools/msg2tqm/msg2tqm.cpp
@@ -192,10 +192,10 @@ void translate( const TQString& filename, const TQString& qmfile )
TQString charset = msgstr.mid( cpos, i-cpos );
codec = TQTextCodec::codecForName( charset.ascii() );
if ( codec ) {
- debug( "PO file character set: %s. Codec: %s",
+ tqDebug( "PO file character set: %s. Codec: %s",
charset.ascii(), codec->name() );
} else {
- debug( "No codec for %s", charset.ascii() );
+ tqDebug( "No codec for %s", charset.ascii() );
}
}
break;
diff --git a/tools/tqvfb/qanimationwriter.cpp b/tools/tqvfb/qanimationwriter.cpp
index a7cb7635..f71dd55e 100644
--- a/tools/tqvfb/qanimationwriter.cpp
+++ b/tools/tqvfb/qanimationwriter.cpp
@@ -33,7 +33,6 @@
#include "qanimationwriter.h"
-#define QT_CLEAN_NAMESPACE
#include <ntqfile.h>
#include <png.h>