Commit Graph

26136 Commits

Author SHA1 Message Date
Marc Mutz
d730281753 QEasingCurve: mark nothrow move constructible/assignable and nothrow swappable
Change-Id: Ib81e6f2278608e102ed7bfc799525777737a4e87
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-12-04 23:21:06 +00:00
Marc Mutz
7d19edaf04 QMdiArea: replace a QList<int> with a QVector
A QVector<int> uses 50% less space on 64-bit platforms.

Change-Id: I6a2174b04b362188597bc42cad84b7ce2018ea78
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-12-04 23:20:45 +00:00
Marc Mutz
909e6a009c Clean up QGraphicsItemCache::purge()
The old code assigned an empty QPoint to elements contained
by value in a QHash that was cleared out in the very next
step.

That makes no sense, because the operations in the loop cannot
possibly cause a re-entrancy into QGraphicsItemCache, which
would be the only explanation for modifying the state of a
death-row object.

While at it, replace the use of the highly inefficient
(and no longer needed) QMutableHashIterator with C++11
range-for, taking care to iterate over a const reference to
avoid detaches.

Change-Id: Ie3eba0f954644a27932666bc9e97f1ca8f36a578
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-04 16:56:47 +00:00
Louai Al-Khanji
6b1dc2641e QEventDispatcherUNIX: Remove unused mainThread member variable
Change-Id: I400c3fc7430c2a7d273325a03ba3499369d30a4f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-12-04 16:42:59 +00:00
Louai Al-Khanji
a4f849ff8c Raster and Blitter engines: method override markups and fixes
While investigating a rendering bug I noticed that methods marked in the
blitter engine as virtual and intended to override a base implementation
where in fact just shadowing a non-virtual method in the raster engine.

Fix that and add Q_DECL_OVERRIDE all around to avoid similar breakage
in the future.

Change-Id: I24c5bb27fb6d3ac57dddb704a14dab7ce153a72a
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-12-04 16:42:55 +00:00
Jan Arve Saether
118d5dc496 Skip testing empty window sizes on Windows
Change-Id: Ib4f3bc63196527583a274180c40d0f7847e13f55
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-04 15:13:59 +00:00
BogDan Vatra
361e24b79e Fix extract style on Android 6.0
A few things were changed in Android 6.0

Task-number: QTBUG-49323
Change-Id: I3112d885881dce541d5c4f3a1561f6c34d75e319
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-12-04 15:10:57 +00:00
Joerg Bornemann
b99300712f Remove superfluous code from collectDependencies
val.first was never used.

Change-Id: I7be631c09061d6969234502fc0d5660c147aca39
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2015-12-04 15:05:15 +00:00
Joerg Bornemann
00abd1ddd2 vcproj generator: Fix auto-generated inter-project dependencies
Task-number: QTBUG-49580
Change-Id: I356be24ac555ed436e4f638e83c6cca703281cba
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-04 15:05:11 +00:00
Jan Arve Saether
753ebd5ba0 Respond with a sound for certain message boxes on windows
This was a regression (it worked in 4.8) that was probably introduced
by the refactoring of the accessibility framework in Qt 5.

Now, QPlatformAccessibility::notifyAccessibilityUpdate() is called
regardless of isActive(), so its the responsibility of each
implementation of notifyAccessibilityUpdate() to check for isActive()
where it matters.

Task-number: QTBUG-33303
Change-Id: I0d18f8c1890ef679460408b05e704712b886bf7c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2015-12-04 14:38:34 +00:00
Friedemann Kleint
dc0c68262e WinRT/QMessageBox: Default to QtWidgets-based dialog for rich text.
Change-Id: I071810cc5bc2773df9f6202c4547379d3ecd8b5c
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-12-04 13:18:31 +00:00
Allan Sandfeld Jensen
18f6cd0163 NEON optimized qimagescale
Adds a NEON optimized version of the QImage smooth scaling.

Change-Id: I27c0a24d25f66bda3b5c55a8fabdb8b583fcd5c6
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-12-04 11:46:36 +00:00
Tim Blechmann
98f326e9b8 windows: enable drop for embedded windows
when embedding a QWindow into a native win32 window hierarchy, dragndrop
is not working, as RegisterDragDrop is not called.
the parent HWND is wrapped via QWindow::fromWinId(), which is topLevel, but
a Qt::ForeignWindow. it's children are not topLevel.

we therefore add a conditon to call RegisterDragDrop on non-topLevel windows
whose parent is a Qt::ForeignWindow

Change-Id: Id2bfa1130857c21566feae9cb10b62b648d86a72
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-04 10:18:00 +00: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
Rolland Dudemaine
6d39e8425e Remove the socketpair special case for eventdispatcher on INTEGRITY.
The special case was needed for INTEGRITY 5, but select support has
since long been added.

Change-Id: Ice25c5becc9d7dcdf6c5bc9eeac36b70e1b94df3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-12-04 01:04:28 +00:00
Rolland Dudemaine
ab352b8b0d pwd and group variables should be declared inside Q_OS_INTEGRITY.
The variables were always intended to be located inside the #ifdef
Q_OS_INTEGRITY.

Change-Id: I5e223ff8b5b2a686e4b45e2b8eb731e8406a199f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-12-04 01:03:20 +00:00
Rolland Dudemaine
f64c992ec5 sys/flock.h should not be included for Q_OS_INTEGRITY.
More specifically, equivalent declarations to this BSD header are
defined implicitly on INTEGRITY, and the header does not exist.

Change-Id: Ib0bd4b22742ef403c83dab0d72c268c1571b8250
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-12-04 01:03:11 +00:00
Rolland Dudemaine
6cae64b9e4 Remove use of system() when QT_NO_MULTIPROCESS is defined.
Some systems, like INTEGRITY, may support Posix/unix but lack system()
in certain configurations.

Change-Id: I8ef09fac03f8d16d791cdf1073f32b1c7c911776
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-12-04 01:02:44 +00:00
Rolland Dudemaine
614acc29a7 Use portable temporary directory implementation for Q_OS_INTEGRITY.
Change-Id: I667dece31d6b60e67363d7b2cc26fdd0621641a8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-12-04 01:02:17 +00:00
Rolland Dudemaine
bb7deb69c8 Add GHS toolchain architecture macros.
Change-Id: I4967451d52443a5f301b3706bcbbc2713ae70942
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-12-04 01:01:58 +00:00
Rolland Dudemaine
c0b912efd9 Use intrinsics for GHS toolchain for CPU feature detection.
cpuid and cpuidex are available as intrinsics, but the GNU-style
assembly is needed for xgetbv.

Change-Id: Ib9f280ac6b69b7ffb9c39289b52fa4af5e2de9ba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-12-04 00:54:09 +00:00
Rolland Dudemaine
012e4b81fa Give names to enum used in templates.
The GHS toolchain needs names for enumerations that are used for
template instantiation.

Change-Id: I4e184cd77074fd7ece89f21317536e6006ab257d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-12-04 00:52:12 +00:00
Rolland Dudemaine
209f1f0b75 Use default home directory from QDir for INTEGRITY.
Using single-process mode of INTEGRITY, there is no notion of user,
so no notion of home directory or tilde expansion.

Change-Id: Ia128b8cd2c7392ba9cf201b74a5118b94d79b4c5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-12-04 00:51:27 +00:00
Rolland Dudemaine
dff4120a37 Add an else clause that clears the return value.
This avoids several warnings with the GHS toolchain, in the form:
warning #111-D: statement is unreachable
This is because the sizeof() equality test is statically determined,
but the following code is not discarded automatically. It is when
using an explicit else clause.

Change-Id: Ic0584aafc72f70badcf5285ab635f9d99eac161a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-12-04 00:28:10 +00:00
Rolland Dudemaine
7cff3e807e Remove inclusion of sys/sem.h for INTEGRITY.
On INTEGRITY, the header does not exist and is not needed for compilation.

Change-Id: I7e473c30d23f213a31fc39ad4ef86c06db299f16
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-12-04 00:27:39 +00:00
Marc Mutz
dc41ff5a84 QMdiArea: fix quadratic behavior
Repeatedly calling QVector::erase(it) (via QMutableVectorIterator::remove())
results in quadratic runtime.

Use std::stable_partition, which does exactly what the old code tried to do,
except in linear time.

Change-Id: I6e5911ee781071bbb84d72449c969e3b9907da51
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-12-03 22:35:19 +00:00
Marc Mutz
0d1024e0f1 QMdiArea: fix unintended reallocations
The capacity of 'result' is reserved, but QVector::clear() always
deallocates. Fix by using resize(int) instead, which at least
preserves capacity when it has been reserve()d.

Change-Id: I198d532661f4f767588c4ce244c2454eb8823e54
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-03 19:58:58 +00:00
Marc Mutz
b566d670e5 QMovie: fix quadratic behavior
Repeatedly calling QList::erase(it) (via QMutableListIterator::remove())
results in quadratic runtime.

Use std::remove_if, which does exactly what the old code tried to do,
except in linear time.

Change-Id: I682e5e05f04953ae1c8788e5d66335241de39fee
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-12-03 19:58:51 +00:00
Marc Mutz
5d44d17127 QMacStyle: fix quadratic behavior
Repeatedly calling QVector::erase(it) (via QMutableVectorIterator::remove())
results in quadratic runtime.

Separate the removal of expired objects from the sending of the event to
the remaining objects, so we can use QVector::removeAll() for the former,
which does exactly what the old code tried to do, except in linear time.

Use range-for for the sending-loop. This could cause detaches, but since
we modify the container two lines before, and we don't copy it anymore,
anywhere, detaches are impossible.

Change-Id: I9aa6427e3646c8ad92b673fe42a86a0dfe79ee80
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-12-03 19:58:45 +00:00
Marc Mutz
dd9df8d31f QAbstractItemModelPrivate::Change: add some constexpr
Change-Id: Ie852a20463af42db7d9959f8b79512e0d521e73d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-03 19:58:38 +00:00
Friedemann Kleint
2366ecfb2d Manual dialog test: Build also when QtPrintSupport is not available.
Fixes the build on WinRT.

Change-Id: I68510b70b61433ceed6bf06a31424f93a02230dc
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-12-03 15:55:47 +00:00
Nico Vertriest
68a2f62065 Doc: Added missing semicolons to snippet
Task-number: QTBUG-34594
Change-Id: I3eeff4494f5b27c5b34b911008b1a87abe032868
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2015-12-03 15:17:21 +00:00
Nico Vertriest
ed59376239 Doc: Clarified QTextTable::mergeCells() documentation
Task-number: QTBUG-37928
Change-Id: I8d3ae3b540f9483d1e93d4c8135f777dea13f967
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2015-12-03 15:16:57 +00:00
Friedemann Kleint
d508c6697b Freetype font engine: Restrict bold depending on OS2 weight class.
Limit setting bold to weights <=750.

Task-number: QTBUG-48922
Change-Id: Id38b636698e58b0686dda9711ee1b3426a3b45b9
Reviewed-by: Gunnar Roth <gunnar.roth@gmx.net>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-12-03 15:03:33 +00:00
Friedemann Kleint
de7d2eb2ad Polish the fortune server/client examples.
- Remove Qt::WindowContextHelpButtonHint.
- Make the server label interactive (enable copy).
- Introduce new connection syntax.
- Remove unneeded member variables.
- Use constructor initialization where appropriate.
- Adapt the layout to fullscreen platforms by wrapping it
  into a QGroupBox.

Change-Id: I6e397ad082f22ba1e99fc5a17440b2be1f9584f6
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2015-12-03 15:03:26 +00:00
Friedemann Kleint
d93a4158e0 tst_QLocalSocket::threadedConnection(): Add failure message.
Introduce QVERIFY2() to get some information when exactly it fails.

Change-Id: Icaddf2ecae434d0bafc90c18458c5ee067dfd506
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-12-03 15:03:17 +00:00
Samuel Nevala
ba40d1a872 Combine environment variable implementations
Environment variable storage implementations on Windows Runtime and CE are
very similar. For better maintainability have just one implementation.

Change-Id: I12ec38f7bde3fcc0bcc56face88d5f19cf3b3504
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-12-03 14:33:18 +00:00
Andreas Holzammer
eb812cf3ce Updating the Toradex Colibri mkspec
Change-Id: I7d7256689e2b6ce4fa8930b62397b2d48d8984d6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-03 14:32:50 +00:00
Nico Vertriest
1c720be3fb Doc: corrected statement about QByteArray::clear
Task-number: QTBUG-45096
Change-Id: I30a49044690c2f0ef5bf6ee80712e1395c60ac77
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2015-12-03 13:50:14 +00:00
Nico Vertriest
8724dc5eac Doc: added doc for missing stylesheet outline properties.
Task-number: QTBUG-26673
Change-Id: Iaf13921515981c09a84822e66fd1ed21d73779f6
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2015-12-03 13:50:00 +00:00
Nico Vertriest
b07c10c5de Revert "Doc: Added info about sorting in QItemSelectionModel::selectedIndexes"
This reverts commit d0f57439d0.
This commit had introduced a wrong statement about the sorting.

Change-Id: I2f6ea6f7cfb318bca7bd44c686956ba135b65b20
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2015-12-03 13:49:43 +00:00
Friedemann Kleint
afaa7351c0 QStandardPaths::standardLocations()/WinRT: Return empty lists.
Previously, lists containing one empty string were returned for the
unimplemented functions.

Change-Id: Ia64b53325420e32076f2bacf22c48885d7121df0
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-12-03 10:48:25 +00:00
Liang Qi
3b6aafe9a7 Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev 2015-12-03 10:43:54 +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
Marc Mutz
e85ba9c67f QComboBox: don't re-evaluate count()/model->rowCount() all the time
QAbstractItemModel::rowCount() is a potentially expensive
operation, so cache its value whereever possible.

Change-Id: Ib2829b20a0fedcbf091a535945b88db323b53fbe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-02 22:16:46 +00:00
Laszlo Agocs
14e138652d eglfs: Fix the logical dpi calculation for some devices
KMS and backends using the default logicalDpi() implementation
(EGLDevice for instance) did not correctly check if the physical width
and height are greater than zero. The result is a NaN dpi on systems
where the drivers report a zero size. This in turn breaks font
rendering and various other things.

isValid() is changed to !isEmpty(). This way we check for width and
height > 0 instead of >= 0.

Change-Id: I8cdcf93a116379ae33c65599ad792a3b712518a3
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
2015-12-02 20:27:31 +00:00
Eskil Abrahamsen Blomfeldt
bf0af8b5a2 Round advances if subpixel position not supported
Due to kerning and other OpenType features, it's possible
that the advances from the shaping process are fractional, but
this gives uneven glyph positioning for font engines that don't
support subpixel positioning (since the glyph will not match the
expected position, some gaps will look too large and some
too small). To match how e.g. GDI renders this, we round the
advances before setting the glyph positions for engines that
do not support subpixel positions.

[ChangeLog][Windows] Fixed uneven kerning for some fonts.

Task-number: QTBUG-48546
Change-Id: Ic00dc402abf7149aab6bf9b05b42827b805c1a15
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-12-02 18:25:45 +00:00
Eskil Abrahamsen Blomfeldt
a2ef3479b8 Differ between vertical and no hinting on Windows
Symmetric text rendering seems to be the equivalent to no hinting
at all since it does subpixel antialiasing in both horizontal and vertical
directions. Let people select non-symmetric, natural rendering as well,
by setting vertical hinting on the font. This is the mode used for many
UI elements in newer versions of Windows (like the title bar of windows
etc.)

[ChangeLog][Windows] Added differentiation between vertical hinting and
no hinting in DirectWrite font engine.

Task-number: QTBUG-48546
Change-Id: I2f75ae2d16fdf26706587d92da43daf29afbbcf2
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-02 18:25:37 +00:00
Eskil Abrahamsen Blomfeldt
96cc7fe5c2 DirectWrite: Inherit synthesized properties for fallback fonts
When a fallback font is selected, we need to copy out the
properties from the main font which can be synthesized
by the font engine. In particular, this is weight > normal,
and oblique style.

This is the DirectWrite equivalent of
a856c4a902.

Change-Id: I5d1215c66a433c8a8029c06e7a3dcee287f3f76f
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-12-02 18:25:28 +00:00
Christian Strømme
d6b9ae201b Android: Add function to check permissions at run-time.
This is convenient when we you want to check which permissions the
application has been granted at run-time. On Android device running
Android 6.0 or newer the permissions might be changed by the user,
so there are cases where this will be needed to determine what
APIs are available. On older devices or if the application is built
for an older SDK version, the old behavior is used, that is, the
permissions from the manifest is the permissions the application has.

Change-Id: I17ad588b35b26dd7ab26fa4b749764c1602c6854
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-12-02 17:59:34 +00:00