Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-1043

QT_DEPRECATED_WARNINGS defines QT3_SUPPORT

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.7.1
    • 4.3.1
    • Build tools: qmake
    • 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
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            goffart Olivier Goffart (closed Nokia identity) (Inactive)
            rve Anders Bakken
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes