summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
Commit message (Collapse)AuthorAgeFilesLines
* Add a method that allows registration of files to typesAlan Alpert2012-12-055-1/+106
| | | | | | | | | | There is currently no way in C++ to duplicate the functionality of a qmldir file in mapping QML files to versioned types in a module. This functionality would be useful both in cases where a separate qmldir file would be overkill, and for cases where the type mapping should be generated dynamically. Change-Id: I28d7898122c5556fcd7cf3476795bcf4bb288eab Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* Delay loading implicit importAlan Alpert2012-12-053-36/+66
| | | | | | | | | | | As a performance improvement to avoid accessing the filesystem unecessarily, only import "." implicitly if types cannot be found in the existing imports. This is not a behavior change for type resolution, because "." already has the lowest precedence for type resolution. Change-Id: I8a8f10f7a790e6a02fc2c07c443f7be1984fc979 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au> Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* Limit case-sensitivity check in QML to file names.Friedemann Kleint2012-12-012-2/+23
| | | | | | | | | | Provide for checking relative paths only; default to file names. Currently, the checking triggers on a drive letters and installation folder names, which is too strict. Task-number: QTBUG-28277 Change-Id: I2056a39b605f7891d2c3e395efc6bc541aa7e470 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Fix QML XmlHttpRequest Insecure Redirection FlawRichard Moore2012-12-011-3/+5
| | | | | | | | | Fix the redirection flaw in QML's XmlHttpRequest implementation that is described in http://lists.qt-project.org/pipermail/announce/2012-November/000014.html Change-Id: I5190e63648f4664753003b70c20cb8dbd20ab150 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QML file loading: honor synchronous requests made through QNAMAlan Alpert2012-11-282-8/+28
| | | | | | | | | | So that it can skip loading state when the underlying QNetworkReply is already finished. Change-Id: Ic2d26271868b64bf8a411b4b54d7e5be7ee5d2b5 Parts-of-the-patch-by: Jeremy Nicholl Task-number: QTBUG-27723 Reviewed-by: Alan Alpert <aalpert@rim.com>
* Accept missing semicolon after do-while statement.Erik Verbruggen2012-11-266-802/+852
| | | | | | | | | | | Although not valid according to ECMA 5.1, both JSC and V8 accept a missing semicolon after a do-while loop. (Both JSC and V8 do not do this through automatic semicolon insertion, but handle it as a special case.) This is a "port" of a similair change done in the qtdeclarative module. Change-Id: I417cf18abb75e7040c48894b8f8f68afc41547fe Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove references to QApplication::type()J-P Nurmi2012-11-221-1/+1
| | | | | | | | Qt3 legacy QCoreApplication::Type and QApplication::type() will be removed -> use qobject_cast instead. Change-Id: If95a5552440ace2592332de03f9d2240fa8770b9 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Move the Qt Quick 1 imports back to "imports"Thiago Macieira2012-11-191-1/+1
| | | | | | | | | | The Qt Quick 2 ones will be in a different place. This restores Qt 4 behaviour. Change-Id: I6bc11113c0c89f4b11422b7fe98571930eb852cd Discussed-on: http://lists.qt-project.org/pipermail/development/2012-October/007011.html Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change the header message: this is now the QtDeclarative moduleThiago Macieira2012-10-19144-144/+144
| | | | | Change-Id: I18a370a58494049939d035f1c3528406f3f7645f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Do not use an export macro in the function definitionThiago Macieira2012-10-171-1/+1
| | | | | | | | | | qmlExecuteDeferred is exported using Q_DECLARATIVE_EXPORT in qdeclarative.h, so we don't need to use one here. Better not have any than have the wrong one, which can cause problems. Change-Id: I672f8aaf0fef2600a6ab8c4a17112404fc5b1cda Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Rename the QtQuick1 module back to QtDeclarativeFriedemann Kleint2012-10-1734-103/+103
| | | | | | | | | | | | | | | | | Matches the name that this code used to have in Qt 4. - Adapt library, change import path to 'QtDeclarative'. - Update the tests and examples to match the new library name. - Rename qtquick1global{_p}.h to qtdeclarativeglobal.h. - Change exports back to Q_DECLARATIVE_[PRIVATE_]EXPORT, like it was in Qt 4 and matching the library name again. This also changes the include guards in qtdeclarativeglobal{,_p}.h. - Fix occurrence of quick_debug in tools/qml/qml.pro. Change-Id: Ibb1fb2e503f90943a2125e4ac3cc4eca3369ca3f Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPerformanceTimer: fixed wrong implementation of elapsedToAbsoluteTime()Frantisek Vacek2012-10-131-4/+6
| | | | | | | | Function elapsedToAbsoluteTime() had wrong implementation on MAC and WIN platforms. Change-Id: Icc11e85bcd562cce42af902749883b433a1fcb0b Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
* QDeclarativeTrace patch for a custom trace instanceFrantisek Vacek2012-09-282-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Needed for the BB10 Cascades profiling. There are more reasons for introducing this patch: 1) Cascades do not use QtGui library for QML rendering. It has its own paint engine with client-server architecture. Profiler traces are sent asynchronously from non Qt renderer thread to the Qt client. The QPerformanceTimer has to be patched too, cause we need to know time difference between tracing zero time and some time in past, see: qint64 QPerformanceTimer::elapsed(qint64 to_monotonic_time_ns) const 2) Since we need more sophisticated trace engine in cascades, this patch allows explicitly assign custom class derived from QDeclaraqtiveDebugtrace to the trace framework. If no custom instance is assigned, the default QDeclarativeDebugTrace instance is created implicitly on first trace request. Using custom trace instance which is not part of Qt (it is part of libbbcascades) allows us to implement all Cascades trace special needs in libbbcascades and not to carry Qt with the platform specific code. 3) The NO_CUSTOM_DECLARATIVE_DEBUG_TRACE_INSTANCE macro is introduced to allow custom trace engine only on the bleckberry platform, see declarative.pro. If this macro is defined Qt compiles from its original code. 4) Possibility of custom QDeclaraqtiveDebugTrace instance might be usable for other projects which needs to extends somehow default Qt trace functionality. 5) Patch is not intended to be applied to Qt Quick 2, since declarative debugging infrastructure is changed there. Change-Id: I199211c1de66e930e252e8c033503d7f4940565f Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-24145-3508/+3508
| | | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I11a957e35758e821269478ebc91e87f0f5ebc4d5 Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove Symbian platformKai Koehne2012-09-183-78/+3
| | | | | Change-Id: Iad770614f7c1c890febeee662d0ce9370dcb17e3 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Register Qt 4.7 import on-demand, instead of at startup.Robin Burchell2012-09-035-6/+37
| | | | | | | | | | | | | | | | | | | | This is a slightly less awkward approach (keeps backwards-compatibility) while speeding up startup for applications that don't use the old import path. Also prints a warning to let developers know they should migrate their code when possible. Completely disabling the Qt 4.7 import is still possible by setting QT_NO_IMPORT_QT47_QML. This takes around 10-15ms off a very simple "hello world" on my macbook. As an added bonus, forward-port a similar approach to 4.8's a26f545d8e25af74fb43d16c9afa79f6e04463e7 and don't register graphical types in a non-graphical application as someone (very naughtily) apparently forgot to get it integrated to Qt 5 first. Change-Id: I7821523750b3ab6770f367788725d0da70c5ec1f Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Alan Alpert <416365416c@gmail.com>
* Remove the user of the QWidgetStar metatypeid.Stephen Kelly2012-08-152-4/+0
| | | | | | | | It is to be removed, and is obsoleted by QMetaType::PointerToQObject. Change-Id: I6832808cfd1e22d6c04c7ba37bf52ff7c36f0272 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Fix compilation of missed network dependYuchen Deng2012-08-031-1/+1
| | | | | | | | qtquick1/src/declarative/qml/qdeclarativeengine.cpp:78:25: fatal error: QNetworkReply: No such file or directory Change-Id: If39be538bd135118d6654e154e86e8a082f03a58 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Doc: Changed \qmlclass to \qmltype and added \instantiatesJerome Pasion2012-07-303-4/+8
| | | | | | | | -\qmlclass is now \qmltype -\instantiates is for QML types implemented in C++ Change-Id: I017822524de1879d272d777ec7681f4233128b01 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Fix objectName test in tst_qdeclarativeecmascript.Glenn Watson2012-07-134-24/+2
| | | | | | | | | | | The QtQuick1 library relied on special case handling of the objectName property in qtbase. With Qt5, there is a normal notify signal for objectNameChanged. Remove the QtQuick1 special cases and fall through to the default code path. Task-number: QTBUG-26334 Change-Id: I70f31947b6c74c7125d6f99a33e9b02d7ef52273 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* load plugins properly when QT_NO_SETTINGS is definedTasuku Suzuki2012-07-061-3/+0
| | | | | Change-Id: I9bc7a3ed70f866c59ba9f72ad3a96b22e6bbf7a6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Include <QDataStream> properly where QDataStream is usedThiago Macieira2012-06-191-0/+1
| | | | | | | | | | | And add the missing forward-declaration to QMetaObject in one place. I guess no one noticed that QObject was actually fully-declared, despite the existing forward declaration. This was caused by qpair.h including qdatastream.h, which includes qiodevice.h, then qobject.h, then qobjectdefs.h. Change-Id: Idd3aef1acecf0c045a63c154c3ce2d7835afa71b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Separate the path for Qt Quick 1 plugins from Qt Quick 2Lars Knoll2012-06-121-1/+1
| | | | | | | | | | | | Install and load Qt Quick 1 plugins from imports/QtQuick1/... This is to avoid conflicts between Qt Quick 1 and 2 and cleanly spearate the plugins for both. Currently, e.g. the folderlistmodel exists for both, and gets installed into the same location. Change-Id: I55331a5a02148eacc3c615436d77eb97bf0fbd72 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QDeclarativeXmlHttpRequest - use readyread signal not downloadProgressShane Kearns2012-06-061-5/+4
| | | | | | | | | | | | | The readyRead signal (part of QIODevice base class) is the appropriate signal for knowing when there is data available in a QNetworkReply. DownloadProgress is intended for UI elements e.g. progress bars. Previously it was emitted at the same time, but now it is emitted less often. Task-number: QTBUG-20449 Change-Id: I732a2facb083f4cc35d01441a34964847f00fdb2 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Remove the remaining traces of the old plugin systemLars Knoll2012-06-051-2/+2
| | | | | Change-Id: I0b4156f01d5d1bfe5cdde724148ed681025ab227 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Move QIcon reference from QtWidgets to QtGui.ybot2012-05-201-1/+1
| | | | | Change-Id: I975527171f840d5ea6cdd3c99c35379b5d9faa36 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Doc: Fix \sa usageMarius Storm-Olsen2012-05-101-5/+5
| | | | | | | | Ensure comma between elements (9 missing), single space and curly- braces around title elements, etc. Change-Id: Iefe491665804861f2a179ca87fb2f8a0eded8781 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QtQuick1: Fix build warnings.Friedemann Kleint2012-05-101-1/+1
| | | | | | | | - Add missing .json file. - Fix warnings about unused variables, deprecated cast from char*. Change-Id: Ibb5065e604460ff945b3e452b2270d2b7368ea49 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Remove hook for objectNameChanged signal handler.Andrew den Exter2012-05-102-13/+0
| | | | | | | | Made obsolete in Qt5 with the addition of an objectNameChanged signal to QObject. Change-Id: I86df09ade866f0322303f40de223cb84b8e95c27 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Change uses of {to,from}Ascii to {to,from}Latin1Thiago Macieira2012-05-041-2/+2
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I657ca349b700fa043a796b7a464d057ca18bb90a Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* QtQuick1: Fix deprecation warnings.Friedemann Kleint2012-05-024-13/+21
| | | | | | | Introduced by qtbase:0df1c9f1fa04c06d6105de3f312c6c752a58ad70 Change-Id: I61e330707a49efd09bad0efda386712fba207c8a Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Fix warnings in autotests.Jędrzej Nowacki2012-04-241-0/+4
| | | | | | | In Qt 5 QVariant can not be constructed for "void" type. Change-Id: Ic58ec9a17c93ec0f3e587da8b820e289699f67d7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Small optimization in declarative property cache.Jędrzej Nowacki2012-04-181-5/+1
| | | | | | | | We do not need to do a name lookup, with new api we can get a type id directly from QMetaMethod. Change-Id: I180a0e409c3d4a8c49f228db5417d4f1d9f0cf00 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Adapt to Qt5 meta-object changesKent Hansen2012-04-186-16/+19
| | | | | | | | | | | | | | | | | | | | QMetaMethod::signature() has been renamed to methodSignature(), and returns a QByteArray, not const char *. Thew new function QMetaMethod::isValid() should be used to check whether a method is valid (it's a lot cheaper than calling signature()). Also use the new QMetaObject::checkConnectArgs() overload that takes QMetaMethods, not strings, as arguments. Further improvements can be made by using the new functions QMetaMethod::name(), parameterCount() and parameterTypes(), but that will be done in separate commits. Change-Id: I3e4cfbdc7799d8bce747ef37f07d0d097370e409 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Fix compilation and tests after qtbase/api_changes mergeKent Hansen2012-04-182-8/+2
| | | | | | | | Adapt to QUrl changes, based on how qtdeclarative was adapted in commit 2d393ae042d5badf0862c0f95122f9662042f2a9. Change-Id: I9d1fddf4bbc6d86ac206dca4ac929d180ec12efa Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Build with g++ / C++11.Friedemann Kleint2012-03-201-1/+4
| | | | | Change-Id: Ibc538d11806d0fec452ee9eb01936940da9dc199 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-139-98/+98
| | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: Iae34eb8f2233dd9dbec79e7ab3c324f3f505b4cc Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Define Q_QUICK1_EXPORT independentlyMatthew Vogt2012-02-2728-79/+81
| | | | | | | | | | | | Define Q_QUICK1_EXPORT and Q_QUICK1_PRIVATE_EXPORT inside the qtquick1 module rather than using the definition in qtbase. This change undefines the definitions from qglobal.h; the undef should be removed once the definitions have been expunged from qtbase itself. Change-Id: I1ee6fa1e513d110d9a298d897a8d3d465290e9ce Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Use new plugin system in QtQuick1.Friedemann Kleint2012-02-214-4/+15
| | | | | | | | - Use prefix "org.qt-project" for interfaces. - Use new macros, add json files. Change-Id: I157206ad883be16fb85b9b6bffca7200532561e4 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QtQuick1: Fix warnings of gcc 4.6Friedemann Kleint2012-02-082-4/+3
| | | | | | | | - Fix warnings. - Remove duplicate entries from profile. Change-Id: I7b4a3cd71ec7d1c11b3530c95f57fef3a3041b16 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Don't include pri file from qtbase source directory.Andrew den Exter2012-02-071-2/+3
| | | | | | | The pri file is one line, just duplicate it. Change-Id: Ie541efb5713fa69763ca75a66f97ebaa69cb5a84 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix license header format.Matthew Vogt2012-02-07145-292/+146
| | | | | Change-Id: Ib71237ed181d075329a0267b5c108e6534c13e4e Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* QtQuick1: Fix compilation on Windows.Friedemann Kleint2012-02-073-3/+4
| | | | | | | | - Add missing modules, includes. - Fix warnings. Change-Id: I21a6107db6c5978ccfd59c4202cf31e3deba19ca Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Fix license headers to match conventions.Matthew Vogt2012-02-07145-145/+292
| | | | | | | | Files updated to mtach licensing conventions for different types, and license text updated to match current. Change-Id: Ib2c7457fbc3b37907ab3936e176e6f16f8308036 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Fix qdeclarativeecmascript test failure.Andrew den Exter2012-02-021-3/+5
| | | | | | | | Don't use hardcoded constants for the number of methods belonging to QObject as they can and have changed. Change-Id: Iaae3bb6cad34fce6c2351217480755f1ac2f6085 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Fix breakage due to meta-type id reordering in qtbaseAndrew den Exter2012-02-011-1/+7
| | | | | | | | Cherry-pick of 40c8da550cac90460970f1dbdca1e6f02be99a8c in qtdeclarative. Change-Id: I85d0922dc1ddbdfc24c100d8bbf4d085513a5739 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Fix assert when binding to property variant.Andrew den Exter2012-02-017-3030/+92
| | | | | | | | | Remove workarounds for the QVariant meta-type and use it directly and remove QMetaObjectBuilder entirely and use the up to date copy in qtbase. Change-Id: I1ad601906d6b172adc7ce7bb63af28cd578eb5d7 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Fix compile failures.Andrew den Exter2012-01-311-1/+0
| | | | | | | | Remove uses of QLineControl, QTextControl and QBool and forward declared QGraphicsWidget. Change-Id: Ic5184a1d5aebfb1100ad0e24444b6773f4e617e8 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Modify QtQuick1 to build in Qt5Matthew Vogt2012-01-3117-32/+27
| | | | | Change-Id: I1c5ccaef420e8f119e761f50b969127f430df7ba Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Import relevant source from Qt 4.8Matthew Vogt2012-01-30150-0/+62111
Change-Id: I5078db4081d95290c54f39d3c0efc2fc2f62e6a6