Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2165,7 +2165,20 @@ if(QT6)
QML_FILES
res/qml/Mixxx/MathUtils.mjs
res/qml/Mixxx/PlayerDropArea.qml
NO_GENERATE_QMLDIR
)

# Generation of the `qmldir` file has been disabled (via `NO_GENERATE_QMLDIR`
# above) due to QTBUG-100326, which breaks JavaScript module imports:
# https://bugreports.qt.io/browse/QTBUG-100326
# Instead, a handwritten `qmldir` file that works around the issue needs to
# be added to the resources here.
set_source_files_properties("res/qml/Mixxx/qmldir" PROPERTIES QT_RESOURCE_ALIAS "qmldir")
qt_add_resources(mixxx-libplugin qmldir
FILES "res/qml/Mixxx/qmldir"
PREFIX "/mixxx.org/imports/Mixxx"
)

# FIXME: Currently we need to add these include directories due to
# QTBUG-87221. We should figure out a better way to fix this.
# See: https://bugreports.qt.io/browse/QTBUG-87221
Expand Down
8 changes: 8 additions & 0 deletions res/qml/Mixxx/qmldir
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module Mixxx
linktarget mixxx-libplugin
optional plugin mixxx-libplugin
classname MixxxPlugin
typeinfo mixxx-lib.qmltypes
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required to keep qmllint happy

Suggested change
typeinfo mixxx-lib.qmltypes
typeinfo mixxx-lib.qmltypes
import QtQuick

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unrelated and should be taken care of in a separate PR, that also adds this import to qt_add_qml_module. The qmldir is the same one that Qt generates automatically, just with the MathUtils line added.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have already taken care in #4679. So If we merge that first, we should add the import here as well.

prefer :/mixxx.org/imports/Mixxx/
MathUtils 0.0 res/qml/Mixxx/MathUtils.mjs
PlayerDropArea 0.0 res/qml/Mixxx/PlayerDropArea.qml