Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.3.1
-
None
-
0c6f61ccdf24259d9dc64ae0d0bcd004a957cd46
Description
Given this code:
#elif defined(QT_DEPRECATED_WARNINGS) /* enable Qt3 support warnings as well */ # undef QT3_SUPPORT_WARNINGS # define QT3_SUPPORT_WARNINGS # undef QT_DEPRECATED # define QT_DEPRECATED Q_DECL_DEPRECATED # undef QT_DEPRECATED_VARIABLE # define QT_DEPRECATED_VARIABLE Q_DECL_VARIABLE_DEPRECATED # undef QT_DEPRECATED_CONSTRUCTOR # define QT_DEPRECATED_CONSTRUCTOR explicit Q_DECL_CONSTRUCTOR_DEPRECATED #else
and
#if defined(QT3_SUPPORT_WARNINGS) # if !defined(QT_COMPAT_WARNINGS) /* also enable compat */ # define QT_COMPAT_WARNINGS # endif # undef QT3_SUPPORT # define QT3_SUPPORT Q_DECL_DEPRECATED # undef QT3_SUPPORT_VARIABLE # define QT3_SUPPORT_VARIABLE Q_DECL_VARIABLE_DEPRECATED # undef QT3_SUPPORT_CONSTRUCTOR # define QT3_SUPPORT_CONSTRUCTOR explicit Q_DECL_CONSTRUCTOR_DEPRECATED
You will actually have QT3_SUPPORT defined if you define DEPRECATED_WARNINGS
Since there are deprecated functions that aren't Qt3Support only this seems like a bug (e.g. QDir::convertSeparators()).
This patch would take care of the issue:
--- /tmp/tmp.19479.0 2007-08-27 09:13:47.000000000 -0700
+++ /home/anders/dev/qt-4.3/src/corelib/global/qglobal.h 2007-08-27 09:11:29.000000000 -0700
@@ -729,8 +729,10 @@ QT_BEGIN_HEADER
# undef QT_DEPRECATED_CONSTRUCTOR
#elif defined(QT_DEPRECATED_WARNINGS)
/* enable Qt3 support warnings as well */
+# ifdef QT3_SUPPORT
# undef QT3_SUPPORT_WARNINGS
# define QT3_SUPPORT_WARNINGS
+# endif
# undef QT_DEPRECATED
# define QT_DEPRECATED Q_DECL_DEPRECATED
# undef QT_DEPRECATED_VARIABLE