platform/upstream/qtdeclarative.git
11 years agoFix distance field antialiasing for retina displays.
Gunnar Sletta [Wed, 20 Mar 2013 14:40:49 +0000 (15:40 +0100)]
Fix distance field antialiasing for retina displays.

Change-Id: I01d7d41a4e70822555bae453978dbe92fbb5c98d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
11 years agoShow fullscreen button in qmlscene on Mac
Gunnar Sletta [Thu, 21 Mar 2013 08:56:37 +0000 (09:56 +0100)]
Show fullscreen button in qmlscene on Mac

Change-Id: I3202e8e7461f457eeb73a82b7a8da40a11e4f76d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
11 years agoDoc: Fix some titles and links
Sze Howe Koh [Thu, 28 Mar 2013 12:39:13 +0000 (20:39 +0800)]
Doc: Fix some titles and links

Make page titles follow the conventions at
http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation.

Make class/type list titles follow the "<Qt Module> C++ Classes" and
"<Qt Module> QML Types" formats.

Links are updated accordingly, along with broken links found during this
sweep. Some inline links also have their surrounding text modified, to
improve flow.

Change-Id: I0ed7788caa250085d7ea0080a77d8a2655debf39
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoDoc: Update module "Qt Declarative" -> "Qt Quick"
Sze Howe Koh [Wed, 27 Mar 2013 14:28:24 +0000 (22:28 +0800)]
Doc: Update module "Qt Declarative" -> "Qt Quick"

Also update examples/README to show the relationship between Qt Quick
and Qt QML.

Change-Id: I4e50d9f0ddb1ac25ccdfed09f579f76a375b14fe
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoDelay loading implicit import
Alan Alpert [Sat, 8 Dec 2012 21:57:12 +0000 (13:57 -0800)]
Delay loading implicit import

As a performance improvement to avoid extra filesystem access, only
import "." if it is needed for type resolution.

Change-Id: If9be25deb3205f8c81f9f418404d9fb41bebb84f
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
11 years agoFix warning QQuickImplicitSizeItem redefines signals
Caroline Chao [Mon, 25 Mar 2013 13:12:19 +0000 (14:12 +0100)]
Fix warning QQuickImplicitSizeItem redefines signals

Task-number: QTBUG-30258

Change-Id: I3ab2a3ffbe22f583ac422f876be3037c07e8255d
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
11 years agoDoc: Fixed some uses of terminolgies in qdoc files.
Jerome Pasion [Mon, 25 Mar 2013 11:37:22 +0000 (12:37 +0100)]
Doc: Fixed some uses of terminolgies in qdoc files.

-"element" -> "type" or "object" (not in all cases where this change applies)
-some instances of QtQuick. It should be "Qt Quick".
-only in qdoc files. Examples and source code changes will be done later.

Task-number: QTBUG-30180
Change-Id: Ie587461a138e97606f761ad1e90909c91b479303
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
11 years agoBump MODULE_VERSION to 5.1.0
Sergio Ahumada [Mon, 25 Mar 2013 10:09:43 +0000 (11:09 +0100)]
Bump MODULE_VERSION to 5.1.0

Change-Id: I3d794f16eb81634b9fe69d4fc9559be19cf3a998
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
11 years agoAttempt to stabilize tst_qquickanimatedsprite
Frederik Gladhorn [Tue, 26 Mar 2013 14:24:31 +0000 (15:24 +0100)]
Attempt to stabilize tst_qquickanimatedsprite

Change-Id: I557f985ca5e68eb75d0b032b1dfa28cc33d56b6a
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
11 years agoEnable accessibility again.
Frederik Gladhorn [Tue, 12 Mar 2013 12:38:48 +0000 (13:38 +0100)]
Enable accessibility again.

Revert "Disable accessibility temporarily."

This reverts commit 361015dc73b887026e1937da09c11df89acf5c85.

Change-Id: Ie1d053fe64ee79fbd9e57bf2d0d2764bb638db72
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
11 years agoMerge "Merge remote-tracking branch 'origin/dev' into stable" into refs/staging/stable
J-P Nurmi [Fri, 22 Mar 2013 15:31:39 +0000 (16:31 +0100)]
Merge "Merge remote-tracking branch 'origin/dev' into stable" into refs/staging/stable

11 years agoMerge remote-tracking branch 'origin/dev' into stable
Frederik Gladhorn [Fri, 22 Mar 2013 15:27:17 +0000 (16:27 +0100)]
Merge remote-tracking branch 'origin/dev' into stable

These two patches should have targeted 5.1 and went in just
at the wrong time.

Change-Id: Idd0a7a812fb11e2aea2c187d5e82aa31494c576c

11 years agoSkip flaky FileDialog modality test
Shawn Rutledge [Thu, 21 Mar 2013 07:27:43 +0000 (08:27 +0100)]
Skip flaky FileDialog modality test

It's been failing in CI, not just on MacOS

Change-Id: Iba3ff400c0b8b6b0cc9a7c6bddd710d3f0e78964
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoMerge "Merge branch 'dev' into stable" into refs/staging/stable
Sergio Ahumada [Fri, 22 Mar 2013 12:16:59 +0000 (13:16 +0100)]
Merge "Merge branch 'dev' into stable" into refs/staging/stable

11 years agoTry to stabilize qquickimage and rendernode tests.
Gunnar Sletta [Wed, 20 Mar 2013 09:19:38 +0000 (10:19 +0100)]
Try to stabilize qquickimage and rendernode tests.

Some of Our CI machines are running on tiny screens and recent
changes in Qt have caused us to limit windows to the screen
geometry (which is sensible).

Change-Id: I29eb3b5c73a7ea650ac26494c25d204fb254dee3
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
11 years agoAdd Instantiator type to QtQml
Alan Alpert [Mon, 24 Dec 2012 06:57:10 +0000 (22:57 -0800)]
Add Instantiator type to QtQml

Provides a dynamic instantiation type which is not tied to visual items.

Change-Id: I42f7332b29b752dcc94979b6e0ec191fc76b96ef
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoMerge branch 'dev' into stable
Sergio Ahumada [Wed, 20 Mar 2013 08:13:42 +0000 (09:13 +0100)]
Merge branch 'dev' into stable

This starts Qt 5.1 release cycle

Change-Id: I6178a580b4c99aded1a69032a02169cff502b71d

11 years agoOptimize QQuickTextEdit for larger documents.
Pierre Rossi [Mon, 18 Mar 2013 15:25:59 +0000 (16:25 +0100)]
Optimize QQuickTextEdit for larger documents.

The rationale is to not end up re-processing the whole document on each update
Since we know where the editing takes place, we can break down the text edit's
contents in several text nodes and only re-create the affected text nodes upon
editing.

This requires ripping out the SelectionEngine helper class from QQuickTextNode
so that QQuickTextEdit can tap into its functionality directly.

A positive side-effect of this exercise is that it should be much harder to
to come across GlyphNodes packing more than 16300 glyphs or so.

Task-number: QTBUG-29596
Change-Id: Id29b0709baa43f5b29c44ab02398ba996be3e28a
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
11 years agoAdd QQmlApplicationEngine
Alan Alpert [Fri, 21 Dec 2012 21:37:30 +0000 (13:37 -0800)]
Add QQmlApplicationEngine

This helper class exposes QML application functionality that QML-only
applications want to have, but QML-using applications may not.

Change-Id: If91c3f55ffa2a4aecdd9d6cc62f6ad09fd35b0dd
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
11 years agoFix multi-line string content.
Erik Verbruggen [Tue, 19 Mar 2013 12:04:54 +0000 (13:04 +0100)]
Fix multi-line string content.

ECMA5.1, paragraph 7.8.4, item 9 under semantics: The SV of
   LineContinuation :: \ LineTerminatorSequence
is the empty character sequence.

So, do not add any line-terminator inside a multi-line string. Escaped
characters like \r and \n are added of course.

Change-Id: I8c58b7971b1d1bc90adc795ea278541758246e01
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoMake sure that TextInteractionFlags get set.
Frederik Gladhorn [Tue, 19 Mar 2013 14:04:44 +0000 (15:04 +0100)]
Make sure that TextInteractionFlags get set.

The first time the function is called,
it could fail to set the flags.

Calling setSelectByKeyboard(true) would not actually
set the text interaction flags (was == on).

The test didn't detect it because it called setReadOnly
before setSelectByKeyboard.

Change-Id: Ia54cc782b6ad5a74f1d7029c92fa230116d034b0
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
11 years agoQQuickItemView: Add guard before returning currentItem item
Caroline Chao [Tue, 19 Mar 2013 13:01:54 +0000 (14:01 +0100)]
QQuickItemView: Add guard before returning currentItem item

And don't check if the currentItem is empty before calling
applyPendingChanges().

And an autotest. (Patch from Steffen Imhof)

Task-number: QTBUG-30227

Change-Id: Ia16362a6d0dce771f20772929c32e9306ed0e0f9
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoGet rid of warning Module 'QtQuick.Dialogs'...cannot be protected...
Shawn Rutledge [Mon, 18 Mar 2013 14:53:52 +0000 (15:53 +0100)]
Get rid of warning Module 'QtQuick.Dialogs'...cannot be protected...

After I86bc6d975223979c19d94a3fd70e4b5130b73f47 it's possible for
qmldir to have the module declaration again.  The reason it was
absent was that src/imports/dialogs/plugin.cpp was registering
new types in initializeEngine.

Change-Id: I6b28a3b97df7f7817cfdc1e745c4ce6f048302f1
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoMark renderNode test as insignificant, as CI doesn't manage to run it
Gunnar Sletta [Tue, 19 Mar 2013 11:11:53 +0000 (12:11 +0100)]
Mark renderNode test as insignificant, as CI doesn't manage to run it

Change-Id: I43c2306f8b1c095140c9712821ddcc2dcea1b95d
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
11 years agoFix jump and property changes on first move when dragging a Flickable.
Andrew den Exter [Tue, 12 Mar 2013 04:05:32 +0000 (14:05 +1000)]
Fix jump and property changes on first move when dragging a Flickable.

Fixes a regression introduced by https://codereview.qt-project.org/48690
whereby on the first mouse move the contentItem was moved the total
distance from the touch point to where the drag distance was exceeded.
For large drag thresholds this causes a noticeable jump. Reverting the
dragStartOffset portion of that change fixes the regression.

That same change was also resposible for the property update regression
https://codereview.qt-project.org/49768 attempted to fix.  That change
is also reverted as it was unnecessary and may have introduced some
regressions of its own.

Task-number: QTBUG-30032
Change-Id: I7723b459cc5a6a0731893aeb6332d00cad1bd79b
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
11 years agoRemove unused field in test class.
Erik Verbruggen [Mon, 18 Mar 2013 14:31:22 +0000 (15:31 +0100)]
Remove unused field in test class.

Change-Id: Id9bfbd1c84acb59a669908e933ed1f63a4987526
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix hexadecimal escape sequence validation in strings.
Erik Verbruggen [Mon, 18 Mar 2013 14:30:55 +0000 (15:30 +0100)]
Fix hexadecimal escape sequence validation in strings.

Give an error message when the sequence does not conform to the grammar.
Although the specification does not explicitly state that this is an
error, this is the behaviour of both JSC and V8.

Change-Id: I34d189f07628bc6cc40b13bfbb8d09bee7810ced
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove duplicated docs
Alan Alpert [Mon, 4 Mar 2013 22:03:56 +0000 (14:03 -0800)]
Remove duplicated docs

In the move of docs to a separate file, this copy of docs seemed to be
resurrected by mistake. Removing it and properly formatting the code.

Change-Id: Id7257c232880a8829e8864af12c5b7b5c484a398
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
11 years agoQQuickItem: Support FocusReason in focusNextPrev
Liang Qi [Mon, 18 Mar 2013 08:46:09 +0000 (09:46 +0100)]
QQuickItem: Support FocusReason in focusNextPrev

Change-Id: Ib1b69607e1b4b52bad6e382d8102a42553f13432
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
11 years agoAdd ColorDialog to QtQuick.Dialogs
Shawn Rutledge [Mon, 11 Mar 2013 10:05:30 +0000 (11:05 +0100)]
Add ColorDialog to QtQuick.Dialogs

As with FileDialog, it tries QPA, then QColorDialog, and falls back to
a QML implementation (which is also provided here) if neither type of
native dialog is available.

Change-Id: I384928e1f7322bb6b867d4618d07c88c70e3cbfe
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoCosmetic changes in DefaultFileDialog and dialog shared controls
Shawn Rutledge [Mon, 11 Mar 2013 10:42:00 +0000 (11:42 +0100)]
Cosmetic changes in DefaultFileDialog and dialog shared controls

Implementation of the button for QML-based dialogs matches
the one for QML examples.  The button and the text field
use system palette colors, as does the file dialog.

Change-Id: Ibf45d57bdab8799ae6aa69ba543c0e05c55b01d3
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoFixed invalid GLSL in openglunderqml example.
Samuel Rødal [Mon, 18 Mar 2013 08:12:43 +0000 (09:12 +0100)]
Fixed invalid GLSL in openglunderqml example.

First argument to pow is not allowed to be negative.

Task-number: QTBUG-30191
Change-Id: Iac6c25d84e26777564d6741690aab552a0bb513e
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoQQuickLoader: fix the recursion guard for size updates
J-P Nurmi [Wed, 13 Mar 2013 17:31:57 +0000 (18:31 +0100)]
QQuickLoader: fix the recursion guard for size updates

Task-number: QTBUG-30183
Change-Id: Ic8720e1e35bf2f349d74d2021dd202849da67852
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agooptionally bootstrap QmlDevTools and qmlmin
Oswald Buddenhagen [Thu, 1 Nov 2012 19:05:49 +0000 (20:05 +0100)]
optionally bootstrap QmlDevTools and qmlmin

QmlDevTools is really meant for host tools (the two only ones using this
being qmlmin in this repo and lupdate in qttools). qmake magic will take
care of bootstrapping them while x-building.

Change-Id: I29d921af483659d5455be0ad080dc1a88540c036
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
11 years agoimprove dependencies of qmlparser test
Oswald Buddenhagen [Thu, 7 Mar 2013 15:31:03 +0000 (16:31 +0100)]
improve dependencies of qmlparser test

first, this doesn't need gui.
second, use qml instead of qmldevtools - there is no need to use the
static library here, and after bootstrapping it would pose a real
problem (testlib is not bootstrapped). on the downside, this makes the
test rely on private_tests.

Change-Id: Ic550fa05dcd0f3ba333850640a5b7e3fdd47d905
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
11 years agoCreate common base class for declarative dialogs
Shawn Rutledge [Thu, 28 Feb 2013 16:57:38 +0000 (17:57 +0100)]
Create common base class for declarative dialogs

QQuickAbstractFileDialog inherits QQuickAbstractDialog, and so can
the future platform dialog types.  Also some header comment corrections.

Change-Id: I86bc6d975223979c19d94a3fd70e4b5130b73f47
Reviewed-by: Liang Qi <liang.qi@digia.com>
11 years agophotosurface example: simplify PinchArea usage; fileUrls; license
Shawn Rutledge [Thu, 14 Mar 2013 20:06:51 +0000 (21:06 +0100)]
photosurface example: simplify PinchArea usage; fileUrls; license

FileDialog.filePaths was changed to fileUrls.  No need to do so much
scripting because the PinchArea.target takes care of the math already,
and with better rotational symmetry too.  Example QML should have a
BSD license.

Change-Id: I892292574c81c032d948c1c2d4924fc7127dd008
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
11 years agoAdd TextEdit::selectByKeyboard
J-P Nurmi [Fri, 1 Mar 2013 14:26:54 +0000 (15:26 +0100)]
Add TextEdit::selectByKeyboard

The main use case is for enabling text selection by keyboard
for read-only editors.

Change-Id: Ieaa9af366fd0eaf863a104a2fdf33c9ddad38b10
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
11 years agoQQuickWindow: expose activeFocusItem as a property
J-P Nurmi [Wed, 27 Feb 2013 12:54:26 +0000 (13:54 +0100)]
QQuickWindow: expose activeFocusItem as a property

Change-Id: Ifd393399f93b04313cd66d7873fb99b505640c8a
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
11 years agoQQuickView's equivalent in QtQuick1 is QDeclarativeView
Debao Zhang [Thu, 7 Mar 2013 09:23:30 +0000 (17:23 +0800)]
QQuickView's equivalent in QtQuick1 is QDeclarativeView

Change-Id: I12104e8bd58a406a0ff03c110e2df54bbc1c816c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
11 years agoMove QML types to types folder
Alan Alpert [Wed, 23 Jan 2013 23:17:27 +0000 (15:17 -0800)]
Move QML types to types folder

The QtQml module has gain a bunch of QML types cluttering up the qml
folder. Moving them to types organizes them a bit better.

Change-Id: I570884c00f4abc48f4f1aea048bf002bc70223f3
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoCosmetic changes in common controls for examples
Shawn Rutledge [Fri, 8 Mar 2013 15:44:32 +0000 (16:44 +0100)]
Cosmetic changes in common controls for examples

Use system palette colors.  SimpleLauncherDelegate has its own "button"
rather than using the shared one, which really wasn't suitable for any other
purpose.  So now example apps can use Button, and ToolButton isn't necessary.

Change-Id: I632397f36b96a26c32a86301ddacb85d5c3221f0
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoAdd some docs, improve scope of var.
Frederik Gladhorn [Mon, 4 Mar 2013 20:45:24 +0000 (21:45 +0100)]
Add some docs, improve scope of var.

Change-Id: I62e0b3bb4882f58ba58b3c8d71679e4ad2dbc5a3
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
11 years agoAdd clocks.qmlproject
hjk [Thu, 14 Mar 2013 11:30:57 +0000 (12:30 +0100)]
Add clocks.qmlproject

Change-Id: I4fb063d1a4ccc990b5098237f1784b3dce015a81
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
11 years agoSmooth dragging an item with MouseArea.
Andrew den Exter [Thu, 14 Mar 2013 02:36:20 +0000 (12:36 +1000)]
Smooth dragging an item with MouseArea.

Calculate drag distance relative to the mouse position when a drag is
detected rather than the press position so there isn't a large change
in position on the first move.

Task-number: QTBUG-30188
Change-Id: I5c2269c2228668a3842e18f65167637497b3beb4
Reviewed-by: Joona Petrell <joona.petrell@jollamobile.com>
11 years agoMerge remote-tracking branch 'origin/stable' into dev
Frederik Gladhorn [Thu, 14 Mar 2013 08:30:12 +0000 (09:30 +0100)]
Merge remote-tracking branch 'origin/stable' into dev

Conflicts:
tests/auto/qml/debugger/qv8profilerservice/qv8profilerservice.pro

Change-Id: I2fd99ed8bd03302b9bbf31e6f21990f6455c4f1c

11 years agoCompile fix.
Samuel Rødal [Wed, 13 Mar 2013 15:10:06 +0000 (16:10 +0100)]
Compile fix.

Some compilers don't allow the first argument to printf and similar
functions to be a non-literal string.

Change-Id: Idd11ae6679d5c0585b5d10b76c991dcfdb4f65da
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoPolish usage of a QElapsedTime instance in QSGThreadedRenderLoop
Jędrzej Nowacki [Tue, 12 Mar 2013 10:03:51 +0000 (11:03 +0100)]
Polish usage of a QElapsedTime instance in QSGThreadedRenderLoop

The patch should make valgrind happy, by not using an uninitialized
memory.

Change-Id: Iec7f16c56f250dd121a37f03da4cfc5d9e5c0742
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoFixed tutorial gettingStartedQml part5.
Libor Tomsik [Thu, 7 Mar 2013 07:37:08 +0000 (08:37 +0100)]
Fixed tutorial gettingStartedQml part5.

In FileDialog.qml the selector GridView.view.currentIndex does not work, replaced with dirView.currentIndex

Change-Id: I7c1893ce3872c41fc4f0fd63bad0e6a2cff2b207
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoFix usages of \since for QML items
Thomas McGuire [Wed, 13 Mar 2013 09:43:51 +0000 (10:43 +0100)]
Fix usages of \since for QML items

\since uses the QML import, not the Qt version.

When adding a new property, it needs a REVISION argument and the type
needs to be registered again for the new version.

Change-Id: I2e636e9d26c8e989729eadad2ef73a836c35caa1
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
11 years agoMerge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging...
Stephen Kelly [Wed, 13 Mar 2013 14:47:29 +0000 (15:47 +0100)]
Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable

11 years agoDocumentation and versioning for new Window properties
Shawn Rutledge [Tue, 5 Mar 2013 08:26:45 +0000 (09:26 +0100)]
Documentation and versioning for new Window properties

Even some of the properties that existed in 5.0 were not documented.

Change-Id: I25a14b9b19425a6c792d06bc41983e9abd1d17d0
Task-number: QTBUG-29807
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
11 years agoDoc: Changed section title in whatsnew.qdoc
Jerome Pasion [Wed, 13 Mar 2013 09:57:11 +0000 (10:57 +0100)]
Doc: Changed section title in whatsnew.qdoc

- "Qt 5.0" is the name of the main landing page, which causes link
conflicts in Qt QML module.

Change-Id: I2becb864873ea3784eb4fece3ebcbe64e0a00cba
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
11 years agoAbort rendering when QOpenGLContext::create/makeCurrent fails.
Gunnar Sletta [Wed, 13 Mar 2013 06:36:30 +0000 (07:36 +0100)]
Abort rendering when QOpenGLContext::create/makeCurrent fails.

Task-number: QTBUG-30158
Change-Id: Ic8239fe6f074c989e4474d46042e1a82796b4908
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
11 years agodon't use CamelCase includes
Oswald Buddenhagen [Tue, 12 Mar 2013 19:26:13 +0000 (20:26 +0100)]
don't use CamelCase includes

they are not available during bootstrap.

Change-Id: I5e941f22cd2b9fa622730ba0bf8389394f6a30a5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
11 years agoMakes QSmoothedAnimation respect zero duration.
Thomas Kristensen [Mon, 11 Mar 2013 11:54:56 +0000 (12:54 +0100)]
Makes QSmoothedAnimation respect zero duration.

In automated GUI test scenarios it often desired not to wait for animations
before verifying a result, so setting the duration to zero should accomplish
this, before this patch; if duration was set to zero QSmoothedAnimation
would treat it as if duration was not set, and used velocity to calculate
animation speed.

Change-Id: Ia57f1c9ffdd2056ac7c85d1cb94dbd3835fcbb7a
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
11 years agoAdd QtQml.Models module
Alan Alpert [Wed, 23 Jan 2013 22:08:58 +0000 (14:08 -0800)]
Add QtQml.Models module

The moved Model classes can now be exposed in a QtQml import.

To keep the QtQml import resticted to more core functionality, they are
being exposed in a plugin module.

Change-Id: I0a84642a72c7c9bbf9b6ffd2a6c33549f8e61c29
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix remote image loading for AnimatedSprite
Alan Alpert [Tue, 26 Feb 2013 21:50:51 +0000 (13:50 -0800)]
Fix remote image loading for AnimatedSprite

The Sprite generated behind the scenes had no QmlEngine associated, and
the engine is needed by QQuickPixmap for async loading.

Task-number: QTBUG-28086
Change-Id: Ibf3b03c54b339fe8f44201dc6fcb507e5274bbec
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoFixed some auto tests
Bernd Weimer [Thu, 7 Mar 2013 15:07:35 +0000 (16:07 +0100)]
Fixed some auto tests

In the listmodel test an error description was not converted to a
string.
In the pathview test, number literals are always interpreted as double,
but qreal can also be float, which lead to failing tests. Constructor
usage prevents "expected data of type 'float', got 'double'".

Change-Id: I0c760486de0ba4df6a5e9a33e9528ca7d7a1a63e
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoFixed text opacity when using Text.NativeRendering.
Yoann Lopes [Tue, 12 Mar 2013 11:57:39 +0000 (12:57 +0100)]
Fixed text opacity when using Text.NativeRendering.

Change-Id: I76922074c02c368f8a8a6998c478a33537e9a6e8
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoFix QString usage in createPixmapDataSync().
Friedemann Kleint [Thu, 7 Mar 2013 14:47:27 +0000 (15:47 +0100)]
Fix QString usage in createPixmapDataSync().

Warning introduced by  707bbe5dea9d7398b205124a54422f2fafb6f151 .

Change-Id: I20f0da00ea519cc2ec82a1d13f1887c099a3947c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
11 years agoDisable accessibility temporarily.
Frederik Gladhorn [Tue, 12 Mar 2013 12:38:11 +0000 (13:38 +0100)]
Disable accessibility temporarily.

This is required to update headers in QtBase.

Change-Id: I373a1f13dcde8ce1cafeedb5cd2269a0f8f3a670
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
11 years agoFixed incorrect vsync delta time in QSGThreadedRenderLoop.
Yoann Lopes [Fri, 8 Mar 2013 13:28:21 +0000 (14:28 +0100)]
Fixed incorrect vsync delta time in QSGThreadedRenderLoop.

Change-Id: I32bb720e9c9aa0278959dd64e5e1c449bdace7d1
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoMerge remote-tracking branch 'origin/release' into stable
Frederik Gladhorn [Tue, 12 Mar 2013 10:30:13 +0000 (11:30 +0100)]
Merge remote-tracking branch 'origin/release' into stable

Change-Id: I9f54f308efc4d165d091f215d0b031e4e895d749

11 years agoIntroduce QML_FBO_FLUSH_BEFORE_DETACH to work around FBO issue.
Michael Brasser [Tue, 5 Mar 2013 02:20:15 +0000 (20:20 -0600)]
Introduce QML_FBO_FLUSH_BEFORE_DETACH to work around FBO issue.

On some AMD hardware, detaching the depth attachment immediately after
rendering to an FBO will cause rendering issues. Adding an explicit
glFlush before detaching seems to work around the issue.

Task-number: QTBUG-29265
Change-Id: I97c7b87c1c3d3a69a4d6228dd9459745710c5f4c
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoUse official V8 string manipulation methods in QML
Peter Varga [Fri, 1 Mar 2013 13:39:59 +0000 (14:39 +0100)]
Use official V8 string manipulation methods in QML

The QtJSBackend's String::GetCharacter and String::Equals methods are Qt
specific and they are not supported by official V8. These methods can be
replaced by more "V8-friendly" implementations in QtDeclarative. Thus
the mentioned methods can be removed from QtJSBackend to reduce the
difference between QtJSBackend and the official V8 source.

Change-Id: I5590ca62dc667e64a7f54a7e47a02d350ba0c077
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agocorrect misspelling
Shawn Rutledge [Mon, 11 Mar 2013 10:05:44 +0000 (11:05 +0100)]
correct misspelling

Canceled

Change-Id: Ie080e5be4af0cf60cab56e906f82fb6e7b32c6e3
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoCreate the sg render thread's opengl context on the GUI thread
Gunnar Sletta [Fri, 8 Mar 2013 18:45:07 +0000 (19:45 +0100)]
Create the sg render thread's opengl context on the GUI thread

Change-Id: I710d80ebb4e5a12fda1f58f54089b0e72268dfcf
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
11 years agomake the sample code more consistent in context
Xingtao Zhang [Fri, 8 Mar 2013 19:44:40 +0000 (19:44 +0000)]
make the sample code more consistent in context

Change-Id: Id831032a937bf07b70515e95ff481ea8a741edeb
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoSupport activeFocusOnTab in QQuickItem
Liang Qi [Fri, 22 Feb 2013 12:44:06 +0000 (13:44 +0100)]
Support activeFocusOnTab in QQuickItem

Add activeFocusOnTab as property to QQuickItem. Setting the
property allows automatic keyboard navigation between all
elements that have it set.

This key event handler will only be called after the QML key
handlers, such as KeyNavigation and Keys, and the C++ key
event handlers, such as keyPressEvent function.

Algorithm is most done by Frederik Gladhorn, in cooperation with
Gabriel de Dietrich.

Done-with: Frederik Gladhorn <frederik.gladhorn@digia.com>
Done-with: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Change-Id: I8b58be9c20d113661fe85d27bdb1af84340d9de5
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
11 years agoImprove the ordering of Flickable dragging and moving property updates.
Andrew den Exter [Tue, 5 Mar 2013 07:56:21 +0000 (17:56 +1000)]
Improve the ordering of Flickable dragging and moving property updates.

Move the contentItem after the dragging and moving properties have been
updated so they return the correct values from the onContentYChanged
and onContentXChanged handlers.

Task-number: QTBUG-30032
Change-Id: I15716dc8eee4d9836f96362a8b49f1d0c404b0c2
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoFix displacement transition bug for horizontal case
Guenter Schwann [Wed, 27 Feb 2013 14:52:03 +0000 (15:52 +0100)]
Fix displacement transition bug for horizontal case

Task-number: QTBUG-29944

Change-Id: I23381f7a1d2c8d3c6df007b5b11c12b0db3bb1e9
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoReplace deprecated V8 functions
Peter Varga [Mon, 4 Mar 2013 16:21:08 +0000 (17:21 +0100)]
Replace deprecated V8 functions

The External::Wrap and External::Unwrap functions became deprecated in
the mainline V8. Replace them as it is officially proposed.

Change-Id: Ieac1da53997da440a909939d86c98f17a124c068
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoImprove timer dependent tests.
Frederik Gladhorn [Wed, 6 Mar 2013 17:47:17 +0000 (18:47 +0100)]
Improve timer dependent tests.

tst_QQuickLoader::loadedSignal depended on
sharing the engine with simultaneousSyncAsync
and that function being run before it.

After each test run call clearComponentCache()
as that is important for caching of the network tests.

The test server would send the item after 500ms.
Sometimes the CI would be faster or slower.
Instead of relying on timing, simply call a function
when the reply should be sent.

Change-Id: Ifb0447041197e1cba103570597a62a2510d31aab
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
11 years agoRemove comment about performance in qquickitem's clip property.
Gunnar Sletta [Thu, 7 Mar 2013 07:23:07 +0000 (08:23 +0100)]
Remove comment about performance in qquickitem's clip property.

Change-Id: I2d1b9a86251466445d506969d779308e2d7b92bb
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
11 years agoMark geometry dirty to signal scene graph that a repaint is needed.
Gunnar Sletta [Thu, 28 Feb 2013 11:28:16 +0000 (12:28 +0100)]
Mark geometry dirty to signal scene graph that a repaint is needed.

Change-Id: Ic230ffe43b690e3f1e0e7290c4c9571f60bd34b7
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
11 years agoFix warning about uninitialized value in QML-ECMA-test (CLANG).
Friedemann Kleint [Thu, 7 Mar 2013 10:59:37 +0000 (11:59 +0100)]
Fix warning about uninitialized value in QML-ECMA-test (CLANG).

Change-Id: Ifcc3ef0e0e65245758697d7302e8227bb6e748f7
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
11 years agoFix warning about use of uninitialized value in QML-debug helpers.
Friedemann Kleint [Thu, 7 Mar 2013 10:58:41 +0000 (11:58 +0100)]
Fix warning about use of uninitialized value in QML-debug helpers.

Change-Id: Ifcba9c1224dfa7db069ef71b1bb39e3c7658a7b5
Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
11 years agoFix MSVC warning C4819 under Chinese locale
Debao Zhang [Wed, 6 Mar 2013 08:57:44 +0000 (16:57 +0800)]
Fix MSVC warning C4819 under Chinese locale

warning C4819: The file contains a character that cannot be represented in
the current code page (936)

Change-Id: I53dc345e03b0ec6f951bd2763bc1bab4aef63d04
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
11 years agoFix warning about adding int to a QString (CLANG).
Friedemann Kleint [Thu, 7 Mar 2013 10:58:15 +0000 (11:58 +0100)]
Fix warning about adding int to a QString (CLANG).

Change-Id: Ibc84dcbe5ca4519bb1ac25e5d5463ef58c48190e
Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
11 years agoFix warnings about overloaded virtual functions in tests (CLANG).
Friedemann Kleint [Thu, 7 Mar 2013 11:08:48 +0000 (12:08 +0100)]
Fix warnings about overloaded virtual functions in tests (CLANG).

Change-Id: I1f4bda77d0520766813201726f53b439b6094a24
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
11 years agoSimplify function with early return.
Frederik Gladhorn [Wed, 6 Mar 2013 17:24:19 +0000 (18:24 +0100)]
Simplify function with early return.

Change-Id: Ic0e1a32f6c586e75fb7389ef8009e56881942cf1
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
11 years agoTests: add autotests for TextEdit and TextInput
Caroline Chao [Tue, 5 Mar 2013 13:56:10 +0000 (14:56 +0100)]
Tests: add autotests for TextEdit and TextInput

Check the selection is not cleared when the control receives
a focus out event with one of the following reason:
- Qt::ActiveWindowFocusReason
- Qt::PopupFocusReason

Change-Id: I38f4a4cba5e769f19de4e327d03be57a8d1d36a7
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
11 years agoHandle focus events directly in TextEdit.
Frederik Gladhorn [Mon, 4 Mar 2013 20:26:13 +0000 (21:26 +0100)]
Handle focus events directly in TextEdit.

Instead of relying on the item change
where we don't get focus reason, use
focusInEvent and focusOutEvent.

Change-Id: I2db7d81c67c65595b929fdcedc568af360831c5c
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
11 years agoTextInput: Update text deselection on focus out event
Caroline Chao [Tue, 5 Mar 2013 10:11:02 +0000 (11:11 +0100)]
TextInput: Update text deselection on focus out event

The text selection should not be cleared when the focus
out event received has one the following reasons:
- Qt::ActiveWindowFocusReason
- Qt::PopupFocusReason

When the user opens a menu or navigates to another window,
the eventual selection should not be clearer.

This also makes the behavior consistent with TextEdit.

Change-Id: Ibc6242cb2f8207cf5281925c8e20b88394f21eea
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
11 years agoTextInput: Handle focus event directly
Caroline Chao [Tue, 5 Mar 2013 10:04:26 +0000 (11:04 +0100)]
TextInput: Handle focus event directly

Use focusInEvent and focusOutEvent instead of changeItem
to handle focus event. (One benefit is the focus events
have the focus reason and changeItem doesn't).

Change-Id: I164820f375f0ffddc529d59565a3e448b84c6042
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
11 years agoFocus reason
Caroline Chao [Tue, 5 Mar 2013 11:00:19 +0000 (12:00 +0100)]
Focus reason

When trying to do for example text handling it becomes
obvious that focus handling is not proper.

A mouse click focus should de-select text,
while a window change should preserve the selection.

Re-introduce focus reason.

Change-Id: I3322c976437cba68938d7c9188e549bdb499fa5a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
11 years agoFix rendering of subpixel positioned native text
Eskil Abrahamsen Blomfeldt [Tue, 5 Mar 2013 13:21:04 +0000 (14:21 +0100)]
Fix rendering of subpixel positioned native text

To get accurate sampling of the native text rendering, we use
nearest filtering. This, however, does not work well when we're
sampling in the middle of pixels and the result is that with
text which is positioned at 0.5 offsets, we will sample the
wrong pixels and get artifacts from this. The main use case
for native rendered text is unrotated and unscaled text,
so we fix this use case by pixel-aligning the translation
factor.

Done-with: Samuel

Task-number: QTBUG-30022
Change-Id: I6911196d6ff491dca3b329c42da1c6dd7263cff0
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoDisable qv8profilerservice test. It is very unstable
Gunnar Sletta [Wed, 6 Mar 2013 10:12:44 +0000 (11:12 +0100)]
Disable qv8profilerservice test. It is very unstable

Change-Id: Ic7fada8ca457b15fb62a47d2137de7d6f8b1711a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoDisable more unstable tests
Gunnar Sletta [Thu, 7 Mar 2013 07:49:36 +0000 (08:49 +0100)]
Disable more unstable tests

Change-Id: I54db72466ca50d65dd39e9c8e25d3a366cb737ea
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoRemove spurious include
Alan Alpert [Mon, 25 Feb 2013 22:38:07 +0000 (14:38 -0800)]
Remove spurious include

While it's discouraged to use the entire module headers inside Qt, this
particular example also compiles without the line.

Change-Id: I75b6fc09e11d00df2f19f5db9b0209ed4cd82844
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
11 years agoAdd core application functionality to Qt.application in QML
Alan Alpert [Tue, 19 Feb 2013 05:07:15 +0000 (21:07 -0800)]
Add core application functionality to Qt.application in QML

This exposes some information to QML which is available on
the QCoreApplication instance.

A future change should make it possible to restrict this for use in scripting
environments (which should not have access to the QCoreApplication). That has
been left out of this change because proper support for such restrictions is
not yet in place.

Change-Id: Ica144fcfb0b42fa6df8d0cb1c7c03eb97282b489
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
11 years agoAndroid support: build fixes
Paul Olav Tvete [Mon, 4 Mar 2013 12:51:32 +0000 (13:51 +0100)]
Android support: build fixes

Change-Id: If829341b0baef7b253a386a195d3b5e4238b8103
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
11 years agoAccessibility: Adapt memory management for Qt 5.1
Frederik Gladhorn [Wed, 9 Jan 2013 14:51:04 +0000 (15:51 +0100)]
Accessibility: Adapt memory management for Qt 5.1

The model was changed to cache interfaces, so
do not try to delete them.

Change-Id: I5a97a6aca38036803c62d90988bb6d02196f0b84
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
11 years agoFix crash for keypress without active focus.
Frederik Gladhorn [Mon, 4 Mar 2013 23:23:23 +0000 (00:23 +0100)]
Fix crash for keypress without active focus.

If there was no active focus item
we need to use tryShortcutEvent with
 the window as target.

Change-Id: I420925781bbbda79fe2a62a5774230ae77c2cd34
Reviewed-by: Liang Qi <liang.qi@digia.com>
11 years agoRemove extra semicolon.
Frederik Gladhorn [Mon, 4 Mar 2013 20:08:12 +0000 (21:08 +0100)]
Remove extra semicolon.

Change-Id: I5830f8dd2c636ad8653506c04f8ea1a9ac000f9a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
11 years agoLoad "@2x" images on high-dpi "retina" systems.
Morten Johan Sørvig [Tue, 5 Mar 2013 07:55:34 +0000 (08:55 +0100)]
Load "@2x" images on high-dpi "retina" systems.

Check for the existence of a "@2x" file when loading
an image from a local file url. For example,

Image {
source = "foo.png"
}

will load "foo@2x.png" if that file exists.

Change-Id: I37688d035bc9eb412d54be0eb758dd52ebfa5d90
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoWork with synchronous replies from a custom QNetworkAccessManager
Alan Alpert [Thu, 28 Feb 2013 17:13:23 +0000 (09:13 -0800)]
Work with synchronous replies from a custom QNetworkAccessManager

Forward port of e5783b79887299d094 from QtQuick 1.

Task-number: QTBUG-27723
Change-Id: I4332dd72bb9d65167307c1ac5ce24e93b14cff5f
Reviewed-by: Peter Hartmann <phartmann@rim.com>
11 years agoFix relative URL in parallax example
Alan Alpert [Thu, 28 Feb 2013 18:24:47 +0000 (10:24 -0800)]
Fix relative URL in parallax example

Samegame demo moved a while back, this didn't get updated.

Change-Id: Ib34a09f606528e1e53650bbbd4d19787b1864bcb
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoAdded photosurface example to demo PinchArea/MouseArea together
Shawn Rutledge [Mon, 25 Jun 2012 18:06:12 +0000 (20:06 +0200)]
Added photosurface example to demo PinchArea/MouseArea together

It seems to be important to put the MouseArea inside the PinchArea
in order to support simultaneous drag/rotate/pinch.

Change-Id: Ic3ec6a131bd2d4c7f8a8560cd9c3015a717fef20
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>