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

LoggingCategory QML Type issues unnecessary warnings on property changes

XMLWordPrintable

    • All
    • 7136df0f8ed2b691f5291712fdeaf401072b32fd (qt/qtdeclarative/dev) c2f6ef8504f7444bf1c47016088bc0997c362a9d (qt/qtdeclarative/6.2) f9f69fe0ac (qt/tqtc-qtdeclarative/5.15)

      LoggingCategory issues a warning about attempted write on its properties even when it is unnecessary, i.e. when new value is equal to the old one.

      It can be triggered with QQmlEngine::retranslate() call on 5.15 and early 6.x branches. Since the recent optimizations to retranslate() which now only forces to re-evaluate what's really dependent on qsTr, it became harder, but I still managed to pull it off. Sample code attached.

      I have a use case for "expressions as name of logging category", so it's bugging me out, now that I've introduced i18n support to my app.

      Patch is ready, and on its way to Gerrit.

        1. loggincategory-reset-name.zip
          6 kB
          ivan tkachenko
        2. Qt 5.png
          157 kB
          ivan tkachenko
        3. Qt 6.1.2.png
          165 kB
          ivan tkachenko
        For Gerrit Dashboard: QTBUG-97717
        # Subject Branch Project Status CR V

            ratijas ivan tkachenko
            ratijas ivan tkachenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 2 hours
                2h
                Remaining:
                Remaining Estimate - 2 hours
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  There are no open Gerrit changes