Commit Graph

1170 Commits

Author SHA1 Message Date
Liang Qi
511790fd1a Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	config_help.txt
	configure
	mkspecs/features/uikit/sdk.prf
	src/corelib/global/qhooks.cpp
	src/corelib/io/qfilesystemwatcher.cpp
	src/corelib/io/qlockfile_unix.cpp
	src/corelib/tools/qalgorithms.h
	src/gui/kernel/qwindowsysteminterface.h
	src/gui/text/qtextdocument_p.cpp
	src/network/access/access.pri
	src/network/access/qnetworkaccessmanager.cpp
	src/network/access/qnetworkreplynsurlconnectionimpl.mm
	src/src.pro
	src/testlib/qtestcase.cpp
	src/widgets/kernel/qwidgetbackingstore_p.h
	src/widgets/styles/qwindowscestyle.cpp
	src/widgets/styles/qwindowsmobilestyle.cpp
	tests/auto/corelib/io/qdiriterator/qdiriterator.pro
	tests/auto/corelib/io/qfileinfo/qfileinfo.pro
	tests/auto/gui/kernel/qwindow/BLACKLIST
	tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
	tools/configure/configureapp.cpp

Change-Id: Ibf7fb9c8cf263a810ade82f821345d0725c57c67
2016-06-13 12:46:46 +02:00
Shawn Rutledge
982b70d37d autotests: use QTest::createTouchDevice()
Task-number: QTBUG-44030
Change-Id: I514c1294a0ff6587b825982a8bb354104c214120
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-06-10 13:07:17 +00:00
Milla Pohjanheimo
e73e2264de Blacklist tst_QWindow tests for Ubuntu 16.04
Blacklisting tests positioning(default), modalWindowPosition() and
modalWindowEnterEventOnHide_QTBUG35109()

Task-number:
QTBUG-53156
QTBUG-54001
QTBUG-35109

Change-Id: Ib0c50a356a1928afbd12a1ec3650f80f65b81265
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2016-06-10 08:49:44 +00:00
Liang Qi
57057f76ad Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	.qmake.conf
	config.tests/unix/nis/nis.cpp
	mkspecs/unsupported/freebsd-g++/qplatformdefs.h
	src/corelib/tools/qdatetime.cpp
	src/corelib/tools/qsimd.cpp
	src/corelib/tools/qsimd_p.h
	src/network/access/access.pri
	src/network/access/qnetworkreplynsurlconnectionimpl.mm
	src/network/access/qnetworkreplynsurlconnectionimpl_p.h
	src/plugins/platforms/cocoa/qnsview.mm
	src/plugins/printsupport/windows/qwindowsprintdevice.cpp
	tests/auto/corelib/kernel/qobject/tst_qobject.cpp
	tests/auto/network/access/qnetworkreply/BLACKLIST
	tests/auto/widgets/widgets/qopenglwidget/BLACKLIST

Change-Id: I4b32055bbf922392ef0264fd403405416fffee57
2016-06-06 09:04:55 +02:00
Morten Johan Sørvig
22667483e1 Blacklist modalDialogClosingOneOfTwoModal on OS X
Passes locally (on 10.10), but seems to have become
unstable on the CI system.

Task-number: QTBUG-53790
Change-Id: I0432fca4121b97bcdd6cec529fc4e148dfb8c1ab
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-06-04 18:36:04 +00:00
Eskil Abrahamsen Blomfeldt
8fb29ed259 Don't alter input string in QTextLayout with ShowLineAndParagraphSeparators
When ShowLineAndParagraphSeparators was set, we would replace the
separator character in the user's string in some cases, since we never
detached from the input string and just const_cast the pointer to the
shared buffer.

[ChangeLog][QtGui][Text] Fixed bug where a QTextLayout with
ShowLineAndParagraphSeparators would modify the layout's input
string.

Task-number: QTBUG-42033
Change-Id: I92f9100b750f16e52b38b718245c13e5c4a0ebb9
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2016-06-01 10:04:02 +00:00
Jake Petroules
a160bd4fcc Fix bugs causing Thin font weights to be ignored or mishandled.
Task-number: QTBUG-53196
Change-Id: If12b3cab3d8de5e0e452fca844b0a484c29e9e86
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2016-06-01 02:29:51 +00:00
Milla Pohjanheimo
a6e724df77 Blacklist tst_qabstracttextdocumentlayout::formatAt on OpenSUSE42.1
To get QtWayland in the CI, we need to blacklist formatAt on OpenSUSE
42.1

Task-number: QTBUG-52991
Change-Id: I8f411ccd6ab1e1d385e98cd8cae81a5570d68a8f
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2016-05-27 12:22:01 +00:00
Milla Pohjanheimo
a15741b382 Blacklisting tst_qabstractdocumentlayout::imageAt on OpenSUSE 42.1
We need to blacklist the test since we need to get QtWayland in CI

Task-number:QTBUG-53648

Change-Id: Id98c18aa8f39766b5dbb859b085f1912c42339fe
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2016-05-26 11:29:36 +00:00
Benjamin Terrier
0e6f1cb7fa Add applicationDisplayNameChanged() signal.
If applicationDisplayName has not been set, the signal is emitted when
applicationNameChanged() is emitted.

[ChangeLog][QtGui][General] Add
QGuiApplication::applicationDisplayNameChanged() signal.

Task-number: QTBUG-53076
Change-Id: I18494ad90bd8dec3f79ef5175a3a85e776560fd0
Reviewed-by: David Faure <david.faure@kdab.com>
2016-05-24 10:01:42 +00:00
Liang Qi
56d6e000f7 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	mkspecs/wince80colibri-armv7-msvc2012/qmake.conf
	qmake/generators/win32/msvc_vcproj.cpp
	src/corelib/global/qnamespace.h
	src/corelib/global/qnamespace.qdoc
	src/corelib/io/qfsfileengine_win.cpp
	src/corelib/tools/tools.pri
	src/network/ssl/qsslconfiguration_p.h
	src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
	src/plugins/platforms/windows/windows.pri
	src/src.pro
	src/tools/bootstrap/bootstrap.pro
	src/tools/uic/cpp/cppwriteinitialization.cpp
	src/widgets/dialogs/qfilesystemmodel.cpp
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt

Change-Id: I4d2ac78f0dcc97f008186bbbc769c6fe588ab0e5
2016-05-23 21:09:46 +02:00
Maurice Kalinowski
8e8bd90e44 Fix compilation without process support
Change-Id: I88ef96bf15f40e459bacc4b2abe4dfe84e257495
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-05-20 10:37:18 +00:00
Liang Qi
818014b449 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	configure
	src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
	src/network/access/qnetworkaccessmanager.cpp
	src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h
	src/widgets/widgets/qlineedit_p.cpp
	src/widgets/widgets/qlineedit_p.h
	src/winmain/winmain.pro
	tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp
	tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
	tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt
	tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
	tools/configure/configureapp.cpp

Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
2016-05-19 12:55:27 +02:00
Mike Krus
03e9c6f4a6 Add support for Apple tvOS
Pass -xplatform macx-tvos-clang to configure to build.
Builds device and simulator by default.

Added ‘uikit’ platform with the common setup.
Also added QT_PLATFORM_UIKIT define (undocumented).
qmake config defines tvos (but not ios).

tvOS is 64bits only (QT_ARCH is arm64) and requires bitcode to be
embedded in the binary. A new ‘bitcode’ configuration was added.
For ReleaseDevice builds (which get archived and push to the store),
bitcode is actually embedded (-fembed-bitcode passed to clang). For all
other configurations, only using bitcode markers to keep file size
down (-fembed-bitcode-marker).

Build disables Widgets in qtbase, and qtscript (unsupported,
would require fixes to JavaScriptCore source code).

Qpa same as on iOS but disables device orientation, status bar, clipboard,
menus, dialogs which are not supported on tvOS.

Change-Id: I645804fd933be0befddeeb43095a74d2c178b2ba
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-05-17 16:11:23 +00:00
Eirik Aavitsland
5316befba2 ICO image format: fix regression in writing when size >= 256
In commit c6c9304, the earlier size limit of 128 was raised to the
format's defined maximum of 256. But the required special storage of
this size in the image structures was not implemented. Hence,
attempting to store such big icons would result in invalid image
files.

Fix the size storing details, and add some autotests of ico format
writing since that was practically uncovered.

Task-number: QTBUG-53259
Change-Id: I00e17a04e90c32dcf1124ba5adaf53728fb74dc7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-05-13 04:37:15 +00:00
Eskil Abrahamsen Blomfeldt
d70205cd2b Remove dead code from tst_QFont::exactMatch()
All this code was skipped on all platforms, so keeping it is just
confusing.

Change-Id: I405d2e791b22a2494fe5ccac6e3bf08905dc4e5a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-05-12 10:13:58 +00:00
Eskil Abrahamsen Blomfeldt
78eeb6b066 QFont::exactMatch() should return false for aliases
This is a partial revert of 992f233c in Qt 4 repo. The rest of the
change cannot be reverted, since it added public API, but that
API might be useful anyway.

The patch was wrong, basically. QFont::exactMatch() should not claim
that you can get an exact match for a typeface alias. It also introduced
some weird inconsistencies: For instance, if the first font the alias
resolved to in FontConfig did not exist, then exactMatch() would return
false, even if it then resolved to the next one which existed. This
caused a test failure on OpenSuse, where the preferred font for "sans"
is Arial, which doesn't exist, so Roboto will be used instead.

[ChangeLog][QtGui][Important Behavior Changes] QFont::exactMatch() now
returns false when the provided typeface is an alias.

Task-number: QTBUG-46054
Change-Id: I7532d2879b492544620aa0d1d87dd493a4923af9
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-05-12 10:13:42 +00:00
Liang Qi
990969655c Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	config_help.txt
	configure
	src/corelib/io/qprocess_wince.cpp
	src/plugins/platforms/windows/qwindowstheme.cpp
	src/plugins/platforms/xcb/qxcbbackingstore.cpp
	tests/auto/corelib/tools/qtimezone/BLACKLIST
	tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
	tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp

Change-Id: I26644d1cb3b78412c8ff285e2a55bea1bd641c01
2016-05-12 08:33:08 +02:00
Mitch Curtis
e64b2234e8 QImage::setPixelColor: warn about invalid colors
Task-number: QTBUG-52142
Change-Id: I9f390bd332f8edabaece75a6b36830c691ff4b9e
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2016-05-11 07:21:02 +00:00
Liang Qi
dbef41f43e Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	examples/qtestlib/tutorial5/containers.cpp
	examples/widgets/tools/tools.pro
	src/corelib/io/qprocess.cpp
	src/corelib/io/qprocess_unix.cpp
	src/corelib/io/qprocess_win.cpp
	src/network/kernel/qdnslookup_unix.cpp
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/testlib/qtestcase.cpp
	tools/configure/configureapp.cpp

Change-Id: I838ae7f082535a67a4a53aa13a21ba5580758be8
2016-05-06 15:36:44 +02:00
Friedemann Kleint
722faa8daa Add some QChar::unicode() calls to brush over deprecation warning.
Change-Id: I381226153cdd7bc002476ebc7a33fcb6cf15535d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2016-05-06 08:11:19 +00:00
Friedemann Kleint
728a1b4f29 tst_QKeyEvent::modifiers(): Ensure test data row names are pure ASCII.
The test used to output random character sequences which contained
terminal control characters. Change it to output plain ASCII and
Unicode syntax for non-ASCII characters.

Change-Id: Ifaa72f50242bd27416a8698a1f5152bc8b902898
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-05-04 13:06:37 +00:00
Konstantin Ritt
a954ba8315 Enable some tests previously disabled due to different results with HB-NG
As of 5.7, HB-NG is the default shaper engine.

Change-Id: Ia5400444a5e387fa6b56de47fabc6f1c2c166f85
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-29 16:25:46 +00:00
Konstantin Ritt
3df159ba17 Improve the script itemization algorithm to match Unicode 8.0
Override preceding Common-s with a subsequent non-Inherited,
non-Common script.
This produces longer script runs, which automagically improves
the shaping quality (as we don't lose the context anymore),
the shaping performance (as we're typically shape a fewer runs),
and the fallback font selection (when the font supports more
than just a single language/script).

Task-number: QTBUG-29930
Change-Id: I1c55af30bd397871d7f1f6e062605517f5a7e5a1
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-04-27 16:52:27 +00:00
Eskil Abrahamsen Blomfeldt
7094466f7d Interpret fixed CSS line-height as minimum rather than absolute
The QTextBlockFormat::FixedHeight overrides the line height
regardless of its calculated height. If the line contains
objects or text which is higher than the specified line height,
using FixedHeight will cause them to overlap with the previous
line. This is not what happens in normal web browsers. The
expected behavior is that the line height given in CSS is the
minimum height, but that we still reserve space needed to display
everything without overlaps.

To make it possible for people to retain the old behavior, we
introduce the -qt-line-height-type property, which allows them
to override the default.

This also fixes output from toHtml() to use the new property
rather than set the minimum height of the paragraph or the
"line-spacing" property, which does not exist in either CSS nor
in Qt.

[ChangeLog][QtGui][Important Behavior Changes] When line height
is specified in pixels, this is now interpreted as the minimum
line height rather than an absolute line height to avoid overlaps.
To get the old behavior, use the -qt-line-height-type property in
CSS and set it to "fixed".

Task-number: QTBUG-51962
Change-Id: Ic2dde649b69209672170dad4c2de1e1c432a1078
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-19 09:32:10 +00:00
Friedemann Kleint
c736497483 Remove tests/auto/qtest-config.h.
The header defined a macro QTEST_NO_CURSOR depending
QT_NO_CURSOR or obsolete platforms Windows CE and Meego.

Replace usages by QT_NO_CURSOR in the tests.

Change-Id: I3edac88e684d1f932dd3b721bb1c1b3fe9144237
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-04-12 14:56:49 +00:00
Allan Sandfeld Jensen
cd06d901af Implement ordered dithering for image format conversions
QImage::convertToFormat was ignoring its conversion flag argument, only
performing dithering when converting to indexed formats.

This patch updates the documentation and implements ordered dithering
for other conversions.

Change-Id: I807353d61669694185b7e595ef262d80d9fbb3f1
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2016-04-12 12:52:34 +00:00
Lars Knoll
00ca784be6 Always build JPEG and GIF support as plugins
Our handling of plugins when Qt is build statically is
nowadays good enough, so we don't need to build the
JPEG and GIF support directly into Qt for static builds.
Let's simply always build them as plugins.

Also simplify the logic in configure, and get rid of the
no-gif, no-jpeg and no-png config variables.

[ChangelLog][Build system] JPEG and GIF image support is now
always built as a plugin. Removed -imageformat-[jpeg|gif]
arguments to configure.

Change-Id: Ic01559ff406c966807b3be8761252e8802adcdf7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-07 09:08:41 +00:00
Liang Qi
f285687584 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	examples/corelib/ipc/ipc.pro
	src/plugins/platforms/xcb/qxcbbackingstore.cpp
	tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp

Change-Id: Ia006e10ff1732fe78f90138c41f05b59b49486cf
2016-04-05 14:22:45 +02:00
Liang Qi
216f57ef86 Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I35ca979395620e104e50b06366d0869433a4ffc2
2016-04-04 08:59:18 +02:00
Simo Fält
f44d826751 Autotest: Remove blacklistings
Removing blacklistings from tests that are now passing.

Change-Id: I00aa1ce286d3e7715fb4bee4a36d0d77049a29ae
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
2016-04-01 05:41:21 +00:00
Eskil Abrahamsen Blomfeldt
a4e2f2e687 Fix possible crash in QImage::pixel()
QImage::pixel() assumed that the color table was valid
for the values in the bitmap. This was always wrong
for indexed images with explicit no color table set and
was wrong for mono images that were constructed from
preexisting data.

For mono images, we default to a black/white color table,
like we do when constructing with uninitialized data.

For indexed image, we always default to no color table,
but instead of crashing in pixel(), we warn and return
an undefined value.

[ChangeLog][QtGui][Image] Fixed possible crash in QImage::pixel()
for mono or indexed images.

Change-Id: Ieaf19c03984badddfd06e1855a7e287b862adc70
Task-number: QTBUG-50745
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2016-03-31 08:54:03 +00:00
Friedemann Kleint
bf537516a9 QtGui: Remove Windows CE.
Remove #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library,
and tests.

Task-number: QTBUG-51673
Change-Id: I55f61845c3b54027c467a5c59c122e7d16955358
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-03-30 17:35:41 +00:00
Eirik Aavitsland
91f8c9cc70 Remove the traces of the discontinued android-no-sdk platform
Cleaning out the workarounds for the discontinued "Embedded Android"
platform of Boot2Qt.

Change-Id: I0ff9d770e82a43457fb7e5da0428f4597ead4038
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-30 10:12:34 +00:00
Edward Welbourne
717724b17a Purge sRGB chunks from PNGs in tests.
Subjects each *.png file that matched grep -law "sRGB" to:
pngcrush -ow -brute -rem allb -reduce
(Two needed -force but did get smaller.)

Change-Id: Ia030f0bc1d3617ba716bcc26677ff919ef58423c
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-03-29 08:39:43 +00:00
Liang Qi
a02863234d Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	configure
	mkspecs/common/wince/qplatformdefs.h
	src/plugins/platforms/directfb/qdirectfbbackingstore.cpp
	src/plugins/platforms/xcb/qxcbbackingstore.cpp

Change-Id: Ied4d31264a9afca9514b51a7eb1494c28712793c
2016-03-22 07:28:42 +01:00
Liang Qi
6cb8121a44 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/widgets/styles/qgtkstyle_p.cpp
	tests/auto/corelib/io/qtextstream/test/test.pro
	tests/auto/corelib/plugin/plugin.pro

Change-Id: I512bc1b36acf3933ed2b96c00f476ee3819c1f4b
2016-03-21 09:02:57 +01:00
Rolland Dudemaine
d58596fd61 Remove inclusion of -lm for INTEGRITY.
Math functions are linked in by default on INTEGRITY.

Change-Id: I737ae87c02b2321caca3975f69525731e839d1a7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-18 20:40:59 +00:00
Alberto Mardegan
fb6000a74f Add QAbstractTextDocumentLayout::imageAt(), formatAt()
The new imageAt() method pairs with the existing anchorAt() method, and
allows retrieving the source link of the image under the cursor.
We also expose the common logic between these two methods as an
additional formatAt() method.

[ChangeLog][QtGui][QAbstractTextDocumentLayout] Added imageAt() and
formatAt() methods, which respectively can be used to retrieve the
source link of the image under the cursor, or the QTextFormat of the
text under the cursor.

Change-Id: If09815dde91de6616edcb19c72c462dbf7abd8ef
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-03-18 19:02:13 +00:00
Tony Sarajärvi
1151d8e5e3 Blacklist tst_qfont::exactMatch in openSUSE 42.1
It is already blacklisted in openSUSE 13.1 and is a
known bug somewhere.

Task-number: QTBUG-46054
Change-Id: Ie2fb23bcede1871d3b9fa15644112fb2ab975c2b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-03-17 08:41:48 +00:00
Tony Sarajärvi
3e72eaba2c Autotest tst_qfont can split font families
openSUSE 42.1 returns 2 font families comma separated
when querying monospace font families. Without splitting
we compared the family against the whole list.

Task-number: QTBUG-51336
Change-Id: Icd757e173aa8ffab713b83cf9e38b78aab00c07e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-03-16 09:24:21 +00:00
Liang Qi
50d0f57b77 Merge remote-tracking branch 'origin/5.6' into 5.7
This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define
and undef in src/corelib/tools/qsimd_p.h.

This change is also squashed with "Fall back to c++11 standard
compiler flag for host builds" which is done by Peter Seiderer.

Conflicts:
	mkspecs/features/default_post.prf
	src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch
	src/3rdparty/sqlite/sqlite3.c
	src/corelib/tools/qsimd_p.h
	src/gui/kernel/qevent.cpp
	src/gui/kernel/qwindowsysteminterface.cpp
	src/gui/kernel/qwindowsysteminterface_p.h
	src/plugins/bearer/blackberry/blackberry.pro
	src/plugins/platforms/cocoa/qcocoasystemsettings.mm
	src/plugins/platformthemes/gtk2/gtk2.pro
	src/plugins/styles/bb10style/bb10style.pro
	src/sql/drivers/sqlite2/qsql_sqlite2.cpp
	tools/configure/configureapp.cpp

Task-number: QTBUG-51644
Done-with: Peter Seiderer <ps.report@gmx.net>
Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
2016-03-11 20:08:50 +01:00
Allan Sandfeld Jensen
8589bb334f Enable most of tst_qstatictext on non-developer builds
Only two tests inside tst_qstatictext required private symbols, so
we can enable the rest on all builds.

Change-Id: Id222ba01d9676c40b6447c1526ee127fcc2090d3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-10 15:45:41 +00:00
Friedemann Kleint
45dc347a95 tst_QStaticText: Output verbose message for test failures.
Factor out function to check on the pixel color that
outputs a verbose message on failure.

Change-Id: I2331fe45f35327d1ff8ae547a58d93a2e6fe9184
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-03-10 12:37:47 +00:00
Friedemann Kleint
4ef990ce4a tst_QKeyEvent: Fix MSVC warning about 64bit shift.
tst_qkeyevent.cpp(140): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)

Change-Id: Id3e0eea125f7f7ec13f9b9428e034b922d2ce204
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-03-08 14:57:14 +00:00
Dan Cape
36ecf2c025 Fix QTextEdit/QQuickTextEdit undo bug - Part #2
If a user selected the text "foo" and typed "bar", upon pressing undo,
the text would change to "b". This is incorrect and does not match the
functionality of QLineEdit or the default behaviours of Windows/OSX/Ubuntu.
This was fixed by a change made to always merge two sequential inserts
if they are not part of the same block. Previously the selection delete
and the "b" were part of one edit block and "ar" was part of another.
With this change, the selection delete and "bar" are part of the same
edit block.

Unit test changes are part of a separate review (Part #1) since they
required changes in qtdeclarative.

[ChangeLog][QtGui][Important Behavior Changes] Fixed QTextEdit to match
undo functionality of QLineEdit to group two sequential inserts into one
undo action.

Task-number: QTBUG-38825
Change-Id: I76bf30e331e3526277c3e0ade58cf95b611fc117
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-03-02 16:00:02 +00:00
Friedemann Kleint
0aed4fd941 tst_qimagewriter: Fix leaking temporary files.
Add missing slash to the prefix pointing to the temporary directory.

Change-Id: I0d00f706af58214a9922758a60d097cab7d6bc9d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2016-03-02 14:53:08 +00:00
Friedemann Kleint
235c1c776a Fix test tst_QIcon::fromThemeCache().
Verify that the temporary directory could be created. Check whether
the gtk-update-icon-cache binary exists before running and skip cleanly.
Check successful execution. Fixes Windows warnings:

SKIP   : tst_QIcon::fromThemeCache() gtk-update-icon-cache not run
.\tst_qicon.cpp(707) : failure location
QWARN  : tst_QIcon::fromThemeCache() QTemporaryDir: Unable to remove "D:\\temp\\tst_qicon-DSSn9G" most likely due to the presence of read-only
files.

Change-Id: Ibc8f883121e62b30d71586bc64b42eb6c480925f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-02 07:14:47 +00:00
Liang Qi
24cd4a7190 Merge remote-tracking branch 'origin/5.7' into dev
Change-Id: Ic7aaa06f4a14b1aed61faa1a6e7f527ee0eeb96b
2016-03-01 08:23:55 +01:00
Liang Qi
a224dfc9d1 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	tests/auto/corelib/io/qprocess/tst_qprocess.cpp

Change-Id: Ib6955eb874b516b185b45d6c38cec646fbaa95f4
2016-02-29 12:34:31 +01:00
Marc Mutz
77164e4cc0 QRegion: make iterable
Virtually all code in Qt that inspects a QRegion does
so by calling rects(), which returns a QVector<QRect>.

But rects() has a problem: A QRegion that contains just
one rectangle internally is not represented by a QVector,
and the mere act of calling rects() makes QRegion create
one.

So, expose the fact that QRegion is a container of QRects
to users by providing iterators and begin()/end(), which
can be nothrow, since for the one-rectangle case, instead
of vectorize()ing the region, we just return pointers to
(and one past) the 'extent' rectangle.

As a consequence, the iterator type is just const QRect*,
but I think that whatever containers QRegion may use under
the hood in the future, it will be certainly one that is
layout-compatible with a C array.

No mutable iterators are provided, since QRegion maintains
a running bounding-rect, so a mutable iterator would have
to call into QRegion for every change, which doesn't make
sense.

[ChangeLog][QtGui][QRegion] Is now iterable as a container
of QRects: added {c,}{r,}{begin,end}().

Change-Id: I2fa565fac0c1d26e2c0937604b23763cd4e23604
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-28 19:06:44 +00:00
Marc Mutz
0a8fd9c620 tst_qguimetatype::flags(): port to QTypeInfoQuery
QTypeInfoQuery was introduced for 5.6 to decouple isStatic
and isRelocatable so old code continues to work. But since
this test still uses !isStatic to mean trivially-relocatable,
it will fail as soon as one of the checked types is marked as
Q_RELOCATABLE_TYPE instead of Q_MOVABLE_TYPE.

Incidentally, such a change is in the pipeline for Qt 5.7/5.8,
so fix the test by porting to QTypeInfoQuery. Do this in 5.6,
because that's when QTypeInfoQuery was introduced.

Change-Id: I06f815f26ca9b430e124c4a2f8de2a729999762b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-26 09:12:23 +00:00
Liang Qi
3ed944b843 Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/dev 2016-02-25 12:23:23 +00:00
Tony Sarajärvi
d8f4d4452d Adjust tst_qabstracttextdocumentlayout for border cases
OpenSUSE 42.1 failed this case for some reason. With this change
the test tests the anchor from the middle of the string instead
of looking for it from the end.

Task-number: QTBUG-51345
Change-Id: I2fc7496399f46926f261c7a1f48756bfaf782f7b
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-02-25 07:37:49 +00:00
Liang Qi
1fadc7292b Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
	src/plugins/platforms/windows/qwindowsfontengine.cpp
	src/plugins/platforms/windows/qwindowsnativeimage.cpp
	tests/auto/gui/kernel/qwindow/BLACKLIST
	tests/auto/gui/kernel/qwindow/tst_qwindow.cpp

Change-Id: I649b32b260ce0ed2d6a5089021daa0d6a8db85f7
2016-02-24 13:31:14 +01:00
Anton Kudryavtsev
9e59174b49 QPixmap: check data ptr in isQBitmap()
Task-number: QTBUG-51271
Change-Id: I670e074ced1217d2614fa334eb365e40ef80b8b1
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-02-24 12:13:56 +00:00
Błażej Szczygieł
7091be1b79 xcb: Deliver mouse enter event to window when closing modal window
When a modal window is closed and the mouse is not under the modal
window - find a proper window and send a fake enter event.

Added auto test for checking enter event on window when modal window
is closed.

Task-number: QTBUG-35109
Change-Id: I370b52d386503820ac9de21e6d05fd019ca456ec
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-02-24 09:03:14 +00:00
Liang Qi
4fe2fbcf82 Merge remote-tracking branch 'origin/5.6' into 5.7
This also reverts commit 018e670a26.

The change was introduced in 5.6. After the refactoring, 14960f52,
in 5.7 branch and a merge, it is not needed any more.

Conflicts:
	.qmake.conf
	src/corelib/io/qstandardpaths_mac.mm
	src/corelib/tools/qsharedpointer_impl.h
	tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp

Change-Id: If4fdff0ebf2b9b5df9f9db93ea0022d5ee3da2a4
2016-02-18 20:50:35 +01:00
Oswald Buddenhagen
86c5a337e3 Merge "Merge dev into 5.7" into refs/staging/5.7 2016-02-17 19:57:54 +00:00
Stephen Kelly
bfeb2fdd79 QStandardItemModel: Reset the flags on clear()
Pass modeltest after clear().  Otherwise it fails because more flags
than Qt::ItemIsDropEnabled get returned for the QModelIndex().

Change-Id: I8f11515cc7dc9383f528f785312ffb77b3c2699d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-17 11:39:13 +00:00
David Faure
bbc830ce3e QIcon::fromTheme(): add support for absolute paths.
This allows methods that return an icon name, to sometimes also
return an icon full path (e.g. because the icon was dynamically generated
and stored into a local cache on disk)

Change-Id: Ib01c3955f4b64236463846241d9814b2d0686634
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-15 13:53:54 +00:00
Liang Qi
80bf4bfe3d Merge remote-tracking branch 'origin/5.6.0' into 5.6
Change-Id: I0b190005377a23a91da3563428e223b8a3b18333
2016-02-15 08:09:50 +01:00
Marc Mutz
afc7da09ec QRegion: add move ctor
After this change, this was the distribution of calls in
QtGui and QtWidgets when the patch was developed for 5.4:

      QtGui  QtWidgets
move  23     63
copy  23     36

Change-Id: If3f536e52fc242c585e7fa0662049c0657efcc9c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-02-13 18:18:32 +00:00
Liang Qi
d456f87ece Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/corelib/io/qfilesystemwatcher_win.cpp
	src/corelib/plugin/plugin.pri
	src/plugins/platforms/cocoa/qcocoaaccessibility.mm
	tests/auto/corelib/tools/qlocale/tst_qlocale.cpp

Change-Id: Id6824631252609a75eff8b68792e4d10095c8fc1
2016-02-11 08:25:04 +01:00
Simo Fält
5d8354e63a Autotest: Enable make check on rhel 7.1
Blacklisting all tests, which were failing locally.

Task-number: QTQAINFRA-949
Change-Id: I40c25ab0155b8977596d61297ab252a546515f87
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
2016-02-11 05:47:38 +00:00
Aleix Pol
8b4ac65e29 Provide QCss with the correct font for <pre> blocks
Labels would use a statically defined font for <pre> blocks.
Use the one defined by the QPlatformTheme instead, through
QFontDatabase::systemFont(FixedFont)

Task-number: QTBUG-50564
Change-Id: I5491bd0defce651bdf809bcbc6a529a900f4959b
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
2016-02-09 21:24:46 +00:00
Eirik Aavitsland
e4f71b0cb5 Crash fix: reject certain malformed bmp images
A malformed bmp file header could specify a negative color table
size. The bmp handler would then return a QImage that claimed to be
valid, but actually was invalid, having an empty color table. This
would cause crash later, e.g. when attempting to paint it.

Change-Id: I7df7c40867557a82dbcee44c7de061226ff232c0
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2016-02-05 04:14:35 +00:00
Allan Sandfeld Jensen
6ec7d7658d Fix rounding error in fetchTransformedBilinear
To calculate the real count we need to use the actual fixed point
increment and can not use the floating point value increment wass based
on since it might round differently.

Includes auto-test by Gabriel de Dietrich.

Task-number: QTBUG-50153
Change-Id: Ia973088f361c90370fa20bac14a4b8f373b5d234
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-02 22:47:10 +00:00
Liang Qi
d3e6e732c7 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	config.tests/unix/compile.test
	src/plugins/platforms/cocoa/qcocoahelpers.mm
	src/tools/qlalr/cppgenerator.cpp

Change-Id: I0103ca076a9aca7118b2fd99f0fdaf81055998c3
2016-02-02 15:57:44 +01:00
Oswald Buddenhagen
615534f14c Merge 5.6 into 5.6.0
Change-Id: I95962e28b6fc101cbbad41230585e2b61f1f6c0f
2016-02-02 13:12:21 +01:00
Dmitry Shachnev
b84c61b088 Stop Q_AUTOTEST_EXPORTing QKeyBinding and QKeySequencePrivate
The QKeySequence test no longer uses private members (since commit
725bdc3fd2), so that is no longer needed.

Also, remove the unused include from the test.

Change-Id: I4d252bb3efd7282f74c44e48444c23ab51d48ea5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-02-02 05:57:08 +00:00
Tor Arne Vestbø
d10bfff89a Revert "QWindow::destroy(): only reset QGuiApp::focus_window and friends as a last resort"
This reverts commit 4c71db7567.

It's too risky for 5.6, we should let it cook in dev for a while
and backport when ready.

Change-Id: I91e677e65d967f29c84a254cd3dffc8bb847b263
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-02-02 02:12:26 +00:00
Eskil Abrahamsen Blomfeldt
dce530b64e Fix bounding rect of glyph runs in multi-line QTextLayout
When getting the glyph runs from a QTextLayout with multiple
lines, the glyph runs would be merged if possible, but not their
bounding rects. This was an oversight.

[ChangeLog][Text][QTextLayout] QTextLayout::glyphRuns() now returns
united bounding rects for glyph runs that are merged.

Change-Id: Ibbeaa99ecfc4e82e7965342efdae7c3c2b637343
Task-number: QTBUG-50715
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-30 06:53:44 +00:00
Tor Arne Vestbø
f576f438bf Add basic QKeyEvent auto-test
Change-Id: I732723389edf0970e9688966407c728d38538d0a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-01-30 05:13:21 +00:00
Tor Arne Vestbø
4c71db7567 QWindow::destroy(): only reset QGuiApp::focus_window and friends as a last resort
Resetting focus_window and other internal QGuiApplication variables before
calling setVisible(false) and destroying the platform window means that the
platform window can't reason about whether or not it was the focus window
unless it can resolve that using native APIs. We should let the platform
window take care of resetting the focus window and related states, and
only execute our fallback logic if the plugin doesn't do the right
thing.

We also use QPA to update the state instead of modifying the internal
QGuiApplication variables directly, so that events and signals are
emitted as a result of the reset.

The QLineEdit test gets two added calls to processEvents(), since
assuming that activateWindow() is synchronous is not correct, and
would result in the QMenu resetting the focus window to 0 on destroy.

Task-number: QTBUG-46414
Change-Id: I562788393ed0ffd77d7a4be2279862322f721c1a
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-01-29 19:29:14 +00:00
Konstantin Ritt
3e5719ae7b QFont: Fix possible cache misses due to misprepared cache key
Parse the requested family before we're looking/saving into the cache,
thus hitting the cached EngineData for:
* quoted family names (eg. QFont("'Arial'"))
* non-simplified family names (eg. QFont(" Arial  "))
* substituted family names (\sa QFont::insertSubstitution())
* explicit fallback list, where possible (eg. QFont("Tahoma, Arial"))

This also improves the cache hitting for the font engines in some cases.

Change-Id: I18cdc3e8d669cccec961f84e9b27329402e2b7ed
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-01-29 11:24:49 +00:00
Konstantin Ritt
5f472cae71 QFontCache: Centralize the engine type safety check
We depend on the assumption QFontCache::findEngine(key) for key.multi=1
returns a font engine of type QFontEngine::Multi;
guarantee that by checking it in a single place.

Change-Id: I287da4fd62deb22fc5520cde5b0505bc44547609
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-01-28 18:24:08 +00:00
Liang Qi
a15c3d086d Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
	src/dbus/qdbusconnection_p.h
	src/dbus/qdbusintegrator.cpp
	src/dbus/qdbusintegrator_p.h
	tests/auto/corelib/io/qdir/qdir.pro
	tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp

Change-Id: I3d3fd07aed015c74b1f545f1327aa73d5f365fcc
2016-01-26 16:27:28 +01:00
Liang Qi
0a1af55a9b Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev 2016-01-26 11:27:37 +00:00
Tony Sarajärvi
720d1792f2 Remove insignificant from qabstracttextdocumentlayout test
Task-number: QTBUG-28593
Change-Id: If5a102cd1c8cdad6d77cc8dbcece3ac983a8010b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-01-22 09:13:27 +00:00
Tony Sarajärvi
870e68cd75 Remove insignificant flag from qglyphrun test
Task-number: QTBUG-28593
Change-Id: I04e73947c7f131bdb4341c224fb008b26be22c22
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-01-22 09:13:20 +00:00
Thiago Macieira
d921a9bd15 Hide better the private API QTextCursor constructors
Both constructors were taking a pointer, so they participated in
overload resolution along with QTextDocument and QTextFrame pointers.

Instead, make them take references and move them to the private section
of QTextCursor. That necessitated adding a method to QTextCursorPrivate
to access that private constructor from non-friend classes.

Change-Id: I7e6338336dd6468ead24ffff1410e3bc534d77dd
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2016-01-22 03:36:16 +00:00
Jani Heikkinen
f776595cc1 Updated license headers
From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some
exceptions, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/

Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one
(in those files which will be under GPL 3 with exceptions)

Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-21 18:55:18 +00:00
Liang Qi
158a3a4159 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/corelib/io/qiodevice_p.h
	src/corelib/kernel/qvariant_p.h
	src/corelib/tools/qsimd.cpp
	src/gui/kernel/qguiapplication.cpp
	tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp

Change-Id: I742a093cbb231b282b43e463ec67173e0d29f57a
2016-01-21 08:17:21 +01:00
Jani Heikkinen
7b2fb038ae Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6 2016-01-21 04:27:06 +00:00
Timur Pocheptsov
b530ca770f tst_qtextcocumentlayout::blockVisibility - make the test more robust
The test inserts strings "0" ... "9" into the text document,
takes the half of resulting document's size, makes half of
lines invisible and compares sizes. On OS X 10.11 after inserting
"4" the width changes, so making "4" invisible also reduces the width
and QCOMPARE(currentSize, previosHalfSize) fails. Instead of digits,
insert the same string "A" 10 times.

Change-Id: Ie88a0442703f98949cea9bcdb694cecee59695f3
Task-number: QTBUG-49848
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2016-01-19 14:48:47 +00:00
Liang Qi
8f569c740a Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	config.tests/common/atomic64/atomic64.cpp
	configure
	src/3rdparty/forkfd/forkfd.c
	src/corelib/io/forkfd_qt.cpp
	src/widgets/kernel/qwidgetwindow.cpp
	tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp
	tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
	tools/configure/configureapp.cpp

Change-Id: Ic6168d82e51a0ef1862c3a63bee6722e8f138414
2016-01-19 10:03:01 +01:00
Simon Hausmann
6b8c0a5058 Merge remote-tracking branch 'origin/5.6' into dev
Change-Id: I5839bded07e23af65ced9491c4f50242f964dd31
2016-01-12 11:07:56 +01:00
Oswald Buddenhagen
5783a915c4 don't rely on transitive dependencies
Change-Id: Ide872b452e02ebefb3eeb51464c8d59e8bf58bc4
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-01-08 18:51:02 +00:00
Alex Trotsenko
02f70004c2 Allow socket events processing with a foreign event loop on Windows
While a native dialog is open, the application message queue is
handled by the native event loop which is external to Qt. In this
case, QEventDispatcherWin32::processEvents() does not run and socket
notifiers will not be activated. So, this patch moves the notifier
activation code into the window procedure, which enables socket
event processing with native dialogs.

Task-number: QTBUG-49782
Task-number: QTBUG-48901
Change-Id: Icbdd96b2e80c50b73505f4fe74957575b83d6cf1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-01-05 13:05:35 +00:00
Liang Qi
beb65dcd79 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/gui/painting/painting.pri
	src/plugins/platforms/xcb/qxcbconnection.cpp
	tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro
	tests/auto/corelib/tools/qlocale/test/test.pro
	tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
	tools/configure/environment.cpp

Change-Id: I9c40f458b89b2c206de2d2c24e90b5f679c93495
2015-12-18 08:37:31 +01:00
Friedemann Kleint
e3288f246b Windows: Restore window geometry after normal->maximized->fullscreen->normal.
- Do not save geometry when going from maximized->fullscreen
- Use SW_SHOWNA instead SW_SHOWNOACTIVATE as otherwise the
  maximized geometry is restored.
- Add a test for Windows.

Task-number: QTBUG-49709
Change-Id: Ic81e7398ee90d499a50b02192a45cb09276a2105
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-12-17 14:58:29 +00:00
Allan Sandfeld Jensen
d290424f2a NEON optimized bilinear sampling
Adds NEON version of interpolate_4_pixels used by smooth upscaling, and
bilinear sampling.

The SSE2 version is reordered to match the NEON version so they have
the same order of operations and a faster version that loads directly
into vector registers.

Testing is extended so we have a test of smoothness that can catch more
possible mistakes.

Change-Id: I0de4aecf5cb79468e7c8f19f421aa24b2955547c
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-12-17 01:11:57 +00:00
Maurice Kalinowski
acdd57cb43 Fix compilation for WinRT
TEST_HELPER_INSTALLS cannot be used on platforms with no
QProcess support.

Change-Id: I2a6a283d94ca4487fc628449c53fc37140dd291d
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-12-14 08:43:15 +00:00
Juha Turunen
672f7dfdcd Fix a crash when calling QOpenGLTexture::setData with a null QImage.
Change-Id: Idf8ae00cff6929114b38dcb003c259c83a11dbaa
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-12-11 17:58:21 +00:00
Friedemann Kleint
1289bc8172 Tests: Remove empty init/cleanup slots, constructors and destructors.
Move some code (like registrations of meta types) from init() to
initTestCase() in the process.

Change-Id: I57db5156647cfadab554fbed853b2e68b2815f3b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-12-10 05:26:05 +00:00
Simon Hausmann
3ec31ef9c5 Merge remote-tracking branch 'origin/5.6' into dev
Change-Id: I2532c7f7db5e6cc3ef09753d886279816dd662b2
2015-12-08 07:09:47 +01:00
Allan Sandfeld Jensen
c04e7dead8 QImage pixelColor and setPixelColor must use unpremultiplied QColor
QColor always uses unpremultiplied alpha, but the new QImage methods
were based on the QRgb versions which might be either. This patches fixes
the two new methods so they treat QColor alpha correctly.

Change-Id: I78a5b875ad4e78ad7fde3b811c6187482b4f6d15
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-12-04 09:54:39 +00:00
Liang Qi
72f5867f14 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/corelib/kernel/qcoreapplication.cpp
	src/corelib/kernel/qeventdispatcher_blackberry.cpp
	src/network/bearer/qnetworkconfiguration.cpp
	src/plugins/bearer/blackberry/qbbengine.cpp
	src/plugins/platforms/android/androidjnimain.cpp
	src/plugins/platforms/android/qandroidplatformtheme.cpp
	src/plugins/platforms/qnx/qqnxbpseventfilter.cpp
	src/plugins/platforms/qnx/qqnxfiledialoghelper_bb10.cpp
	src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp
	src/plugins/platforms/qnx/qqnxintegration.cpp
	src/plugins/platforms/qnx/qqnxnavigatorbps.cpp
	src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp
	src/plugins/platforms/qnx/qqnxwindow.cpp
	src/widgets/kernel/qwidgetwindow.cpp
	src/widgets/styles/qwindowsvistastyle.cpp
	src/widgets/styles/qwindowsxpstyle.cpp
	src/widgets/widgets/qtoolbararealayout.cpp
	tests/auto/corelib/global/qflags/qflags.pro
	tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp
	tests/auto/corelib/tools/qversionnumber/qversionnumber.pro
	tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp

Change-Id: I37be88c6c185bb85404823353e027a0a6acdbce4
2015-12-02 23:33:06 +01:00
Jake Petroules
4f1b6749c3 Fix possible null pointer dereferences.
This follows up 130c2baa93.

Change-Id: I2f6c9b4f995af427cec9a2162b782039debf8564
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-12-02 16:32:12 +00:00
Tony Sarajärvi
609aaf64dc Remove insignificant flag for qstatictext test
Task-number: QTBUG-28593
Change-Id: Idcffe328dcb8d17b12244574518bb091157ae41e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-12-02 16:31:41 +00:00
Jędrzej Nowacki
2e00500b9f Fix conversion QVariant(QColor) to QString.
QVariant was using QColor::name() to convert a color to string, which by
default loses alpha value. The patch is fixing the problem by always
including the alpha value in the string when required.

[ChangeLog][Core][Variant] QVariant(QColor)::toString() uses
QColor::HexArgb format when the alpha component is different from 1.

Task-number: QTBUG-37851
Change-Id: I887460c1ea151180ba99d64dd873ba9d6e2268f2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-11-30 12:10:49 +00:00
Tony Sarajärvi
63c3515a87 Update bug ID after insignificant flag
Task-number: QTBUG-49630
Change-Id: I2dba72dd81f267b90ce5b44f68221fdf72b4af41
Reviewed-by: Heikki Halmet <heikki.halmet@theqtcompany.com>
2015-11-29 07:02:40 +00:00
Simon Hausmann
ea5f40a788 Merge remote-tracking branch 'origin/5.6' into dev
Change-Id: Ib43c6f126998eefcfed9a7c1f2bcbac8b4dd05ec
2015-11-27 08:27:53 +01:00
Eskil Abrahamsen Blomfeldt
50cd0daf29 Fix kerned advances in QRawFont on OS X and Windows
On Windows, the wrong value was used to calculate the
design-to-device scale. The assumption has been that tmHeight
in the TEXTMETRIC is the pixel size of the em square, but
it is not, it's the height of the font (ascent + descent).
The pixel size of the font is defined to be the em square size
in pixels.

On OS X, the kerning data was never actually read from the
font. I've added a lazy initialization for this similar to
the one in the FT engine.

This was discovered when investigating QTBUG-48546, as it turned
out that the kerning information extracted by Qt in this case was
different from the one used by Harfbuzz.

I've changed testfont.ttf to kern "_2" so that the digit is positioned
directly on top of the underscore and constructed a test.

[ChangeLog][QRawFont] Fixed kerning on advances in QRawFont for
OS X and Windows.

Change-Id: Ic9a321ad119ea880cef89b861c75a820ab8d3182
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-11-25 19:53:46 +00:00
Friedemann Kleint
1e8863e39d tst_QImageReader: Fix file handling.
Use a QTemporaryFile in readFromFileAfterJunk() instead writing
to the current directory which might not have write permission.
Enclose each call to QFile::open() in QVERIFY2() with error message.

Change-Id: I3c5da31c6681a2396cee473cafe7d92c5c220de3
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-11-24 15:30:04 +00:00
Friedemann Kleint
bb5570082e tst_QImageWriter: Use QTemporaryDir.
Create a temporary directory instead of writing to the
test data  directory or home path (Android).

Change-Id: I6af583e5da91eefb603eaae179e7d789487dc626
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-11-24 15:02:28 +00:00
Tony Sarajärvi
4e39cbaa41 Remove unneeded insignificant flag in qopengl
VS2010 is not supported in Qt5.7+

Task-number: QTBUG-31611
Change-Id: I4b2bd703f6462e6f0a4de9e75bca8316b8707680
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-11-24 11:02:37 +00:00
Liang Qi
746f54c6df Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev 2015-11-23 19:17:25 +00:00
Ulf Hermann
15b5b3b3f0 Add flags to omit/reject padding in scientific notation exponents
The EcmaScript format for printing doubles in exponent form differs
from Qt's format only in this aspect. EcmaScript explicitly prohibits
leading zeroes in exponents. It is thus worthwhile to add those flags
in order to be able to generate and parse doubles in compliance with
EcmaScript.

[ChangeLog][QtCore][QLocale] Additional flags in QLocale::NumberOption
allow generating and parsing doubles in EcmaScript compliant format.

Change-Id: Ia7b82c2e67bb8b80bd890014ff5cd4563faf2a03
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-23 14:13:42 +00:00
Liang Qi
1ed7a67a4c Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/corelib/kernel/qcoreapplication.cpp
	src/corelib/thread/qthread_unix.cpp

Change-Id: Ia08d613c3f0bd08cb6dc3e3a57257207dfd4a099
2015-11-23 07:13:00 +01:00
Louai Al-Khanji
dbb7817e13 Remove remaining support for Blackberry
The platform is no longer supported or actively maintained, and is
in the way for improvements to the Unix event dispatcher and QProcess
implementations.

Change-Id: I3935488ca12e2139ea5f46068d7665a453e20526
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-21 15:38:39 +00:00
Eirik Aavitsland
711f799298 Make the ppm image handler corrctly handle long comment lines
The ppm decoder used a fixed size buffer to discard comment lines,
which would fail for comments longer than 100 characters.

Task-number: QTBUG-49414
Change-Id: I92e910e025cf7584a6ff1c0e5b0e8a4ab281d479
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-11-19 08:06:07 +00:00
Liang Qi
c7934f2489 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/corelib/io/qprocess.cpp
	src/corelib/io/qprocess_unix.cpp
	src/network/kernel/qnetworkinterface_winrt.cpp
	tools/configure/configureapp.cpp

Change-Id: I47df00a01597d2e63b334b492b3b4221b29f58ea
2015-11-18 09:01:51 +01:00
Liang Qi
17dc773221 Merge remote-tracking branch 'origin/5.5' into 5.6
Change-Id: I6b1fe0c6c360a0d5285911869f0f4f93d86d822e
2015-11-17 07:14:16 +01:00
Frederik Gladhorn
f40593b111 Fixup typo in blacklisting of tst_qwindow::setVisible
Fix typo in f05c75a1b9

Change-Id: I42919975e5a6716beacac8d780debb5c3d92ea50
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-11-16 19:09:08 +00:00
Frederik Gladhorn
f05c75a1b9 Blacklist tst_QWindow::setVisible for Ubuntu
The test is new and something seems to go wrong on the Ubuntu test
machines.
Since it ends up failing a lot, blacklist it for the time being.

Task-number: QTBUG-49388
Change-Id: I06de7ba15aaee68351a747e3a06c0150018b39de
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-11-12 12:23:39 +00:00
Frederik Gladhorn
e5b166875a Stabilize tst_QWindow::childWindowPositioning
Change-Id: I13215eb9f4efc145922e9c4a98d66db568381783
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-11-12 12:23:36 +00:00
Joni Poikelin
d894cfa863 Fix QImage::setDotsPerMeterX/Y for images with some orientations
Rotation of images with orientation of 90 and 270 degrees dropped DPM
values from rotated image.

Task-number: QTBUG-49220
Change-Id: I9c23153c49dd63b5f6958fdde72f466873b0a407
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
2015-11-05 05:33:37 +00:00
Tor Arne Vestbø
2bebf640cc Add QWindow child window positioning test
Tests that window creation order doesn't affect the resulting geometry
of the parent and child windows.

Change-Id: Iff0cb5adf87107dfed4a633a67e1b4312b90e24a
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-26 19:01:32 +00:00
Tor Arne Vestbø
73c86fcb40 Defer QPlatformWindow creation on setVisible(true) if parent hasn't been created
When a child QWindow is shown by calling setVisible(true), we don't need to
create the platform window immediately if the parent window hasn't been
created yet.

We defer creation until the parent is created, or we're re-parented into
a created parent or made top level.

This optimization is more important now that we create the full parent
hierarchy once we decide that we need to create a child QWindow.

Change-Id: Ia4f0430f0d3709a12f41f6473c1cea6b0ef3c9cd
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-26 17:10:02 +00:00
Tor Arne Vestbø
ac27f9a83e Ensure QWindow::setParent() creates parent hierarchy if needed
If the QWindow has been created and has a platform window, we need to
ensure that the windows in the parent hierarchy also are created before
we set a new parent on the platform window, otherwise the platform window
will think that it's a top level window.

Change-Id: Icb2c3cd5411cd1eb595e8673e144095feda31df9
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-26 14:53:40 +00:00
Tor Arne Vestbø
2f402e4d09 Ensure QWindow::create() creates parent hierarchy before creating self
To be able to create a platform window for a given QWindow we need to
sync up the parent hierarchy first, so that the newly created window
can be placed into that hierarchy.

Without creating the parent hierarchy first, the QPlatformWindow will
end up thinking it's a top level window, when in reality is represents
the platform backing of a child QWindow.

Change-Id: I2cad7759fbc118b04718e7a27ec7570ce1238757
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-26 13:12:35 +00:00
Friedemann Kleint
733ac31ccc tests/auto/gui: Remove some placeholder formatting.
Use QByteArray/QString addition instead in loops and for
test row names.

Change-Id: I31adb60bdaf7ea243143a9244b6c4f66f38b189d
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-10-19 08:06:53 +00:00
Liang Qi
4456984da7 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	tests/auto/corelib/io/qfile/tst_qfile.cpp
	tests/auto/corelib/io/qprocess/tst_qprocess.cpp
	tests/auto/corelib/tools/qversionnumber/qversionnumber.pro

Change-Id: Ia93ce500349d96a2fbf0b4a37b73f088cc505c6e
2015-10-14 15:45:35 +02:00
Friedemann Kleint
f0a559f1c8 Tests: Use QCOMPARE() with QLatin1String() for QString values.
Prefer QCOMPARE over QVERIFY for equality and use QLatin1String().

Change-Id: If226a0fc7b25be3e6774c7e36ca1e6f99234e5dd
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-10-14 08:32:42 +00:00
Friedemann Kleint
a2a00eb044 Tests: Fix single-character string literals.
Use character literals where applicable.

Change-Id: I1a026c320079ee5ca6f70be835d5a541deee2dd1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-13 18:14:27 +00:00
Ulf Hermann
54b5287adf Insert leading after each line, not before
Task-number: QTBUG-45791
Change-Id: I763d9d1ba00989d0c6b1e0b955173dadbef26b10
Reviewed-by: Stephen Chu <stephen@ju-ju.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-09 15:18:11 +00:00
Liang Qi
925d6eff3e Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6 2015-10-02 17:24:58 +00:00
Liang Qi
d0eaa737e1 Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	qmake/doc/src/qmake-manual.qdoc
	src/corelib/tools/qstring.h
	src/gui/image/qimagereader.cpp
	src/network/access/qnetworkaccessmanager.cpp
	src/tools/qdoc/doc/examples/examples.qdoc
	src/widgets/accessible/qaccessiblewidgetfactory_p.h
	src/widgets/doc/qtwidgets.qdocconf

Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
2015-10-02 16:59:55 +02:00
Friedemann Kleint
bbb2c95d7a tst_qdesktopservices: Use regular expression to suppress error message.
The error return has been observed to vary.

Task-number: QTBUG-48566
Change-Id: Iecfe7819898a6a8a482c1b2251543193ecfa4841
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-10-02 09:34:41 +00:00
Friedemann Kleint
9facf1be9b Tests: Always verify whether QTemporaryDir/File creation succeeded.
Use QVERIFY2() with QTemporaryDir/File::errorString() consistently.
Attempt to catch issues like the below warning and follow-up issues.

QSYSTEM: tst_QFiledialog::clearLineEdit() QFileSystemWatcher: FindNextChangeNotification failed for "C:\Users\qt\_____aaaaaaaaaaaaaaaaaaaaaa"  (Access is denied.)

Task-number: QTBUG-47370
Change-Id: I58a6e87c502627e976efa62ad73c912f3b2d49fa
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-09-28 15:05:43 +00:00
Liang Qi
a1ad9a74eb Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/corelib/io/io.pri
	src/corelib/io/qdatastream.cpp
	src/corelib/io/qdatastream.h
	src/network/socket/qabstractsocket.cpp
	src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
	src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h
	src/widgets/styles/qgtkstyle.cpp
	tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro
	tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro
	tests/auto/dbus/qdbusconnection/qdbusconnection.pro
	tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp
	tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp

Change-Id: I347549a024eb5bfa986699e0a11f96cc55c797a7
2015-09-25 14:02:04 +02:00
Friedemann Kleint
7183d08095 Tests: Harmonize code checking on platform name.
Use case insensitive comparison and static invocation
of QGuiApplication::platformName().

Change-Id: I8c197c7b4f0669f71c019fbcee09a0f03dfab399
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-09-24 07:49:30 +00:00
Jędrzej Nowacki
a153bb232c Stabilize qguieventloop test.
The test assumed that an event loop can be tested for emptiness
multiple times, which is wrong because an event can be delivered any
time.

Change-Id: Ic44245321eeed2091b640ada2c83d205b83a1cc2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-09-24 07:36:25 +00:00
Serge Lysenko
8f68d15789 Add method for checking of QPixmapCache::Key validity
We need a method to check whether a specified pixmap is still
cached without touching the recently-accessed list for this pixmap.

[ChangeLog][QtGui][QPixmapCache] Added QPixmapCache::Key::isValid().

Change-Id: I90fa4f67b569099b67b6207e78494beb3111b68e
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
2015-09-18 13:48:05 +00:00
Serge Lysenko
f807a6de2c Fix QImageReader::size() to return correct size for .ico files.
According to MSDN, the zero value of ICONDIRENTRY bHeight and bWidth
fields mean a maximum icon size 256 pixels. So QtIcoHandler::option()
should return 256 instead of 0 pixels for such icons. Also there is
fixed wrong seek offset at the second call on this method.

http://blogs.msdn.com/b/oldnewthing/archive/2010/10/18/10077133.aspx

Task-number: QTBUG-48103
Change-Id: I99f0c9720fd58889045b0c73c51498f2065b0b91
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
2015-09-17 16:30:37 +00:00
Andy Shaw
d36a1dfb51 Serialize the capitalization value of QFont
By serializing the capitalization value of QFont, it ensures that it is
correctly preserved when QPicture streams it and later plays it back.

Subsequently the QDataStream version has been bumped up to account for the
change of the data format for serializing QFont.

[ChangeLog][QtGui][QFont] QFont now serializes the capitalization setting.
[ChangeLog][Important Behavior Changes] QDataStream version bumped up to
17 to account for changes in the serialization of QFont.

Task-number: QTBUG-15214
Change-Id: I042680760e5a69d18d41e786b7500a3eebbe562f
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
2015-09-15 13:30:09 +00:00
Tor Arne Vestbø
0e342fce4c Replace direct QPA access in tst_qguiappliction with testlib wrapper
Change-Id: I698aa9d7633992d257296759f5e04307ff0d8331
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-09-15 07:41:17 +00:00
Olivier Goffart
e68d06714f QIconLoader: Use the GTK+ icon caches
Loading icons is quite slow because we need to stat many files in many directories.
That's why gtk adds a cache in the icon theme directory so it avoids stating lots
of files.

The cache file can be generated with gtk-update-icon-cache utility on a theme
directory. If the cache is not present, corrupted, or outdated, the normal slow lookup
is still run.

[ChangeLog][QtGui][QIcon] fromTheme gained the ability to use the GTK icon cache
to speed up lookups.

Change-Id: I3ab8a9910be67a34034556023be61a86789a7893
Reviewed-by: David Faure <david.faure@kdab.com>
2015-09-13 16:23:24 +00:00
Pasi Petäjäjärvi
4b2db07b42 Fix tst_QGuiApplication for embedded platforms using eglfs QPA
Disable input and cursor for QGuiApplication instances used in
autotest to initialize it properly.

Change-Id: I78dc9b776269c082c20f244a51f858289129275d
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-09-10 06:29:11 +00:00
Friedemann Kleint
76cf88157f Tests: Remove CONFIG += parallel_test.
The keyword no longer has a meaning for the new CI.

Change-Id: Ibcea4c7a82fb7f982cf4569fdff19f82066543d1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-09-05 07:16:50 +00:00
Tor Arne Vestbø
54dbdc26ba Move min left/right bearing calculations to QFontEngine baseclass
The logic used in the FreeType font engine can be generalized
and move to the QFontEngine baseclass. This allows the CoreText
font engine to correctly report the minimum left/right bearings,
which decreases the chance that an optimization in QTextLayout's
line breaking algorithm will produce wrong results.

The calculation of left and right bearing has been moved to the
glyph_metrics_t type to reduce code duplication. This allows us
to use the with and height of the bounding box to determine if
the glyph has any contours.

Change-Id: I864697d3f31ed56f22f04666199b6c5023c5e585
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-09-02 09:11:31 +00:00
Friedemann Kleint
51e501fa8d Remove QT_DISABLE_DEPRECATED_BEFORE=0 from tests not using deprecated API.
Change-Id: I1955320e7639760b4383a53f37a506c8055933ef
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-09-01 16:57:46 +00:00
Eirik Aavitsland
fee16baca1 Another fix of cosmetic QPainter::drawPolyline()
At the edge of the view, a line segment could end up as not producing
any pixels even if not clipped by the floating-point clip
routine. Make sure the starting point for the next line is still
updated correctly for any significant segment lengths.

Change-Id: I381a4efb81ce6006f3da4c67abf279aea79e4663
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-09-01 08:21:45 +00:00
Jan Arve Saether
17aaaad653 Ensure sendPostedEvents() can be called independently
If Qt is not running its own event loop (e.g. if Qt is a plugin running
in a non-Qt host application with its own event loop, a call to
sendPostedEvents() should process all events by default, and not depend
on the flags passed to the last call to processEvents()

We also modify sendPostedEvents() to call its base implementation instead
of directly calling QCoreApplication::sendPostedEvents(). (The behavior of
the base implementation is the same, so no behavior change there).

This also adds a test for QWindow event handling without Qts event loop is
running. This is a black box test, just to ensure that basic functionality
is working. It can be extended later.

Task-number: QTBUG-45956
Change-Id: I7d688c0c6dec5f133fb495f07526debdde5389af
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-09-01 08:21:05 +00:00
Friedemann Kleint
50b9e30970 qtbase tests: Remove QT_DISABLE_DEPRECATED_BEFORE=0 for simple cases.
Fix usage of API that is marked deprecated.

Change-Id: Ie31b6ee029c5b5f015fe52fb9bcd8e94b22d6cd0
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-08-31 19:56:59 +00:00
Pier Luigi Fiorini
61ad604ad4 Add QGuiApplication::setDesktopFileName()
This property might be set by applications whose desktop entry file name
cannot be determined by heuristics already in place.

It is particularly useful for QtWayland as it can be used to determine
the app_id simply by stripping the ".desktop" suffix from this property.
Without a correct app_id, Wayland compositors won't be able to e.g.
show the application icon on task managers.

This property is also very interesting for X11 as there are various
desktop environments trying to map windows to launchers.
It will be possible to export desktopFileName as a xproperty, making
such mapping less error prone.

Change-Id: I0fef23f28f383639e625379ab46e36aecb338ac4
Reviewed-by: Martin Gräßlin <mgraesslin@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2015-08-27 11:00:39 +00:00
Bernd Weimer
b46fe39d94 Harmonize input context selection
Input context selection works differently across platforms. On some
platforms it is not possible to request a specific context at all
(e.g. Wayland). This will be unified, depending on the environment
variable "QT_IM_MODULE", you will get:
- null:  default (platform) context, if defined (otherwise no context)
- empty: no context
- set:   set one, if it exists and is valid (otherwise no context)

[ChangeLog][Platform Specific Changes] Haromnized input context selection.
QT_IM_MODULE environment variable will be taken into account.

Change-Id: Ic8f826fbc6ace25941cd19b9b086943e848fbe01
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com>
2015-08-25 07:04:19 +00:00
Erik Verbruggen
d44ca1ed0b Remove type punning from QRgba64.
In C++, type punning with a union is not allowed. It will result in
compiler defined behavior at best, and undefined behavior at worst.
Specifically, if QRgba64 is passed to a function by value, the different
members of a struct might be passed in separate registers. This means
that any write to the quint64 might not blank out the values of the
struct whenever the compiler looses track with TBAA.

Change-Id: I991b5492fe4bb13a14bb670fef5bf13dacbe6c0a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-08-11 11:01:27 +00:00
Allan Sandfeld Jensen
5551295028 Fix repremultiply from RGB64 to RGB30
Just like from RGB32 to RGB30 we must also repremultiply when converting
from RGB64 because the alpha channel loses more precision than the other
color channels.

Since this is not approximated accurately in the simple blending
functions and the functions are no longer needed now the main render
engine supports higher accuracy, the simple blending routines for RGB30
have been removed.

Change-Id: I2b7b8eb015e330a487848fc4370ad3a1e966be91
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-08-11 09:33:06 +00:00
Laszlo Agocs
49ea02f435 windows: Verify the built-in GPU blacklist in autotests
Have an autotest to prevent introducing JSON syntax errors
that become apparent only at runtime.

Change-Id: If2bcbf4d227fddcbeb9c095b7986bada078131d7
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-08-11 09:30:39 +00:00
Frederik Gladhorn
77da617dc8 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	doc/global/qt-cpp-defines.qdocconf
	src/3rdparty/forkfd/forkfd.c
	src/corelib/codecs/qtextcodec.cpp
	src/corelib/kernel/qmetatype.cpp
	src/corelib/tools/qset.qdoc
	src/gui/accessible/qaccessible.cpp
	src/gui/image/qpixmapcache.cpp
	src/opengl/qgl.cpp
	src/tools/qdoc/generator.cpp
	src/widgets/kernel/qwidget.cpp
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp

Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
2015-08-06 10:54:01 +02:00
Konstantin Ritt
c57c89b3c1 Don't expose qt_setQtEnableTestFont(bool) by default
Build it only in -developer-build mode for tests that might depend
on exact-matching font behavior.
Return earlier to avoid doing any useless job.

Change-Id: I966ee5689f03403e45f4c957b63e3113f0467803
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-07-31 09:50:17 +00:00
Friedemann Kleint
3859b304e8 tests/auto/gui: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0)  by
          Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by  Q[TRY]_COMPARE(a, b) and
  add casts where necessary. The values will then be logged
  should a test fail.

Change-Id: I624deb320c378c18a29b3707f48583d53bfd5186
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-07-31 08:29:15 +00:00
Morten Johan Sørvig
6309062722 high-DPI tweaks for autotests
Task-number: QTBUG-46615
Change-Id: I724f56fb3bc1a4b671b5d010765ef4e354412e2e
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-07-30 18:09:12 +00:00
Laszlo Agocs
06b86f68e8 Support MRT in QOpenGLFramebufferObject
Introduce overloads in the API to allow specifying multiple color
attachment sizes and formats. When these are in use and MRT is supported,
a texture or renderbuffer is created for each of GL_COLOR_ATTACHMENT0, 1, 2, ...

[ChangeLog] Added support for multiple render targets in QOpenGLFramebufferObject

Task-number: QTBUG-39235
Change-Id: Ie7cfd81d1b796a9166b80dff7513aafe0120d53d
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-07-29 07:54:13 +00:00
Friedemann Kleint
c067c012dc Tests: Replace Q[TRY]_VERIFY(v == true|false) by QVERIFY(v)|QVERIFY(!v).
Preparing the replacement of Q[TRY]_VERIFY(a == b) by
Q[TRY]_COMPARE(a, b) for non-boolean types.

Change-Id: Iab6ec2f0a89a3adc79e18304573994965013dab5
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
2015-07-27 12:09:19 +00:00
Friedemann Kleint
424e6386c6 tests/auto/opengl: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0)  by
          Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by  Q[TRY]_COMPARE(a, b) and
  add casts where necessary. The values will then be logged
  should a test fail.

Change-Id: I7add5b7afeba83895acdcbed110e8275dc76864a
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-07-24 21:23:34 +00:00
Marc Mutz
0abd207052 QZip*: don't hold QZipReader::FileInfo in QList
FileInfo is larger than a void*, so holding them in a QList is needlessly
inefficient. Worse, the code could come to depend on the fragile property
of (inefficient) QLists that references to elements therein never are
invalidated.

Change-Id: I772177c5ac544a5fecce2368f628148308ef260f
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-19 10:35:41 +00:00
Simon Hausmann
b2603b7665 Merge remote-tracking branch 'origin/5.5' into HEAD
Conflicts:
	src/plugins/platforms/windows/qwindowsopengltester.cpp

Change-Id: Ia7abeba9395ccf84e2fa81b91a5725a86dedb9fe
2015-07-17 16:35:42 +02:00
Rainer Keller
954f0d9397 Add test for invalid exif data
Task-number: QTBUG-46870
Change-Id: Idfde92ca12336c6432798b4517e244c2f5a5ba4d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-07-17 11:37:02 +00:00
Friedemann Kleint
a847c2cb61 Stabilize tst_QTouchEvent::touchBeginWithGraphicsWidget().
The test sends touch events to the root item at the top left
corner which fails if the views starts to scroll.
Make the view sufficiently large to prevent scrolling and align
at top left.

FAIL!  : tst_QTouchEvent::touchBeginWithGraphicsWidget() Compared values are not the same
     Actual   (((root->touchBeginCounter))): 0
     Expected (1)                          : 1
     Loc: [/work/build/qt/qtbase/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp(1471)]

Change-Id: I357322ccc809ddb5cb587febf3c75cbe497e59d8
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-07-16 21:43:31 +00:00
Frederik Gladhorn
8c7a9bfbbc Do not support static QIcon instances
There was an attempt to allow static instances of QIcon in
7727a4355876607a1a022ff54e2570dae883f79c (Qt 4). This patch does only
solve some of the corner cases and broke with
aa5f70c00a. Since the "breakage" has been
there for two years, let's officially declare it unsupported instead of
trying to work around the issue.

Change-Id: I61e12fd03953763ee2e70eae58bcaecabdcb85b8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-09 10:53:29 +00:00
Morten Johan Sørvig
899153b6f9 Run tst_qwindow::positioningDuringMinimized on OSX
The test passes.

Change-Id: Ic1a0aa4b861eb6fe18fed3d5b5cd4481b9f5fbad
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
2015-07-07 12:52:24 +00:00
Liang Qi
0698f876ca Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev 2015-07-01 09:59:28 +00:00
Allan Sandfeld Jensen
cd297f99a2 Fix A2RGB30 compositing tests
With two alpha-bits half opacity can not be represented, so we must use
one third (85) instead of half (127).

Change-Id: I2b3f1c983a3034196bf2604840945ad3a81f5b38
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-07-01 09:59:26 +00:00
Liang Qi
0aa2d318b1 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/corelib/global/qglobal.cpp
	src/corelib/global/qglobal.h
	src/corelib/global/qsysinfo.h
	src/corelib/global/qsystemdetection.h
	src/corelib/kernel/qobjectdefs.h
	src/plugins/plugins.pro
	tests/auto/widgets/itemviews/qlistview/qlistview.pro

Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
2015-07-01 11:05:26 +02:00
Nico Vertriest
a7f2af0911 Replace MAC OS X with OS X
Task-number: QTBUG-46374
Change-Id: I7bc633ab551740bd328a24b0ccae1d534af47138
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-06-30 07:33:31 +00:00
Laszlo Agocs
a8a8cdd24b Add support for driver_description and os.release in GPU blacklists
os.version is the kernel version which is just not very useful or easy to
use for us. Instead, introduce a string that allows easy differentiation
between Windows 7 and 8.

From the adapter identifier the driver description is often helpful too,
especially in virtual machines.

These allow writing rules like:

{ "description": "Use WARP in some Win 8 and 8.1 VMs",
  "os": { "type": "win", "release": [ "8", "8.1" ] },
  "driver_description": "VMware SVGA 3D",
  "features": [ "disable_desktopgl", "disable_d3d9", "disable_d3d11" ]
}

Change-Id: I196f6b44d7bb9e42ef47f61f4c28d8aa79afb7c4
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-26 15:27:31 +00:00
Marc Mutz
5b6fd71d3a tst_qzip: remove unused init()/cleanup() functions
Change-Id: I3502e8e20a4496051554dc6fb92ea9bd347cc0f7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-06-24 12:57:20 +00:00
Laszlo Agocs
d40647922b Revert "windows: Disable D3D9/11 with ANGLE in VMs"
This reverts commit a6000e2b66.

Temporarily remove this to unblock the qtdeclarative dev CI.

While Windows 8 VMs are fixed by this patch, Windows 7 has different
problems.

Change-Id: I45ef064ed953cc4b7bbf19657300d4fc43d82452
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-23 04:08:41 +00:00
Laszlo Agocs
a6000e2b66 windows: Disable D3D9/11 with ANGLE in VMs
By adding support for the driver description, we can detect if
we are in VMware. In this case D3D9 and 11 get disabled, so only
the software-based options are in use.

This allows running autotests like tst_qopengl, tst_qopenglwidget,
tst_qgl, etc. in the Qt CI system. There OpenGL 2.x is not available,
so ANGLE is the only option. D3D11 is not an option, so it picks D3D9
by default. However, this results in mystic failures. The stable solution
seems to be to use WARP. This can be achieved by setting disable_d3d9 in
the built-in GPU blacklist.

Change-Id: I937c4b3fa82fc1a2d524b4eb712732722df2070c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-19 17:52:19 +00:00
Kai Pastor
fefa8cf392 Fix boundingRect test in tst_QPicture
Verify the bounding rect of the left hand side of copy/assignment,
not the right hand side (which is passed by const ref).

Change-Id: I5044d269fe0acb5f4484c82da7e030ca33958792
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-06-16 06:11:58 +00:00
Simon Hausmann
f3939d943e Blacklist and skip various tests that are flakey
They didn't show up in the "old" CI runs because they usually pass the second
time they are executed - which the testrunner does. The new CI doesn't do that
anymore, instead we now mark those tests explicitly and will track their record
of passing and failing in the new metrics database.

Change-Id: Id34dd6f792f38995b07b6fec88f833df64de2f8b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-06-14 10:50:45 +00:00
Friedemann Kleint
56d62345ad Fix less-than comparison for QStandardItem and QSortFilterProxyModel with invalid data.
Previously, QStandardItem::operator<() returned true when both
items had invalid data. With MSVC in debug mode (checked
iterators/STL), this triggered an assert in
tst_QStandardItem::sortChildren() since that verifies
that !(b < a) when a < b:

Debug Assertion Failed!
Line: 3006
Expression: invalid operator<

Introduce a stable sort order for invalid items such that
other items are always less than invalid items and comparing
invalid items returns false (indicating equivalence).

Change-Id: Ica0f0d9f001c86973b1941dbcc1faf282e4c47df
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-06-11 13:29:23 +00:00
Oswald Buddenhagen
d32f47b703 fix usage of wince scope
Fix style issues along the way.

Change-Id: Ic6a6de28e198eb0b14c198b802e78845703909b9
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-06-05 10:29:10 +00:00
Allan Sandfeld Jensen
8f760808e0 Fix premul conversion from ARGB32 to A2RGB30 formats.
When a premultiplied alpha changes value because it is rounded to fewer
bits the premultiplied colors may need to be recalculated with the new
value. Otherwise the color will both be wrong and potentially invalid.

Change-Id: I9ec74a22aac73cd7ffab04e180cf2bf35bb4c315
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-06-03 12:01:26 +00:00
Simon Hausmann
e2f66f9215 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/corelib/global/qnamespace.qdoc
	src/corelib/io/qwindowspipereader.cpp
	src/corelib/io/qwindowspipereader_p.h
	src/corelib/statemachine/qstatemachine.cpp
	src/corelib/statemachine/qstatemachine_p.h
	src/plugins/platforms/xcb/qxcbconnection.h
	tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/auto/tools/qmake/tst_qmake.cpp
	tests/manual/touch/main.cpp

Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
2015-06-03 10:23:56 +02:00
Friedemann Kleint
6fba3c1904 Stabilize tst_qtouchevent.
- Use QTRY_COMPARE() in touchBeginWithGraphicsWidget.
- Change raw event translation tests to wait for the
  window to become active to avoid WM positioning issues.
- Blacklist the raw event translation tests on Linux.

Task-number: QTBUG-46266
Change-Id: I73aae375ee279a518a2a083d0ce8919cce474cb3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-01 13:39:13 +00:00
Marc Mutz
87d57d1994 Fix users of QTextLayout::additionalFormats to use the new API
QTextLayout::additionalFormats setters and getters using QList<FormatRange> have
been deprecated; port to the QVector versions.

Moved op== definition for FormatRange needed in tst_qsyntaxhighlighter.cpp
to a friend declaration in FormatRange itself, because MSVC 2008 doesn't find
it otherwise.

Change-Id: Ibab6589df057f02377d895079b56395859e3401e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-05-30 10:56:24 +00:00
Friedemann Kleint
0c5befa129 Reanimate test gui/kernel/qtouchevent/tst_qtouchevent.
Add CONFIG += testcase to the .pro file which was missing.
The test thus was never executed by make check and left to
rot.

Fix up code:
- Remove module includes.
- Introduce explicit constructors taking parent object
  for helper classes, removing calls to setParent().
- Ensure test does not leak objects by converting pointers
  to stack variables or introducing QScopedPointer, verify
  by checking for an empty window list in cleanup().
- Simplify code by removing unneeded variables.
- Split up conditions in QVERIFY().

Fix tests:
- Show windows were required when events are sent to
  QWidget::windowHandle().
- Invert the conditions checking whether touch events are
  accepted by widgets since widgets no longer accept them
  by defaults in Qt 5 after
  e50416066c.
- XFAIL multiPointRawEventTranslationOnTouchPad()
  which started to fail at some point in Qt 5.
- Mark as insignificant on OS X due to crash.

Task-number: QTBUG-46266
Change-Id: I6676d021afb015411a24d97d9b8f7c327d4d3c3f
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-29 16:36:48 +00:00
Simon Hausmann
6a72afa5f7 Blacklist tst_qwindow tests that are failing on Ubuntu 14.04
This should allow us to make the rest of 14.04 enforcing

Change-Id: I37f6751e8b966b047d1bd2e49ba9482e5846acb1
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
2015-05-22 14:24:32 +00:00
Allan Sandfeld Jensen
ba323b04cd Optionally apply orientation on QImage read
Make it possible to read images with EXIF orientation automatically
applied. This was originally implemented without opt-out in Qt 5.4, but
reverted. Here it is implemented as opt-in for JPEG, and opt-out for TIFF
to keep behavioral consistency.

The EXIF support for JPEG was written by Rainer Keller.

[ChangeLog][QtGui][Image plugins] An option has been added to
QImageReader to enable automatic application of EXIF orientation.
This behavior was default in Qt 5.4.1, but reverted in Qt 5.4.2.

Task-number: QTBUG-37946
Task-number: QTBUG-43563
Task-number: QTBUG-45552
Task-number: QTBUG-45865
Change-Id: Iaafd2519b63ede66ecc1f8aa4c7118081312b8f5
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-05-12 09:25:11 +00:00
Allan Sandfeld Jensen
1fce111809 Merge remote-tracking branch 'origin/5.4' into merge5.5
Conflicts:
	src/corelib/global/qglobal.h
	src/corelib/io/qnoncontiguousbytedevice_p.h
	src/gui/image/qjpeghandler.cpp
	src/network/access/qhttpthreaddelegate_p.h
	tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
	tests/auto/widgets/widgets/qmenubar/BLACKLIST

Change-Id: I01de8c1c28efcedfd7953d05025f54802dc08ab3
2015-05-08 13:26:44 +02:00
David Faure
cd90182e67 QStandardItem: add user-tristate and auto-tristate getters/setters
and deprecate isTristate()/setTristate() which isn't specific enough.

This matches the changes to the flags themselves.

Change-Id: I0ba592af340cb81fc9f4d483569844fe8d7510c3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-05-07 09:50:59 +00:00
David Faure
ae8406d82f Deprecate ItemIsTristate in favor of ItemIsAutoTristate.
This makes the behavior much more clear. You can get a tristate checkbox
just by setting the CheckStateRole to PartiallyChecked, no tristate flag needed.

The flag, on the other hand, enables the automatic-tristate behavior in
QTreeViews (and only there), hence the new name for it.

Change-Id: I18d292a8b8294c863eab806f3874d15dfb72556c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-05-07 09:14:18 +00:00
Simon Hausmann
7f8719e663 Merge remote-tracking branch 'origin/5.5' into HEAD
Change-Id: I487a4b7c05687a10c498ac219c31367d4db6fbc0
2015-05-04 13:19:31 +02:00
Allan Sandfeld Jensen
041cbe4b38 Add missing RGB32 <-> RGB30 convertions
Completes the inplace converters so that we can rely on inplace
conversions to succede as long as the image depth is the same.

Change-Id: Ia1ae34b5de1bc16e87ff5403bdacfcae44a22791
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-30 19:27:39 +00:00
Allan Sandfeld Jensen
68faf3a9bb Fix QImage format after inplace conversion
Some inplace conversions would not set the requested image format in
the returned image, due to the same conversion being used for several
destination formats.

This patch ensures all inplace conversions return the right format,
and adds testing infrastructure to easily test iterate over all formats
so that they all can be tested.

Change-Id: I68ab17a713ddb2aa8ed6aaf0a0a1ec8bbcb56090
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-30 15:26:26 +00:00
Allan Sandfeld Jensen
52ddfb36c8 Fix two errors in RGB30 conversions
The one converters from RGB30 was misplaced in the method table, and
the unpremultiplication from A2RGB30 to RGB30 had an underflow mistake
when alpha was 2.

Change-Id: I92c11ede28611a3dbdce72aca1898845c120c209
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-30 10:00:21 +00:00
Rainer Keller
518f886b61 Revert "Rotate images according to Exif orientation"
Due to a behavior change.

This reverts commit 9157087334.
This reverts commit 16c32c6dfb.

Task-number: QTBUG-37946
Task-number: QTBUG-45552
Task-number: QTBUG-43563
Change-Id: Idf8df7d8f22465e8f6b51acb68993ac97208b184
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-29 17:36:43 +00:00
Allan Sandfeld Jensen
f15d6c3fa9 Preserve QImage metadata in image transforms
Some QImage methods were not preserving image metadata, or only
preserving some of it. This adds the missing parts and adds a test for
metadata.

Change-Id: Ib5892a23e49dfde5ea26074d3deaa887fa930c6b
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-28 12:42:12 +00:00
Liang Qi
1c8451bdbb Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/tools/qdoc/tree.cpp
	tests/auto/gui/painting/qcolor/tst_qcolor.cpp

Change-Id: Iaa78f601a63191fa643aabf853520f913f2f0fdc
2015-04-27 21:36:32 +02:00
Allan Sandfeld Jensen
71203b1f0e Fix overflow in rgb30 gradient tests
The tests were trying to access one pixel outside of the image.

Change-Id: Ieabdefbbdb76bb736214a0495bec72c881b27d2c
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-24 09:03:48 +00:00
Allan Sandfeld Jensen
f657ecdc5d Fix inplace double mirroring on odd sized images
The QImage inplace mirroring method, failed to handle the middle line
when mirroring both ways (rotate 180). In both other mirroring cases
the middle can be left untouched, but in this case it needs to be
mirrored half way.

To make the logic simpler, double mirroring will now mirror half the
lines instead of half of every line.

Change-Id: Iaa1f1e1c3f7dedfb78891fc93207f6d0c64bcafe
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-23 10:14:48 +00:00
Allan Sandfeld Jensen
63d5a42b59 Revert "Remove separate SSE4 unpremultiply function"
Could causedSSE4 instructions to be used on non SSE4 machines
in cases when qUnpremultiplywas not inlined.

This reverts commit 964ccc5853.

Change-Id: Ic676ade8f75129e8d37c4d96cbfb2bdb5b794919
Task-number: QTBUG-45741
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-23 09:25:28 +00:00
Liang Qi
aed5a71683 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/corelib/statemachine/qstatemachine.cpp
	src/corelib/statemachine/qstatemachine_p.h
	src/gui/painting/qdrawhelper.cpp
	src/plugins/platforms/xcb/qxcbnativeinterface.cpp
	src/plugins/platforms/xcb/qxcbwindow.cpp
	src/plugins/platforms/xcb/qxcbwindow.h
	src/testlib/qtestblacklist.cpp
	src/tools/qdoc/node.cpp
	src/tools/qdoc/node.h
	tests/auto/gui/painting/qcolor/tst_qcolor.cpp

Change-Id: I6c78b7b162001712d5774293f501b06b4ff32684
2015-04-22 09:25:54 +02:00
Marc Mutz
05d1693793 Add qHash(QMatrix) and qHash(QTransform)
QMatrix and QTransform can be compared for equality,
so qHash should be overloaded, too.

[ChangeLog][QtCore][QMatrix] Added qHash(QMatrix).
[ChangeLog][QtCore][QTransform] Added qHash(QTransform).

Change-Id: I1ce925ebe258c9d7e35b68e5ac5c3373f1460c58
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-21 07:28:14 +00:00
Harald Hvaal
8fb881900c Enable checking for whether the system palette was explicitly set
In order to obey a palette set globally on QApplication, an application
attribute for checking if it's set at all is added.

Task-number: QTBUG-39800
Change-Id: I26b965e6e18e0e1ca4df03cf343b3527df3636b2
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-20 06:39:31 +00:00
Allan Sandfeld Jensen
964ccc5853 Remove separate SSE4 unpremultiply function
Merges the SSE4 specific unpremultiply with the normal version, and
adds a SSE2 fallback. There was no reason to split the two since
compile time options will ensure the right version is inlined.

Also adds short-cut for 0 and 255 values.

Change-Id: Ie5aa262f6964219fd3062d4a498f697cf79a4595
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-16 19:24:06 +00:00
Laszlo Agocs
f3fad26bc9 Add matching by GL_VENDOR to QOpenGLConfig
This will be essential on Linux, especially Embedded where PCI IDs are
not that useful.

Change-Id: I2fa8ca07236e8aae203e21fe629d12aab092c7fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-16 16:47:43 +00:00
Allan Sandfeld Jensen
95f694682e Implement radial and conical gradients for rgb64 rendering
Adds the last two missing source types to rgb64 rendering.
Conical and radial gradients. At the same time linear
gradients are moved to a template form to increase code
sharing.

Change-Id: I30fdd0837b0da03e3447683856ebbe4d7f48df6c
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-15 19:34:04 +00:00
Allan Sandfeld Jensen
7432c7c08a Cleanup and optimization of qimage smoothscale
Cleaning up smoothscale code. Upscaling is improved using existing
optimized interpolation methods, and downscale is given SSE4.1
optimized versions.

Change-Id: I7cdc256c26850948aef7dae26fda1622be6b8179
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-15 11:25:41 +00:00
Allan Sandfeld Jensen
29380121ef Fix RGB30 painting tests
Some tests were failing because the color was not read correctly from
a QImage. To make it possibly to read more accurate colors a pixel
accessor returing QColor has been added.

Some tests also had the wrong order of arguments, confusing dest and src
formats. This has been corrected, so they test what they claim to test.

A test for RGB30 linear gradients is also added.

Change-Id: Ic623ae1b8e0bf7383056b641c6e8230a1d7dd0dd
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-13 13:01:45 +00:00
Allan Sandfeld Jensen
60e8519544 Solid and gradients in high color accuracy
This patch updates the internal color precisions of solids and
gradients to 16bit per color. This makes it possible to render
at higher precision on non-premultiplied ARGB32, the RGB30
formats and any other hi-color formats if more are added.

[ChangeLog][QtGui][Painting] Internal precision of solids and gradients
is now up to 16bit per color.

Change-Id: Ieae5468bd6de1f56adfa4cb9fa966faf2ed824fd
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-10 09:15:59 +00:00
Liang Qi
4973786f0d Merge remote-tracking branch 'origin/5.5' into dev
Change-Id: I04f9f2749f68c0cb5a427b8d84e43b44bb143e4d
2015-04-08 21:24:26 +02:00
Konstantin Ritt
95d034a14f Introduce QQuaternion::fromDirection()
...which constructs a quaternion using specified forward and upward
directions, so that the resulting Z axis "faces" a given forward direction.

Change-Id: Ib77b8ab5c359a4880b0d946face87026acdc6f0b
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Michael Krasnyk <michael.krasnyk@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-04-07 13:07:48 +00:00
Liang Qi
20cac3d9c9 Merge remote-tracking branch 'origin/5.5' into dev
Change-Id: If9fd98525b6b4ca07e5e006fc98bf372a73b8a21
2015-04-06 19:10:25 +02:00
Marc Mutz
e486d69133 QString: preserve embedded NULs when converting from QByteArray
Unearthed an off-by-one error in a QByteArray::fromRawData() call in
tst_qtextdocumentfragment. Fixed by porting to QStringLiteral.

[ChangeLog][Important Behavior Changes] All conversions from QByteArray
to QString now preserve embedded NULs. This is done in order to provide a
faster conversion from QByteArray to QString that does not involve a call to
strlen. If you need the old behavior, convert from QByteArray::constData()
instead. If you are porting from Qt 4, we suggest to make your source compile
with QT_NO_CAST_FROM_BYTEARRAY before porting to Qt 5.

Change-Id: Ibca40f503920fee6f3a5f0d74a04b38b8849796f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-02 19:28:31 +00:00
Liang Qi
0e6ee136c9 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/testlib/qtestblacklist.cpp
	src/widgets/accessible/qaccessiblewidgets.cpp

Change-Id: If032adb9296428f62384ed835dbf41ee7a0b886c
2015-04-01 09:10:26 +02:00
Andy Shaw
2e4a107e7e Ensure that CSS rules are inherited from the parent tags
When CSS is set in a head tag then it was not being inherited by the child
tags when the CSS specification indicates that the properties are in fact
inherited. This ensures that those properties are inherited and the non
inheritable ones are unchanged.

A test is added to cover the different situations with inheritance and a
fix is done for the QTextDocumentFragment test which was passing despite
having incorrect defaults.

Task-number: QTBUG-28770
Task-number: QTBUG-34153
Change-Id: I55966240845a885852a04ecb82c61926dea9f800
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-03-25 11:55:47 +00:00
Liang Qi
ce9519593a Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts:
	mkspecs/android-g++/qmake.conf
	qmake/generators/unix/unixmake2.cpp
	src/gui/image/qimage_conversions.cpp

Change-Id: Ib76264b8c2d29a0228438ec02bd97d4b97545be0
2015-03-31 10:03:31 +02:00
Morten Johan Sørvig
72854081b2 Add tests for detach on setDevicePixelRatio()
Change-Id: I414ff0b794e0202a7f8c931b59b973cb1e7dc148

Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-03-24 11:22:36 +00:00
Eirik Aavitsland
d5c6335ff3 Fix rasterization errors in aliased cosmetic drawPolyLine
If a cosmetic polyline contained a 1-pixel segment, the next segment
would be drawn with wrong starting point.

The original fix for QTBUG-26156 had some unwanted side effects
(QTBUG-31579 and now QTBUG-42398). It tried to skip start-point update
if stroke() did not actually draw anything (because the segment was
too small). However, to determine that, it tested for a change in
lastPixel. But that was not failsafe; in some cases (1-pixel segment),
lastPixel could be unchanged even though the segment had been
drawn. With this change, we instead test directly whether stroke()
skipped the segment or not.

Task-number: QTBUG-42398
Change-Id: Id751db69a18cd1af4f45070db9d5698aa532d22a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-03-19 09:01:08 +00:00
Simon Hausmann
198606f6db Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/plugins/platforms/xcb/qxcbnativeinterface.cpp
	src/plugins/platforms/xcb/qxcbnativeinterface.h

Change-Id: I31b38ba439b9341d51a01c0fd54bea33f7410076
2015-03-16 10:31:07 +01:00
Rafael Roquetto
00c09aaf5b Fix build of tests on QNX.
Change-Id: Ib28e42e3eb10e26555fe392c55534f715bee5f8b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-03-14 07:05:34 +00:00
Allan Sandfeld Jensen
fd6a2d1c8f Improve rounding in QCosmeticStroker
Fixes the drawn position of end points in drawLine.

Based on a patch by Jørgen Lind, and modified so that
it caused no test regressions.

Task-number: QTBUG-38144
Change-Id: I24aa28480cc6ae09abf91d80378970565a29b254
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-03-12 13:27:10 +00:00
Tor Arne Vestbø
c286afee3a tst_QWindow::initialSize: Use showNormal() instead of show()
On some platforms show() may result in the window being shown full
screen, depending on the defaultWindowState of the platform. If
that's the case, the resulting window size does not follow
the requested size (though the internal normal geometry should).

We need to use showNormal, so that we guarantee that the window
state is WindowNoState.

Change-Id: Ied080eaca13d759501ea292b5e6b2df4e3b32426
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2015-03-12 00:10:27 +00:00
Allan Sandfeld Jensen
e2c91dd77b Introduce QRgba64 structure for 64bit RGBA values
This structure is meant to replace QRgb where higher precision is
needed.

Change-Id: I49d441e2133371a8b91c2e6af0c137bcc5fcb9ed
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-03-10 12:27:54 +00:00
Allan Sandfeld Jensen
1edd16879c Fix building tests on QNX
Use qmath and cmath methods instead of math.h methods.

Change-Id: I86ee2465c999822bf00a7cefee1642c4c30590a6
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
2015-03-09 11:23:24 +00:00
Konstantin Ritt
da681a41cb Introduce QQuaternion::rotationTo(vecFrom, vecTo)
which returns the shortest arc quaternion to rotate vector from
to the destination vector to.

Change-Id: Ibd7a746789ecdfe6f7fe17e4ac9049f7ac46560d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
2015-03-07 01:14:15 +00:00
Konstantin Ritt
1e441d298d [QQuaternion] Add a way to convert to/from orthonormal axes
It is just a convenience wrapper
around convertion to/from the rotation matrix.

Change-Id: I27511b43866827172960b0152f1c7b65da857f6f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-07 01:14:04 +00:00
Konstantin Ritt
a5d5353b59 Introduce QQuaternion::dotProduct()
Change-Id: I14b9857ca0a43808b7d536fc258a6bb10f611211
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-03-05 10:46:07 +00:00
Eirik Aavitsland
509bc7e59c Fix another crash when converting format of buffer-created QImage
This continues 68762151db

When doing format conversion, the optimized inplace codepath did not
check if the image data was external, i.e. if the QImage had been
created by the constructor taking an existing external buffer.

The previous commit fixed the readonly case. But in the case of the
QImage constructor taking non-const uchar*, data will be read-write,
but still external. This would of course crash if the converter tries
to realloc it.

Task-number: QTBUG-44610
Change-Id: I94d275d464e8af221682b538fc3e4897a59c061e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-03-04 10:53:00 +00:00
Allan Sandfeld Jensen
59f168c5e5 Optimize fallback RGB888 to RGB32 conversion
Improves the conversion from RGB888 to RGB32 on platforms without SIMD
versions. This includes the fallback used on non-neon ARM devices.

Besides image conversion the routine is also used for decoding JPEG.

On x86 this version is within 0.7x of the speed of the SSSE3 version.

Change-Id: Id131994d7c3c4f879d89e80f9d6c435bb5535ed7
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-03-03 13:38:17 +00:00
Oswald Buddenhagen
2b5982aac8 Merge remote-tracking branch 'origin/5.4' into 5.5
Change-Id: I95b3a87c5068c6b8068b30a35655b4c2419e7f9e
2015-03-02 09:23:07 +01:00
Joni Poikelin
fc3733cba4 Fix drawing of background for multipage QTextTable cells
Task-number: QTBUG-31330
Change-Id: I0103919ee2864b7cd8bed41e6d6fe4ac5b84142e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-02 06:07:18 +00:00
Friedemann Kleint
175b12beba Prevent static functions of Q[Gui]Application from crashing if there is no instance.
Add tests.

Task-number: QTBUG-44499
Change-Id: I160b089ad3f23ab71a87519e50f8a2ef5d2a4a6f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-02-27 06:02:44 +00:00
Konstantin Ritt
4ed795df24 Use C++ <cmath> instead of <math.h> in math3d autotests
Change-Id: I2e13ec190ec42ac7732ce9ed3ca5567f637beb1e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-02-26 20:15:04 +00:00
Konstantin Ritt
1872857ca7 [QQuaternion] Fix naming of the new methods
According to the Qt naming policy, methods that return value(s) via
the mutable parameter(s) should have "get" prefix to mention that.

[ChangeLog][QtGui][QQuaternion] Added methods to convert a quaternion
to/from Euler angles and to/from rotation matrix.

Change-Id: I95704e1f4623dc4ca54cd237ea203539fb60d452
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-02-26 11:02:38 +00:00
Eirik Aavitsland
68762151db Fix crash when converting format of QImage created from buffer
When doing format conversion, the optimized inplace codepath did not
check if the image data was readonly, i.e. if the QImage had been
created by the constructor taking an existing external buffer.

Task-number: QTBUG-44610
Change-Id: I085ff8da427bc4ee392f548dffd2418b63148965
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-02-26 01:27:37 +00:00
Friedemann Kleint
33403f2c79 Fix crash when accessing QStyleHints before QGuiApplication is constructed.
Make styleHints a static member variable of QGuiApplicationPrivate and
fix accessor accordingly. Extend tst_QApplication::settableStyleHints()
to run without QApplication instance as well and add a similar test
to  QGuiApplication.

Task-number: QTBUG-44499
Change-Id: I42b92ef38f7dd512d08d70accfa7dd4f09a22f01
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-02-25 14:16:44 +00:00
Alexander Volkov
76922a706f Decide whether to synthesize mouse events on a per device basis
Currently Qt uses the QPlatformIntegration::StyleHint
SynthesizeMouseFromTouchEvents to check whether to synthesize mouse
events from touch events. But not only platform plugins can produce
touch events, they can be created by e.g. QTest::touchEvent() and in
this case we almost definitely need synthesizing regardless of the
platform.

This commit introduces a QTouchDevice::MouseEmulation capability which
replaces use of the QPlatformIntegration::SynthesizeMouseFromTouchEvents.
So it's possible to pass QTouchDevice without this capability to
QTest::touchEvent() and be sure that mouse events will be synthesized.
Notice that touch pads always emulate mouse events.
As a result we can activate some tests which were disabled for specific
platform configurations by commits 6c1670d8c2
and e9760f1559.

Change-Id: Idc82fa4007a095fc1cb5934979361b0023d2b793
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-02-25 13:31:41 +00:00
Eskil Abrahamsen Blomfeldt
12d6f70037 Fix QTextDocument test when default font is pixel-sized
When the default font has the pixel size set instead of point
size, then pointSize() will return -1 and the output from the
HTML will include the pixel size instead. This happens e.g.
on Android when we extract font information from the system.

Change-Id: I26dc49fff215c9887cf0b78dcfff88df0f74450d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-02-17 15:02:48 +00:00
Laszlo Agocs
effc6b4cd1 Add widget support for requestUpdate() and improve its docs and tests
We must do something when requestUpdate() is called on a QWidgetWindow.
The semantics of UpdateRequest for QWindow and QWidget are unfortunately
different: for widgets an UpdateRequest means "sync the backing store".
For QWindow it also involves marking as dirty.

Change-Id: Idf40b3fc0873652dc081edeb12c96b3007a126ef
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-02-16 15:56:29 +00:00
Friedemann Kleint
4dd7aeee10 Add support for GPU bug list reading.
- Add support for reading out feature lists from GPU bug lists
  in Chromium format (supporting OS + version, exceptions lists,
  device ids and vendor ids).
  Add a overloads allowing for passing file name,
  data or JSON documents.

- Test reading in tst_qopenglconfig

- Prototypically have the Windows plugin read the file
  from the environment variable "QT_OPENGL_BUGLIST" and
  turn off renderers depending on the standard keyword
  "disable_d3d11" and newly introduced keywords
  "disable_d3d9", "disable_desktopgl".

- QT_OPENGL_BUGLIST can point to an absolute or relative
  path, in which case it is resolved via QLibraryInfo::SettingsPath
  and QStandardPaths::ConfigLocation.

[ChangeLog][QtGui][Windows]
Introduce experimental feature allowing the user to specify
a GPU driver buglist with some additional keywords to chooose
the GL renderer backend depending on GPU.

Task-number: QTBUG-43263
Change-Id: I8c20b0e8ee3cf575b91d0672bf405c42d3e9fb64
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-02-14 16:23:47 +00:00
Konstantin Ritt
88142e73d5 [QQuaternion] Introduce to/from euler angles conversion routines
Change-Id: I26c0a9d1ce9258048cf44eed5b5238920c2317b1
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-02-14 05:45:03 +00:00
Konstantin Ritt
5d784deb71 [QQuaternion] Introduce toAxisAndAngle()
This operation is the exact opposite to QQuaternion::fromAxisAndAngle()
(so that it is a way to extract the axis and angle values suitable
to create the same quaternion via QQuaternion::fromAxisAndAngle()).

Change-Id: I41fda58f5fb2b867cccd6b2faf58ab671fa070da
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-02-14 05:45:00 +00:00
Kai Koehne
9ddfa43e02 MSVC: Remove use of -Zm argument
We've been setting the -Zm argument since the dawn of times (even before
the first git commit). Anyhow, MSDN from VS2008 onwards indicates
that this is not needed:

"In earlier versions of Visual C++, the compiler used several discrete
heaps, and each had a finite limit. Currently, the compiler dynamically
grows the heaps as necessary up to a total heap size limit, and requires a
fixed-size buffer only to construct precompiled headers. Consequently, the
/Zm compiler option is rarely necessary."

[ChangeLog][Compiler Specific Changes] Visual Studio: -Zm200 (an option to
specify the precompiled header memory allocation limit) is not added anymore
by qmake to the compiler calls. If you encounter an C1076 compiler error you
might need to re-add it in your .pro file.

Change-Id: Ia4bec7eba09d893a7d81886a1814602b9ce7563c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-02-13 21:23:19 +00:00
Morten Johan Sørvig
8bccf93300 Make the QPlatformTheme::keyBindings() search deterministic
QPlatformTheme::keyBindings() performs a binary search
into an ordered list of StandardKey -> Key Sequence
mappings where each StandardKey can have multiple
key sequences.

Previously the order of the Key Sequences in the
returned list would be indeterministic and, except
for the designated pri-1 key sequence, would not
necessarily correspond to the list order. (The
ordering was dependent on where the binary search
"hits", which again depends on the size of the list.)

This caused trouble when adding mappings, since it
would change the order in the returned key sequence
list for existing mappings and confusingly cause
(apparently) unrelated test failures.

Fix this by replacing the manually coded binary search
with std::equal_range.

One test case needed to be fixed up because it had the
result in the wrong order (verified by looking at
QPlatformTheme::keyBindings).

Change-Id: I555ca2736b1a8e6454dc79645a8246f80119cfc2
Done-with: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-02-12 19:40:21 +00:00
Jani Heikkinen
83a5694dc2 Update copyright headers
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.

Outdated header.LGPL removed (use header.LGPL21 instead)

Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing
combination. New header.LGPL-COMM taken in the use file which were
using old header.LGPL3 (src/plugins/platforms/android/extract.cpp)

Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license
combination

Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe
Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
2015-02-11 06:49:51 +00:00
Laszlo Agocs
0866680bd9 Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/dev 2015-02-10 16:57:11 +00:00
Frederik Gladhorn
fc35f71434 Merge remote-tracking branch 'origin/5.4' into dev
Conflicts:
	src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro
	src/gui/image/qimage_conversions.cpp
	src/gui/opengl/qopenglextensions_p.h
	src/gui/text/qtextengine.cpp
	src/network/ssl/qsslsocket_openssl.cpp
	src/plugins/platforms/eglfs/qeglfshooks_stub.cpp
	src/plugins/platforms/eglfs/qeglfsscreen.cpp
	src/plugins/platforms/eglfs/qeglfswindow.cpp
	src/plugins/platforms/windows/qwindowsfontdatabase.cpp
	src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp
	src/plugins/platforms/windows/qwindowsnativeinterface.cpp
	src/plugins/platforms/windows/qwindowsscreen.cpp
	src/plugins/platforms/windows/qwindowswindow.cpp
	src/plugins/platforms/windows/qwindowswindow.h
	src/plugins/platforms/xcb/qxcbdrag.h
	src/widgets/itemviews/qabstractitemview.cpp
	src/widgets/kernel/qwidget.cpp
	src/widgets/util/qsystemtrayicon_p.h
	tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp

Thanks to Friedemann Kleint for resolving the qwindowsfontdatabase.cpp
conflicts.

Change-Id: I937232c30523d5121c195d947d92aec6f129b03e
2015-02-10 09:42:25 +01:00
Allan Sandfeld Jensen
38aafe1a17 Optimize unpremultiply on SSE4.1
Adds an SSE4.1 optimized version of qUnpremultiply and uses it in the
most drawing conversions methods. This gives a speed-up of little over
2x.

Change-Id: Ieb858a94ada1eb86d7af715ac1a100f1587f360d
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-02-09 11:36:49 +00:00
Konstantin Ritt
ba640a75a5 [QQuaternion] Introduce to/from rotation matrix conversion routines
Change-Id: Ic19824e7e135f53a9ce3f2ea7ecd078a589e7425
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-02-06 16:14:38 +00:00
Maks Naumov
b444769840 Don't crash with invalid QModelIndex or when QTreeWidgetItem is NULL in mimeData()
Change-Id: I0a9abaa05cf136eadf222d3e7d102930719b84ff
Reviewed-by: David Faure <david.faure@kdab.com>
2015-02-06 09:43:38 +00:00
Allan Sandfeld Jensen
57469a8e10 Avoid creating a QPixmap on QBrush comparisons
We shouldn't create QPixmaps when comparing QBrushes that do not
contain a QPixmap.

This patch extends the comparison logic to comparing QImage cachekeys
if the brushes are QImage based.

Note the comparison still produces false negatives on equal content on
different pixmaps and images, but this is preserving existing behavior.

Task-number: QTBUG-43766
Change-Id: I001b4032172c1e568aad311f7df2eaae6aee8dc6
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-02-04 22:10:17 +00:00
Allan Sandfeld Jensen
5bd41b850f Correct inplace conversion methods from RGBA8888 formats
The methods for inplace conversion from RGBA to ARGB was misplaced by
one step causing conversion to RGB16 to get an invalid method.

Change-Id: I3b2b4cffe993705c48613eec7d9b7c6213f57fc2
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-02-03 14:21:29 +00:00
Tor Arne Vestbø
c5db8fc74a Make it more obvious that Q_WS_ is dead code, and should perhaps be ported
We still have a bunch of Q_WS_ ifdefs in our code, which are easy to
mistake for Q_OS_ ifdefs when quickly scanning the code. By renaming
the ifdefs we make it clear that the code in question is dead.

In incremental follow-ups, we can then selectively either remove, or
port, the pieces that are dead code.

Change-Id: Ib5ef3e9e0662d321f179f3e25122cacafff0f41f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-02-03 11:49:14 +00:00
Ruslan Nigmatullin
a40d390a3b Fixed icons lookup in QIcon::fromTheme
This commit fixes incorrect logic of icons' lookup if there are
fallbacks or more than one theme's directory.

According to Icon Theme Specification, Directory Layout section, theme
can be spread across several base directories by having subdirectories
of the same name. This makes possible to extend system themes by
application-specific icons without making of collisions with other
applications.

According to Icon Naming Specification, Icon Naming Guidelines section,
icon name may contain dashes to separate levels of specificity in icon
names. This makes possible to set in application very specific icon
which may be not in every theme. So it can fallback to less specific one.

Change-Id: Iafc813902a3646be56e8f1d3a2fdbf8fd32ac542
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-02-02 23:28:19 +00:00
Friedemann Kleint
ec71482374 Add qopenglconfig test.
Add some parts of the qtdiag tool as a qtbase test to output the
graphics configuration to the CI log and to verify that Open GL can be
initialized for platforms on which the qopengl test is marked as
insignificant (for example, ANGLE).

Change-Id: Id445e57928e0307ad38cd433c52a62501f1097c6
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-02-02 23:05:41 +00:00
Allan Sandfeld Jensen
9cd5c61455 Avoid unneeded QBrush::texture() calls
If a QBrush has been created without QPixmap the texture() method will
create one. This patch avoids that in several places by checking the
type of the texture brush before accessing it, or not accessing it at
all.

Task-number: QTBUG-43766
Change-Id: If6009fe1d5bd51b239ae2c838e5c3b904b56b11a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-02-02 22:05:31 +00:00
Konstantin Ritt
14419b0a2b Introduce QQuaternion::inverted()
Change-Id: I6de77082bb7c32e48fb7f7d765a58fdbe68db1fd
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-01-28 12:37:50 +00:00
Konstantin Ritt
a14559bc78 [QVectorND] Add missing operator/=(const QVectorND &)
Change-Id: Ic1d2912808b95e02ba5d9cb2972c81c6374bbca9
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-01-28 12:37:47 +00:00
Konstantin Ritt
4046055caf Deprecate QFont:: rawMode()/setRawMode()
rawMode only has an effect under X11 in pre-QPA times.

Change-Id: Iaff8fed8f4ae5af5dd0399bb3ebd9d590a39a758
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-01-23 14:06:03 +01:00
Paul Lemire
595ed595ea Add project/unproject methods in QVector3D
Equivalent of gluProject and gluUnproject.

[ChangeLog][QtCore][QVector3D] add convenience project and unproject methods
to use like gluProject and gluUnproject

Change-Id: I6e4e3e79ea6e34d1fb0c375e15185c950b699ef0
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-01-22 12:39:20 +01:00
J-P Nurmi
cec7dcc723 QTextDocumentLayout: handle QTextBlock visibility
Task-number: QTBUG-10153
Change-Id: I0420b9c59a7a437da28675349c14e84bfa4aea54
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-01-22 00:22:53 +01:00
Frederik Gladhorn
b6191b16d4 Merge remote-tracking branch 'origin/5.4' into dev
Conflicts:
	src/corelib/global/global.pri
	src/corelib/global/qcompilerdetection.h
	src/corelib/global/qglobal.h
	src/corelib/tools/qdatetime.cpp
	src/plugins/platforms/xcb/qxcbscreen.h
	src/plugins/platforms/xcb/qxcbwindow.h
	src/widgets/dialogs/qcolordialog.cpp
	src/widgets/dialogs/qcolordialog_p.h
	tools/configure/configureapp.cpp

Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
2015-01-21 11:10:14 +01:00
Friedemann Kleint
205f68f8ad Fix assorted MSVC warnings in tests.
tst_collections.cpp
tst_collections.cpp(3138) : warning C4305: 'argument' : truncation from 'size_t' to 'bool'
        tst_collections.cpp(3190) : see reference to function template instantiation 'void testContainerTypedefs<QVector<int>>(Container)' being compiled
        with[Container=QVector<int>]
(repeated)
tst_qringbuffer.cpp(297) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
tst_qringbuffer.cpp(300) : warning C4309: '=' : truncation of constant value
tst_qringbuffer.cpp(306) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
tst_qrawfont.cpp(947) : warning C4309: 'argument' : truncation of constant value
tst_qsslsocket_onDemandCertificates_member.cpp(217) : warning C4189: 'rootCertLoadingAllowed' : local variable is initialized but not referenced

Change-Id: I6143d4ad121088a0d5bdd6dd2637eb3641a26096
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-01-17 12:06:59 +01:00
Eskil Abrahamsen Blomfeldt
1ee6fdc72c Fix QRawFont test when used with bundled FreeType
The auto-hinter in the FreeType version bundled in Qt gives
slightly different advances on some glyphs. As noted in
the removed code, this was already observed on Windows and QNX,
and recently also on Android.

I'm sure it could also happen on platforms using the system library
if the system library was the same version as the one bundled in Qt.
Instead of expect-failing the test, we simply accept both the
observed results as valid.

Note that we need to accept 9 as a result for the default hinting
preference on all platforms, not just Windows, since the default
hinting preference in FreeType can be a system setting.

Change-Id: I3cc0f33f0f66dd64419770b37c10dee457706b5e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2015-01-16 09:27:29 +01:00
Eskil Abrahamsen Blomfeldt
b4031387f9 Android: Fix QImageReader test
The files for the test have to be included in a qrc to be available on
Android.

Most of the image files are already in a qrc, but a couple were missing.
We add this in a separate qrc to avoid interfering with the tests on
other platforms.

Change-Id: Ibb24f5015a1aba4d5622e14f7aae80bc18611ec4
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-01-16 09:27:15 +01:00
Tobias Koenig
37fd702e30 Haiku: Make remaining auto tests compile on Haiku
Change-Id: I369b988b8c7d441ebc912298a81d3d82ec19df8c
Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-14 05:37:28 +01:00
Eskil Abrahamsen Blomfeldt
ccf50893e8 Skip incompatible QTextLayout tests when dpi-scaling is used
On e.g. Android, the tabs will be scaled by DPI. This breaks the
logic in the QTextLayout tests for tabs. It's not possible to
just scale the expected sizes either, since the whole text layout
will be affected by font sizes and scaling, and it's difficult to
predict where characters will land on different platforms and
resolutions.

To avoid breaking this test on other platforms, we just skip them
when we know they will break. Since the code tested is
cross-platform, this will hopefully not have any significant
impact on our coverage.

Change-Id: I65d6c33c9c6724665983a17f99eadcf1baedcc20
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-01-09 15:41:40 +01:00
BogDan Vatra
7ab513d539 Android: Fix qpixmap test.
Add all test data to resources.

Change-Id: I31b0dbb7546a15151f64523c86bf8eb687ff9ec0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-01-08 10:10:50 +01:00
BogDan Vatra
c161197b5f Android: Fix qimage test.
We must add all test data to resources.

Change-Id: I1b18415cd53a27bd23e51ac6b738d3ed94162ac9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-01-08 10:09:39 +01:00
Eskil Abrahamsen Blomfeldt
d056618d68 Make sure widget is polished before checking its font
QWidget is polished when show() is called, so unless you do this
first, QWidget::font() will return a default constructed QFont,
and not necessarily the default specified in the platform theme.
Comparing this to QPainter::font() later, which has been resolved
against the platform theme font, and not the default constructed
font, you can get a mismatch and a false test failure. This
happened on Android.

Change-Id: I41ef5b10879bbd4bb8ef8d52ecaccf5e8e894075
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-01-08 10:07:00 +01:00
Eskil Abrahamsen Blomfeldt
954d355fbc Android: Fix QPainter autotest
The testdata needs to be in a qrc to be available on Android.
Note that a single test will still fail. Since this requires
a platform-independent fix, it will be committed separately.

Change-Id: Ib2438a3298d81d77b7f4f240ef045aa0500d8382
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-01-08 10:03:27 +01:00
BogDan Vatra
57949b5f2d Android: Fix qimagewriter test.
We must add all test data to resources. Write output data into a writable location.

Change-Id: I5a1c212f6108abf2a82288a2c84cfb31eda5e101
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-01-08 10:02:23 +01:00
Andy Shaw
bb16ceac68 Prevent buffer overrun when getting the glyph images
The change 35bc3dc45a moved some padding out
of QTextureGlyphCache into the font engines directly, however this was not
done for the DirectWrite font engine so it caused a buffer overrun.

Task-number: QTBUG-41782
Change-Id: I4e643159036f06c5edd8a742dc6694d517a47826
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-01-07 09:42:32 +01:00
Friedemann Kleint
16c32c6dfb JPEG: Fix reading of EXIF orientation.
The orientation is unsigned short, read it as such. In
JPEG-files created by Ricoh/Pentax cameras, the data is saved in
Motorola format. Reading the wrong data size will produce invalid
values when converting the byte order.

Change-Id: I8f7c5dc5bfc10c02e090d3654aaefa047229a962
Task-number: QTBUG-43563
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-06 14:26:00 +01:00
Frederik Gladhorn
aaff94c2df Merge remote-tracking branch 'origin/5.4' into dev
Conflicts:
	src/corelib/tools/qbytearray.cpp
	src/gui/kernel/qplatformsystemtrayicon.cpp
	src/gui/kernel/qplatformsystemtrayicon.h
	src/plugins/platforms/xcb/xcb-plugin.pro

Change-Id: I00355d3908b678af8a61c38f9e814a63df808c79
2014-12-29 16:37:38 +01:00
Shawn Rutledge
32422885fc emit lastWindowClosed even if quitOnLastWindowClosed is false
Behavior will agree with the docs.

[ChangeLog][QtGui][QWindow] lastWindowClosed will be emitted even if
quitOnLastWindowClosed is not set

Task-number: QTBUG-32956
Change-Id: I7bb269d53894859fee27e171eea7ad472ea86af0
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2014-12-23 14:12:25 +01:00
BogDan Vatra
49517ac1dc Android: Fix qicoimageformat test.
Add all test data to resources.

Change-Id: Id42a4c033b75409f65cb4d56ebf1161336b93832
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2014-12-22 08:34:05 +01:00
BogDan Vatra
4cea71eebe Android: Fix qmovie test.
We must add all test data to resources.

Change-Id: Ic12f8fce9afb965aff32e7141516c8d223e64491
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2014-12-22 08:33:17 +01:00
BogDan Vatra
daa5679c8e Android: Fix qicon test.
We must add all test data to resources.

Change-Id: I7f9e7650156b174b7c16270d86b78e9408dff254
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2014-12-22 08:33:02 +01:00
Simon Hausmann
622df95fee Prospective stabilization fix for tst_qwindow::positioning(default)
Our theory for the failure of framePosition() not having the expected
value after setFramePosition towards the end of the test is that we try
to call setFramePosition() while the getting-back-from-fullscreen-to-normal
window animation is still running, at which point the compositor may
just choose to ignore our move request.

Similarly to when going fullscreen, also wait when coming back from it.

Change-Id: Icfc92f277d96dccdfad772c4aac252b2a20c6196
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2014-12-18 17:56:03 +01:00
Simon Hausmann
e281537f20 Merge remote-tracking branch 'origin/5.4' into dev
Conflicts:
	src/corelib/global/qglobal.h
	src/platformsupport/platformcompositor/qopenglcompositor.cpp
	src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp
	tests/auto/gui/kernel/qwindow/tst_qwindow.cpp

Change-Id: I5422868500be695584a496dbbbc719d146bc572d
2014-12-18 12:12:58 +01:00
Alex Blasche
8eb4b281d9 Change bugreports.qt-project.org -> bugreports.qt.io
The Qt bug tracker URL changes as part of the qt.io transition

Change-Id: Icb4ab198943b93639b5e3a8d99262303785c6459
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-12-18 09:46:09 +01:00
Simon Hausmann
bfbb985ed5 Add some debug information to tst_qwindow
The test still fails sporadically at a new place, so this adds some
debug information when it fails to may help us identify what is going
wrong.

Change-Id: Ife0f171299ef7e800a2d808602e76ca2f3885964
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2014-12-18 09:41:36 +01:00
Eskil Abrahamsen Blomfeldt
19bb9aa9e5 Fix possibly corrupted log clusters when using custom tab stops
The calculateTabWidth() can trigger shaping of the item, which can
cause the layout data to be reallocated, so we need to update the
local pointers to it, like we do when we explicitly invoke the
shaper.

[ChangeLog][Text] Fixed problems with text layout when using custom
tab stops.

Task-number: QTBUG-43126
Change-Id: Ifaeeeb4bfb1a55e6638b12b444f53d2679d3d1e6
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-12-15 21:02:12 +01:00
Simon Hausmann
015002fec9 Merge remote-tracking branch 'origin/5.4' into dev
Conflicts:
	doc/global/template/style/online.css
	mkspecs/android-g++/qmake.conf

Change-Id: Ib39ea7bd42f5ae12e82a3bc59a66787a16bdfc61
2014-12-10 07:58:06 +01:00
Simon Hausmann
9ccd359be8 Attempt to make the positioning test of QWindow more reliable
The part of the test that verifies that setFramePosition moves the window
successfully appears to be very unreliable in the CI system. The "tested"
frame position is calculated to be at (40, 40) relative to the top left
of the available screen geometry, which can be non-zero due to task bars
and similar system ui elements. However that position appears to be
unreliable in the sense that the window manager doesn't seem to always
respect that. So instead let's try placing the window (by frame position)
in the center of the screen instead.

Change-Id: I96fe6c37e748fc18262632b5effe5a9e90dc0028
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2014-12-09 16:52:37 +01:00
Simon Hausmann
7644faa881 Merge remote-tracking branch 'origin/5.4.0' into 5.4
Change-Id: I0cd11cbe95693b78450ea81a0187760f4a6a8b5f
2014-12-05 11:53:33 +01:00
Simon Hausmann
bd5743f1d8 Make tst_qwindow::positioning more reliable
Don't check for absolute counts of resize events but just check if we
were resized. Also use QTest::qWaitForWindowExposed instead of QTRY_COMPARE
and checking for QEvent::Expose.

Change-Id: Ie383493a8ce6d88cad50bd6375d432ad1578449c
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2014-12-04 12:00:43 +01:00
Frederik Gladhorn
34aba4724f Merge remote-tracking branch 'origin/5.4' into dev
Conflicts:
	src/corelib/io/qiodevice.cpp
	src/plugins/bearer/linux_common/qofonoservice_linux.cpp
	src/plugins/bearer/linux_common/qofonoservice_linux_p.h
	src/plugins/platforms/android/qandroidplatformtheme.cpp
	src/tools/bootstrap/bootstrap.pro
	src/widgets/styles/qmacstyle_mac.mm

Change-Id: Ia02aab6c4598ce74e9c30bb4666d5e2ef000f99b
2014-11-24 13:39:13 +01:00
Friedemann Kleint
94e40c7c78 Observe QLocale::RejectGroupSeparator in QInt/DoubleValidator.
Pass it as additional boolean parameter to QLocaleData::validateChars().

Task-number: QTBUG-42522
Change-Id: I4b2367f4e2fdcbd17e343d215edad57e6687697a
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2014-11-20 16:38:23 +01:00
Paul Olav Tvete
71ed74e72e Allow empty string as intermediate match
QRegularExpressionValidator and QRegularExpression disagree on what a
partial match means.

[ChangeLog][QtGui][QRegularExpressionValidator] Allow empty string as
intermediate match

Change-Id: Ia6c55beb54870b1be5c88b6ef3eceebc8ca3f86b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-11-20 14:58:39 +01:00
Sean Harmer
c5ecabb70c Send events when platform surfaces are created/about to be destroyed
These synchronously delivered events allow applications to correctly
and conveniently handle native platform surfaces being destroyed. This
is particularly useful when doing rendering on a non-gui thread as it
allows to shutdown rendering before the native surface gets destroyed
from under us.

Task-number: QTBUG-42476
Task-number: QTBUG-42483
Change-Id: I63f41bbdb32f281d0f3b8ec2537eb2b0361f3bb3
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-11-17 10:38:22 +01:00
Frederik Gladhorn
af3bd5037a Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/dev 2014-10-28 10:32:06 +01:00
Frederik Gladhorn
2eb26c1709 Merge remote-tracking branch 'origin/5.4' into dev
Conflicts:
	src/gui/text/qfontdatabase.cpp

Change-Id: I6ac1f55faa22b8e7b591386fb67f0333d0ea443d
2014-10-27 13:00:36 +01:00
Allan Sandfeld Jensen
5adbb9cc57 Support Alpha8 and Grayscale8 natively in the OpenGL paint engine
Adds special shaders for the Alpha8 and Grayscale8 formats so that
they do not need to rely on the support of GL_ALPHA and GL_LUMINANCE
that has been removed from core in recent OpenGL versions.

Change-Id: Ie370379b458abf2a50e252bc5099aefc1b11fb1d
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-10-27 11:54:39 +01:00
Rainer Keller
9157087334 Rotate images according to Exif orientation
Task-number: QTBUG-37946
Change-Id: I181f88acdff0ef76aa02e968dc6afca1ed495f38
Reviewed-by: aavit <eirik.aavitsland@digia.com>
2014-10-27 10:30:02 +01:00
Pierre Rossi
929509ea03 QStyleSheetStyle: Don't interfere with QFontDialog
The sample lineedit in Qt's own font dialog shouldn't have its font
affected by stylesheets.
Not only does this hampers the ability to preview the font, it actually
overrides the font selection as that one is taken directly from the
widget.

Task-number: QTBUG-41513
Change-Id: I11d0bef8c7bf7bdae4cc08b6b9276d0fc14a75fb
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2014-10-24 16:59:26 +02:00
Frederik Gladhorn
3361fcbc28 Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: If7e51514ed6832750e3ad967e4d322ccf920d2bb
2014-10-20 19:12:25 +02:00
Jørgen Lind
c231694949 Fix QOpenGLWindow tests when devicePixelRatio != 1
Change-Id: I83d71de8b9d735cd649a6c514e41a9ff23625005
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-10-20 10:11:25 +02:00
Eskil Abrahamsen Blomfeldt
74a20b77a6 Fix memory leak in QClipboard::setMimeData()
The setMimeData() function is documented to take ownership of
the object passed in, but in the case where the platform
plugin did not support the requested mode, we would simply
return without deleting the object nor telling the application,
so it would cause a potential memory leak. We need to honor the
contract, even when we fail to set the mime data.

Test was updated to avoid verifying the leak in cases where
the platform does not support all modes.

[ChangeLog][QtGui][Clipboard] Fixed a memory leak in setMimeData()
when the platform plugin did not support the requested mode.

Task-number: QTBUG-41852
Change-Id: I2112da1613199fe1b56724e7ccf097b9e912c117
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-10-10 13:37:59 +02:00
Frederik Gladhorn
881ceeff42 Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: I05fcd8dc66d9ad0dc76bb7f5bae05c9876bfba14
2014-10-09 17:56:52 +02:00
Allan Sandfeld Jensen
0175ad4d3f Fix regression in metric calculation of text with mnemonics
Even when we do not intend to display the text, we still need to go
through the processing of mnemonics to remove them from the text.

Instead of capping the max underlines to 0, the TextDontPrint option now
just saves adding the underline formats.

Task-number: QTBUG-41593
Change-Id: I67790650dbed0092de2c63e5d5a9349dc02d5846
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-10-01 15:30:43 +02:00
Oswald Buddenhagen
189dc655bb Merge remote-tracking branch 'origin/5.4' into dev
Conflicts:
	src/corelib/tools/qbytearray.cpp
	src/gui/image/qimage.cpp
	src/gui/image/qppmhandler.cpp
	src/gui/kernel/qguiapplication.cpp
	src/gui/painting/qpaintengine_raster.cpp

Change-Id: I7c1a8e7ebdfd7f7ae767fdb932823498a7660765
2014-09-29 14:08:49 +02:00