Commit Graph

28744 Commits

Author SHA1 Message Date
James McDonnell
e969e6d2ca Fix cast warnings when pthread_t is smaller than a pointer
Push conversions from pthread_t to Qt::HANDLE and back into functions.
The casts that were being used didn't work for the unusual 64-bit
pointer/32-bit int combination that QNX is using for 7.0.  HANDLE ends
up as a 64-bit pointer and pthread_t ends up as a 32-bit integer.  g++
considers the precision loss when converting from the 64-bit pointer
to the 32-bit integer an error.  Better to have the casts hidden in
functions so it's easier to adjust them for unusual combinations such
as this.

Change-Id: Ia156b26224a0f7edc1c31e3d1ee8b21191381698
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-13 19:00:32 +00:00
David Edmundson
49491dd678 Handle device pixel ratio in QTreeWidget animations
As we are rendering into a new paint device we need to copy the device
pixel ratio from the widget.

Task-number: QTBUG-50207
Change-Id: I2fe08052c4ab589cb871f4c95440b7d63f79beb9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-06-13 16:12:20 +00:00
Liang Qi
511790fd1a Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	config_help.txt
	configure
	mkspecs/features/uikit/sdk.prf
	src/corelib/global/qhooks.cpp
	src/corelib/io/qfilesystemwatcher.cpp
	src/corelib/io/qlockfile_unix.cpp
	src/corelib/tools/qalgorithms.h
	src/gui/kernel/qwindowsysteminterface.h
	src/gui/text/qtextdocument_p.cpp
	src/network/access/access.pri
	src/network/access/qnetworkaccessmanager.cpp
	src/network/access/qnetworkreplynsurlconnectionimpl.mm
	src/src.pro
	src/testlib/qtestcase.cpp
	src/widgets/kernel/qwidgetbackingstore_p.h
	src/widgets/styles/qwindowscestyle.cpp
	src/widgets/styles/qwindowsmobilestyle.cpp
	tests/auto/corelib/io/qdiriterator/qdiriterator.pro
	tests/auto/corelib/io/qfileinfo/qfileinfo.pro
	tests/auto/gui/kernel/qwindow/BLACKLIST
	tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
	tools/configure/configureapp.cpp

Change-Id: Ibf7fb9c8cf263a810ade82f821345d0725c57c67
2016-06-13 12:46:46 +02:00
Maurice Kalinowski
27e94bd9d1 winrt: Fix potential crash in QCoreApplication
GetModuleFileName exists for Windows 10 and upwards, hence use the
generic version from the win32 mkspec. This allows to create a
QCoreApplication object with nullptr argv, as the application filename
is identified via the binary itself and not via arguments. A couple of
auto-tests use this method to create multiple application objects during
runtime.

Unfortunately we cannot apply this for msvc2013, even though MSDN states
the GetModuleFileName exists, it fails to compile for Windows Phone 8.1.

Change-Id: I2b8b988107487ef3785462f8ca40b0a6e0623e32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-06-13 06:13:19 +00:00
Maurice Kalinowski
038c57f4b3 winrt: Close IAsyncInfo manually in case of error
In case QEventDispatcherWinRT::runOnXamlThread returns an error the
runtime sets the status of IAsyncInfo to Error. At the point when the
IAsyncInfo destructor is invoked, an unhandled exception is thrown
indicating the error has not been handled, causing any application to
just crash deep inside the Windows platform libraries.

Hence, in case runOnXamlThread returns non-S_OK we have to manually
invoke Close() of the IAsyncInfo to tell the system we have taken care
of everything.

Change-Id: I3ac1e2ec2726f42e44f4f9a92191e454711120dd
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-06-13 06:13:15 +00:00
Maurice Kalinowski
3394d97edf winrt: Add privateNetworkClientServer to default capabilities
Contrary to our initial assumption, this should be added by default to
allow full functionality during development by default. Developers need
to decide which capabilities to use during the publishing step already,
hence improve DX by adding this.

Task-number: QTBUG-50847
Change-Id: I36e0214f7bcf8610d31851eea172aba3944cfd99
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-06-13 06:13:13 +00:00
Oliver Wolff
6fa74764d9 WinRT: Avoid asserts in socket function with bool return values
There is no need for the functions to assert. By returning false they
show that something went wrong and the error will be handled
gracefully.

Change-Id: Ib026adf5c6fb23b5e6b5598533caec3b3669220c
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-06-13 06:13:10 +00:00
Oliver Wolff
c111abe060 WinRT: fixed error reporting of QNativeSocketEngine::initialize
If runOnXamlThread returns anything but S_OK an exception is thrown
which might cause the application to terminate. So we give the lambda
a reference to hr and check that reference instead of runOnXamlThread's
return value for errors.

Change-Id: I1188ea720c63f6fdf43400f2f3ff928b72afc58e
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-06-13 06:13:09 +00:00
Oliver Wolff
0f6ededb15 WinRT: Proper error handling in socket engine's "bind"
runOnXamlThread should always return S_OK (causes exceptions otherwise)
so we need another way of error reporting to the outside (hr reference).
A failed hr is reported to the outside (of the lambda) and interpreted
as an unknown error.

Specific error cases like the given address not being a local address
or the given address being in use already are handled inside the lambda.
The specificErrorSet variable is necessary in these cases so that the
error is not overwritten by unknownError.

Change-Id: I198d66fe97726d5127bf31e50c7eff3363d5259c
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-06-13 06:13:07 +00:00
James McDonnell
d4e98a9a38 Move __cpp_constexpr check inside Q_COMPILER_CONSTEXPR check
Q_COMPILER_CONSTEXPR can be undefined (or not defined at all) to
indicate that constexpr should not be used regardless of the compiler's
ability to support it.  This is done for QNX because some C library
floating point functions used in the Dinkumware C++ library aren't
constexpr functions; i.e., the library doesn't have proper constexpr
support even though the compiler does.

(cherry picked from commit d87242968f)
Change-Id: If0bdeb2180710dd9ccd97d79fa91cf9ff42f7990
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-13 00:47:13 +00:00
Oleksandr Tymoshenko
1542d8881f Added bsdfb platform plugin for FreeBSD
[ChangeLog][QtGui][Platform Specific Changes] Added bsdfb
platform plugin for FreeBSD. Plugin renders directly to
framebuffer, no hardware acceleration supported.  bsdfb accepts
"fb", "size", "offset", and "mmsize" arguments with the same
format as linuxfb.

Change-Id: I5f5cea0b5ed70d5c6f8d01dc547f54c731bcae5f
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-06-12 23:50:37 +00:00
Thiago Macieira
50d70fd1e3 Fix warning when compiling x86 with SSE2 but no AVX2
qstring.cpp:595:13: error: unused variable ‘nullmask’ [-Werror=unused-variable]

Change-Id: I1cc7601489634e96833cfffd1456474a529a79ed
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2016-06-11 20:50:04 +00:00
Ralf Nolden
927f26c351 BSD mkspec cleanup for FreeBSD, NetBSD and OpenBSD to common namespace
BSD OS mkspecs share mainly the same configurations except very few
differences. Merge into a common/bsd/bsd.conf file to be used across all BSD
OSes in their respective qmake.conf and add a qplatformdefs.h that contain
the common defines to be re-used in the BSD mkspecs.

The change includes the usage of <sys/param.h> also on NetBSD through the
common qplatformdefs.h, which is intended for using NetBSD's version defines.

Change-Id: Ibb0ac9e4c8bb5aff7d0febdcab1a4b9600a61117
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-11 20:17:38 +00:00
Tor Arne Vestbø
ebee64645a darwin: Add Foundation conversion functions for QRect/QRectF
The fromCGRect function was left out for QRect, as the foundation type is
using CGFloats internally. Clients should use an explicit QRectF::toRect()
when potentially throwing away precision.

Change-Id: I0d4c5c5a4e6a45ea3287e3f37a00b69b0bfdefcf
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-06-10 23:47:15 +00:00
Friedemann Kleint
b465fe7596 QSystemTrayIcon/Windows: Use large icon for balloon message.
Use larger system metric SM_CXICON instead of SM_CXSMICON and set NIIF_LARGE_ICON
in the NOTIFYICONDATA. De-inline function iconFlag() and set NIIF_USER for user
icons for NIIF_LARGE_ICON to take effect.

Task-number: QTBUG-53591
Change-Id: I47c8e0a020ef94241403b1fbae76d5ef2e074301
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-06-10 21:49:45 +00:00
Friedemann Kleint
caa4e44937 tst_QTcpSocket: Replace insignification on Windows by BLACKLIST.
Partially reverts f3939d943e.

Task-number: QTBUG-52714
Task-number: QTBUG-49332
Task-number: QTBUG-49333
Change-Id: I1f1b3278134b1e6156c0cb7006d396154c776a46
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-06-10 21:48:54 +00:00
Liang Qi
cbe332405a Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	configure
	mkspecs/macx-ios-clang/features/default_pre.prf
	mkspecs/macx-ios-clang/features/sdk.prf
	mkspecs/unsupported/freebsd-g++46/qplatformdefs.h
	src/widgets/styles/qgtkstyle.cpp
	tests/auto/corelib/io/qdiriterator/qdiriterator.pro
	tests/auto/corelib/io/qfileinfo/qfileinfo.pro

Change-Id: Ia943555d1e59234a66f7dc65bdfda838e40001b5
2016-06-10 23:27:10 +02:00
Thiago Macieira
cbe62a0e6d Add move constructor to QDateTime
The move constructor is slightly more interesting than the copy
constructor because we can reset other to a short data state on 64-bit
systems. The assembly of that function is simply:

       mov    (%rsi),%rax
       mov    %rax,(%rdi)
       movq   $0x1,(%rsi)
       retq

The move-assignment operator for QDateTime was already there. There's no
need for one for QDateTime::Data since it's never called.

Change-Id: I06bae9392f534e45b3f1ffff144dffdd7f23b170
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-06-10 17:57:17 +00:00
Thiago Macieira
72393ac3b6 Allow QDateTime to shrink back to short data mode on copy
We won't shrink on manipulation when we have memory allocated, but it's
a good idea to create a non-shared copy if we can. It's an unlikely
scenario, though, because it requires the QDateTime object to have been
set to a large state then manipulated back into a small state.

Change-Id: I06bae9392f534e45b3f1ffff144dfee755bafa01
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-06-10 17:57:13 +00:00
Thiago Macieira
d1395b76cf Move the QDateTime file static functions to their right place
The file has an organization, so let's follow it. This commit has no
other changes besides moving code around.

Change-Id: I06bae9392f534e45b3f1ffff144e0b1f6dd72622
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-06-10 17:57:08 +00:00
Thiago Macieira
fb498a6519 Long live the short QDateTime optimization
Well, maybe not for so long: we may want to revisit it for Qt 6. At the
very least, we should enlarge the size of QDateTime on 32-bit system so
that they too can benefit from the optimization.

With this optimization, on 64-bit systems, the most common uses of
QDateTime now no longer allocate memory at all. The range is slightly
reduced from 584,554,049 years to 2,283,414 years around 1970. The other
drawback is that calling QDateTime::offsetFromUtc() on a localtime now
needs to recalculate the offset, instead of using the cached offset.
(QDateTime::toMSecsSinceEpoch() didn't use the cache).

Change-Id: Id5480807d25e49e78b79ffff144a8b2c9af91814
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-06-10 17:57:03 +00:00
Thiago Macieira
3eb5b15d80 QDateTimePrivate refactor: static'fy the date/time manipulators
This commit moves QDateTimePrivate functions setTimeSpec, setDateTime,
getDateTime, checkValidDateTime and refreshDateTime outside the
class. Like the previous commit, this is done in preparation for the
"Short QDateTime Optimization" as the "msecs" field will be placed in
the short data, if possible.

By making them file-level static, this also improves code generation, as
the compiler doesn't know whether it has to emit the class members for
out-of-line use or not.

Change-Id: I06bae9392f534e45b3f1ffff144df4d73cbc9184
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-06-10 17:56:57 +00:00
Thiago Macieira
97eae54083 QDateTimePrivate refactor: static'fy access to d->m_status
This commit changes most accesses to the d->m_status (including
d->spec() and d->setSpec() uses) to use new static functions. This is
done in preparation to the "Short QDateTime Optimization" as the status
byte will be kept in the short data.

Change-Id: I06bae9392f534e45b3f1ffff144dbd795d03227a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-06-10 17:56:53 +00:00
Thiago Macieira
b726751cd1 Refactor & simplify QDateTime::setMSecsSinceEpoch
Change-Id: I06bae9392f534e45b3f1ffff144df5ce1aa52636
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-06-10 17:56:48 +00:00
Thiago Macieira
38a1f610ab Refactor & simplify QDateTimePrivate::refreshDateTime()
Change-Id: I06bae9392f534e45b3f1ffff144df51ae6159a97
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-06-10 17:56:45 +00:00
Thiago Macieira
8e12120a2b Simplify the QDateTimePrivate::setTimeSpec() function
Change-Id: I06bae9392f534e45b3f1ffff144df36cc98b5f3f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-06-10 17:56:41 +00:00
Thiago Macieira
d3279b3217 QDateTime: fix the massageAdjustedDateTime differently
Instead of using a macro for maybe passing an extra parameter, pass the
d pointer and let the function decide what to use and what not to use.

Change-Id: I06bae9392f534e45b3f1ffff144dbeb68a30cb48
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-06-10 17:56:37 +00:00
Thiago Macieira
31b926d679 Move QDateTimePrivate::toMSecsSinceEpoch() code into QDateTime
Change-Id: I06bae9392f534e45b3f1ffff144dbad485814779
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-06-10 17:56:33 +00:00
Thiago Macieira
0358b87102 Remove QDateTimePrivate::isNull{Date,Time}()
They're superfluous, since b491fab02a
removed the distinction between null and invalid. Just use the
isValidXxx equivalents.

Change-Id: I06bae9392f534e45b3f1ffff144db9badad010fd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-06-10 17:56:28 +00:00
Thiago Macieira
6d311a23ad Stop QDateTimePrivate from inheriting QSharedData
We're going to have to stop using QSharedDataPointer because of the
upcoming short-datetime-optimization. By dropping the inheritance, I am
also able to rearrange the members and remove the padding hole that
existed.

The second padding hole was removed in the previous commit, which merged
two 32-bit fields into one.

On 64-bit systems, there's no way around a remaining 4-byte hole
somewhere due to the odd number of 32-bit members. I chose to leave it
in the middle of the struct, before the m_timeZone member, instead of
tail padding, so that the layout of the first members structure are the
same in bootstrapped and non-bootstrapped builds. That should help
debugging the bootstrapped tools in Qt Creator. It's also now the same
in 32- and in 64-bit systems.

Change-Id: Id69569111e7d4e619e22ffff144b1fba708885f7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-06-10 17:56:23 +00:00
Thiago Macieira
1a161c8ede QDateTimePrivate: merge the time spec, DST status and validity flags
Storing them in a single byte is the first step towards the Short
QDateTime Optimization.

The bump in the "private version" by 10 is to accommodate possible
changes in the Qt 5.7 branch.

Change-Id: Id5480807d25e49e78b79ffff144a59420457bcf0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-06-10 17:56:18 +00:00
Nico Rieck
67ca72796e Paint small progressbars correctly on Vista+
The animated glow always has a length of 120 but was previously drawn
with the clipping rect of the bar's actual size. For sizes smaller than
120 the native theme part would be clipped and the black gradient would
show.

Change-Id: Id81e39c405ef81ae08af0f64249568016944bdf1
Task-number: QTBUG-51266
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-06-10 14:48:46 +00:00
André Klitzing
9466d0e633 Disable QSslDiffieHellmanParameters tests for QT_NO_SSL builds
Change-Id: Ie0b7e9c819ddd1627709f64c30c8d2374bf50c9b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-06-10 13:18:03 +00:00
Shawn Rutledge
04e224b19a add QTest::createTouchDevice()
This enables creation of autotests which use touch events, without using
private API.

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

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

Change-Id: Ib0c50a356a1928afbd12a1ec3650f80f65b81265
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2016-06-10 08:49:44 +00:00
Mitch Curtis
ea86f73640 Mention extension in QFileInfo's suffix-related documentation
This makes it easier for users to find out how to get a file's
extension when browsing docs.

Change-Id: I08a1b620dea5432462133324824fae85754b9a09
Task-number: QTBUG-53380
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-06-10 06:59:42 +00:00
Antti Kokko
6c1e352803 Add Qt 5.7.0 changelog
Done-With: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Done-With: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I1e8d75afa4e26bac1e5f64b7a25320f80b54aa58
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2016-06-10 06:48:56 +00:00
Allan Sandfeld Jensen
fa8d16d476 Fix QWidgetBackingStore::isDirty() for render-to-texture widgets
The backing store would not report itself dirty if only render-to-
texture widgets were dirty.

This caused QOpenGLWidgets not be repainted after being remapped if they
marked themselves dirty while unmapped.

Task-number: QTBUG-50818
Task-number: QTBUG-51815
Change-Id: If43f7cbb6f4d44831b4c21b89f884d6bcaebf87c
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-06-10 06:48:21 +00:00
Oswald Buddenhagen
e005e99005 fix ios device&simulator builds again
the assumption stated in b67a0836d is actually invalid - configure sets
build_all without debug_and_release there. debug_and_release does
actually imply build_all, though.

to make things less confusing, don't let configure inject
iphonesimulator_and_iphoneos into all projects, but handle it like
debug_and_release instead.

Change-Id: Ib7acdc63308a538862fc603428f81aba60bca08e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-06-10 06:36:52 +00:00
Friedemann Kleint
196d55ba5c Output region in debug operator of QPaintEvent.
This helps to analzye flicker/painting issues.

Change-Id: I18e04598013c013386c3d019ff3098b1accec3f7
Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2016-06-10 06:09:37 +00:00
Tor Arne Vestbø
751143724a uikit: Call base class implementation of rotation callbacks
The Apple documentation explicitly says that you should call super
when implementing these methods.

Change-Id: I584bb140a4a5bde88927b379ab19158a78c6fea9
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-06-10 06:09:14 +00:00
Friedemann Kleint
d2c6294bd5 Diaglib: Add class LogWidget.
Add a class to display debug messages, providing convenience functions for
installing and formatting parameters like indentation. It prints a startup
message containing relevant information about Qt.

Change-Id: Id0a19adbb5953a6ded1a8e692f242b63748e7273
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-09 20:16:47 +00:00
Anton Kudryavtsev
1c9818c871 QString: use new QL1S::at() in lastIndexOf()
Make overloaded lastIndexOf() functions
more homogeneous.

Change-Id: If45aac88b43d26baf7f93caec3662a1085e26b97
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-06-09 18:01:50 +00:00
Thiago Macieira
b05741937c Plug padding holes in QHostAddressPrivate
On ABIs where quint64 is aligned on 8-byte boundaries (such 32-bit
Windows and all 64-bit systems), there was a padding hole of 4 bytes
between QHostAddressPrivate::a and the anonymous union. If we move the
member to after the union, there is no hole anymore.

That operation causes the tail padding to grow from 3 to 7 bytes. Since
we also don't need full 32 bits for the protocol, we can shrink the
structure by 8 bytes on those architectures and by 4 bytes on 32-bit
Unix systems.

Change-Id: I461e9fc7199748faa187ffff1415d6601a7bd777
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-09 15:59:24 +00:00
Thiago Macieira
7835b260a9 configure: check whether std::atomic<T> works for function pointers
And ask the user to apply one of the patches we're carrying to their
Standard Libraries.

Change-Id: I7e6338336dd6468ead24ffff141139c79056922e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-06-09 15:58:23 +00:00
Thiago Macieira
0a78d918f0 Replace qAllocMore with a pair of more useful functions
The first is "exact", not "more": qCalculateBlockSize. It ensures that
there's no overflow in multiplying, adding the header size or when
converting back to an int.

The second is the replacement for qAllocMore: it calculates the block
size like the first, but increases the block size to accommodate future
appends. The number of elements that fit in the block is also returned.

Task-number: QTBUG-41230
Change-Id: I52dd43c12685407bb9a6ffff13f5da09f816e667
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-06-09 15:32:14 +00:00
Thiago Macieira
43ff604f94 x86: Fix build with BMI but no LZCNT extensions
The GCC builtins for clzs and ctzs are enabled when the x86 extension
for LZCNT and TZCNT are enabled. The use of only __BMI__ in commit
f5f47987ce was incorrect.

But GCC needs both BMI and LZCNT enabled to enable this builtin.

Change-Id: I1cc7601489634e96833cfffd145647e9fc9f2f51
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2016-06-09 15:29:25 +00:00
Allan Sandfeld Jensen
bdf270202b Remove QWidgetBackingStore::fullUpdatePending
This was no longer used and always false.

Change-Id: I981055e6cc736cfe3432914c173c8b3edc31b46e
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-06-09 14:53:05 +00:00
Erik Verbruggen
923d869b0f Aarch64: vectorize ascii de-/encoding.
This works only on Aarch64, because the vaddv instruction is only
available on 64bit ARM. Doing something equivalent on 32bit ARM has the
high chance to run into micro-architecture differences: on an Cortex-a8,
transferring a single vector element from NEON to the regular CPU
registers takes 20 cycles(!).

Change-Id: Iccbfe84da82abb9b10f3f3dc35c8b950df69e251
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2016-06-09 08:06:04 +00:00