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

qmllint prints Warning: Ambiguous type detected. XxxDialog is defined multiple times.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • 6.8.1, 6.9.0 FF
    • 6.7.2
    • QML: Tooling
    • None
    • All
    • d16bcf083 (dev), 3557dc846 (6.8)

      When running qmllint on our sources, I get for one of the files the following block of warnings:

      [build] Warning: /home/user/Src/Project/qml/MySettingsPage.qml:23:1: Warnings occurred while importing module "QtQuick.Dialogs": [import]
      [build] import QtQuick.Dialogs
      [build] ^^^^^^
      [build] ---
      [build] Warning: Ambiguous type detected. FolderDialog 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. ColorDialog 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. ColorDialog 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. FolderDialog 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. ColorDialog 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. MessageDialog 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. ColorDialog 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. FileDialog 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. FolderDialog 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. FontDialog 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. MessageDialog 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. FontDialog 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. FolderDialogDelegate 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. FolderDialogDelegate 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. FontDialog 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. FileDialog 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. FontDialog 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. MessageDialog 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. FileDialog 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. FileDialog 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. FolderDialogDelegate 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. MessageDialog 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. FolderDialog 6.0 is defined multiple times. [import]
      [build] Warning: Ambiguous type detected. FolderDialogDelegate 6.0 is defined multiple times. [import]
      [build] ---
      [build] 
      

      The file can be a simple as the following, to trigger the warning:

      import QtQuick.Dialogs
      
      Item {
          id: root
      }
      

      The warning is printed only on the first file that imports QtQuick.Dialogs, and not printed later in the linting for other files that also have that import.

      Are we doing anything wrong?

      Important sub-goal: It would be really great if qmllint could indicate where the duplicate definition is encountered. Otherwise it's virtually impossible to track down - I've spent an hour and have no idea where this may be coming from.

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

            qtqmlteam Qt Qml Team User
            emmenlau Mario Emmenlauer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes