NdefEditor: fix B2Qt cross-builds on Windows
The example was generating a qml module named NdefEditor and a binary named ndefeditor. During the build, the build tools create a subdirectory named after the qml module in the build dir. As a result, on case-insensitive filesystems (i.e. on Windows) this was leading to a linker error, because the linker failed to create a binary (since there already was a directory with the same name). The issue was only observed during cross-compilation, because native binaries get the ".exe" suffix. Fix it by renaming the qml module to NdefEditorModule. Amends115b4d947a. Fixes: QTBUG-133788 Task-number: QTQAINFRA-6985 Pick-to: 6.9.0 6.8 6.8.3 6.5 Change-Id: I1187474b07fe7c676612e79064f56d6711984c72 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commitb5a4074cd7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
696d6a1f30
commit
6f5362b90b
|
|
@ -33,7 +33,7 @@ qt_add_resources(ndefeditor "theme" FILES
|
||||||
)
|
)
|
||||||
|
|
||||||
qt_add_qml_module(ndefeditor
|
qt_add_qml_module(ndefeditor
|
||||||
URI NdefEditor
|
URI NdefEditorModule
|
||||||
VERSION 1.0
|
VERSION 1.0
|
||||||
QML_FILES
|
QML_FILES
|
||||||
Main.qml
|
Main.qml
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import QtQuick.Controls
|
||||||
import QtQuick.Dialogs
|
import QtQuick.Dialogs
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import NdefEditor
|
import NdefEditorModule
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: window
|
id: window
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import NdefEditor
|
import NdefEditorModule
|
||||||
|
|
||||||
SwipeDelegate {
|
SwipeDelegate {
|
||||||
required property int index
|
required property int index
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ int main(int argc, char *argv[])
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
&engine, &QQmlApplicationEngine::objectCreationFailed, &app,
|
&engine, &QQmlApplicationEngine::objectCreationFailed, &app,
|
||||||
[]() { QCoreApplication::exit(1); }, Qt::QueuedConnection);
|
[]() { QCoreApplication::exit(1); }, Qt::QueuedConnection);
|
||||||
engine.loadFromModule("NdefEditor", "Main");
|
engine.loadFromModule("NdefEditorModule", "Main");
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
QT += nfc quick quickcontrols2
|
QT += nfc quick quickcontrols2
|
||||||
|
|
||||||
CONFIG += qmltypes
|
CONFIG += qmltypes
|
||||||
QML_IMPORT_NAME = NdefEditor
|
QML_IMPORT_NAME = NdefEditorModule
|
||||||
QML_IMPORT_MAJOR_VERSION = 1
|
QML_IMPORT_MAJOR_VERSION = 1
|
||||||
|
|
||||||
TARGET = ndefeditor
|
TARGET = ndefeditor
|
||||||
|
|
@ -27,7 +27,7 @@ qml_resources.files = \
|
||||||
MainWindow.qml \
|
MainWindow.qml \
|
||||||
NdefRecordDelegate.qml
|
NdefRecordDelegate.qml
|
||||||
|
|
||||||
qml_resources.prefix = /qt/qml/NdefEditor
|
qml_resources.prefix = /qt/qml/NdefEditorModule
|
||||||
|
|
||||||
theme_resources.files = \
|
theme_resources.files = \
|
||||||
icons/ndefeditor/20x20@2/add.png \
|
icons/ndefeditor/20x20@2/add.png \
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module NdefEditor
|
module NdefEditorModule
|
||||||
prefer :/qt/qml/NdefEditor/
|
prefer :/qt/qml/NdefEditorModule/
|
||||||
Main 1.0 Main.qml
|
Main 1.0 Main.qml
|
||||||
MainWindow 1.0 MainWindow.qml
|
MainWindow 1.0 MainWindow.qml
|
||||||
NdefRecordDelegate 1.0 NdefRecordDelegate.qml
|
NdefRecordDelegate 1.0 NdefRecordDelegate.qml
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue