aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Flickable: use wheel event pixel deltas when availableShawn Rutledge2015-02-163-83/+214
| | | | | | | | | | | | | | | | | | | Flickable can now handle wheel events which come from touchpads, providing pixel deltas instead of angle deltas. It will interpret them as distance to flick, rather than using an average-velocity physics model as it does when handling events from a physical mouse wheel. This enables much finer control and limits the tendency to "zing" way out of bounds accidentally. It is achieved by refactoring the direct-drag code which is needed for mouse dragging and for touchpad gesture dragging (and eventually touchscreen dragging) into a new internal drag() method. [ChangeLog][QtQuick][Flickable] Flickable handles pixel deltas from trackpad gestures as drags, for a more native feel Task-number: QTBUG-22407 Change-Id: Ia613ddb25f46d452603f7cb567b74e80c95a346c Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* High-dpi SVG and QQuickImageProvider ImagesMorten Johan Sørvig2015-02-131-1/+13
| | | | | | | | | | | | Scale sourceSize by the target devicePixelRatio before passing it to the providers. Task-number: QTBUG-38127 Task-number: QTBUG-38991 Change-Id: I1746e0859b4e63eb0d28d1a1c8aac610b68a9eb9 Reviewed-by: Jocelyn Turcotte <jturcotte@woboq.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* PinchArea: handle smart zoom gestureShawn Rutledge2015-02-133-0/+40
| | | | | | | This is the double-finger double-tap trackpad gesture on OS X. Change-Id: Ie79dc533adf382170867318bc9b61b367f819e9b Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Fix 590 inconsistent override warnings [-Winconsistent-missing-override]Sérgio Martins2015-02-136-30/+30
| | | | | | | | Classes should either use or not use override, otherwise it hurts code readability. Change-Id: Ieb899a3475b0c36ab20285740b2cec2cd1677a54 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Doc: Bump QtQuick import version to 2.5Shawn Rutledge2015-02-121-1/+1
| | | | | | Change-Id: I9b41d6c755f804aeb47564f10d7131df528ba61d Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* Use TabFocusBehavior in QStyleHints in QtQuickLiang Qi2015-02-122-12/+2
| | | | | | | | * QQuickItemPrivate::qt_tab_all_widgets was removed. * qt_tab_all_widgets in test was updated. Change-Id: I418d7a3edae0a4782a91289f6c0494ff5874d071 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* QQuickText: Move baseUrl to ExtraData.Robin Burchell2015-02-122-5/+8
| | | | | | | | | | | | | | | It's only used for external resource loading, which is not the common case. Note that the case of an unset baseUrl may become a little more pessimised now, as it has to be looked up from the context which involves a loop to find the outermost parent context, but again, this is not a common case, so I'd consider that acceptable. QQuickTextPrivate now goes from 496 bytes to 488 bytes. ExtraData increases from 72 bytes to 80 on x86_64. Change-Id: I7e346eeb3b3cefe81912aac2b115e106ec519d1e Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* QQuickText: Decrease the size of QQuickTextPrivate by moving image tags to ↵Robin Burchell2015-02-122-50/+65
| | | | | | | | | | | | | ExtraData. Given that other data about images is already stored there (e.g. nbActiveDownloads), it seems curious to not store it all there. On x86_64, this drops the size of QQuickTextPrivate by 16 bytes (512 -> 496), and increases the size of ExtraData from 56 bytes to 72 bytes. Change-Id: Ib0a98199a74f757cf439d4ba276c7704504055b2 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* QQuickParticleData: Reorganise fields to drop size from 208 to 200 bytes on ↵Robin Burchell2015-02-122-5/+10
| | | | | | | x86_64. Change-Id: Ide7a70baecf6d1ff3ec8160a2cb47f0bd9955e45 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* QML Models: Register ItemSelectionModelGabriel de Dietrich2015-02-122-0/+141
| | | | | Change-Id: I7f5c9e05c2e779d33e1bc92d698c75d97d397339 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* QuickTestResult: Try a bit harder when stringifying a valueGabriel de Dietrich2015-02-121-1/+3
| | | | | | | | | | Q_GADGETs are not always QVariant::toString()-convertible but they probably have their own toString() function that we always try to call. This may still lead to false posi- tives, but in a much smaller proportion. Change-Id: I80547a9e773e97410fe5d4723efcac6b010046f9 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* Add Q_GADGET wrappers for QModelIndex & Co.Gabriel de Dietrich2015-02-125-0/+412
| | | | | | | | | | | | | | | | | | | | | | | | | The complete list of types is, * QModelIndex * QModelIndexList * QPersistentModelIndex * QItemSelection * QItemSelectionRange These wrapper types follow the QQmlValueType conventions and allow us to expose the wrapped types without introducing meta-type changes. They also allow to customize the string type representation. We also extend QQmlValueTypeFactory to return the meta-object for those types. Finally, we add two-way meta-type conversion between QModelIndex and QPersistentModelIndex to get the same interoperability as in C++ when passing an object of one type to a function requir- ing an object of the other type. Change-Id: Iaa7089ea576c901f12715ffa21e4d94603d53755 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-121205-7770/+7746
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Remove unnecessary calls to initializeOpenGLFunctionsLaszlo Agocs2015-02-111-5/+2
| | | | | | | | We now have a change in QtGui that guarantees that the returned versionfunctions object is initialized as long as the context is current. Change-Id: I2e76e91bb4265a95fae657f6cacd92a789d56782 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Implement dnd support in QQuickWidget differentlyLaszlo Agocs2015-02-112-15/+43
| | | | | | | | This way subclasses can reimplement functions like dragEnterEvent(). Task-number: QTBUG-43821 Change-Id: I24bd14de8aab5ab741bc36330b4dcf7c83dedbf6 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Exposed TypedArray private APIs for Canvas3D use.Pasi Keranen2015-02-114-6/+20
| | | | | | | | | | Exported QV4::TypedArray, QV4::ArrayBuffer and QV4::Heap::ArrayBuffer in to the private API set. Changed ArrayBuffer length in the constructor to size_t instead of int. Added accessor methods to TypedArray array type and byte length. Change-Id: I3f89b8e263012bc90cc665aed5744cbc66379204 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Respect the text's background-color when it is set in the style in HTMLAndy Shaw2015-02-051-0/+7
| | | | | | Task-number: QTBUG-36837 Change-Id: Iea85f4bc7c66124178a318f0ebd776726cf72c96 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QQuickItemParticle: Only delete owned particlesAlan Alpert2015-02-042-11/+54
| | | | | | | | | | | | | | | | | A common pattern for ItemParticle (as shown in the particleview.qml example) is to use it to manage movement of a model's delegates. In such a case item management is handled by the user code (which bridges the needs of the Model and the View) and deleting the items in ItemParticle quickly leads to crashes. This change maintains (and improves, due to handling resets) the deletion of delegates created by the ItemParticles, as shown in delegates.qml. This example was expanded with a click to reset feature so as to more clearly see the impact of resets. Task-number: QTBUG-37486 Change-Id: I9de935034c11a7dd2abdd60e7b3bd42867dede9c Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Initial shot at native Qml-and-C++ debugginghjk2015-02-041-0/+234
| | | | | | | | | | | | | | This supports a Qt Creator debugging mode that allows to extract combined C++/JS stacktraces and JS variable values by examinining only the stack of the "native" debugger backend. Currently, only simple breakpoints and stepping with GDB is supported, and the setup requires a debug build of Qt(Declarative). Change-Id: I9d73041ee541fa45ed4a977f4deef8ebb0493ff9 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Use correct QOpenGLFunctions objectBerthold Krevert2015-02-041-3/+15
| | | | | | | | | | | | | If core profile is used, QOpenGLContext::versionFunctions returns 0 if a legacy or a non-core profile version is requested. That means, when using core profile we have to request a QOpenGLFunctions_3_2_Core object (which is the lowest OpenGL version that comes with profiles). Otherwise the application would run into a segfault. Change-Id: I8119e5fbeafccf14d59680617172c71e60e188ce Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Move VAO binding to Renderer::render()Berthold Krevert2015-02-042-12/+3
| | | | | | | | | | | | | Amongst other things, QSGRenderer::preprocess() triggers the rendering of QQuickShaderEffectSource items into framebuffer objects. The renderers responsible for these QQuickShaderEffectSource items bind and unbind their own VAOs, which messes up the VAO state set in QSGRenderer::preprocess(). Scenegraph nodes must not depend on the vao state set by the renderer anyway as the binding has to be considered as an implementation detail. Change-Id: Idec34c65397394e12e7f8419a1c9633d5f70a22e Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* QQmlEngineDebugService: Avoid assert when debugging QModelIndexGabriel de Dietrich2015-02-041-1/+15
| | | | | | | | | | | | | | QModelIndex is not streamable, so returning the input QVariant in valueContents() will result in an assert. We try to detect whether the input QVariant is a know value type and then call the toString() meta-method on it. Otherwise, we fall back to thge old behavior. This works since QModelIndex is exposed to QML wrapped in an internal value type class (at least for the time being). Change-Id: I1a4c61b2bd441f823469dd73b31e86a1192f02e6 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Handle context lost in the Windows render loopLaszlo Agocs2015-02-031-2/+11
| | | | | | | | | | | | | With ANGLE (which always uses this loop) EGL_CONTEXT_LOST may happen quite often, depending on various factors. It is therefore good to handle this by tearing down and reinitializing the scenegraph. Task-number: QTBUG-43263 Change-Id: I8e985e001f46865ccd814255f39add58fe2a737a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Introduce QSG_TRANSIENT_IMAGES.Gunnar Sletta2015-02-033-9/+11
| | | | | | | | | | | | | | This feature enables the same feature that we already have in the 'nonpreservedtexture' in the scene graph playground. This change also cleans up some leftover logic from the early Qt 5.2 days when we had to manually extract the image from the default texture factory rather than going through QQuickWindow::createTexture(). This cleanup is required for the logic to work. Change-Id: I7cdf15d981ba8af94f8d51781fc01e2b834b77c6 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Release atlas texture's image instance once uploadedGunnar Sletta2015-02-032-14/+62
| | | | | | | | | | | Sitting on the instance makes it impossible for custom texture factories to release images to keep down memory. Also, ditch the extra QRect used to store the nonpadded atlas rect as this is easily reachable from the padded one. Change-Id: I4914753cc43a6f3173cfc9b210e02b2770ef33fd Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Keep PersistentValueStorage page size in sync with system page sizeTor Arne Vestbø2015-02-021-14/+12
| | | | | | | | | | | | | WTF::PageAllocation::allocate() requires the allocated size to be a multiple of the system page size (available through WTF::pageSize()), so we can't hard-code the page size in PersistentValueStorage to 4K. As we control the memory of the page we can use 'Value values[1]' as a trick to let the compiler set up a head-reference for our list of Values, which we access by values[0:kEntriesPerPage - 1]. Change-Id: I71fdfffa0424d510fc1073bb67b6675a04ac2d80 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* MouseArea: add scrollGestureEnabled propertyShawn Rutledge2015-01-284-3/+39
| | | | | | | | | | | | | | | | | If true, scroll gestures coming from the operating system can cause wheel to be emitted; if false, only an actual mouse wheel will do that. The photosurface example demostrates the use case. 1) the flick gesture on a trackpad should flick the underlying Flickable, not zoom an individual image 2) mouse wheel should zoom an individual image if the cursor is pointing to it 3) dragging an image on a touchscreen should be possible, independently of flicking the Flickable. This means multiPointTouchEnabled should be true, so we cannot interpret multiPointTouchEnabled to mean that multipoint touch scroll gestures should be disabled. Change-Id: Ie063556866f07b3fbadc53990b110edeed532710 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Properly mark all arguments in the call contextLars Knoll2015-01-261-5/+3
| | | | | | | | | This broke in change d24b7fb904771ba078ac52e05984b23327ddff3b, where argc changed to contain the number of arguments passed into the function, not the number of arguments it really has. Change-Id: I2d25f159a9f60922b863c238147564f542d62ba0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Avoid crashes when resetting the same material or geometry.Gunnar Sletta2015-01-261-3/+3
| | | | | | | | | We still need to call markDirty() though, to avoid changing behavior. Change-Id: I9df00e8d1cbe95bfae96b9ba9162bd6f226b5bdc Reviewed-by: Florian Hänel <florian.haenel@basyskom.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* PinchArea: handle native gestures when availableShawn Rutledge2015-01-255-55/+167
| | | | | | | | | | | | | | | | | | | | | | | | PinchArea is the first Item where we handle a QNativeGestureEvent, so QQuickWindowPrivate::deliverGestureEvent is added to deliver these events in the same way as the other deliverXEvent methods. For now there is not a separate virtual event handler in QQuickItem, because QNativeGestureEvent is not universally available, so it's necessary to handle this event type in QQuickPinchArea::event(). updatePinchTarget() contains code factored out from updatePinch() to do the necessary tranformations on the Item which was set as pinch.target in QML. So far the QNativeGestureEvents are generated only on OSX, so the behavior of the PinchArea on other platforms is unmodified. On OSX the intention is that we do not need to enable multiple-touch events in order to use any of the common 2-finger gestures, and the "feel" will be similar to that of gestures in native applications. [ChangeLog][QtQuick][PinchArea] Pinch gestures are recognized by the operating system on OSX Change-Id: I693526ea120a9144beb7666afeab6256caa73e51 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Let ApplicationWindow inherit QQuickWindowQmlImplJ-P Nurmi2015-01-242-107/+140
| | | | | | | | | Inheriting QQuickWindow would mean that ApplicationWindow would have to duplicate all that visibility and root item marker related code. Change-Id: I3b58631011a88d6a079c091db08215f2eef6df84 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Properly mark all members in QObjectMethodLars Knoll2015-01-231-0/+2
| | | | | | | | | | | markObjects wasn't calling the parent implementation, so the members in Object and FunctionObject didn't get marked properly and thus collected early by the garbage collector. Change-Id: Iee036de909b68002db6d363263e739dcf857f024 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move Stmt::d to Phi::dRobin Burchell2015-01-233-20/+34
| | | | | | | Phi is the only thing using it. Change-Id: I2b6706884d9e41cc26632a6ad72281b391960f4f Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* V4: change regalloc hints to be a QVarLengthArray.Erik Verbruggen2015-01-231-7/+13
| | | | | | Change-Id: I0541431dee0ce4575df56d952a3a9a2ab9fca01d Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Typeloader cleanupSimon Hausmann2015-01-233-31/+26
| | | | | | | | | | | | | | | | | | The QQmlDataBlob base class had a typeloader member that was provided with startLoading() later, just to allow calling the url interceptor. The one sub-class of QQmlDataBlob - QQmlTypeLoader::Blob - also had a typeloader pointer, provided at constructor time. This patch cleans this up by removing the duplicated typeloader pointer in the sub-class and passing it straight through to the base-class at construction type. This also allows moving the url interception to the constructor. Also fixed the findCachedCompilationUnit calls to use the url after applying the intercept and removed one unnecessary findCachedCompilationUnit call - the QFile::exists call is sufficient. Change-Id: If5c49d38a6ec66fea6cd7c21013c046cf75acafd Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: Update QtQuick import version to 2.5Caroline Chao2015-01-231-3/+3
| | | | | Change-Id: I1c2f4c8b2e052d541b4045bd5a739e5cb9e96429 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Better align data members in ExecutionContextLars Knoll2015-01-232-7/+5
| | | | | | | Saves another 4-8 bytes per object. Change-Id: Iaeb013abd20733cd7a5d9a5e0d42b92da8153da9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove the realArgumentsCount member in CallContextLars Knoll2015-01-234-17/+10
| | | | | | | | | | | The data is easily available through the CallData, only used by the Arguments object and we save a pointer in Heap::CallData this way. For this to work, let CallData::argc always return the real number of arguments passed into the function. Change-Id: I59c7c41e8c1af160db09fa794977ab7084c9e12d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Store a double in NumberObjectLars Knoll2015-01-236-17/+16
| | | | | | | Makes more sense than storing a Value in there. Change-Id: I2e6ca71477100c1e1639bb89cced4f4049b5e5c2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* CleanupsLars Knoll2015-01-2341-1054/+1064
| | | | | | | | Simplify some code in BooleanObject Simplify access to call arguments and thisObject Change-Id: I2f8e844019bc587385608beb02f05b15f827535c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* CleanupsLars Knoll2015-01-2325-106/+71
| | | | | | | | Remove duplicated methods. Remove some mostly unused methods, and simplify some others. Change-Id: I605b249e54417bb32c3dfc8e22f2c8b6b684a1e1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move the definition of Object vtables into qv4object_p.hLars Knoll2015-01-232-59/+60
| | | | | Change-Id: I8dc15999e268d2d78691bf030b36cd09de1c4057 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove all remaining usages of ValueRefLars Knoll2015-01-2323-126/+45
| | | | | Change-Id: Icd76d3d03fac2e57530e55f8ec15b97109dcdcbc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of most uses of ValueRefLars Knoll2015-01-2383-1036/+1025
| | | | | | | | | | | | Instead pass a const Value & into the functions With our new inheritance structure, we can get rid of ValueRef and instead simply pass a pointer to a Value again. Pointers to Values are safe to use again now, as they are now guaranteed to be in a place where the GC knows about them. Change-Id: I44c606fde764db3993b8128fd6fb781d3a298e53 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Introduce ShortcutJ-P Nurmi2015-01-234-2/+399
| | | | | | | | | | [ChangeLog][QtQuick] Added a Shortcut utility type for catching keyboard shortcuts Change-Id: I4af631bfa7987f0d809b1f5af499f1d9688a1e04 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* QML: Fix MSVC 2013/64bit warnings.Friedemann Kleint2015-01-225-23/+29
| | | | | | | | | | | | | | | | | | | | | | | | | compiler\qv4ssa.cpp(687) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data compiler\qv4ssa.cpp(950) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data compiler\qv4ssa.cpp(1117) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data compiler\qv4ssa.cpp(1120) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data compiler\qv4ssa.cpp(1148) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data compiler\qv4ssa.cpp(1266) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data compiler\qv4ssa.cpp(1622) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data compiler\qv4ssa.cpp(2246) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data compiler\qv4ssa.cpp(4289) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data compiler\qv4ssa.cpp(4351) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data jit\qv4regalloc.cpp(1383) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data jit\qv4regalloc.cpp(1769) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data jit\qv4regalloc.cpp(1814) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data jsruntime\qv4mm.cpp(496) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data jsruntime\qv4mm.cpp(503) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data jsruntime\qv4mm.cpp(506) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data jsruntime\qv4regexp.cpp(60) : warning C4267: 'return' : conversion from 'size_t' to 'uint', possible loss of data jsruntime\qv4typedarray.cpp(85) : warning C4309: '=' : truncation of constant value Change-Id: I0b04e1a9d379c068fb3efe90a9db8b592061e448 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* QQuickText: respect new line width set by lineLaidOut() handler.Dmitry Volosnykh2015-01-211-6/+6
| | | | | | | | This commit makes text elide properly when custom layout is implemented. Task-number: QTBUG-44025 Change-Id: Iefe344079c002d3a79aea18096a71667f6c17add Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Rework QJSValue internalsLars Knoll2015-01-2111-274/+354
| | | | | | | | | | | | | Use a flagged pointer to either store a pointer to a QV4::Value (from the persistent storage) or a pointer to a QVariant in QJSValue::d. Like this we don't need to malloc to create a QJSValue for most use cases. Significantly reduces the memory consumption of QJSValue and speeds it up a lot. Change-Id: I10902cc4b6cc3f43d3f816875dc6c4bbb6b4490f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add C++11 move operators, and a simpler internal constructorLars Knoll2015-01-217-24/+37
| | | | | | | | | Move semantics should optimize some copy operations on QJSValues, and the internal constructor will simplify refactoring the QJSValue class to get rid of the extra allocated private. Change-Id: I24863b30523af2432aa81ad6b87fda7fe35749c4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move the internalClass pointer into Heap::ObjectLars Knoll2015-01-2116-51/+25
| | | | | | | | The other classes that derive from Heap::Base don't need it at all. So get rid of it there and save a pointer. Change-Id: I9c5df2e43cd6eeac2e6e41f3d3b8077d3afbc8f2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>