Commit Graph

1036 Commits

Author SHA1 Message Date
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