aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
Commit message (Collapse)AuthorAgeFilesLines
* Delay loading implicit importAlan Alpert2013-03-273-20/+55
| | | | | | | | As a performance improvement to avoid extra filesystem access, only import "." if it is needed for type resolution. Change-Id: If9be25deb3205f8c81f9f418404d9fb41bebb84f Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* Add Instantiator type to QtQmlAlan Alpert2013-03-201-0/+2
| | | | | | | | | Provides a dynamic instantiation type which is not tied to visual items. Change-Id: I42f7332b29b752dcc94979b6e0ec191fc76b96ef Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add QQmlApplicationEngineAlan Alpert2013-03-206-2/+469
| | | | | | | | This helper class exposes QML application functionality that QML-only applications want to have, but QML-using applications may not. Change-Id: If91c3f55ffa2a4aecdd9d6cc62f6ad09fd35b0dd Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Fix multi-line string content.Erik Verbruggen2013-03-201-12/+1
| | | | | | | | | | | | ECMA5.1, paragraph 7.8.4, item 9 under semantics: The SV of LineContinuation :: \ LineTerminatorSequence is the empty character sequence. So, do not add any line-terminator inside a multi-line string. Escaped characters like \r and \n are added of course. Change-Id: I8c58b7971b1d1bc90adc795ea278541758246e01 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix hexadecimal escape sequence validation in strings.Erik Verbruggen2013-03-192-22/+39
| | | | | | | | | Give an error message when the sequence does not conform to the grammar. Although the specification does not explicitly state that this is an error, this is the behaviour of both JSC and V8. Change-Id: I34d189f07628bc6cc40b13bfbb8d09bee7810ced Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move QML types to types folderAlan Alpert2013-03-1415-5716/+4
| | | | | | | | | The QtQml module has gain a bunch of QML types cluttering up the qml folder. Moving them to types organizes them a bit better. Change-Id: I570884c00f4abc48f4f1aea048bf002bc70223f3 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Compile fix.Samuel Rødal2013-03-131-1/+1
| | | | | | | | Some compilers don't allow the first argument to printf and similar functions to be a non-literal string. Change-Id: Idd11ae6679d5c0585b5d10b76c991dcfdb4f65da Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* don't use CamelCase includesOswald Buddenhagen2013-03-138-26/+28
| | | | | | | | they are not available during bootstrap. Change-Id: I5e941f22cd2b9fa622730ba0bf8389394f6a30a5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Add QtQml.Models moduleAlan Alpert2013-03-122-9/+30
| | | | | | | | | | | The moved Model classes can now be exposed in a QtQml import. To keep the QtQml import resticted to more core functionality, they are being exposed in a plugin module. Change-Id: I0a84642a72c7c9bbf9b6ffd2a6c33549f8e61c29 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use official V8 string manipulation methods in QMLPeter Varga2013-03-123-7/+16
| | | | | | | | | | | The QtJSBackend's String::GetCharacter and String::Equals methods are Qt specific and they are not supported by official V8. These methods can be replaced by more "V8-friendly" implementations in QtDeclarative. Thus the mentioned methods can be removed from QtJSBackend to reduce the difference between QtJSBackend and the official V8 source. Change-Id: I5590ca62dc667e64a7f54a7e47a02d350ba0c077 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Replace deprecated V8 functionsPeter Varga2013-03-114-37/+37
| | | | | | | | The External::Wrap and External::Unwrap functions became deprecated in the mainline V8. Replace them as it is officially proposed. Change-Id: Ieac1da53997da440a909939d86c98f17a124c068 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove spurious includeAlan Alpert2013-03-051-1/+0
| | | | | | | | | While it's discouraged to use the entire module headers inside Qt, this particular example also compiles without the line. Change-Id: I75b6fc09e11d00df2f19f5db9b0209ed4cd82844 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Add core application functionality to Qt.application in QMLAlan Alpert2013-03-053-4/+116
| | | | | | | | | | | | | | This exposes some information to QML which is available on the QCoreApplication instance. A future change should make it possible to restrict this for use in scripting environments (which should not have access to the QCoreApplication). That has been left out of this change because proper support for such restrictions is not yet in place. Change-Id: Ica144fcfb0b42fa6df8d0cb1c7c03eb97282b489 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Android support: build fixesPaul Olav Tvete2013-03-051-1/+1
| | | | | | Change-Id: If829341b0baef7b253a386a195d3b5e4238b8103 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Remove extra semicolon.Frederik Gladhorn2013-03-051-1/+1
| | | | | Change-Id: I5830f8dd2c636ad8653506c04f8ea1a9ac000f9a Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Work with synchronous replies from a custom QNetworkAccessManagerAlan Alpert2013-03-041-6/+21
| | | | | | | | Forward port of e5783b79887299d094 from QtQuick 1. Task-number: QTBUG-27723 Change-Id: I4332dd72bb9d65167307c1ac5ce24e93b14cff5f Reviewed-by: Peter Hartmann <phartmann@rim.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-03-041-2/+2
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-251-2/+2
| |\ | | | | | | | | | Change-Id: Ia02971527a2d1a80c5624d69330428818aab3a41
| | * Clarify Component::createObject docsAlan Alpert2013-02-191-2/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-29650 Change-Id: Ie6f9027ff779f8a513a52b425d9a393c0ecd9c7d Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | | Fix the QtQml's use of plugins for value type providersThiago Macieira2013-03-012-2/+32
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the QtQuick library is loaded, it runs a global constructor that installs the QtQuick value providers. But those providers are never uninstalled when the library is unloaded, resulting in a dangling pointer stored in QtQml's singly-linked list of value providers. Since cafb02911a29b98ac2652fde64e95870e70fd547, QLibrary will unload plugins after inspecting their plugin metadata on Mac and Windows. If QtQml is trying to load a plugin that links to QtQuick (in particular, *the* qtquick2plugin plugin), it would cause the value provider to go stale. To make matters worse, it's quite likely that the plugin would get loaded soon after, at the same address in memory, which causes the valueTypeProvider list to become cyclic. Change-Id: I6f4db5475ceeaba766d9e9c78f86266c9a65806a Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Make the base URL available to QQmlExtensionPluginShawn Rutledge2013-02-195-7/+98
| | | | | | | | | | | | | | | | This is for the benefit of any plugin which needs to interact with the QML files or related assets which are also located in its import directory. Change-Id: Id23ec279b4d017bd3f620c3a7916dac9f9ac29bc Reviewed-by: Alan Alpert <aalpert@rim.com>
* | Add qmlRegisterType for Composite TypesAlan Alpert2013-02-181-0/+21
| | | | | | | | | | | | | | | | | | This is equivalent functionality to registering a composite type in a qmldir file, a type name in a versioned module is associated with a given file. This function now allows that to be done easily from C++. Change-Id: I1cf44b92c3ad7fee593f4f84773c35b56253e628 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Add Composite Types to QQmlTypeAlan Alpert2013-02-1810-138/+264
| | | | | | | | | | | | | | | | | | When a composite type is loaded from a QML file, it now generates a QQmlType entry in QQmlMetaTypeData. Change-Id: I9b127dff7955456aacb25138fa6ea8efb7bb9221 Reviewed-by: Christopher Adams <chris.adams@jollamobile.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* | QQuickPlatform: remove QT_{BEGIN,END}_HEADER macro usageJ-P Nurmi2013-02-151-4/+0
| | | | | | | | | | Change-Id: I219517d740fa7385e923a9e09cb7e241378f8576 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Add QQmlPlatform (exposed as Qt.platform)J-P Nurmi2013-02-146-2/+207
| | | | | | | | | | | | Change-Id: If34603fd8fbd907bc063b52ea31848eabdb49f61 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-077-23/+33
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quick/textureprovider/etcprovider.h src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp src/qml/doc/qtqml.qdocconf src/quick/doc/qtquick.qdocconf tests/auto/quick/qquickflickable/tst_qquickflickable.cpp Change-Id: I5027b0ee024e00b9525bd45516b7f401ff7d4ae4
| * Fix lupdate-warning in qqmlrewrite.cpp.Friedemann Kleint2013-02-061-4/+12
| | | | | | | | | | | | | | | | | | Class 'QQmlRewrite' lacks Q_OBJECT macro. Replace global-static strings by message functions. Change-Id: I67a6fbe67575533d3ce5750d72c9d7eff06e7efa Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
| * Fix lupdate-warnings in qqmlimport.cpp.Friedemann Kleint2013-02-061-13/+9
| | | | | | | | | | | | | | | | | | | | qqmlimport.cpp:738: Class 'QQmlImportsPrivate' lacks Q_OBJECT Remove tr()-function and use QQmlImportDatabase::tr() directly. Change-Id: I3a1561c57a6ee90d271a6043b0175e17a7828666 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
| * Fix lupdate-warnings.Friedemann Kleint2013-02-062-2/+2
| | | | | | | | | | | | | | | | | | qqmlcomponent.cpp:667: Cannot invoke tr() like this qqmltypeloader.cpp:2292: Cannot invoke tr() like this qquickloader.cpp:944: Cannot invoke tr() like this Change-Id: Ifdd1a7b958b6af88f251e7df27eb4d4018301914 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
| * Merge branch 'release' into stableSergio Ahumada2013-01-311-3/+3
| |\ | | | | | | | | | Change-Id: Ic270f7814489b2c7df7e0f1ecb46cd516802cac5
| | * Remove outdated macro usageChristian Stenger2013-01-241-3/+3
| | | | | | | | | | | | | | | | | | Change-Id: I4b58f3d74d7dec9a95a07b907c500990630e7762 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
| * | Strengthen reference to var properties during constructionAlan Alpert2013-01-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally var properties are kept alive by a reference to the object they are declared on, but during the construction of that object the GC may not be aware of said object. This change uses a strong reference during GC passes which take place while the object is being constructed. Task-number: QTBUG-29138 Change-Id: Ieecfcc7567aefac0d67cb933728daf16ed3eed0a Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
| * | Fix memory leakAlan Alpert2013-01-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The cache is filled with dynamically created entries, so clear is not quite enough. Change-Id: I40a49ce5d1a3d6da1b419e85cae95f2f95011a19 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
| * | Doc: Fix uses of \sinceDebao Zhang2013-01-241-1/+0
| | | | | | | | | | | | | | | | | | Change-Id: Idf497424279fbee08e6e5750e6a15372c808105f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | | Use constFind instead of find in QQmlMetaType::qmlTypehjk2013-02-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | There is no need to detach when only checking for the presence of an item. Change-Id: I59a0aadb74b4613b019882bcf67e84e68df18a21 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | | Qml: Use QString::append(QStringRef) overload in ProcessAST::asStringhjk2013-02-061-1/+1
| | | | | | | | | | | | | | | Change-Id: Ifc9d276e0d4f9e2ff9a89c7edbe34a04ab080774 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | | Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-2850-198/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The macro was made empty in qtbase/ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Ia07e99676e0134fde5e32880edb95e57c779a7ff Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* | | Move the model classes from QtQuick to QtQmlAlan Alpert2013-01-241-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed for proper support of non-GUI instantiators in QtQml. Only private C++ classes are affected. Aside from name changes, model classes now operate on QObjects instead of QQuickItems, leading to minor changes in the implementation of QtQuick classes using them. The old QML type names will still be registered in the QtQuick import for the forseeable future, but pointing to the new classes. The new QML types will be added in a second commit. Classes Affected: QQuickVisualDataGroup -> QQmlDataGroup QQuickVisualDataModel -> QQmlDelegateModel QQuickVisualItemModel -> QQmlObjectModel QQuickVisualModel -> QQmlInstanceModel QQuickChangeSet -> QQmlChangeSet QQuickListAccessor -> QQmlListAccessor QQuickListCompositor -> QQmlListCompositor QQuickPackage -> QQuickPackage (just moved for now) Change-Id: Ia19e630e53bfa9e5d459e289596cd11df1ea3930 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* | | Move ListModel and ListElement to the QtQml importAlan Alpert2013-01-249-172/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They're already in the QtQml module, but were left in the QtQuick import because they were considered to be of minimal use without QtQuick types. QtQml types are being developed would could make ListModel useful without QtQuick, indicating that they should no longer be considered QtQuick depedent. Change-Id: I31499f2cc23baf4bc70fb451ba164408bed89ff6 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* | | Refactor QQmlTypePrivateAlan Alpert2013-01-242-92/+169
| | | | | | | | | | | | | | | | | | | | | | | | Now has a registrationType, and an extraData union for data only relevant to certain registration types. Change-Id: I9b127dff7955456aacb25138fa6ea8efb7bb9220 Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* | | Move documentation to QtQml moduleAlan Alpert2013-01-233-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | The recent move of certain elements from the QtQuick module forgot to update the module in some of the documentation strings. Change-Id: I5da27772004c7ceeb9c5ab6184e0078ac64ba07a Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | | Merge branch 'stable' into devGunnar Sletta2013-01-17241-249/+249
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/doc/qtqml.qdocconf src/quick/doc/qtquick.qdocconf Change-Id: I087fa14720995a5e53c43567dc4a3c29eb9992a9
| * | Merge branch 'release' into stableGunnar Sletta2013-01-171-1/+1
| |\| | | | | | | | | | Change-Id: I88ecd5f396ecd9a9c910108d1cca832a3087f1d8
| | * Exporting required symbols for Qt Quick DesignerThomas Hartmann2013-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These classes are used by qml2puppet. Qml2Puppet is an external process used by the Qt Quick Designer, that builds the interface between the designer and Qt Quick/QML internals. Qml2Puppet is responsible for emulation and rendering. The 2 in Qml2Puppet indicates that it is used for Qt Quick 2.0. This would be nice to have in Qt 5.0.1 to allow testing based on official packages. Also this helps early adaptors. QQmlTimer is used to disable timers. QQuickTextEdit and QQuickTextInput are used to disable the blinking cursor. QQuickBehavior is used to deal with behaviors. QQuickPropertyChanges and QQuickStateGroup are used to emulate states. QQuickTransition is used to disable transitions. Task-number: QTCREATORBUG-8572 Change-Id: I572707d93eda477df945976442efed32ef16df34 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
| * | Doc: correcting typo "the the"Nico Vertriest2013-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-28756 Spurious repetition of the definite article Doc: corrected trailing space issue. Change-Id: I95c1c5773dc4b25dd0a3625343a67975783435fd Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
| * | Update copyright year in Digia's license headersSergio Ahumada2013-01-10241-243/+243
| | | | | | | | | | | | | | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
| * | Doc: Updated docs for examples and etcXingtao Zhang2013-01-091-4/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | - Corrected several \snippet paths and \example paths. - Added missing example images. - Marked several commands as code. - Updated the exampledirs variable for qtqml. Done-with: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Task-number: QTBUG-28898 Change-Id: I24aac17821f54de4bd5129c45b5bf96dc0f114b2 Reviewed-by: Liang Qi <liang.qi@digia.com>
* | Make numeric-literal parsing even more robust.Erik Verbruggen2013-01-161-3/+6
| | | | | | | | | | | | | | | | The numeric value could overflow a unsigned 64-bit integer, so instead just buffer the string and have libc's strtod handle all the conversion. Change-Id: I220e490ddc22363460b0df65a91b47336e747310 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Fix automatic semicolon insertion before ++/-- operators.Erik Verbruggen2013-01-111-3/+1
| | | | | | | | | | | | | | | | Also move the tilde token from isBinop to the lex method, because it is not a binop, but should still be delimited. Change-Id: I532260f4f3ebdde2d38128b41d11bce5a113d1f1 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Make numeric-literal parsing more robust.Erik Verbruggen2013-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | For cases where large non-fp numeric literals might end up triggering coversion or rounding errors when stored as doubles when lexing. This is a corner case, but it does trigger a case or two in the ECMA5 test suite (test262). Change-Id: Ie6d355e28379aba9a339c4e345b5d2a0c32d5fdd Reviewed-by: Lars Knoll <lars.knoll@digia.com>