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

Use find_package(Qt6 REQUIRED COMPONENTS ...) idiom

    XMLWordPrintable

    Details

      Description

      We should change the documentation and examples to use

      find_package(Qt6 REQUIRED COMPONENTS Core)
      

      idiom. So far our documentation uses

      find_package(Qt6 COMPONENTS Core REQUIRED)
      

      while examples just use

      find_package(Qt6 COMPONENTS Core)
      
      1. Reasoning
      • REQUIRED enforces a fatal error if Qt6 is not found, which makes the error more obvious to the end user.
      • Using REQUIRED before the components list better matches behavior of OPTIONAL_COMPONENTS argument .

        Attachments

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

          Activity

            People

            Assignee:
            kkohne Kai Köhne
            Reporter:
            kkohne Kai Köhne
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes