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

Port QObject::findChild/ren() to QAnyStringView objectNames

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • P2: Important
    • 6.7
    • None
    • None
    • 8
    • 80cdd4e5b (dev), e608bc019 (dev), bf946e8e3 (dev), 48affe5ad (tqtc/lts-6.5)
    • Foundation Sprint 92, Foundation Sprint 93, Foundations Sprint 94, Foundations Sprint 95

    Description

      The object names in QObject::findChild/ren() are currently QStrings, but are only ever used to compare them against QObject::objectName()s, so this API is a perfect candidate for replacing all of these overload sets with a single QAnyStringView function.

      In addition, we already fixed the findChildren() overloads to allow passing just a FindChildrenOptions flag, without a name. This should also work with the findChild() version.

      Note that these functions are all templates, so we can just change them. No need for QT_REMOVED_SINCE, as previously communicated.

      Acceptance criteria:

      • the QString versions are QT_REMOVED_SINCE
      • and replaced by QAnyStringView versions
      • this should work: o->findChild<T>(FindDirectChildrenOnly);

      Attachments

        Issue Links

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

          Activity

            People

              rybouabi Rym Bouabid
              mmutz Marc Mutz
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes