platform/upstream/qtdeclarative.git
9 years agouse the new form of QTranslator::load() for more flexibility
Shawn Rutledge [Thu, 4 Sep 2014 12:29:21 +0000 (14:29 +0200)]
use the new form of QTranslator::load() for more flexibility

As the docs explain, the variant of QTranslator::load() taking a
const QLocale& is better because it "uses QLocale::uiLanguages()
and not simply the locale name, which refers to the formatting of
dates and numbers and not necessarily the UI language."  And, using
a default-constructed QLocale permits QLocale::setDefault() to
override the system locale, so for example an application's
main.cpp can do that before constructing a QQmlApplicationEngine.

Task-number: QTBUG-7329
Change-Id: Ia29a4c894087c92b071c0fe484728866f2660fe6
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
9 years agodocumentation for qmldir "depends" declaration
Shawn Rutledge [Tue, 30 Sep 2014 07:00:21 +0000 (09:00 +0200)]
documentation for qmldir "depends" declaration

[ChangeLog][QtQml][qmldir] added the ability to declare dependencies
on other modules in a module definition qmldir file

Task-number: QTBUG-41489
Change-Id: Icd526bc7617bc3e4f725c7d008d0522a201cf645
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoqmlimportscanner: parse "depends" lines in qmldir files
Shawn Rutledge [Thu, 25 Sep 2014 16:28:27 +0000 (18:28 +0200)]
qmlimportscanner: parse "depends" lines in qmldir files

These lines specify additional hidden dependencies.  The first use case
is in QtQuick.Dialogs: DefaultFileDialog.qml uses FolderListModel, but
this file is not listed in the qmldir because the decision whether to
use it is made at runtime.  So QtQuick.Dialogs qmldir contains this:
depends Qt.labs.folderlistmodel 1.0

Task-number: QTBUG-41489
Change-Id: Ide4bca2ce2e342b95e9a87cc418d26f331372d12
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
9 years agoqmldir parser: add support for "depends component version" syntax
Shawn Rutledge [Wed, 24 Sep 2014 15:36:53 +0000 (17:36 +0200)]
qmldir parser: add support for "depends component version" syntax

Dependency declarations are initially for the benefit of
qmlimportscanner which does not (yet) use this parser.  This patch
adds support for dependencies into the qmldir parser for completeness,
along with autotests.  It is necessary to prevent errors at runtime
when parsing a qmldir which contains the "depends" declaration.

Task-number: QTBUG-41489
Change-Id: Ief2524a30140c42874f94f1735755b171e15dcf7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
9 years agoPartially revert d9c531781e6c95f80681b3c82700833e1de88794
Gunnar Sletta [Wed, 1 Oct 2014 09:12:18 +0000 (11:12 +0200)]
Partially revert d9c531781e6c95f80681b3c82700833e1de88794

This logic changed then timing for when the layer's m_dirtyTexture
was set and unset, which had some side effects. Revert to the old
and known-to-work behavior of using a connection.

Change-Id: I4048e7ae70491afe36b2d766e6c506d9febc44ed
Task-number: QTBUG-41451
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoMake Canvas use texture atlas for smallish Image based canvases.
Gunnar Sletta [Fri, 26 Sep 2014 17:43:52 +0000 (19:43 +0200)]
Make Canvas use texture atlas for smallish Image based canvases.

This makes Canvas with Image batchable in the renderer which
means that it is feasible to have 100s of small Canvases in a
scene, for instance as static icons rendered with a bit of
script.

Change-Id: I3ad57360d632b7093fd6993afa88ed35c21d178a
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
9 years agoDocument that QQmlApplicationEngine's root item must be a window.
Mitch Curtis [Tue, 30 Sep 2014 08:40:40 +0000 (10:40 +0200)]
Document that QQmlApplicationEngine's root item must be a window.

Change-Id: I22466e82105c9b56894a53400394d1124191f93d
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
9 years agoFix compiler warning
Lars Knoll [Tue, 2 Sep 2014 12:48:03 +0000 (14:48 +0200)]
Fix compiler warning

Add a matching operator delete to our operator new to shut
up MSVC.

Task-number: QTBUG-40652
Change-Id: I1396094d23c4d0cfc88a73fabbab05f1d4ec7b44
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoUpdate the Calqltr demo visuals and engine logic
Topi Reinio [Wed, 24 Sep 2014 12:37:46 +0000 (14:37 +0200)]
Update the Calqltr demo visuals and engine logic

    - Add logic for displaying the calculation result in the best
      available precision, determined by the display width
    - Display 'ERROR' when the result cannot be displayed
    - Animate the number pad button colors to react to presses and
      visually disable them when pressing the button has no effect
    - Fix issues in calculator.js logic
    - Update documentation accordingly

Task-number: QTBUG-41253
Change-Id: Ibed7b8218ea4cd074b8f9b90d9bb4e3ea6b25ba2
Reviewed-by: Johanna Äijälä <johanna.aijala@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
9 years agoDoc: Combine the extending QML tutorial chapters into a single example
Topi Reinio [Fri, 26 Sep 2014 13:00:14 +0000 (15:00 +0200)]
Doc: Combine the extending QML tutorial chapters into a single example

Combine the six examples associated with each tutorial chapter
into a single, top-level example project 'extending-qml', with
subprojects for each of the tutorial chapters.

Clean up the docs, add links, and a note about a warning that
the user may see when running the code in the first chapter.

Task-number: QTBUG-32947
Change-Id: Idba4e2153817ab29f1afaf1947d1f2e25964e7b3
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
9 years agoFix build when using -Werror
Sérgio Martins [Thu, 25 Sep 2014 20:02:04 +0000 (21:02 +0100)]
Fix build when using -Werror

"'borderBottom' may be used uninitialized in this function [-Werror=maybe-uninitialized]"

Observed when compiling for android.

Change-Id: Ifcb26e28440f08528a192ea2fe88d6343e33710b
Reviewed-by: BogDan Vatra <bogdan@kde.org>
9 years agoAdd orientationUpdateMask to QQuickScreen
Alex Blasche [Wed, 24 Sep 2014 10:08:10 +0000 (12:08 +0200)]
Add orientationUpdateMask to QQuickScreen

Task-number: QTBUG-38699
Change-Id: I173b7e53c27dba336351572859f7c9aeafe07ef9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
9 years agoRevert "Temporarily mark grab()/item.layer tests insignificant under ANGLE"
Andrew Knight [Wed, 24 Sep 2014 07:29:39 +0000 (10:29 +0300)]
Revert "Temporarily mark grab()/item.layer tests insignificant under ANGLE"

This reverts commit 6b31418a1b5d9be47df5ed61747e8a5fb225acfa.

These tests now pass with the latest ANGLE.

Change-Id: If812d430e69f0d39a970e9119ebc1f2e5b4886dc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
9 years agoPartially revert "Disable tests on failing ANGLE config"
Andrew Knight [Wed, 24 Sep 2014 09:09:50 +0000 (12:09 +0300)]
Partially revert "Disable tests on failing ANGLE config"

This partially reverts commit fa29df24bd2792f5eb64e4ff21a116b2c5f5384c.

The sprite sequence test now passes in CI under MSVC2010.

Change-Id: Ie8f7abdd2ff00db377b1ef3f221c5048c430c067
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
9 years agoFix example in scope documentation
Simon Hausmann [Mon, 29 Sep 2014 11:21:09 +0000 (13:21 +0200)]
Fix example in scope documentation

The example tried to demonstrate the use of direct access to properties of the
root component object, but unfortunately it also defined an id property that
clashed with it. Therefore the provided example did not work as intended and
produced a "stringified" object reference instead of the text of the "title"
property.

This patch changes the id to avoid a clash.

Change-Id: Ib9abcf48482773a0dcdf5e2375d1445d87ccf4ef
Reviewed-by: Michael Brasser <michael.brasser@live.com>
9 years agoAlso search for visual children in TestCase::findChild().
Mitch Curtis [Tue, 23 Sep 2014 08:36:22 +0000 (10:36 +0200)]
Also search for visual children in TestCase::findChild().

It previously used QObject::findChild(), which won't work in all cases,
because items like ListView don't seem to make their delegate items
QObject children, while simple nested Items do.

Change-Id: I1a8ed1fb55493212cb25abf595d016437812a80f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoGive Item::layer documentation some much needed love.
Gunnar Sletta [Sun, 28 Sep 2014 10:26:55 +0000 (12:26 +0200)]
Give Item::layer documentation some much needed love.

Change-Id: I31e038d961d3aa09a36db0c091c4e4910e395c2e
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
9 years agoqmlimportscanner: allow a qmlFile to come from stdin
Fawzi Mohamed [Thu, 18 Sep 2014 20:40:09 +0000 (22:40 +0200)]
qmlimportscanner: allow a qmlFile to come from stdin

Change-Id: I22b0e45a8aa25d232791cdbeca15b5bc7400ae7d
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
9 years agoDoc: Replace VisualDataModel with DelegateModel
Nico Vertriest [Mon, 15 Sep 2014 11:36:12 +0000 (13:36 +0200)]
Doc: Replace VisualDataModel with DelegateModel

Task-number: QTBUG-37725
Change-Id: Iad3b31470af8ea965d19b3d0901822b901407d40
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoUpdated calqlatr demo
Johanna Aijala [Tue, 16 Sep 2014 12:14:16 +0000 (15:14 +0300)]
Updated calqlatr demo

Fixes and finetuning of calqlatr demo:
- fixed text overlapping, changed max length of a number from 14 to 9
- fixed app "freeze" after entering number of maximum length
- implemented +/- operator functionality
- fixed listview scrolling, after multiple operations listview was
scrolling only when entering '=' leaving the active line hidden when
the numbers and operator were typed
- added support for entering numbers and certain operators from keyboard
- removed commented code

Task-number: QTBUG-38818
Change-Id: Ic0ecd2dff68a89007421e95a5bdc3ab7ca2e401d
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoDoc: Add docs for Clocks example
Leena Miettinen [Fri, 19 Sep 2014 13:00:11 +0000 (15:00 +0200)]
Doc: Add docs for Clocks example

Change-Id: I626376ae2a169f7d892e86309754633e9ed6a6e9
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoReset 'invalidatePending' after the FBO has been recreated.
Gunnar Sletta [Thu, 25 Sep 2014 07:02:13 +0000 (09:02 +0200)]
Reset 'invalidatePending' after the FBO has been recreated.

If not, we will always request a new FBO during updatePaintNode,
even when the fbo is not following the items size.

Task-number: QTBUG-41565
Change-Id: I20b4b3a8e3630ff963a876320808869bba62fb8a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
9 years agoQDSM: Nested statemachines are supported
Sebastian Sauer [Wed, 17 Sep 2014 17:10:40 +0000 (00:10 +0700)]
QDSM: Nested statemachines are supported

* Remove wrongly printed info that nested
  statemachines are not supported.
* Added autotest for nested statemachines.
* Re-enable commented out testcase in the
  nestedInitalStates autotest. The reason
  why the test was disabled was fixed a
  while ago.

Change-Id: I921483fa49d751d14c877f8f63335fa88cf2ce7b
Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agomove QQuickWindowAttached to QQuickWindowQmlImpl
Shawn Rutledge [Wed, 10 Sep 2014 13:27:58 +0000 (15:27 +0200)]
move QQuickWindowAttached to QQuickWindowQmlImpl

It causes problems to do qmlRegisterType on QQuickWindow if the
attached property also refers to QQuickWindow.

Task-number: QTBUG-40816
Task-number: QTBUG-41047
Change-Id: I7a6f75af52f65e2be022b97128702982bec7cbe8
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
9 years agoFix cleanup of non-threaded render loops.
Gunnar Sletta [Fri, 19 Sep 2014 07:52:25 +0000 (09:52 +0200)]
Fix cleanup of non-threaded render loops.

They would unconditionally call cleanupNodesOnShutdown on hide(), but
QQuickWindow::sceneGraphInvalidated would only be emitted if this was
the last window being hidden, leading to an inconsistent state in the
application.

Since the non-threaded render loops do not support releasing resources
(there is one OpenGL context and one QSGRenderContext shared between
all windows) we delay cleanup until the window is destroyed.

This change also make the render loops track the windows until they
are destroyed, similar to what the threaded one does. The purpose of
this is to, in the case of dangling windows, only trigger invalidation
of the scene graph when the last QQuickWindow is destroyed through
QSGRenderLoop::cleanup().

Task-number: QTBUG-41210
Change-Id: I7e12a4f726ebb3e7935c822b6046abb3590c583a
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
9 years agoCleanup: Simplify CompiledData::Unit structure to always include the string table...
Simon Hausmann [Wed, 24 Sep 2014 10:27:21 +0000 (12:27 +0200)]
Cleanup: Simplify CompiledData::Unit structure to always include the string table at the end

Change-Id: Iae86b8f4dc0dc67c14974472f627e28d6795369f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoAllow multiple cached qml unit registration functions
Simon Hausmann [Mon, 22 Sep 2014 12:09:41 +0000 (14:09 +0200)]
Allow multiple cached qml unit registration functions

Only few will be necessary, but this allows for greater flexibility
at run-time.

Change-Id: Ia03abeb6296a5dee97544209c578dc2974af7cbc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoFix disappearing slider during size/orientation change
Alex Blasche [Fri, 19 Sep 2014 09:46:44 +0000 (11:46 +0200)]
Fix disappearing slider during size/orientation change

Now the slider remains at a position that is equivalent to the old
position based on the previous percentage.

This change is most commonly triggered during orientation changes on
mobile device. That is the reason why the app was converted to a
proper Qt project. This way it was possible to test this behavior
on Android.

Task-number: QTBUG-18423
Change-Id: If05e6a1e42249f90a821c4882021d28cf212fc52
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoDoc: apply title case to all section1 titles
Nico Vertriest [Fri, 12 Sep 2014 09:01:33 +0000 (11:01 +0200)]
Doc: apply title case to all section1 titles

Task-number: QTBUG-41250
Change-Id: I303d989992c9685f73baae50c64accf71b43549f
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoUpdated the example to accept input on Android
Venu [Mon, 15 Sep 2014 15:02:43 +0000 (17:02 +0200)]
Updated the example to accept input on Android

The Android inputMethod doesn't commit the text
until a word is chosen from the suggestions list.
This makes the URL for XMLHTTPRequest invalid. To avoid
the invalid URL, we should either not use predictive text
or explicitly commit the text. I choose to go with the earlier
option.

Task-number: QTBUT-41335
Change-Id: Id03c4dc8cfbd1b32cc2868fe8b78cd039994ff71
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoRecreate the fbo on screen change in QQuickWidget when needed
Laszlo Agocs [Thu, 11 Sep 2014 11:04:49 +0000 (13:04 +0200)]
Recreate the fbo on screen change in QQuickWidget when needed

Move the rendering code out into a separate function since it is
now called from three places.

Like in QOpenGLWidget, the FBO may need to be recreated with a
different size in case the window is moved onto a screen with
a different device pixel ratio.

Change-Id: Iaaa42a06dab9e02710b0a7dafb0ea8c018b69ec2
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoAdd missing import to documentation code snippet
Sérgio Martins [Fri, 19 Sep 2014 13:31:19 +0000 (14:31 +0100)]
Add missing import to documentation code snippet

Change-Id: I358b306fb286ffb00d2edd51bc3d97f1884fe34e
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
9 years agoFix clip state tracking in Context2D
Matt Fischer [Wed, 10 Sep 2014 18:34:51 +0000 (13:34 -0500)]
Fix clip state tracking in Context2D

A recent change (f45fe58ad2aa741c90b756643da75f1a6bc2fdf6)
introduced the concept of clipping being disabled for a context,
so that it can start with no clip path set.  However, this state
is not properly tracked, so an attempt to restore a context state
which has no clip path does not work properly.  This change adds
this information to the Clip command, so that it can be properly
restored.

This patch also re-enables a test case which was supposed to
check this behavior, but had been disabled.

Task-number: QTBUG-40312
Change-Id: I3fd5626ecfcc1298a81931828cbb590290098a92
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoDon't do qgetenv on library load
Thiago Macieira [Tue, 16 Sep 2014 22:20:53 +0000 (15:20 -0700)]
Don't do qgetenv on library load

Bad for two reasons: first, it increases the load time of the
application and second, it makes it impossible to to setenv/putenv from
main(). The latter is useful if you need to work on an embedded device
that doesn't allow setting environment variables.

Change-Id: Id543f77336d7ac2e4ea820b51f55ce5a40a33b4e
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoWindow example: setOrientationUpdateMask to allow all orientations
Shawn Rutledge [Mon, 22 Sep 2014 14:04:19 +0000 (16:04 +0200)]
Window example: setOrientationUpdateMask to allow all orientations

The purpose of showing both orientation and primaryOrientation is to
see how they both change when the screen is rotated.

Change-Id: I54e51c834c568b1dbd895584b9f80e4b00c8d506
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
9 years agoFix deadlock with QQuickView embedded via QWidget::createWindowContainer
Dyami Caliri [Sun, 21 Sep 2014 19:30:24 +0000 (12:30 -0700)]
Fix deadlock with QQuickView embedded via QWidget::createWindowContainer

A QQuickView embedded in a widget application will be deleted in the
QApplication destructor. At that point, events are not being posted,
so the QQmlThread cannot properly shut down, and will deadlock waiting
for an event.

Task-number: QTBUG-36115
Change-Id: I4595f03e0afcf9463cfbc2ba95146d4777d19c56
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoStocQt example: Display trading volume scale for stock charts
Topi Reinio [Tue, 16 Sep 2014 10:51:24 +0000 (12:51 +0200)]
StocQt example: Display trading volume scale for stock charts

Similar to how the example already shows scale of the stock price
on the right-hand side margin, this change adds a scale for the
trading volume.

Large volume values are shortened to a more readable format, using
symbols for units of thousand/million/billion etc.

Task-number: QTBUG-38254
Change-Id: I068bba1622d2a586a5dd14dddd4b832c8b112d2d
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Diana de Sousa <diana.desousa@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
9 years agoUpdate used colors on basis of the recommended color palette.
Tarja Sundqvist [Wed, 17 Sep 2014 12:14:14 +0000 (15:14 +0300)]
Update used colors on basis of the recommended color palette.

qtdeclarative/examples/quick/animation uses some colors which are not
mentioned on the recommended color palette. They are replaced with
recommended colors.

Task-number: QTBUG-41368
Change-Id: I6f07340735333c5da319fdc59ecf8aa7388ad2a5
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoCleanup remaining QtQuick.Dialogs leftovers
J-P Nurmi [Wed, 17 Sep 2014 12:57:02 +0000 (14:57 +0200)]
Cleanup remaining QtQuick.Dialogs leftovers

QtQuick.Dialogs was moved to the qtquickcontrols module in Qt 5.3

Change-Id: I16d03dc1c342d396963c5bec3125b3d11d0d9bed
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoqmlplugindump: Use _CrtSetReportMode() for MSVC only.
Friedemann Kleint [Fri, 19 Sep 2014 09:59:42 +0000 (11:59 +0200)]
qmlplugindump: Use _CrtSetReportMode() for MSVC only.

Fix warnings when using MinGW:

main.cpp: In function 'int main(int, char**)':
main.cpp:734:55: warning: statement has no effect [-Wunused-value]
     _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
                                                       ^
main.cpp:735:53: warning: statement has no effect [-Wunused-value]
     _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG);
                                                     ^
main.cpp:736:54: warning: statement has no effect [-Wunused-value]
     _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG);

where _CrtSetReportMode() is an empty macro.

Change-Id: I644bc207b5a3df62d6390811f53b2c0948979d58
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
9 years agoMake tst_qquickanimations more reliable
Ulf Hermann [Wed, 17 Sep 2014 12:56:54 +0000 (14:56 +0200)]
Make tst_qquickanimations more reliable

As we usually don't get realtime guarantees we cannot rely on exact
sleep times. This change relaxes our expactations in that regard.

Task-number: QTBUG-29062
Change-Id: I54dfb7a28d6bb46479aedb9f943f5ff4db2df701
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
9 years agoDoc: add documentation for Photo Viewer example
Leena Miettinen [Thu, 11 Sep 2014 15:15:37 +0000 (17:15 +0200)]
Doc: add documentation for Photo Viewer example

Change-Id: Iffedd9361bd0475a53c1a8b9567c9cbf5e5d4867
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoFix compiler warnings in qv8engine.cpp.
Friedemann Kleint [Fri, 19 Sep 2014 07:23:22 +0000 (09:23 +0200)]
Fix compiler warnings in qv8engine.cpp.

qml\v8\qv8engine.cpp(91) : warning C4805: '|' : unsafe mix of type 'bool' and type 'int' in operation

Task-number: QTBUG-40431
Change-Id: Ibdc96907aaab132956c87dd6aec2eab2f3bf0e9f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove qtdemo from gitignore
Rainer Keller [Wed, 17 Sep 2014 08:51:05 +0000 (10:51 +0200)]
Remove qtdemo from gitignore

QtDemo was removed with a commit in qtdoc.

Change-Id: I75228b748a2307a713f0c86ecf144dae3b3569a3
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
9 years agoRevert mapping of var signal parameters to QJSValue
Simon Hausmann [Thu, 18 Sep 2014 15:03:44 +0000 (17:03 +0200)]
Revert mapping of var signal parameters to QJSValue

This reverts commit 70004585f89f325f398c556d101bfa1833d87b53, which is
superseded by commit 3dbe05f6bf3fd51ce8097c35f6c7f12b39acb0f6, which is
a much better solution.

[ChangeLog][QtQml][Important Behavior Changes] Qt 5.3 changed the mapping
of "var" parameters in QML declared signals to QJSValue. This was reverted
to the behavior of earlier Qt versions to use QVariant. The original issue
of not being able to pass function objects through var parameters of QML
declared signals is solved by wrapping a QJSValue inside the QVariant.

Task-number: QTBUG-39971
Change-Id: I44de2ef2660c64c68e6a3b2a1ae251ad563d6b3c
Reviewed-by: Taylor Braun-Jones <taylor@braun-jones.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoReplace vsnprintf with qvsnprintf.
Bjoern Breitmeyer [Thu, 4 Sep 2014 09:26:04 +0000 (11:26 +0200)]
Replace vsnprintf with qvsnprintf.

Windows CE does not have vsnprintf, so
use qvsnprintf instead.

Change-Id: I30ddbf2469424ec174903f0cce2b482c652b5d22
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFixed frame focusing on touch devices
Tomi Korpipää [Thu, 18 Sep 2014 04:41:11 +0000 (07:41 +0300)]
Fixed frame focusing on touch devices

Also fixed the \quotefromfile commands in the doc to
display the changed code correctly.

Task-number: QTBUG-38779
Change-Id: I37d37139459cb9cdee7ec9beaffeab26a1cb4aaf
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoRemove tst_dialogs - moved to qtquickcontrols
J-P Nurmi [Wed, 17 Sep 2014 11:41:33 +0000 (13:41 +0200)]
Remove tst_dialogs - moved to qtquickcontrols

QtQuick.Dialogs were moved from qtdeclarative to qtquickcontrols
already in Qt 5.3, but the auto test was forgotten.

Change-Id: I5c74e45b9ee2302f1d20fb476af6a93879913a28
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
9 years agoAvoid crashing the rendercontrol example on exit
Laszlo Agocs [Wed, 17 Sep 2014 14:18:00 +0000 (16:18 +0200)]
Avoid crashing the rendercontrol example on exit

Task-number: QTBUG-41278
Change-Id: I456467698e66fb28f1bf6a05d85771ac25f454d0
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoFinally: A default animation driver which doesn't use walltime.
Gunnar Sletta [Fri, 12 Sep 2014 09:21:36 +0000 (11:21 +0200)]
Finally: A default animation driver which doesn't use walltime.

I've wanted this for a long time, but the animation system didn't
support it when mixed with timers/pauses. However, because of
dfc8f8b5d4a02f33c7f9063c2a28450902a9d863 and
0db3ea4048fe572a256deb343ea5e64a55d98de9 to qtbase, it is now
possible.

Change-Id: Ic70c181ce49eae90276bd4f22a2d299061f96087
Reviewed-by: Michael Brasser <michael.brasser@live.com>
9 years agoFix QQuickText::lineLaidOutRelayout autotest on OS X
Jan Arve Saether [Tue, 16 Sep 2014 11:31:20 +0000 (13:31 +0200)]
Fix QQuickText::lineLaidOutRelayout autotest on OS X

QTextLine::height() can be different that QTextLine::rect().height()

Task-number: QTBUG-37829
Change-Id: I7fa93d50e29397237220ba111baa3bd1a56b88f2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
9 years agoSync QQuickWindow::update() up with polishAndSync().
Gunnar Sletta [Wed, 17 Sep 2014 08:08:09 +0000 (10:08 +0200)]
Sync QQuickWindow::update() up with polishAndSync().

When calling QQuickWindow::update() on the GUI thread, we would
immediately flag the render thread that a repaint was needed and then
schedule a polishAndSync. If the render thread completed the current
frame before the GUI thread got to polishAndSync, it would repaint
right away without syncing with GUI first.

Instead of sending the repaint right away, register the need for a
full repaint in the window and set it as part of the next sync phase.

Change-Id: Ia731fb46724cc79f5391422213b069de9362d002
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
9 years agoQQuickWindow::setColor() should use update() rather than dirtyItem()
Gunnar Sletta [Wed, 17 Sep 2014 08:06:31 +0000 (08:06 +0000)]
QQuickWindow::setColor() should use update() rather than dirtyItem()

dirtyItem() will trigger maybeUpdate in the renderloop which may
decide to skip the render pass if nothing changed in the scene
graph. Use update() instead which forces the rendering to go through
regardless.

Change-Id: I4730bb0cd79d58fa21970a847cc1720060cb14a8
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
9 years agoDon't assume a QSGRenderContext is valid just because it's not 0
Ulf Hermann [Tue, 16 Sep 2014 14:01:40 +0000 (16:01 +0200)]
Don't assume a QSGRenderContext is valid just because it's not 0

Task-number: QTBUG-41353
Change-Id: I2a8c500ed974b3e5f45f3a1eb1f66c7a24b17d56
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoProtect QQuickWindow::openglContext against not having a context.
Gunnar Sletta [Wed, 17 Sep 2014 08:49:20 +0000 (10:49 +0200)]
Protect QQuickWindow::openglContext against not having a context.

Change-Id: I3d5087d9c322ee5ee3325858ee717161fd7801a3
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
9 years agoAdd a note about winId() to QQuickWidget
Laszlo Agocs [Mon, 15 Sep 2014 12:36:23 +0000 (14:36 +0200)]
Add a note about winId() to QQuickWidget

This unfortunate function causes the creation of a
native window which is very wrong.

Task-number: QTBUG-40765
Change-Id: Ia08138cf35c240c883c63a66a54f949b86ccc2d2
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
9 years agoFix mapping of JS objects/arrays to C++
Simon Hausmann [Wed, 10 Sep 2014 15:13:10 +0000 (17:13 +0200)]
Fix mapping of JS objects/arrays to C++

[ChangeLog][QtQml][Important Behavior Changes] When a JavaScript object/array
is passed to C++ through a QVariant, the engine no longer immediately converts
the object recursively into a QVariantMap or QVariantList but instead stores
a QJSValue in the QVariant. This prevents a loss of data when the JS object
contains non-primitive types such as function objects for example. Code that
expects the variant type to be exactly QVariant::Map or QVariant::List may
need to be adapted. Registered conversion functions however ensure that code
that merely calls toMap() or toList() continues to work.

Task-number: QTBUG-40431
Change-Id: I1dbc1d5f8e78ad28bb62db3681b9a0b34557e7f5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoCleaned up the documentation for QQmlEngine::ObjectOwnership.
Kavindra Palaraja [Tue, 16 Sep 2014 18:36:19 +0000 (20:36 +0200)]
Cleaned up the documentation for QQmlEngine::ObjectOwnership.

The paragraphs needed a bit of polish.

Change-Id: I5c6b41fad34f3f58a372aa1bf8be627769871cf8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFixed documentation for QQmlEngine::ObjectOwnership.
Kavindra Palaraja [Tue, 16 Sep 2014 18:10:05 +0000 (20:10 +0200)]
Fixed documentation for QQmlEngine::ObjectOwnership.

The ObjectOwnership enum's documentation mentioned that QObjects
returned from property access are indestructible, which they aren't.

Task-number: QTBUG-35426
Change-Id: Ic936b33b736ff7a45482cf1b626977d34ac4ebb2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix crash when borders exceed item width/height in border image
Eskil Abrahamsen Blomfeldt [Tue, 16 Sep 2014 11:34:15 +0000 (13:34 +0200)]
Fix crash when borders exceed item width/height in border image

While we protected against the the borders exceeding the size of
the source image when deciding whether to create a given patch,
we did not protect against the case where the target rectangle
is smaller than the borders. To fix this, we simply move the
calculation of the target rectangle up to before we create the
nodes, and check for isEmpty() before creating the nodes.

In addition, we did not properly handle changing the borders
dynamically. The subtree has to be rebuilt if the borders change
so that the source or target rectangles change.

Change-Id: Ia6a0df616ebbd0a32924de0b63fd48043027930a
Task-number: QTBUG-41338
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoQQuickTextControl: update cursor rect when cursor changes position
Richard Moe Gustavsen [Tue, 16 Sep 2014 08:10:14 +0000 (10:10 +0200)]
QQuickTextControl: update cursor rect when cursor changes position

If the text cursor changes position by indirect manipulation of the
document that backs a QQuickTextControl, we need to inform that
the cursor rect changed as well.

This will fix a bug with QQuickTextEdit that caused the platform input
method to be out of sync since the cursor rect signal was never
emitted from the the text control.

Task-number: QTBUG-41042
Change-Id: Idcf35a2d51c8dffcb80ba21f8e59a61e04e5a879
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
9 years agoMake Canvas test case independent of chosen font.
Ulf Hermann [Tue, 16 Sep 2014 10:18:01 +0000 (12:18 +0200)]
Make Canvas test case independent of chosen font.

0/0 is not always a red pixel after rendering "Hello" in red. The
chosen font has an influence on that. Looking for some red pixel in row
0 is pretty safe.

Change-Id: I669548c3c9d8cd25d720998fd9ba31c1f480e4e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoDon't start QQmlThreads from their constructor
Ulf Hermann [Mon, 15 Sep 2014 14:57:35 +0000 (16:57 +0200)]
Don't start QQmlThreads from their constructor

In the case of derived classes (like the only user of QQmlThread) we
cannot guarantee that the class is completely constructed when the
thread starts. This includes the vtable which is necessary to decide
which virtual functions to call.

Change-Id: Ieaea67a72cc3b4f845b8621b34ca2928185917fb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoWait longer for image to be loaded in canvas item test
Ulf Hermann [Mon, 15 Sep 2014 16:59:50 +0000 (18:59 +0200)]
Wait longer for image to be loaded in canvas item test

200ms can be too short if the system is busy

Change-Id: I4f9c6bcbec93d511b5b5e9d531450f3ffd22cb0c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoLet QSGPlainTexture support shutting down without a GL context.
Gunnar Sletta [Fri, 12 Sep 2014 15:34:34 +0000 (17:34 +0200)]
Let QSGPlainTexture support shutting down without a GL context.

Change-Id: Iae934e4d9e91f4ea21dd5bf27c4fafc5d481fb0a
Task-number: QTBUG-41278
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
9 years agoFix stack size check on systems with less than 256kb stack
Simon Hausmann [Thu, 11 Sep 2014 15:00:06 +0000 (17:00 +0200)]
Fix stack size check on systems with less than 256kb stack

We require at least 256 kbytes slack stack space, and if a system is
configured with less (or equal), then the stack size checks fail early on
and strange error message occur during engine startup and execution.

This patch calls the stack check code early on and bails out with an error
message that's more descriptive.

Change-Id: I3263f2f93f62332d08003411e1bb5b3b1140d02b
Task-number: QTBUG-41213
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoLink to Key Handling Priorities section more in Keys documentation.
Mitch Curtis [Fri, 12 Sep 2014 06:16:18 +0000 (08:16 +0200)]
Link to Key Handling Priorities section more in Keys documentation.

For those clicking directly on specific property links who might not
know that the info they need about event order already exists.

Change-Id: I18a9124697f542f5b3a2955ee10dfee538a93385
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoprevent crash when set ShaderEffectSource::sourceItem null
Tasuku Suzuki [Thu, 11 Sep 2014 03:31:18 +0000 (12:31 +0900)]
prevent crash when set ShaderEffectSource::sourceItem null

Regression introduced in 81ba77d736f07efac37d284cd741d71f9dad4149

Task-number: QTBUG-41241
Change-Id: I9a65af6915325e1cbf9205c7da94273d5b91b310
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoFix a typo and a warning in qmltest::shadersource-from-other-window
Tasuku Suzuki [Thu, 11 Sep 2014 05:16:58 +0000 (14:16 +0900)]
Fix a typo and a warning in qmltest::shadersource-from-other-window

Change-Id: I60d0494ff8d619cb9be8d7a5db712c1316450b97
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoCheck for valid QSGRenderContext instead of QOpenGLContext
Andy Nichols [Thu, 11 Sep 2014 15:22:59 +0000 (17:22 +0200)]
Check for valid QSGRenderContext instead of QOpenGLContext

A QQuickWindow with a valid QSGRenderContext is what should be checked
for in QQuickCanvasItem::itemChange.

Change-Id: Ibb85c2bb79d85b2d91b5d68cfa8a4760106047ae
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoFix String leak by calling the correct destructor
Ole André Vadla Ravnås [Tue, 9 Sep 2014 12:37:59 +0000 (14:37 +0200)]
Fix String leak by calling the correct destructor

Task-number: QTBUG-41167
Change-Id: I696fbb7400215c7f1fb8cb2a1dbbc0780440a8c3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoCheck for a current QOpenGLContext before use
Andy Nichols [Thu, 11 Sep 2014 10:23:37 +0000 (12:23 +0200)]
Check for a current QOpenGLContext before use

We can not assume that there will be a current OpenGL
context to use in QQuickImageParticle so now there is
a check before we make a call to the current context.

Change-Id: I0c77895d0b0f1afdf4853c0486fba0ef9a7b883d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoDoc: Added a bit more detail about the example
Venu [Tue, 2 Sep 2014 12:54:28 +0000 (14:54 +0200)]
Doc: Added a bit more detail about the example

Task-number: QTBUG-37203
Change-Id: I62664b5dd0041cf8ba210dc3f0375793f7c72a00
Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
9 years agoSelect specific features to be recorded when profiling QML
Ulf Hermann [Wed, 3 Sep 2014 17:28:35 +0000 (19:28 +0200)]
Select specific features to be recorded when profiling QML

Some features, like the memory profiler, create huge amounts of data.
Often enough, we're not actually interested in all the data available
from the profiler and collecting it all can lead to excessive memory
consumption. This change enables us to optionally turn various aspects
of QML profiling off.

Task-number: QTBUG-41118
Change-Id: I7bb223414e24eb903124ffa6e0896af6ce974e49
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoFix debug output from renderer.
Gunnar Sletta [Tue, 9 Sep 2014 05:12:31 +0000 (07:12 +0200)]
Fix debug output from renderer.

It was wrong when we ran without depth buffer or when we used the
separate ibo code path.

Change-Id: Ie6e4bfc99ee2a4a593e45be7d9af9af17896bcba
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
9 years agoSnap native glyphs to pixel grid in vertex shader.
Gunnar Sletta [Mon, 8 Sep 2014 10:38:02 +0000 (12:38 +0200)]
Snap native glyphs to pixel grid in vertex shader.

The implementation relied on the full matrix, but did not
set the RequiresFullMatrix flag. Setting the flag would
have serious negative performance impact as it prevents
batching, so we solve it in the vertex shader instead.

Task-number: QTBUG-38702
Change-Id: I0c245ea9e18b0b29dd9e3073a2648a7f4e061685
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
9 years agoFix setUTCXxx methods in Date
Lars Knoll [Tue, 9 Sep 2014 13:39:11 +0000 (15:39 +0200)]
Fix setUTCXxx methods in Date

The methods where converting doing a localtime->UTC
conversion even though the input was already in UTC.

Task-number: QTBUG-38448
Change-Id: I4409275fade0dd2a677af2293edc87445f853879
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix roundtrip conversion between JS var and QVariant
Lars Knoll [Mon, 8 Sep 2014 12:06:22 +0000 (14:06 +0200)]
Fix roundtrip conversion between JS var and QVariant

Always convert null to a QVariant(VoidStar) as documented in
QJSValue. Make sure the reverse conversion will lead back to
a null JS value.

Adjusted two test cases that expected an invalid QVariant when
setting the property to null, and added test cases for the
correct conversion.

Task-number: QTBUG-40880
Change-Id: I6eb01f0067f2c89779c53fd2cd0a1193047ed2cc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix failing assertion when compiling self-referencing QML singleton
Simon Hausmann [Wed, 10 Sep 2014 11:18:39 +0000 (13:18 +0200)]
Fix failing assertion when compiling self-referencing QML singleton

When a QML singleton file accesses itself, we would hit incomplete
type data.

Task-number: QTBUG-41220
Change-Id: Id0bd5fd71cf9be21f7e4ad8527fa8724a718d702
Reviewed-by: Michael Brasser <michael.brasser@live.com>
9 years agoMerge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4
Simon Hausmann [Thu, 11 Sep 2014 07:53:39 +0000 (09:53 +0200)]
Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4

9 years agoImprove KeyNavigation documentation.
Mitch Curtis [Tue, 9 Sep 2014 13:31:15 +0000 (15:31 +0200)]
Improve KeyNavigation documentation.

Change-Id: I07e66deb4b21eca191c17532749eeccd33d83fb0
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
9 years agoImprove Drag documentation.
Mitch Curtis [Sun, 7 Sep 2014 16:12:00 +0000 (18:12 +0200)]
Improve Drag documentation.

Change-Id: Ifba60b729c8ad02009cd5c8caa5d58e20a76c73b
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
9 years agoFix broken QJSEngine snippet in documentation.
Mitch Curtis [Mon, 8 Sep 2014 09:11:50 +0000 (11:11 +0200)]
Fix broken QJSEngine snippet in documentation.

toBoolean() isn't even a function in that class, and declaring the
button on the stack causes crashes upon closing the application.

Change-Id: I063cac2bb144cfb9786f20bbc122d5af92a4c2c0
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
9 years agoautotests: fix build on iOS
Richard Moe Gustavsen [Tue, 9 Sep 2014 08:27:47 +0000 (10:27 +0200)]
autotests: fix build on iOS

Change-Id: Idf854ad4f868e873582731dfa6b0253ac5b17c5c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
9 years agoEnhance QQuickWidget docs regarding transparency
Laszlo Agocs [Mon, 8 Sep 2014 08:14:43 +0000 (10:14 +0200)]
Enhance QQuickWidget docs regarding transparency

Provide a section similar to the one in the QOpenGLWidget docs.

Change-Id: Ibe161f5b6e1b6654e78b522f44ba21b89fc85abe
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
9 years agoTune the colors in the rendercontrol example
Laszlo Agocs [Mon, 8 Sep 2014 13:23:02 +0000 (15:23 +0200)]
Tune the colors in the rendercontrol example

Change-Id: I904782e6a54c8df63a2e187cdfed5a3193ff2a54
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
9 years agoBeautify the qquickviewcomparison example
Laszlo Agocs [Tue, 9 Sep 2014 12:57:31 +0000 (14:57 +0200)]
Beautify the qquickviewcomparison example

Remove the red rectangle.
Change the background color to a gradient. (taken from rendercontrol)
Disable the transparency checkbox everywhere but Linux since it
usually will not work. (too much hassle with platform specifics like
frameless windows, etc.)

Change-Id: I21488386cddc5841a2bdc8104e7abb197b075b0d
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
9 years agoV4 runtime: tune Runtime::add/sub/mul a bit.
Erik Verbruggen [Fri, 22 Aug 2014 10:29:20 +0000 (12:29 +0200)]
V4 runtime: tune Runtime::add/sub/mul a bit.

Tell the compiler to schedule the int32 case first, tune the double
conversion a bit (int64->double is quite expensive), and write the
function in such a way that it matches typical overflow idiom which
compilers recognize.

Change-Id: Ieae9a60275716002fbdbc54e1d7291c8aad8c927
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoQQuickTextInput: calculate height of cursor rect using QTextLine::height()
Richard Moe Gustavsen [Thu, 4 Sep 2014 07:38:29 +0000 (09:38 +0200)]
QQuickTextInput: calculate height of cursor rect using QTextLine::height()

Calculating the height of the line using ascent + descent seems
inaccurate, since the result will not match what ends up being
drawn. QQuickTextEdit uses instead QTextLine::height() for the
same function, and this works correct.
Since there seems to be no reason to reinvent how to calculate the
height when the line already has a function for that, and since the
result also seems to be wrong, we change the implementation to
use QTextLine::height().

Change-Id: I9c9cd4360b6d4cfd3582756c4efdff9c02065789
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
9 years agoDon't post deleteLater on invalid canvas contexts
Ulf Hermann [Tue, 9 Sep 2014 14:25:54 +0000 (16:25 +0200)]
Don't post deleteLater on invalid canvas contexts

QCoreApplication complains about that. The context will only be valid
once it has been requested in one way or another.

Change-Id: Idb44f2541d71355443a5b491078a3040907b1614
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoDisable tst_QQuickListView::programmaticFlickAtBounds()
Eskil Abrahamsen Blomfeldt [Wed, 10 Sep 2014 10:03:28 +0000 (12:03 +0200)]
Disable tst_QQuickListView::programmaticFlickAtBounds()

This test gives false negatives blocking CI consistently.

Change-Id: Id904f147b720a183167f335ee4db856d7e3ca94d
Task-number: QTBUG-41228
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoFix pixel bleed in BorderImage
Eskil Abrahamsen Blomfeldt [Tue, 26 Aug 2014 08:52:22 +0000 (10:52 +0200)]
Fix pixel bleed in BorderImage

Keeping all patches of the border image in the same texture
with different sample points can cause parts of the border
to bleed over to the center patch. To rectify this, we
create a separate texture for each of the nine patches we
need, and separate image nodes.

To avoid applying antialiasing on the interior edges of the
border image, we introduce new antialiasing flags which can
be used to specify precisely which edges of the image should
be antialiased.

[ChangeLog][BorderImage] Fixed possible pixel bleed between
border patches and center patch in BorderImage.

Change-Id: Icc292b3969217320eecca99e79675316c42eab08
Task-number: QTBUG-35838
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoMerge remote-tracking branch 'origin/5.3' into 5.4
Simon Hausmann [Mon, 8 Sep 2014 11:10:21 +0000 (13:10 +0200)]
Merge remote-tracking branch 'origin/5.3' into 5.4

Conflicts:
.qmake.conf
src/qml/jsruntime/qv4arraydata.cpp
src/quick/scenegraph/util/qsgatlastexture.cpp

Change-Id: Ic4c96066d5c37dcf0d5446baed590ea005d445ce

9 years agoQML: parse .js files as JavaScript, not QML.
Erik Verbruggen [Thu, 28 Aug 2014 11:12:53 +0000 (13:12 +0200)]
QML: parse .js files as JavaScript, not QML.

When importing a JS library into a QML file with the "import" keyword,
that JS file was parsed in QML mode, disallowing QML keywords like "as".

Task-number: QTBUG-40143
Change-Id: Ie98adceb27544732c2e96657d41170db36bff288
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoDoc: Fix link to Qt namespace
Topi Reinio [Thu, 4 Sep 2014 12:49:06 +0000 (14:49 +0200)]
Doc: Fix link to Qt namespace

Linking to 'Qt Namespace' will link to the Detailed Description
section on the Qt namespace doc. Use the new linking format to
link to the start of the page instead.

Change-Id: Ib7e1b2b91fd9987262fc1a083ae94ef086260766
Reviewed-by: Martin Smith <martin.smith@digia.com>
9 years agoqmlscene: load master translation file before more specific ones
Shawn Rutledge [Thu, 4 Sep 2014 10:53:14 +0000 (12:53 +0200)]
qmlscene: load master translation file before more specific ones

It was giving up too early because qmlscene_??.qm doesn't exist.
The file qt_??.qm links to all existing Qt-provided translation files,
so it is enough by itself unless there are application-specific
translations besides.

Change-Id: Iebedf54ddb4eef4f4d7da8a7fade1850a366aee8
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
9 years agoQQuickTextInput: keep floating point precition when calculating offset
Richard Moe Gustavsen [Wed, 3 Sep 2014 12:55:59 +0000 (14:55 +0200)]
QQuickTextInput: keep floating point precition when calculating offset

Without this patch, positionToRectangle will return a slightly
different rectangle than what ends up being drawn.

Change-Id: Ib1a3936f0fab393d6016d85d63547ec7f3036b7a
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
9 years agoMouseArea: Fix cancelling the double click when the windows loses focus
Olivier Goffart [Wed, 3 Sep 2014 18:42:04 +0000 (20:42 +0200)]
MouseArea: Fix cancelling the double click when the windows loses focus

Without this, the next click is not received after the windows loses
focus while we double clicked but not released the mouse.

This may happen if the onDoubleClicked opens a new window

Change-Id: I86742de2bb1ea4c9657b9d5e90472d093293177d
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
9 years agoFix performance regression caused by SG signals in QQuickItem.
Gunnar Sletta [Tue, 2 Sep 2014 09:49:50 +0000 (11:49 +0200)]
Fix performance regression caused by SG signals in QQuickItem.

For a testcase with thosands of items, I measured an increase
in shutdown time from 800ms to 7500ms, all spent in disconnect().
This is not acceptible, so we're choosing a different approach.

If items implement a invalidateSceneGraph slot, this function
will be called during shutdown. It should be made a proper virtual
in Qt 6. This approach costs very little.

Change-Id: I5970143cc0a0744955687e17586f0bb00c9afb26
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoAppend scenegraph in MODULE_PLUGIN_TYPES of quick module
Andy Nichols [Tue, 2 Sep 2014 11:58:26 +0000 (13:58 +0200)]
Append scenegraph in MODULE_PLUGIN_TYPES of quick module

While scenegraph is already a plugin type, it was not defined
as plugin_type by the module feature file so qmake fails to build
when using load(qt_plugin).

Change-Id: I7a6cf21358bbda9878ebe78b7c208c0ded2cf4a9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>