Commit 181e4596 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

windeployqt: Fall back comparing names of QML modules when their class name is empty


QtWebEngine and some other modules have empty class names, so they are
dropped when concatenating QML imports.

Task-number: QTBUG-61957
Change-Id: I06ccf8ab54b2d3ffba04f15746722f5b3596d5d9
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@qt.io>
parent b6735d45
No related merge requests found
Showing with 8 additions and 10 deletions
......@@ -39,6 +39,11 @@
QT_BEGIN_NAMESPACE
bool operator==(const QmlImportScanResult::Module &m1, const QmlImportScanResult::Module &m2)
{
return m1.className.isEmpty() ? m1.name == m2.name : m1.className == m2.className;
}
// Return install path (cp -r semantics)
QString QmlImportScanResult::Module::installPath(const QString &root) const
{
......@@ -153,19 +158,10 @@ QmlImportScanResult runQmlImportScanner(const QString &directory, const QString
return result;
}
static inline bool contains(const QList<QmlImportScanResult::Module> &modules, const QString &className)
{
for (const QmlImportScanResult::Module &m : modules) {
if (m.className == className)
return true;
}
return false;
}
void QmlImportScanResult::append(const QmlImportScanResult &other)
{
for (const QmlImportScanResult::Module &module : other.modules) {
if (!contains(modules, module.className))
if (std::find(modules.cbegin(), modules.cend(), module) == modules.cend())
modules.append(module);
}
for (const QString &plugin : other.plugins) {
......
......@@ -55,6 +55,8 @@ struct QmlImportScanResult {
QStringList plugins;
};
bool operator==(const QmlImportScanResult::Module &m1, const QmlImportScanResult::Module &m2);
QmlImportScanResult runQmlImportScanner(const QString &directory, const QString &qmlImportPath,
bool usesWidgets, int platform, DebugMatchMode debugMatchMode,
QString *errorMessage);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment