diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2018-06-21 11:01:53 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2018-06-25 08:08:49 +0000 |
commit | 77c0ef6aafcdcc52cb2d07ce085ee4b3574c36d9 (patch) | |
tree | 7224acb36115d9dd02a17f89db081b89fc6317e2 /src/quickcontrols2/qquickstyle.cpp | |
parent | 7fec7105b7f6119135aafd6f9ee609128125d594 (diff) |
QQuickStyle::addStylePath(): fix support for qrc paths
The code lacked handling for the "qrc" scheme.
Task-number: QTBUG-68222
Change-Id: Ia0dfdb748b8bdb40c893375b9de77bd8c05986b6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/quickcontrols2/qquickstyle.cpp')
-rw-r--r-- | src/quickcontrols2/qquickstyle.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quickcontrols2/qquickstyle.cpp b/src/quickcontrols2/qquickstyle.cpp index a7349915..9f101273 100644 --- a/src/quickcontrols2/qquickstyle.cpp +++ b/src/quickcontrols2/qquickstyle.cpp @@ -589,6 +589,8 @@ void QQuickStyle::addStylePath(const QString &path) if (url.isRelative() || url.scheme() == QLatin1String("file") || (url.scheme().length() == 1 && QFile::exists(path)) ) { // windows path styleSpec()->customStylePaths.prepend(QDir(path).canonicalPath()); + } else if (url.scheme() == QLatin1String("qrc")) { + styleSpec()->customStylePaths.prepend(QLatin1Char(':') + url.path()); } else { styleSpec()->customStylePaths.prepend(path); } |