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

Fix deprecation warnings in QtDeclarative and compile with QT_DISABLE_DEPRECATED_BEFORE >= 0x060000

    XMLWordPrintable

Details

    Description

      Patches for QTBUG-104857 introduce a lot of forgotten deprecation warnings for Qt 6.0. After all these patches are applied locally, qtdeclarative throws a bunch of deprecation warnings.

      The scope of this task is to fix those warnings, and then try to build QtDeclarative without the deprecated APIs. This can be done by specifying QT_DISABLE_DEPRECATED_BEFORE>=0x060000, up until the current dev (6.5).

      For Qt 6.0 most of the deprecation warnings come either from QAction's menu-related APIs or QMouseEvent::source().

      Most of QAction's APIs have replacements. Exception is QAction::setMenu(), but it can be fixed by using the private API, as we are anyway linking with Qt::GuiPrivate in most cases:

        QAction *myAction = ...;
        QMenu *myMenu = ...;
      - myAction->setMenu(myMenu);
      + QActionPrivate *p = QActionPrivate::get(myAction);
      + p->setMenu(myMenu);
      

      The QMouseEvent::source() case is not so trivial as of now, so all cases need to be handled individually.

      For later Qt versions it should be much easier, because there are not so many new deprecations there.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-104950
          # Subject Branch Project Status CR V

          Activity

            People

              ivan.solovev Ivan Solovev
              ivan.solovev Ivan Solovev
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: