summaryrefslogtreecommitdiff
path: root/src/qml/jsapi/qjsengine.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QML: Encode "missing" line number as negated address of stack frameUlf Hermann2023-05-091-1/+1
| | | | | | | | | | | | | | | This way we can identify which entry in a stack frame to amend when processing an exception in generated code. However, negative line numbers are also used to signal the position of "Ret" instructions. Since you cannot throw an exception from a "Ret" instruction, those cannot collide, but we cannot qAbs() the line number anymore when saving it in the stack trace. We have to qAbs() it in all the places where it's read. Pick-to: 6.5 Fixes: QTBUG-112946 Change-Id: I24dc4008fb7eab38e4d24e70211c22e46f1b72a7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QJSEngine: scope the results of fromData() and fromVariant()Ulf Hermann2023-03-071-2/+7
| | | | | | | | Otherwise the gc might collect them while we're still operating on them. Pick-to: 6.2 6.5 Change-Id: I4644ff7b4b1221f3e58832a245d71215e77bd891 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: Remove duplicate words (typos)Andreas Eliasson2023-03-071-2/+2
| | | | | | Pick-to: 6.5 6.4 6.2 Change-Id: Ibd29739b894598e5d7837ed5f9150e08ca07fa35 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QML: Treat long and ulong like other numbersUlf Hermann2023-02-071-0/+6
| | | | | | | | | | | | They should either be the same size as int/uint or the same size as longlong/ulonglong, but for some reason we get them as separate types. Pick-to: 6.5 Fixes: QTBUG-110767 Change-Id: I4c5826cfe6108e6f9722e6b3443bde13b2141b04 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QJSEngine: Move old convertV2 to removed_api.cppUlf Hermann2023-01-311-7/+0
| | | | | | Pick-to: 6.5 Change-Id: I7f700d64694c8651769841a0109d32e8f9a839b2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix minor API problemsUlf Hermann2023-01-181-8/+0
| | | | | | | | | | | Add explicit where appropriate, and use more elegant constructs in inline functions. Introduce removed_api.cpp for QJSEngine::create(int, const void *). Pick-to: 6.5 Change-Id: Ie54b0494fe3c5567f8a5ca361c3a583de3d97dd5 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QJSEngine: Add efficient conversions for QDateTime and friendsUlf Hermann2023-01-171-0/+11
| | | | | | | | | The JavaScript date and time conversions are different from Qt's. Add them to coerceValue. Task-number: QTBUG-109380 Change-Id: Ic0d7dd8ff51fb8e29d80d9084d4415becaa76259 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QJSEngine: Document new conversion functionsUlf Hermann2023-01-031-6/+38
| | | | | | | | | ... and drop the notes about QMetaType<T>. You can get a metatype for any type these days. Pick-to: 6.5 Change-Id: Iaae53830dfb9cbe81975c3f73cf6cbe33494884a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QJSEngine: Add QJSPrimitiveValue conversionsUlf Hermann2022-12-151-0/+27
| | | | | | | | | | | | We need those in order to get correct results when using the more generic conversions with QJSPrimitiveValue as source or target. Without those extra methods, we frequently get garbage where it would be possible to construct a QJSPrimitiveValue. Pick-to: 6.5 Task-number: QTBUG-109111 Change-Id: I6ceb2a4ed73dae228dd2e5690cd608c58537b95f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QJSEngine: Optimize conversion from QObject* to QStringUlf Hermann2022-11-221-0/+6
| | | | | | | | | | | | | | | This is commonly done for logging. With this in place we can have the code generator use coerceType() for such constructs. [ChangeLog][QML][Important Behavior Changes] You can implement custom toString() methods for your QML objects in JavaScript or in C++. Those methods don't actually have to return a string. Previously, whatever return value the method generated was forwarded as-is. Now it is coerced to a string. Change-Id: I4a9721a6948be0c24a36b31d453a74bd747db729 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* QJSEngine: Mark convertV2 variant with int parameter as BC-onlyUlf Hermann2022-11-161-0/+2
| | | | | | | We won't need it anymore in Qt7. Change-Id: Iff8bfd5192d80d7603aaa66da8cb00ab23e60f99 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QJSEngine: Provide a method to coerce values in JS fashionUlf Hermann2022-11-151-7/+24
| | | | | | | | | | | JavaScript has its own type coercion rules. We already have a methods that coerce QVariants, QJSValues and QJSManagedValues to specific types. The new method is a generalization of all of those and can coerce everything to everything (as far as JavaScript can). Change-Id: I9b6877fb40f67b6f2354781bbd4cf18cf996c7b0 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Port from container::count() and length() to size()Marc Mutz2022-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8: auto QtContainerClass = anyOf( expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o), expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)); makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container', with the extended set of container classes recognized. Change-Id: Idb1f75dfe2323bd1d9e8b4d58d54f1b4b80c7ed7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QML: Make modules imported with registerModule() available in QMLUlf Hermann2022-09-021-10/+18
| | | | | | | | | So far, you could only use them from pure JavaScript programs. Also, fix re-exporting parts of native modules. Fixes: QTBUG-105901 Change-Id: I170017083284e6457b1aa0c6e606fd26227edae3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-111-38/+2
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QJSEngine: optimize isInterrupted handlingMarc Mutz2022-06-041-4/+4
| | | | | | | | | | | The isInterrupted flag is just that: a flag, so it doesn't require acquire/release semantics when loading/storing. Use relaxed loads and stores instead. Change-Id: I6d733a6bebcfc7f2b786265fc28f9ba7e25bb1c7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlCompiler: Perform QVariant conversion in JavaScript semanticsUlf Hermann2022-02-181-57/+83
| | | | | | | | | | | | | In JavaScript we have a number of extra conversions not covered by qvariant_cast. Therefore, add a method to perform a QVariant conversion in JavaScript semantics to QJSEngine, and use that in the compiler. Pick-to: 6.3 Fixes: QTBUG-100883 Change-Id: I8b0bfa0974bc6b339d2601fb373859bc710788c8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
* Ensure QQmlData::get const-correctnessFabian Kosmale2021-12-041-1/+1
| | | | | | | | | | | | If we pass in a const pointer, we're not allowed to modify the object, so the create==true case does not make sense there. We therefore provide now two versions of the function: One taking only a const pointer, and one taking a non-const pointer and a bool. The latter no longer provides a default parameter to encourage usage of the the const version wherever possible. Change-Id: Ifb5a7e0605127de429403982b31f754e154b8048 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QJSEngine: Make uiLanguage a QObjectBindablePropertyFabian Kosmale2021-10-071-6/+2
| | | | | | | | | | | | It was a plain QProperty before. Given that the property is exposed in the global Qt object in the engine, this could be problematic as with the QProperty it is possible to change the value without emitting the uiLanguageChanged signal. By using QObjectBindableProperty, we ensure that the signal is always emitted. Pick-to: 6.2 Change-Id: I0f771a4e4d752704f469de27617835260b261052 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QJSValue: Avoid BIC breakFabian Kosmale2021-07-051-0/+8
| | | | | | | | | | | | The toScriptValue function template called the exported create function. Thus, we can not change the signature of create, even though it was private. To avoid the BIC break, we keep the old version (and ifdef it so that it will go away in Qt 7). Task-number: QTBUG-94407 Pick-to: 6.2 Change-Id: I5b07f978dca156f52bdb529d3e15aea8c0c3c97e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Use QV4::Scope::hasException() where applicableUlf Hermann2021-06-301-2/+2
| | | | | | | It is shorter and encapsulates the exception handling a bit. Change-Id: I8e2dc0eb3b930e222b8cb4852b73d99ca18a0379 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add more links to QJSEngine's ownership documentationFabian Kosmale2021-06-171-1/+10
| | | | | | | | | Also explictily mention again that objects with JS ownership won't be deleted as long as they have a parent. Pick-to: 6.2 6.1 Change-Id: I1eeb5bc8183b6621f24f3751b8152b36acf2eeae Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix documentation issuesTopi Reinio2021-06-021-4/+6
| | | | | | | | | | * Comment out \instantiates referring to an internal class * Remove duplicate module page for Qt QML * Fix various linking problems Task-number: QTBUG-91875 Change-Id: I7675f8a253e0b0e0a031d8a3642b3d2786b75149 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add QJSEngine::registerModuleAlex Shaw2021-05-011-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | Some applications that use JavaScript as a scripting language may want to extend JS through C++ code. The current way to do that is with global objects. ES6 provides a better way of encapsulating code: modules. registerModule() allows an application to provide a QJSValue as a named module. Developers familiar with Node.js will find this very easy to use. Example: ```c++ QJSValue num(666); myEngine.registerModule("themarkofthebeast", num); ``` ```js import badnews from "themarkofthebeast"; ``` [ChangeLog][QtQml][QJSEngine] Adds the ability to register QJSValues in C++ as modules for importing in MJS files. Change-Id: I0c98dcb746aa2aa15aa2ab3082129d106413a23b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Rework qmljsrootgenUlf Hermann2021-04-161-0/+17
| | | | | | | | | This way it actually generates interesting data about the JavaScript types, for example the functions of the String prototype. Add a helper method to create a symbol to QJSEngine. This should be generally useful. Change-Id: I6c7b253b9d6cdb61602ceeae0955aed8d942c139 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use QMetaType for ExecutionEngine::metaTypeFromJS()Ulf Hermann2021-03-241-6/+16
| | | | | | | | We should avoid looking up metatypes by ID. That's expensive. Change-Id: I00ce0a7f95ec82b0db6e7eb976e39e50522a7fe4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* metaTypeToJS: use QMetaType instead of idFabian Kosmale2021-02-191-2/+2
| | | | | | Task-number: QTBUG-82931 Change-Id: I7b663c5f774ef3edbb19d5f2ef53cfe623a8e4cf Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qjsengine: Clarify to/fromScriptValue documentationMaximilian Goldstein2021-02-081-0/+2
| | | | | | Fixes: QTBUG-89956 Change-Id: I96439433b1f172e933c6c56daae639be7e18b931 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QJSEngine: Add a function to throw a pre-generated error objectUlf Hermann2021-01-221-0/+14
| | | | | | | | | | | | | | | It makes little sense that you can construct an error object but not throw it. The test was definitely meant to actually throw the error object, not return it. [ChangeLog][QtQml] QJSEngine has gained an additional overload to the throwError() method, with the effect that calling throwError() with a character literal as argument is now ambiguous. You should explicitly construct a QString instead. Change-Id: I90c6c9edf10509daa142a86581d6a3f7ff45af2c Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add a QJSManagedValueUlf Hermann2020-12-181-0/+12
| | | | | | | | | | | | | A QJSManagedValue is a view on a QJSValue which always knows the engine the value belongs to. This allows us to implement the JavaScript semantics of the various QJSValue methods in a much more rigorous way. [ChangeLog][QtQml] The new QJSManagedValue should be used instead of QJSValue for manipulating properties and prototypes of JavaScript values, as well as for calling JavaScript functions. Change-Id: I9d445ffcf68dfa72dba9bae0818e83c80665ad66 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Allow checking for and catching errors from QJSEngineUlf Hermann2020-12-071-0/+27
| | | | | | | | | As you can manually throw an error, you should be able to catch it again, too. Change-Id: I82475df1969a1fd76f4cf5fc0a8d921dfafaef89 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Mark url as builtin typeUlf Hermann2020-12-021-0/+5
| | | | | | | | | Also, allow conversion from UrlObject and String. We allow the string conversion because we treat string and url as interchangeable in various places. Change-Id: Ib229c6d190e1c5d849ea18798925965b8dbeef7e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qtdeclarative: finish fixing compilation with explicit QChar(int)David Faure2020-11-071-1/+1
| | | | | Change-Id: Idb26e2df6d4fe8940db57066a30fa8c243f6d2c9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc:: Fix documentation warnings for Qt QMLTopi Reinio2020-11-051-3/+3
| | | | | | Task-number: QTBUG-88156 Change-Id: Ic6127c6128b4c7736cb4b5ab8ce51629388b59ca Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QJSEngine::evaluete: fix documentationFabian Kosmale2020-09-031-2/+2
| | | | | | Change-Id: Ie0e6d975079e4cbedad2dd4f17d3efe8aee553bc Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
* QJSEngine: provide a way to check if an exception was thrownFabian Kosmale2020-09-021-5/+27
| | | | | | | | | | | [ChangeLog][QML][QJSEngine] QJSEngine::evaluate gained an optional stackTrace parameter. It can be used to check if the returned QJSValue comes from an uncaught exception, and to retrieve the backtrace of the execution leading to the error. Fixes: QTBUG-54925 Change-Id: I2b5ada1f0c33c335b4b9d0d1268e70ca63a1fad1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove deprecated QJSEngine::installTranslatorFunctions functionFabian Kosmale2020-08-251-34/+0
| | | | | | | | | [ChangeLog][QJSEngine] The deprecated installTranslatorFunctions() has been removed. Use installExtensions() with TranslationExtension instead. Change-Id: I58345793ea154ec37d0c64f13c958193e6fa461b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QJSEngine: support char16_tFabian Kosmale2020-05-161-0/+3
| | | | | | | | Now that char16_t is used in Qt (for instance in QChar::unicode()), we need to support it. Change-Id: I527a70795524bfd883fc4d729aac714708b51181 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Move object onwership functions from QQmlEngine to QJSEngineFabian Kosmale2020-04-241-0/+66
| | | | | | | | | | | | [ChangeLog][QML] The setObjectOwnership and objectOwnership functions have been moved from QQmlEngine to QJSEngine. This reflects the fact that they have an effect on objects passed not only to a QQmlEngine, but also to a QJSEngine. As QQmlEngine is a subclass of QJSEngine, existing code continues to work. Fixes: QTBUG-83657 Change-Id: Ib29cdb4a9884e1f1b68fcba64d32b1cb2e5a4297 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Store a QV4::ReturnedValue in QJSValueUlf Hermann2020-03-181-105/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Being careful, we can now save primitive values inline. We use the heap pointer of QV4::Value as either QString* or QV4::Value* for complex types. We cannot store persistent managed QV4::Value without the double indirection as those need to be allocated in a special place. The generic QVariant case is not supported anymore. The only place where it was actually needed were the stream operators for QJSValue. Those were fundamentally broken: * A managed QJSValue saved and loaded from a stream was converted to a QVariant-type QJSValue * QVariant-type QJSValues were not callable, could not be objects or arrays, or any of the special types. * Cyclic references were forcibly broken when saving to a data stream. In general the support for saving and loading of managed types to/from a data stream was so abysmally bad that we don't lose much by dropping it. [ChangeLog][QML][Important Behavior Changes] When saving a QJSValue to a QDataStream only primitive values or strings will be retained. Support for objects and arrays was incomplete and unreliable already before. It cannot work correctly as we don't necessarily have a JavaScript heap when loading a QJSValue from a stream. Therefore, we don't have a proper place to keep any managed values. Using QVariant to keep them instead is a bad idea because QVariant cannot represent everything a QJSValue can contain. Fixes: QTBUG-75174 Change-Id: I75697670639bca8d4b1668763d7020c4cf871bda Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add Qt.uiLanguage and QJSEngine::uiLanguage propertiesSimon Hausmann2020-01-231-8/+30
| | | | | | | | | | | | | | [ChangeLog][QtQml] Added Qt.uiLanguage and QJSEngine::uiLanguage properties These properties mirror the same value in QML and C++ and can be used freely. They also provide API symmetry to Qt for MCUs. QQmlApplicationEngine binds to this property and applies translations accordingly by constructing a QLocale with the value and using QTranslator::load(locale). Change-Id: Id87d6ee64679b07ff3cb47844594e8eeebd8c8b6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Christian Kamm <mail@ckamm.de>
* Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-121-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4engine.cpp src/quick/handlers/qquicktaphandler.cpp src/quick/items/qquicktableview.cpp Done-With: Richard Moe Gustavsen <richard.gustavsen@qt.io> Done-With: Ulf Hermann <ulf.hermann@qt.io> Done-With: Shawn Rutledge <shawn.rutledge@qt.io> Change-Id: If9558a33f01693ce96420c094e0b57dfff0626cd
| * Doc: Fix documentation warnings for qtdeclarativeTopi Reinio2019-08-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After recent changes to QDoc, it now correctly warns about missing documentation for QML method parameters - fix all of these and also do some minor language editing. Remove duplicated entries for - \qmlmodule Qt.labs.qmlmodels - \group qtjavascript as they were causing issues. Change-Id: I55cd670cc8a0cc6427cdb7945dbd7c28ea94f796 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Port from implicit to explicit atomic operationsMarc Mutz2019-07-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | The old code used the implicit conversions from QAtomicPointer<T> to T*, and QAtomicInteger<T> to T, and vice versa. The semantics of these differ from the ones std::atomic uses, so we're going to deprecate these, like we did for load() and store(), too. This patch fixes some users of these APIs before we deprecate them. Change-Id: I892d705c22280f1c6fdc62c1777248b44e9c4329 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Remove last traces of QV8EngineUlf Hermann2019-05-081-4/+0
| | | | | | | | | | Change-Id: I59f738402d51e39188bbbca2ef1fbc8a61612372 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Make JavaScript execution interruptibleUlf Hermann2019-04-301-1/+35
|/ | | | | | | | | | | Add an atomic isInterrupted flag to BaseEngine and check that in addition to the hasException flag on checkException(). Add some more exception checks to cover all possible infinite loops. Also, remove the writeBarrierActive member from QV4::EngineBase. It isn't used. Fixes: QTBUG-49080 Change-Id: I86b3114e3e61aff3e5eb9b020749a908ed801c2b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Clarify documentation about throwError and the specific error typesSimon Hausmann2018-10-311-0/+6
| | | | | | | | | | | | | Elaborate a bit on some specific types, suggest the use of the overload and omit some values that either exist only to complete the enum for API standard purposes (NoError) or exist only for porting purposes but are not relevant in use (EvalError). Change-Id: I4f9cf7a4605305642fc20570a90a16f2c29d8b98 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Richard Weickelt <richard@weickelt.de>
* Add convenience functions for creating and inspecting error objectsAllan Sandfeld Jensen2018-10-301-0/+72
| | | | | | | | | Serves to simplify porting from QtScript by replacing QScriptContext::Error and QScriptContext::throwError(). Change-Id: I4bfe404c358c50aaf3b5469a4304fec97552bf24 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix translation contexts for paths with drive letters on WindowsErik Verbruggen2018-10-151-15/+13
| | | | | | | | | | | | | | | Inside method_qtTr, the filename is assumed to be a (correct) URL. When a (normalized) path with a windows drive letter is passed to QJSEngine::evaluate, the URL will have a scheme that is the drive letter. We cannot correct this in method_qtTr, because at that point we might get in files that do not come from the file system, but through actual URLs. The place where we know for sure that the filename is a real file name and not a URL, is in QJSEngine::evaluate. So at that point, make sure that the filename is a valid URL. Task-number: QTBUG-70425 Change-Id: Ia41859c4024ac46e6f8c3d96057a5dffdecd8f56 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: Fix QDoc warningsPaul Wicking2018-10-011-1/+1
| | | | | Change-Id: I19545953bde10d4ccc2f37843dcda2569dc77df4 Reviewed-by: Martin Smith <martin.smith@qt.io>