From e6a419d0e3431515ae0e8ff1a344e8fdb4e94220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pasi=20Pet=C3=A4j=C3=A4j=C3=A4rvi?= Date: Fri, 24 Oct 2014 11:44:30 +0300 Subject: 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 --- tools/qml/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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))); -- cgit v1.2.3