aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-12-23 14:01:26 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-12-23 14:23:36 +0000
commitbc889a1622ffefcb617f0f0f85d1245b1acacec9 (patch)
tree3fa2a66618f1a9df12d0a2ce6dd528349dcc017c /src
parentac61952c992ee4cffd6f20b5f3739e44cb6c3de1 (diff)
QQuickStyleSelector: don't include an empty style name as a selector
This solves the recently surfaced QML import issue: ASSERT failure in QQmlImportDatabase::importDynamicPlugin: "Internal error: Plugin imported previously with different uri", file /home/qt/work/qt/qtdeclarative/src/qml/qml/qqmlimport.cpp, line 1947 Because QQuickStyleSelector included double slashes, the path ("Qt/labs/controls//") got converted to a uri with an extra dot in the end ("Qt.labs.controls."), which conflicted with the actual uri "Qt.labs.controls". Somehow related to qtbase commit 2e1de7f which changed QUrl behavior with local files. Change-Id: I8236a685a68dcffcd5f03c439236b2e8ea04492e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/controls/qquickstyleselector.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/controls/qquickstyleselector.cpp b/src/controls/qquickstyleselector.cpp
index a56670e8..6779836c 100644
--- a/src/controls/qquickstyleselector.cpp
+++ b/src/controls/qquickstyleselector.cpp
@@ -163,7 +163,10 @@ QStringList QQuickStyleSelector::allSelectors() const
Q_D(const QQuickStyleSelector);
QMutexLocker locker(&sharedDataMutex);
QQuickStyleSelectorPrivate::updateSelectors();
- return QStringList(d->style) + sharedData->staticSelectors;
+ QStringList selectors = sharedData->staticSelectors;
+ if (!d->style.isEmpty())
+ selectors.prepend(d->style);
+ return selectors;
}
void QQuickStyleSelector::setBaseUrl(const QUrl &base)