diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2014-12-09 15:09:20 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2014-12-09 15:09:26 +0100 |
commit | ff466a1881435f927f5df9ce1e5eac07d5591904 (patch) | |
tree | 760e068743e6a8e1cc4ec63bb2f8e7dcef88b3e2 /tools | |
parent | e04822f3c2a6b69b7d75e2039256aa2433c59dd2 (diff) | |
parent | 4a3f6e58b591f2fe2204f7cbc1efc8abb0aade74 (diff) |
Merge remote-tracking branch 'origin/5.4' into dev
Conflicts:
src/qml/jsruntime/qv4arraydata.cpp
src/qml/jsruntime/qv4context_p.h
src/qml/jsruntime/qv4globalobject.cpp
src/qml/jsruntime/qv4internalclass.cpp
src/quick/items/qquicktext_p.h
src/quick/items/qquicktextedit_p.h
src/quick/items/qquicktextinput_p.h
Change-Id: If07e483e03197cb997ef47a9c647a479cdb09f4c
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qml/main.cpp | 5 | ||||
-rw-r--r-- | tools/qmlscene/main.cpp | 12 |
2 files changed, 7 insertions, 10 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))); diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp index bc339ae3e5..2a86b724f4 100644 --- a/tools/qmlscene/main.cpp +++ b/tools/qmlscene/main.cpp @@ -405,6 +405,9 @@ int main(int argc, char ** argv) } } + // QtWebEngine needs a shared context in order for the GPU thread to + // upload textures. + QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, options.contextSharing); #ifdef QT_WIDGETS_LIB QApplication app(argc, argv); #else @@ -443,15 +446,6 @@ int main(int argc, char ** argv) displayFileDialog(&options); #endif - // QWebEngine needs a shared context in order for the GPU thread to - // upload textures. - QScopedPointer<QOpenGLContext> shareContext; - if (options.contextSharing) { - shareContext.reset(new QOpenGLContext); - shareContext->create(); - qt_gl_set_global_share_context(shareContext.data()); - } - int exitCode = 0; if (!options.file.isEmpty()) { |