diff options
author | Pasi Petäjäjärvi <pasi.petajajarvi@digia.com> | 2014-10-24 11:44:30 +0300 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@theqtcompany.com> | 2014-11-11 11:11:41 +0100 |
commit | e6a419d0e3431515ae0e8ff1a344e8fdb4e94220 (patch) | |
tree | 15af440ebdf85404149dd6f4006b483844f8e3a1 | |
parent | 4d15f5287905a2d8e4f4aa44494d01ecc3bf0cac (diff) |
qml: obey QT_NO_REGULAREXPRESSION define
Not all platforms do have QRegularExpression as it is based on
pcre.
Change-Id: I3247f8b2213f78a6e537f6781d97b0c6382482ad
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
-rw-r--r-- | tools/qml/main.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index 69ccd7a316..e06f249b40 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -494,6 +494,7 @@ int main(int argc, char *argv[]) foreach (const QString &path, files) { //QUrl::fromUserInput doesn't treat no scheme as relative file paths +#ifndef QT_NO_REGULAREXPRESSION QRegularExpression urlRe("[[:word:]]+://.*"); if (urlRe.match(path).hasMatch()) { //Treat as a URL QUrl url = QUrl::fromUserInput(path); @@ -503,7 +504,9 @@ int main(int argc, char *argv[]) ? QDir::toNativeSeparators(url.toLocalFile()) : url.toString())); e.load(url); - } else { //Local file path + } else +#endif + { //Local file path if (verboseMode) printf("qml: loading %s\n", qPrintable(QDir::toNativeSeparators(path))); |