summaryrefslogtreecommitdiff
path: root/src/declarative
Commit message (Collapse)AuthorAgeFilesLines
* [BB10-internal] Revert "[BB10-internal] Remove QPerformanceTimer now that ↵Peter Hartmann2013-05-075-12/+357
| | | | | | | | | | | QElapsedTimer contains the necessary bits" This reverts commit 88966515993773e4d7d6276bce6fccfcc13ab6f4. This apparently caused regressions in Cascades. Change-Id: I004a89ff387fa4af6e11d77ff271e437d2f8e170 Signed-off-by: Peter Hartmann <phartmann@rim.com>
* Fix some warnings in qtquick1 found by ClangThiago Macieira2013-04-263-5/+5
| | | | | | | | | | | | qml/qdeclarativevme.cpp:286:26: error: destination for this 'memset' call is a pointer to dynamic class 'QObject'; vtable pointer will be overwritten [-Werror,-Wdynamic-class-memaccess] qml/qdeclarativemetatype.cpp:441:9: error: expression result unused; should this cast be to 'void'? [-Werror,-Wunused-value] util/qdeclarativefontloader.cpp:87:52: error: addition of default argument on redeclaration makes this constructor a default constructor [-Werror,-Wdefault-arg-special-member] Cherry-picked from qtquick1/99f138ad08101315cc871489c78cd10755b046b0 Change-Id: If0a690eacf9421f932214d2917cd3fa0a7daac9a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Prevent crash when moving elements of a ListView's ListModel.Mitch Curtis2013-04-171-1/+2
| | | | | | | | | | QDeclarativeListView::itemsMoved wasn't checking if its list of visible items was empty before accessing its first element. Task-number: QTBUG-26836 Change-Id: I5ed42889a55026f19e44e44d14080a61fff63b59 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Backport some enum optimizations from Qt 5Alan Alpert2013-03-271-11/+33
| | | | | | | | | | | (backport of 108b9bbe2ff2f5f31525408a08d248499d95a49f in qtquick1) Saving the int when we check the enum is valid allows us to make it a literal assignment instead of a binding, which is much faster on object creation. Change-Id: Ieb174289438a17574c4716df372b04d4dee6d0db Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* Improve emission of FocusScope focusChanged signals.Andrew den Exter2013-03-192-18/+29
| | | | | | | | | | | | | | | | | | | | | | | Emit activeFocusChanged up the focus tree when an item receives a focus event, rather than when the focusItem changes which happens before internal state is sufficiently updated for hasFocus and hasActiveFocus to return the correct values from within a changed signal handler. There are some limitions to this. First the signals are not emitted reliably when the scene is not active which makes sense for activeFocus but not for focus. The second is in some instances the focus and activeFocus can update unnecessarily while the focus chain sorts itself out. QDeclarativeItem tests by Andreas Aardal Hanssen <andreas@hanssen.name> Task-number: QTBUG-28288 Task-number: QTBUG-25644 (cherry picked from qtquick1/c520a69f06317fb90d37324bf284ef9614cb5dbf) Change-Id: Iac12bf8c95cbf3525b454f4afca06a54a5c14b4e Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Flickable shouldn't grab the mouse until it starts an effective move.Andrew den Exter2013-02-221-26/+20
| | | | | | | | | | | | If the boundBehavior prevents the flickable from moving its content item in response to a drag it shouldn't grab the mouse as that will prevent a parent MouseArea or Flickable from handling the drag. (cherry picked from commit e8ca72d484c0e56f030e4742bb5f92b6f0555146) Task-number: QTBUG-29718 Change-Id: Ief82ef7b898ea2581fd0b7e52548f451d887e2f1 Reviewed-by: Alan Alpert <aalpert@rim.com>
* MouseArea shouldn't grab the mouse until there is an effective drag.Andrew den Exter2013-02-221-22/+17
| | | | | | | | | | | | A MouseArea shouldn't prevent a parent MouseArea or Flickable from handling a drag event unless it is going to do something useful with it. (cherry picked from commit 67db779665b1d95a20720c0dee058c47f7df8726) Task-number: QTBUG-29717 Change-Id: I17caa51ebc2e547e73e727fd185e60644591ad2b Reviewed-by: Alan Alpert <aalpert@rim.com>
* Fix QDeclarativeListView currentSection property updateNils Jeisecke2013-02-201-0/+2
| | | | | | | | | | | | Model modifications that did not trigger the refill logic caused the view's currentSection property to contain an outdated value. A new autotest has been added to catch the bug. Task-number: QTBUG-29712 Change-Id: I88cf1295ac55dad7596b6ba1fe475ebf98a31026 Reviewed-by: Alan Alpert <aalpert@rim.com> (cherry picked from qtquick1/d31f965b72a1bb8aba0b846471780e90fcc895ba)
* Add a method that allows registration of files to typesAlan Alpert2013-02-194-1/+122
| | | | | | | | | | | | | | | 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. Since public API is frozen for 4.8, this is being added as private API for those who need some measure of compatibility with qtquick1 in Qt5. Change-Id: I28d7898122c5556fcd7cf3476795bcf4bb288ea6 Manual cherry pick of qtquick1/9995a2910d8a5f0317fe3adeb54f838b99ab31a8 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Ensure QDeclarativeTextLayout uses the correct penChris Adams2013-02-011-1/+12
| | | | | | | | | | Backport of commit: 3a0cec6525be6bf843c597c19693785e2c893ee9 with change id: I6bcc43fbcf7fb2c680959d27b1422364ebb473ae from qt5/qtquick1 to qt4. Task-number: QTBUG-28135 Change-Id: I0d84dcb87b03d7b64797c4d633ae0ae8e6bfcb1e Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Remove QPerformanceTimer now that QElapsedTimer contains the necessary bitsRobin Burchell2013-01-175-357/+12
| | | | | | | | | | | | QPerformanceTimer was a copy of QElapsedTimer with some additional functionality which has since been subsumed into QElapsedTimer, so remove the forked code. (backport of cd6ebb4912a5d96c788ea0c838d8a1a06ff4029e from qtdeclarative) (backport of d733f6a942e40e58ebc09f1d4414e2f8fa3f6a28 from qtquick1) Change-Id: I261f0e957ffe3fc5fe42cd50672d2dd99b080f1e Reviewed-by: Christopher Adams <chris.adams@jollamobile.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-13325-327/+327
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Delay loading implicit importAlan Alpert2013-01-083-36/+66
| | | | | | | | | | | As a performance improvement to avoid accessing the filesystem unnecessarily, 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: I5ac2a9fac85559eb96cba93c29d17068fe8171da Manual cherry-pick of qtquick1/dc96bfd00152e25f007511f64bff7c413f657886 Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* Fix crash when mapping coordinates to & from the root item.Nicolas Tisserand2013-01-081-4/+18
| | | | | | | | | | | | | | | | | | | The crash triggered by our (supported & documented) use-cases (calling map{From,To}Item with a null value), has been introduced earlier this year, by this change: https://qt.gitorious.org/qt/qt/commit/bec02b3f3 Also: * Clarify QDeclarativeItem::map{From,To}Item statement ordering. * Handle the engine-less item corner case. This change is a backport from the following commit in qtquick1: cae858768f7d16b79f3627cd5b077da89dc0c7c9 Change-Id: I6d387fb02ca65ab40365edda26a0ea60ff14446c Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Backport PathView currentIndex fixes from Qt 5Bea Lam2013-01-081-37/+58
| | | | | | | | | | | | | | Backport 447e5acb880ebda498891623dc4009984cb73bc6 and 0fc361f96b06ba318e70610e46beb421753cae9d which fix bugs related to currentIndex. The first commit ensures currentIndex=0 when all items are removed; the second ensures that the initial currentIndex value is respected and also resets the view correctly if the model changes. (Backport of Qt5 qtquick1 5d439d751267c64408bd27ab0e6548822146a35c) Change-Id: I6bfd826c97524ed0d06a168bed7f5c321b02b4d3 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Specify better increment for captured propertiesAlan Alpert2012-12-113-4/+4
| | | | | | | | There aren't that many captured properties, decreasing the increment will give better performance. Change-Id: Iddb17c695eda5513f2d038123f4c886e559d8f6b Reviewed-by: Christopher Adams <chris.adams@jollamobile.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. Parts-of-the-patch-by: Jeremy Nicholl Task-number: QTBUG-27723 backport of e5783b79887299d094e6976630373a4899bd7074 from qtquick1 Change-Id: I8f5ee61a754ddec81ec70f82eb39e727534a6049 Reviewed-by: Alan Alpert <aalpert@rim.com>
* Make the rules for redirects a bit stricter.v4.8.4Richard Moore2012-11-221-3/+5
| | | | | Change-Id: I7a3cec664aa028202de3d3bda9f499e4deb2998d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QDeclarativeTypeLoader: Avoid stat() calls to . and ..Thomas McGuire2012-10-221-1/+1
| | | | | | | | | Not needed in Qt5, QDirIterator is not used there, Qt5 contains a completely new type cache. Change-Id: Ifb97cfda0589210783bccc65ab27a546e0f1fca8 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
* Fix access to uninitialised memory that might lead to crashesThiago Macieira2012-10-131-0/+5
| | | | | | | | | | | | | | | QMetaObject is POD, so its constructor is implicit and trivial (doesn't initialise anything). QAbstractDynamicMetaObject doesn't add a constructor, so the QMetaObject sub-object remains uninitialised. The users of either class must ensure they initialise the members if they will be accessed. Task: QTBUG-23214 cherry-picked from qt5 95cb2a1b5caf7d7158dd1176380c1458ea22b54f Change-Id: If0e6b129e1bddc3b70feafa4b318280bb715ab04 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDeclarativeTrace patch for a custom trace instanceFrantisek Vacek2012-10-125-4/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 elapsedToAbsoluteTime(qint64 absoluteMonotonicTimeNs) 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. (cherry picked from commit f13b52f25c1e0bc26dcf3ea304b3495f7d5cd370) Change-Id: I199211c1de66e930e252e8c033503d7f4940565f Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
* Fix QObject::receivers() within connectNotify()Thomas McGuire2012-10-122-1/+7
| | | | | | | | | | | | The receiver count needs to be correct in connectNotify() to be compatible with ordinary connections. Fix this and add test. This is a backport of qtdeclarative commit b1c6e095404ccb7788e6b12fff692c71f4900815 Change-Id: Ic3145a536c928eccfcc29b4d010a526135b654b0 Reviewed-by: Alan Alpert <416365416c@gmail.com>
* Use QVarLengthArray when creating the connectNotify() argumentThomas McGuire2012-10-123-3/+9
| | | | | | | | | | | This gets rid of the heap allocation of the QByteArray. This change is not needed in Qt5, as there, QMetaMethod is used as the argument, and therefore there is no need to construct a SIGNAL-compatible string in memory. Change-Id: Ie2023aeb99bc8f792d437ec604e9989a5efe456b Reviewed-by: Alan Alpert <416365416c@gmail.com>
* Register Qt 4.7 import on-demand, instead of at startup.Robin Burchell2012-10-049-19/+58
| | | | | | | | | | | | | | | | | | 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. (backport of qtquick1/2a3e9eb0ba00acf30b9cc40f7e2e4347726fb6b4) Change-Id: I6960e7c28bb4f153d793802b978c1944977e8ed4 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* EngineDebug: Updated and renamed serviceAurindam Jana2012-10-024-72/+96
| | | | | | | | | | | Updated service to include parent ids. Since this will break client compatibility, the service has been renamed to 'DeclarativeDebugger' from 'QDeclarativeEngine'. This is effectively a backport of the 'QmlDebugger' service from Qt5. Change-Id: Ic3000712d986e19bdf89417e9c4c23229d56f9dc Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Fix g++/MinGW compiler warnings.Friedemann Kleint2012-09-296-9/+5
| | | | | | | | | | - Assigned/Unused variables. - Unsigned comparison >= 0 is always true. - Constructor initialization order. - Signed/Unsigned comparisons. Change-Id: I1f9edab0506573420ed0bf3055252ba48625c8eb Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-29325-7830/+7830
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Include the signal code in the argument of (dis)connectNotify().Thomas McGuire2012-09-263-3/+3
| | | | | | | | | | | | | | | | As it turns out, the convention of (dis)connectNotify() is to include the signal prefix, i.e. '2'. Therefore add this prefix also when calling these functions from QML. Also add a unit test confirming that the C++ and QML cases are now handled the same way. This patch is not needed in Qt5, as connectNotify() and disconnectNotify() take a QMetaMethod as a parameter, not a const char*. Change-Id: I3add0fc13c60a479949cf3d31218af5fd3f546a2 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Revert "Delete JS-owned QML objects right away in the engine dtor."Peter Kümmel2012-09-254-41/+21
| | | | | | | | | | | This reverts commit ecc432a5b7ae269220f86c6f0b3dd364f8643191 to fix a crash on exit. Task-number: QTBUG-20377 Change-Id: I6606ff194f2c16e06bdbbfca94e55821cf055f75 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Delete JS-owned QML objects right away in the engine dtor.Thomas McGuire2012-09-144-21/+41
| | | | | | | | | | | This prevents memory leaks when the engine is destroyed after exec() has already finished. In most cases this happens during application shutdown, at which point the event loop is never entered again. Task-number: QTBUG-20377 Change-Id: I65564ed3e56314d656d92fd66f11ae67d4eb932b Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make connectNotify() work with QMLThomas McGuire2012-08-3111-34/+239
| | | | | | | | | | | | | Call connectNotify() and disconnectNotify() in QML signal handlers and in QML bindings. This is a backport of Qt5's QtDeclarative commit 26ea8e01e9ee2a8c8c09266147b94c9ac92d09f9. Task-number: QTBUG-11284 Change-Id: If5c3701426208875f3b775040c4e7bcbaac2b0a9 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Register less types for QtDeclarative/QCoreApplicationKevin Ottens2012-08-203-68/+78
| | | | | | | | | | | | | | | | | | In Qt5 QtQml and QtQuick are separated so you have control on the amount of facilities you need. It is not the case in Qt4 unfortunately so you always pay the price of those registration. To overcome that, this patch avoids quite some of the type registration when we detect we're not running a QApplication. In such case all the GUI related QtQuick 1 runtime is not usable anyway. We keep around only a handful of convenience like Timer, Connection, Component, etc. Change-Id: Idf5aa935795a224ceb5bc66015282fd094b5686c Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* XMLHttpRequest does not support the DELETE methodJani Honkonen2012-08-151-1/+4
| | | | | | | | | | This is a backport from qt5 commit: 0eeb925aa5039ffddf8d623f250980fc4c97712e Task-number: QTBUG-17963 Change-Id: Ibc262e81d6c7d3b6882461627a7a312d1fbafb3b Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Update contact information in license headers.Sergio Ahumada2012-08-01325-655/+655
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* MouseArea: use current value of drag.axisAlberto Mardegan2012-07-252-11/+8
| | | | | | | | | | | | | If the drag.axis is changed while a drag operation is in progress, put it into action immediately. This allows, for example, start a dragging operation out of an item in a scrollable ListView to anywhere on the screen. See the linked bug number for an example. Task-number: QTBUG-26440 Change-Id: I4ffa71c08b97a767aec7f69d19271000a2631327 Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com> Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Fix roundtrip between double and string in QDeclarativeListModel leading to ↵Florian Hänel2012-07-251-4/+7
| | | | | | | precision issues Change-Id: Ib667dc79072e900f200943f05fb3db9512f4282e Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Qml ListView highlight component cannot access ListView scopeMartin Jones2012-07-042-64/+48
| | | | | | | | | Use the component creationContext to create the highlight item. Also do this for the header and footer. Task-number: QTBUG-26043 Change-Id: Ib4b947d022cb1513f728ac66455bfd2fe2703744 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Item.mapFromItem() crashes with Items not created by the engine.Martin Jones2012-06-261-2/+4
| | | | | | | | | | Item.mapFromItem() and Item.mapToItem() get the script engine from the item they are called on. Safer to use the script value passed to the function to determine the engine being used. Task-number: QTBUG-26280 Change-Id: Id9d6c952cc91c7799910b29a27e24945d8ba073b Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* rewind macro in WinCE wrongly substituted.Martin Jones2012-06-261-0/+8
| | | | | | | | | qdeclarativestateoperations_p.h gets wrong macro substitution by rewind(fp) macro when compiling for Windows CE Task-number: QTBUG-26227 Change-Id: I228ab17ee0be0e228d0c782bfb48ad5c8b12169f Reviewed-by: Bea Lam <bea.lam@nokia.com>
* QDeclarativeTextInput sends delayed mouse events to input contextLauri Malmi2012-06-071-3/+13
| | | | | | | | | | | | | | | QDeclarativeTextInputPrivate::sendMouseEventToInputContext() now forwards also the delayed press events (sent by QDeclarativeFlickable) to Input context. In case of delayed event QWidget pointer in QGraphicsSceneMouseEvent parameter is null and QApplication::focusWidget() is used to obtain QWidget pointer. Task-number: ou1cimx1#1001264 Change-Id: Ia595af651c322b0c91f3a2bd93a9ac1111a00cf6 Reviewed-by: Pauli Järvinen <ext-pauli.p.jarvinen@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com> Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
* Propagate left key presses to the parent item when TextInput is empty.Marcel Schuette2012-05-301-1/+1
| | | | | | | | | | Don't overwrite the ignore value once it's been set to true. Backport from Qt 5.0 to Qt 4.8 (commit a7017465152d544a4217d5ce4f6f84b80cb9b8b9) Task-number: QTBUG-25447 Change-Id: I2232806b1235b0c901aab21116b5bc70c65d0500 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Fix crash when using aliases and variantsNicolas Arnaud-Cormos2012-05-251-1/+1
| | | | | | | | | | Right now, the parser crash when using id.variant.property for an alias. The current patch fix the crash, and it displays an error message in the console now (like QtQuick 2). Task-number: QTBUG-25341 Change-Id: I5e2c13f487655fd2b90129c5693f5daf3f77984b Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Fix memory leak in qdeclarativevisualdatamodel.Andrew den Exter2012-05-211-2/+4
| | | | | | | | | | | Parent order was backwards, the inner context was parented to the outer context, and then the inner context was reparented to the delegate. Parent the outer context to inner context so both are deleted when the delegate is deleted. Task-number: QTBUG-25784 Change-Id: I1d6cd4dfc2530424535a7e00164563d9b4aaa513 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Wrong signals received when moving Flickable elementKatja2012-05-111-2/+2
| | | | | | | | | | Both onMovingHorizontallyChanged and onMovingVerticallyChanged received when Flickable element moved only to one direction. Fixed so that only relevant signal sent. Task-Id: QTBUG-25042 Change-Id: I20acb2403e08c2afa681da2e553cea227c91f001 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Clicking on a disabled ListView's delegate breaks mouse interactionPasi Pentikainen2012-05-081-1/+1
| | | | | | | | | | A disabled Flickable should not filter children. This is a backport of change I9f0d8fbfd0922b5c6a9eaffa69212867359f79e0, from Qt5 (later discarded in QtQuick1 restructuring of Qt5). Task-number: QTBUG-20584 Change-Id: Id279907ee90faf19284c12b548467850662a7019 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix crash in TextEdit when changing text content.Andrew den Exter2012-04-271-1/+1
| | | | | | | | | Verify the text cursor is not before attempting to deference the layout it refers to. Task-number: QTBUG-25389 Change-Id: I8a75393c5af9f81821ad91cbfdd7bbca0d84b1a2 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Moved qmljs_debug_arguments to QCoreApplicationRafael Roquetto2012-04-201-13/+13
| | | | | | | | | Enable the use of the QML debugger without QtGUI Based on Qt5's 9a096d9e. Change-Id: If97502bc5367e0faadfaf3bbe70b0c89ef2c75c2 Reviewed-by: Kai Koehne <kai.koehne@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc Fix- a QML MouseArea Elelment can accept 5 buttons.Rick Stockton2012-03-201-0/+2
| | | | | | | | | | | Add XButton1 AND Xbutton2 to the list of accepted Buttons. This is only a doco fix, without any code change. On branch 4.8 Change-Id: Ib396ec7707a63123759f1164927f0b63850cebe9 Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Fix QDeclarativeItem::hasActiveFocus().Andreas Aardal Hanssen2012-03-191-2/+5
| | | | | | | | | | | | | | | | | | This function returns true if the item (or, in case it's a focus scope, one of its children,) has focus (i.e., will receive key events now), or will receive focus once the scene is activated. It also returns true if the item has not yet been added to a scene, but has subFocus, implicating that someone has called setFocus() on it prior to it being added to the scene; the latter case seen most commonly in unit tests. Cherry-picked from qt/qtquick1: bb364c14157df635cf166b293f8cab6c22534aa1 Task number: QTBUG-24681 Change-Id: I2f2d9dd81820e94202a44393a38972c868a774b7 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Build fix for QtDeclarative in WindowsCEjaanttil2012-02-061-0/+7
| | | | | | | | | | | | | | | | | | | qdeclarativestateoperations.cpp in declarative module needs to include qgraphicsitem.h. In windows CE, the qgraphicsitem.h further needs to include qfunctions_wince.h. qfunctions_wince.h is used to implement posix functions missing from WinCE. One of reimplemented functions in qfunctions_wince.h is posix rewind. Now qdeclarativestateoperations.cpp also implements method called rewind with different prototype. Two incompatible prototypes of rewind break the QtDeclarative build for WinCE. As a workaround the POSIX rewind reimplemented by qfunctions_wince.h is now undefined in this class, because it is not needed here. Task-number: QTBUG-22511 Change-Id: I9e569fa753e70b386068f54d95c3aae0a2dbe55d Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>