Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.6.0
-
None
-
bc125ff64 (dev), fe6388c24 (6.8), d16bcf083 (dev), 3557dc846 (6.8)
Description
Building the attached example will result in qmllint warnings (and therefore a failed build if qmllint is taken seriously).
Note the order of the qml files:
- Main.qml
- Foo.qml
- Bar.qml
Bar uses Foo. If Bar is listed before Foo (or Main would also use Foo), the warning disappears.
- execute qmllint command only with foo.qml => warning
- execute qmllint command with bar.qml + foo.qml => no warning
- execute qmllint command with foo.qml + bar.qml => warning
It seems the linter object in qmllint does not have a clean state for each invocation on the next file.
Also I don't understand why this warning is triggered at all. Looks a little bit like QTBUG-104571, as QtQuick.Dialogs uses file selectors in its qmldir.
FAILED: CMakeFiles/appuntitled_qmllint /Users/njeiseck/projects/build-untitled-Qt_6_6_0_for_macOS-Debug/CMakeFiles/appuntitled_qmllint cd /Users/njeiseck/projects/untitled && /usr/local/Qt/6.6.0/macos/bin/qmllint --bare -I /Users/njeiseck/projects/build-untitled-Qt_6_6_0_for_macOS-Debug -I /usr/local/Qt/6.6.0/macos/./qml --resource /Users/njeiseck/projects/build-untitled-Qt_6_6_0_for_macOS-Debug/.rcc/qmake_untitled.qrc --resource /Users/njeiseck/projects/build-untitled-Qt_6_6_0_for_macOS-Debug/.rcc/appuntitled_raw_qml_0.qrc /Users/njeiseck/projects/untitled/Main.qml /Users/njeiseck/projects/untitled/Foo.qml /Users/njeiseck/projects/untitled/Bar.qml Warning: /Users/njeiseck/projects/untitled/Foo.qml:2:1: Warnings occurred while importing module "QtQuick.Dialogs": [import] import QtQuick.Dialogs ^^^^^^ --- Warning: Ambiguous type detected. FolderDialog 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. ColorDialog 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. ColorDialog 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. FolderDialog 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. ColorDialog 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. MessageDialog 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. ColorDialog 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. FileDialog 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. FolderDialog 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. FontDialog 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. MessageDialog 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. FontDialog 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. FolderDialogDelegate 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. FolderDialogDelegate 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. FontDialog 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. FileDialog 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. FontDialog 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. MessageDialog 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. FileDialog 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. FileDialog 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. FolderDialogDelegate 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. MessageDialog 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. FolderDialog 6.0 is defined multiple times. [import] Warning: Ambiguous type detected. FolderDialogDelegate 6.0 is defined multiple times. [import] --- [4/8 2.1/sec] Building CXX object CMakeFiles/appuntitled.dir/.rcc/qmlcache/appuntitled_Bar_qml.cpp.o [5/8 2.6/sec] Building CXX object CMakeFiles/appuntitled.dir/.rcc/qmlcache/appuntitled_Main_qml.cpp.o [6/8 3.1/sec] Building CXX object CMakeFiles/appuntitled.dir/.rcc/qmlcache/appuntitled_Foo_qml.cpp.o [7/8 3.4/sec] Building CXX object CMakeFiles/appuntitled.dir/.rcc/qmlcache/appuntitled_qmlcache_loader.cpp.o ninja: build stopped: subcommand failed.
Attachments
Issue Links
- is duplicated by
-
QTBUG-128868 qmllint prints Warning: Ambiguous type detected. XxxDialog is defined multiple times.
- Closed
- relates to
-
QTBUG-104091 Restructure the QtQuick.Dialogs module to make it friendlier for qml compiler
- In Progress
-
QTCREATORBUG-31881 QML Control + Click opens debug file
- Reported