aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-02-28 16:42:54 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2017-03-01 08:09:04 +0000
commita19ab6806043591abf94868de6962a3747284da7 (patch)
tree297d908f4d5b8588bd63be9f3151498ca645985b /tests
parente7409625f24ed8a32bb303b948bfdf077b74ea77 (diff)
Make QQuickStyleSelector::select() more robust
While debugging QTBUG-59026, I found out that QLocale::name() is empty with the "C" locale. Because the empty locale name was used as a selector in QQuickStyleSelector, it ended up registering QML types using URLs that contained a double slash (empty locale selector matched): QtQuick/Controls.2/Material//RadioButton.qml At the same time, the QML engine imported implicitly internal QML types constructing the URLs directly based on the location on the file system without a double slash: QtQuick/Controls.2/Material/RadioIndicator.qml As a result, the same QML module ended up having types registered from two different URLs, which is not allowed. This change simply prevents both problems. First of all, if the locale name is empty for any reason, it won't be added anymore to the list of selectors. Furthermore, the final selected URL is normalized to avoid redundant dashes. Task-number: QTBUG-59026 Change-Id: I19b890451aaddfe4277bb6b26bc3c1394a75a704 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions