aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
Commit message (Collapse)AuthorAgeFilesLines
...
* qdoc: Added excludedirs to qtquickdialogs.qdocconfMartin Smith2013-10-101-0/+2
| | | | | | | | | Added excludedirs += ../qml to qtquickdialogs.qdocconf. Task-number: QTBUG-33966 Change-Id: I08a74061ed82301712239bc0979ed6fcea0a2448 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Cleanup exception handlingSimon Hausmann2013-10-031-1/+0
| | | | | | | | | | The code in the Exception class operates entirely on the engine's data, so move it into ExecutionEngine instead. This eliminates the need for a QV4::Exception class and catches and old code that tries to still do catch (Exception &) instead of catch (...) Change-Id: Ie608bec6af652038aca6c9423c225a4d7eb13b39 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change exception handling APISimon Hausmann2013-10-022-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the exception handling API in the engine slightly, encapsulating any use of direct throw statements and catch blocks with concrete types. In the future we need to be able to change the way these are implemented, in order to ensure that the correct stack unwinding code is triggered for throw and re-throw. This patch separates the C++ exception object thrown from the V4 exception (that includes value, throwing context pointer) and stores the latter inside the engine. In order for that to compile, ExecutionEngine::StackTrace and StackFrame had to move into the QV4 namespace directly. In addition the syntax for catching exceptions changes from try { ... } catch (QV4::Exception &ex) { ex.accept(context); QV4::ScopedValue exceptionValue(scope, ex.value()); } to try { ... } catch (...) { QV4::ScopedValue exception(scope, context->catchException()); } Context::catchException() checks if there's a "current" exception in the engine, and if not assumes that we caught an unrelated exception and consequently re-throws. partiallyUnwind() is also gone and replaced with rethrowException(), in order to encapsulate the re-throw. Lastly, in the future nesting try/catch blocks isn't going to be possible due to limitations in the common C++ ABI with regards to foreign exceptions. Change-Id: Ic81c75b057a2147e3176d8e0b4d326c14278b47d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use SafeValue instead of Value in ScopedValue methodsLars Knoll2013-10-021-1/+1
| | | | | Change-Id: Ie463efe600d498ce77d4b9e8b48abcfd61c1ab78 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix ObjectIterator API to be GC safeLars Knoll2013-10-021-4/+3
| | | | | Change-Id: I3a9c48d53d8dbadcb9b32c00fcef1f89447c4b8c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* qdoc: no longer recognizes the version nr in QML refsMartin Smith2013-10-021-14/+14
| | | | | | | | | | All QML references of the form <QML-module-name><QML-module-version>::<QML-type>::<member-name> have had the <QML-module-version> removed i. Task-number: QTBUG-33776 Change-Id: Idde279e0f254cd24ea44f9841662dd81a2c5bbc6 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Remove some uses of raw Object pointersLars Knoll2013-09-301-3/+5
| | | | | Change-Id: I7c715f33d197ebbf6f0c00040099b27ed7221d42 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove Value::fromString()Lars Knoll2013-09-281-2/+2
| | | | | | | | replaced with call to the GC safe ExceutionEngine::newString() method. Change-Id: I7258296e75ca724ff42b94a0d147bc33a05f8f68 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix Value usage in ErrorObjectsLars Knoll2013-09-281-1/+1
| | | | | Change-Id: Iaa14ad5a8d3f085843e49195f8f4bb7bb020b9b6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move Value::toInteger(double) and related to PrimitiveLars Knoll2013-09-285-12/+12
| | | | | | | Also clean up a few other direct uses of Value Change-Id: Ie27d42c1b31b9e6d16d0a60071cb5e4e1c5b9e8b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move Value::fromBool, ... to a new Primitive classLars Knoll2013-09-282-4/+4
| | | | | | | | This will simplify finding the remaining direct usages of QV4::Value that need fixing. Change-Id: I223099727436d5748027c84c53d9dfc4028e38ed Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix CallContext to not hold arguments on the C stack anymoreLars Knoll2013-09-281-24/+21
| | | | | Change-Id: I35f46cce4f243d4b8b2bac9244f8fc26836f413b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move more API over to use ValueRefLars Knoll2013-09-261-5/+7
| | | | | Change-Id: I372f1f3e3e78d45912a913f437e622e0acfc9646 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix QQmlV4Function API to be GC safeLars Knoll2013-09-261-9/+10
| | | | | Change-Id: Id4f79c22fc48ada1c8a9a858e1b7b3d1cf14d120 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix API of QQmlV4HandleLars Knoll2013-09-264-9/+14
| | | | | Change-Id: Iac4a3fefebd33a5990408598486231a5add8e639 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix Persistent/WeakValue APILars Knoll2013-09-261-4/+8
| | | | | | | Don't use unprotected Values in the API anymore. Change-Id: I8851628227fca374de24701bc8ee0908b5ae3923 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Doc: Made \since command in Dialog QML types consistent.Jerome Pasion2013-09-253-3/+3
| | | | | | | | -QDoc only requires the version number for Qt versions Task-number: QTBUG-32172 Change-Id: Ifa3a94fa66194807d58b079b4f451af90cc1d00a Reviewed-by: Martin Smith <martin.smith@digia.com>
* convert Managed::put() API to be GC safeLars Knoll2013-09-221-9/+9
| | | | | Change-Id: I09198ce372fa545372db389fac26828d21ad5731 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Cleanup Object::define*Property APILars Knoll2013-09-221-8/+8
| | | | | Change-Id: I99125908a9bc1d41a2642c409af9704def7a0832 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add a Safe<T> class and start using itLars Knoll2013-09-223-7/+12
| | | | | | | | | | The class denotes objects that are stored safely in areas controlled by the GC. These we can convert fast to a StringRef etc. Change-Id: I6b154eccaefddc42d4fafca55b7ee9e77179830c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Start using StringRef for parameter passingLars Knoll2013-09-221-3/+3
| | | | | Change-Id: If2c41daeda2862cd1162c5da8163a9d62fe4111d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Cleanup ExecutionEngine::newBuiltinFunction() usagesLars Knoll2013-09-221-10/+4
| | | | | | | And change the return type to be GC safe Change-Id: I6d7513962370fea4072a3d8c6b2c6f2d1705992e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Further work towards an exact GCLars Knoll2013-09-222-21/+24
| | | | | | | | | | | Add some more convenience in the helper classes in qscopedvalue_p.h Make accesses to CallData safer, and change ExecutionEngine::newObject() to return a safe pointer. Change-Id: I980909754ce9681cf6faa1355bab3a1e5d6dd186 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* dialog-private: replace QJSValue with QQmlV4Handle in js functionsLiang Qi2013-09-205-37/+54
| | | | | Change-Id: I1e16147a1930f717cddd246068c06728e76eddd9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Adding QtQuick.Dialogs.MessageDialogShawn Rutledge2013-09-1923-5/+1683
| | | | | Change-Id: Ifa3de21e6f611c24742118d6d178edbe14f243be Reviewed-by: Liang Qi <liang.qi@digia.com>
* Add FontDialog to QtQuick.DialogsLiang Qi2013-09-1825-3/+2433
| | | | | | | | | | | | | As with FileDialog, it tries QPA, then QFontDialog, and falls back to a QML implementation (which is also provided here) if neither type of native dialog is available. The update of plugins.qmltypes files will be in a separate commit. Task-number: QTBUG-31852 Done-with: Shawn Rutledge <shawn.rutledge@digia.com> Change-Id: I066ebbcf44c413af26020ddf8414252b99f5218b Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* rerun qmlplugindump for QtQuick.Dialogs, now including QML typesShawn Rutledge2013-09-181-14/+29
| | | | | | | Task-number: QTBUG-33106 Change-Id: Ib2ee0563f423bf7fe1d5990c621c46950f81516a Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
* Convert some methods to use Returned<>Lars Knoll2013-09-181-6/+16
| | | | | Change-Id: I631606cb5ab3b35b72104e70092a5200dd235fbc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert most remaining return values from Value to ReturnedValueLars Knoll2013-09-182-9/+11
| | | | | Change-Id: If8b0c3b91be50678693868c10fefc3678008834d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert builtin methods to return a ReturnedValueLars Knoll2013-09-181-22/+22
| | | | | Change-Id: I6b75adbf53a5be0deab023d2eed98ce2a7915551 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use a ReturnedValue for Managed::getIndexed()Lars Knoll2013-09-181-4/+4
| | | | | Change-Id: I0371ed21c4ef99564d3ffa1082dd109e890a78bf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Rename QV4::ValueScope to QV4::ScopeLars Knoll2013-09-181-3/+3
| | | | | | | | The class is going to be used all over the place, so let's give it a short name :) Change-Id: If61543cb2c885e7fbb95c8fc4d0e870097c352ed Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Require a ValueScope for ScopedCallData as wellLars Knoll2013-09-181-3/+7
| | | | | | | | This brings things more in line with ScopedValue, and also simplifies cleanup of Scoped values. Change-Id: If5f1466b4e13c629d56c1e7c638937f61ba48f77 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Qt Quick Dialogs: can see and control geometry of QML implementationsShawn Rutledge2013-09-172-13/+50
| | | | | | | | | | | QQuickAbstractDialog had x/y/width/height properties already but they didn't do anything. It's still not possible with the native dialogs because neither QPlatformDialogHelper nor QFileDialogOptions etc. have any geometric properties; but the application author can now see and control the geometry of any QML dialog implementation. Change-Id: Icdac9592c72e81175436436027f7fe3d75ff7f42 Reviewed-by: Liang Qi <liang.qi@digia.com>
* Add currentColor property to ColorDialog.Mitch Curtis2013-09-175-23/+55
| | | | | | | | | | | | QColorDialog has this property. This patch effectively means that the color property will be set when the dialog closes, instead of whenever the current color in the dialog changes, so pressing cancel will revert the color to what it was before the dialog was opened. [ChangeLog][QtDeclarative][ColorDialog] Added currentColor property. Change-Id: I2ef6b32954342cd2469cf1552d53f9e2fbf3420b Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* fixed warnings in dialog module when PURE_QML_ONLY is definedShawn Rutledge2013-09-171-1/+4
| | | | | | | There are a couple of unused parameters in that case. Change-Id: Ica81621e7d74474cbfa0b54c20501ecc72661c08 Reviewed-by: Liang Qi <liang.qi@digia.com>
* Use a ReturnedValue when converting to String or ObjectLars Knoll2013-09-121-6/+6
| | | | | | | | Also rename Value::toQString() to Value::toQStringNoThrow(), and add a throwing toQString() method for JS use. Change-Id: I821b33fc61abb7d08839df965fd337685f61a545 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Allow QtQuick private headers to be used with QT_NO_KEYWORDS.Jocelyn Turcotte2013-09-123-5/+5
| | | | | | | | | | | This is necessary for the QtWebEngine module. This also adds an empty nokeywords test using the same mechanism as qtbase/tests/auto/tools/moc/no-keywords.h to find conflicts at compile time. Change-Id: I9df541720797dd61f078178c2af68ead18ff8bfe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* DefaultColorDialog bugfix: binding color to a TextFieldShawn Rutledge2013-09-121-1/+1
| | | | | | | | The text field shows the hex value of the currently selected color, but the color to string conversion is not implicit. Change-Id: I914033d6358696b4014ca48bf3ae435c98b5be33 Reviewed-by: Liang Qi <liang.qi@digia.com>
* Move CallData onto the JS stackLars Knoll2013-09-111-12/+13
| | | | | Change-Id: I22e853acfd2da337344b581bb0412c5f9930c510 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge branch 'stable' into devSergio Ahumada2013-09-061-2/+1
|\ | | | | | | | | | | | | | | | | Conflicts: src/qml/debugger/qv8debugservice.cpp src/qml/qml/v8/qv8engine.cpp tests/auto/quick/qquickitem/qquickitem.pro Change-Id: Ic4a1dcdd8b8a84155d2f2abefdf1da5c3a56af31
| * Fix compiler warning about unused variableKai Koehne2013-09-041-1/+1
| | | | | | | | | | Change-Id: I2dda2462170658a678a35a6fafdb5d39a8d8e9f4 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Cleanup calls to Object::setPrototype()Lars Knoll2013-09-021-1/+0
| | | | | | | | | | | | | | | | Rather use the correct internalClass directly when constructing the objects. Change-Id: I8e916f1ce8f83d291c08ca6332fe85b1f57b90b5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Move prototype pointer into QV4::InternalClassLars Knoll2013-09-021-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The prototype is actually the same for most objects. By moving it into the internal class, we can save 8 bytes per object, as well as allowing for some future optimizations. Also fix a bug in the implementation of the Error prototype objects. Change-Id: I4d4b641055f644a9b088f27be34bfdb0446279b7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | change calling convention for JS function callsLars Knoll2013-09-021-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | This allows faster pass through of the data if we have nested calls. Also make sure we always reserve at least QV4::Global::ReservedArgumentCount Values on the stack to avoid stack corruption. Change-Id: I42976460f1ef11a333d4adda70fba8daac66acf3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | qmltest: Register test object as a singletonCaroline Chao2013-08-281-2/+3
| | | | | | | | | | | | Change-Id: I5f6c404ff2901082f22b953b29aed08d3488f31d Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | QQuickPlatformFileDialog: fix directoryEntered() signal connectionJ-P Nurmi2013-08-271-1/+1
| | | | | | | | | | | | Task-number: QTBUG-33008 Change-Id: I8c4d06bb9dded7b894ca576efd0a64dce9f9a720 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | TestLib: Fix regression in error location outputCaroline Chao2013-08-221-6/+6
| | | | | | | | | | | | | | | | Error location returned should be given in the test file not in TestCase.qml. Change-Id: Ifea51fe5e39890a369c4dca6754abd46d2ee9bc2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Fix compilation with MSVC 2008 (and prospective Windows CE build fix)Simon Hausmann2013-08-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Only 2010 and newer ship stdint.h, so for 2008 we have to provide a little stdint.h compat header, for some of the third-party code we import. Our own Qt code this patch changes to use quint* types instead. * Include math.h and float.h for some math functions. * disable the JIT on Windows CE for now. * Change use of intptr_t to qintptr in Qt code. intptr_t is in inttypes.h, except that with VS 2008 it is indirectly available through stdio.h. Let's avoid the mess and just use the qt type, that's always available. Change-Id: I19055edd89e0a6b147d9edbb3b711798ed3c05a5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | FolderListModel: count property has countChanged notifierShawn Rutledge2013-08-202-1/+3
| | | | | | | | | | | | | | | | rowCountChanged is kept for compatibility but is inconsistent with the usual naming convention. Change-Id: I8ae72e4783c5edbbcc63319c266ac47e8f3fc5ad Reviewed-by: Alan Alpert <aalpert@blackberry.com>