Commit Graph

27143 Commits

Author SHA1 Message Date
Timur Pocheptsov
23173c725c QSslSocket (OpenSSL) - handle abort/close on sslErrors emitted
If a user's code, attached to sslErrors signal, calls abort/close
or disconnectFromHost but our SSL socket was configured not to verify a peer,
no need to continue handshake after calling checkSslErrors
(and finally crashing on invalid 'ssl' pointer).

Task-number: QTBUG-53906
Change-Id: I7f185511d278f9d6f16e7d6c5ba424707141459c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-06-14 07:29:01 +00:00
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
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
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
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
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
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
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
Joerg Bornemann
bd4344a0bd Fix qplugin autotest on Windows
Since Qt 5.0.0 we never built the test plugins on Windows, because we
checked for the existence of QtCore[d]4.dll, and the actual test does
not complain if it cannot find any plugins.
Use the right conditions to check for debug/release Qt builds on
Windows. Use subdirs dependencies on every platform and then actually
pass the right variable to SUBDIRS. Clean up the pro file while we're at
it.

Change-Id: I099f30afd445fbf43dc5677d256ffe55b27639b3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-06-08 19:40:29 +00:00
Friedemann Kleint
6c0783d107 Revert "Insignifify qfileinfo on Windows, like QDir".
This reverts commit 55655abfaf.

The crashes in release mode cannot be locally reproduced.

Change-Id: I4e7b1defbeac5d5512b2fa82a367d2e04e3c37a4
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-06-08 19:05:46 +00:00
Friedemann Kleint
19def3d8f1 Revert "Insignifify qdiriterator test"
This reverts commit b373d183de.

The crashes in release mode cannot be locally reproduced.

Change-Id: I38ff5e9e045cff0e94e24ca07fb6e18e88b677c7
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-06-08 19:05:38 +00:00
Friedemann Kleint
36ffe18f05 Re-enable tst_QDir on Windows.
Partially revert f3939d943e.

Change-Id: I67e4d8973bc18d9cd77750c6379221d34e9484b3
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-06-08 19:04:36 +00:00
Błażej Szczygieł
afa0e9bf6a QtWidgets: Open submenus also on left mouse button press
This patch allows to open submenus also on left mouse button press.

Previously submenus could be opened only on right mouse button press
as ContextMenu event which was inconvenient especially for long submenu
popup timeout.

Task-number: QTBUG-53054
Change-Id: I1bd78ed4436f738c8838f7f4687ffebb94b66725
Reviewed-by: Félix Bourbonnais <thor400.75@gmail.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2016-06-08 19:04:03 +00:00
Błażej Szczygieł
4762fabce1 xcb: Fix transient parent and "Qt::Window" flag
Don't set transient parent property when Qt::Window flag is set.
Delete transient parent property if a window doesn't have a transient parent.
Force setting standard window flags for Qt::Window only if there are no other
flags.

Amends 98c10a02c5

Task-number: QTBUG-52550
Change-Id: I68ee715b632487e9dd0e7ffbbfc0c2cdd0f0e151
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2016-06-08 19:04:01 +00:00
Luca Bellonda
767319a5aa Add support for 8bit encodings not ASCII compatible in QXMLStreamWriter.
When using a 8 bit encoding to write a file, a test discovers if the
encoding is really ASCII compatible by examining a letter and one of the
XML reserved characters. EBCDIC, in the current base, was not well
handled.

[ChangeLog][QtCore][QXmlStreamWriter] Fixed a bug that prevented the
generation of valid XML files when using encoding with 8 bit per
character but not ASCII compatible. QXMLStreamWriter generated XML
markup using always ASCII in this case.

Change-Id: I9c86a122dd91b2290d50c358638442f99777d4ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-08 18:50:25 +00:00
Marc Mutz
5a15545ee2 QDebug: fix streaming of QChars
Commit 9ef3ff30 introduced a new function, putUcs4(), to
output QChar, char16_t, char32_t as a, possibly escaped,
character literal, but got the order of stream modifiers
wrong. Instead of applying the field width to the 'ucs'
streaming, it applied it to the prefix '\u'. The same
problem exists for the pad char, leading to the result
   '00\ue4'
for a QChar containing
  ä (LATIN SMALL LETTER A WITH DIAERESIS)

Fix by reordering the elements streamed so that the
prefixes come last.

Added a test.

Change-Id: I6eaa0586501b9e780aaa3bb5dcec0e5c2f86a219
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-08 18:29:38 +00:00
Ralf Nolden
4fb2b74119 Remove a.out defines in OpenBSD and NetBSD mkspec
OpenBSD made the switch from a.out to ELF with release 3.4, published
2003, see http://www.openbsd.org/34.html. In preparation to cleaning
up the mkspecs for OpenBSD, remove the a.out defines as only recent
versions of OpenBSD (5.8 onward) will be supported.

NetBSD switched from a.out to ELF file format with release 1.5, see
https://www.netbsd.org/releases/formal-1.5/NetBSD-1.5.html in the year
2000.

Remove the defines for older a.out systems now as we are at release 7.0
and only 6.0 onwards releases are currently supported anyway.

While cleaning up, remove the old comments for QT_SOCKLEN_T values of
outdated OpenBSD and NetBSD releases as well.

Change-Id: I8519eab7bcd4af19c0e9f628657878f32b2bd602
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-08 15:23:47 +00:00
Martin Porcelli
5f3a262a73 QSslSocket: Data is sent after a certificate is downloaded on Windows.
QSslSocket was not transmitting existing data after finishing its
handshake if it had to download a certificate on Windows.

Task-number: QTBUG-48816
Change-Id: Ie35b5f4ca0f6c3c40fe2394166eb31f9f72dac55
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Richard J. Moore <rich@kde.org>
2016-06-08 07:42:42 +00:00
Marc Mutz
862fa24179 Optimize QJsonObject::operator==
The old code iterated through one QJsonObject and looked up the key
in the other, comparing the values. It had linearithmic complexity,
and created one QString 'key' per element.

Since the entries in a QJsonObject are lexicographically ordered,
we can, however, just walk through the two objects in lock-step and
compare corresponding entries (at the same index) with each other.

Doing so saves O(N) QString creations and QJsonObject::value()
calls, and makes operator== linear in the number of elements.

Change-Id: Ib46ee0c1008b7f114454e282b6bd2bfcdbe59e2a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-06-08 04:38:20 +00:00
Alejandro Exojo
f9c60038bf Fix QVariantAnimation documentation
Since 5.0, this class is not abstract. Only the documentation of
updateCurrentValue was updated at that time. Fix the class reference and
the mentions of the class being abstract in the Animation Framework
overview.

Change-Id: I8ef9accb0b870dc8eb75bfc74361c7f2ad8d1d8b
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2016-06-08 04:32:45 +00:00
Laszlo Agocs
76810e1495 xcb: Disable GLX pbuffers with Chromium in VMs
Change-Id: I474e4a4ce424a92b46381eb26aeda811ed059819
Task-number: QTCREATORBUG-16252
Task-number: QTCREATORBUG-14937
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2016-06-08 04:22:57 +00:00
Ralf Nolden
a914003c82 Remove OpenBSD _POSIX_THREAD_SAFE_FUNCTIONS undefine
The qplatformdefs.h for OpenBSD included an undefine of
_POSIX_THREAD_SAFE_FUNCTIONS because of (at the time) missing
implementations of the required _r() functions. After checking these
functions http://www.unix.org/whitepapers/reentrant.html
against the OpenBSD man pages http://man.openbsd.org/OpenBSD-4.4/cat3/getpwuid_r.0
they are all complete with OpenBSD 4.4 released in 2008. As
OpenBSD only supports the current and the last release before (5.8 and
5.9 now), it is safe to assume that this undefine can go away now
for sure.

Change-Id: I341bcae77d1bd7249ac3fdeaefce9c5eb595eca7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-08 04:11:22 +00:00
Ralf Nolden
6db053139e Delete unsupported/freebsd-g++-46 mkspec
The freebsd-g++46 mkspec was intended to specifically use gcc 4.6 from
FreeBSD ports collection. However, the ports collection moves its
"standard" gcc version and uses symlinks to the standard commands
(e.g. gcc -> gcc48) on installing gcc. The current gcc in ports is
4.8.5, so the mkspec is not useful at all.

Change-Id: I041325d05c7dc3f47f4a774d6f46ba24a601bf3e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-08 04:11:16 +00:00
Ralf Nolden
37ef6b4968 OpenBSD: use clock_gettime() provided by OS
The use of clock_gettime() is limited to systems having _POSIX_TIMERS
defined, however OpenBSD implements clock_gettime() but does not have the
posix define. Enable using clock_gettime() on OpenBSD as well.

Change-Id: I785954fe61b42b15755ca625a766c9a95179ae8d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-08 04:11:10 +00:00
Ralf Nolden
4ea95609cc FreeBSD: remove -D_THREAD_SAFE from pthread usage
On FreeBSD, the gcc manpages until Release 5.1 mentioned using
the -D_THREAD_SAFE define when using -pthread. This has been obsoleted
and the gcc manpages from Release 5.2 onwards have this removed.

Now we finally remove this historic relic here, too.

Change-Id: I00a5b688c56f46b938c0806fb44b72d5afe5079e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-08 04:11:03 +00:00
Ralf Nolden
1b22aeda5b OpenBSD: simplify mkspec and match ports
By using commmon/gcc-base-unix.conf and common/g++-unix.conf most of
the contents of the qmake.conf for OpenBSD can go. The QMAKE_LFLAGS_UNDEF
are reset because the linker can't handle environ in libraries, which is
only added to libc in OpenBSD 6 (http://www.openbsd.org/faq/current.html)
even when explicitly adding -lc to QMAKE_LIBS.

See
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151102/309783.html
for similar questions on using -Wl,-z,defs instead.

Change-Id: I6c725fb3bc7ae63270912b07f230a480c9157dfd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-08 04:10:56 +00:00
Ralf Nolden
8339b557e4 NetBSD: simplify mkspec and match supported OS versions (6.x-7.x)
By using common/gcc-base-unix.conf and common/g++-unix.conf most of the
mkspec details can go, leaving us with a minimized qmake.conf.

Change the default X11 location to point to /usr/X11R7 after NetBSD
switched to X.org in Release 5.0 by default.

Also change the default location for addon software on NetBSD, it uses
pkgsrc as its ports system which installs to /usr/pkg by default (the
default value for $LOCALBASE of pkgsrc on NetBSD), see
https://www.netbsd.org/docs/pkgsrc/using.html chapter 4.1.

These default values mirror the current state of NetBSD usage to get
the prerequisites to compile Qt with a minimum amount of configure
parameters.

Tested with NetBSD 7.0 using gcc 4.8.4-nb2 (system compiler)

Change-Id: Ic50757af9f070c0383c7356302e7e7686f031740
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-08 04:10:49 +00:00
Friedemann Kleint
df3f685826 tst_QFileSystemModel: Remove Win32LongFileName().
Modern SSD drives no longer have short file names enabled, causing
the test to fail.

Task-number: QTBUG-29403
Change-Id: I2e9866d8f8a6ed3df9d2dc6630b8cfa47ade0728
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-08 04:09:48 +00:00
Friedemann Kleint
ae0a2fe041 Rewrite test tst_QDir::cdBelowRoot() to be data-driven.
Limit the macro #ifdefery and allow for more test cases.

Task-number: QTBUG-53712
Change-Id: I2c185efc7c3b8fcd0217d2021bd98ab6044b5aee
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-08 04:08:34 +00:00
Giuseppe D'Angelo
15a76e5719 QLineEdit: move to the beginning when receiving a MoveToStartOfLine
The code dealing with shortcut overrides omitted this value from the
checks. If the user had a shortcut installed with a key sequence matching
MoveToStartOfLine, then that would result in the line edit not moving
the cursor at the beginning of the line (unlike other similar sequences).

Change-Id: If2e780068b3139390c79285d2205cc89285ba8b5
Task-number: QTBUG-52796
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2016-06-07 21:09:30 +00:00
Hannah von Reth
ca434d0c20 Enable testStyleOptionInit for all styles and fix affected styles.
Change-Id: I7cb759445342ecb58d5187ddd4a22e41fdea084a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-06-06 13:12:14 +00:00
Allan Sandfeld Jensen
62091be85c Fix zero-as-null-pointer-constant in wayland compositor api
This gets included by Qt Wayland and will cause warnings there.

Change-Id: I3bb470d42ace4e6195d33019f81fa72f3006fc7f
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-06 13:09:22 +00:00
Thiago Macieira
f8b5142e30 Fix race condition in tst_QDBusConnection::pendingCallWhenDisconnected
The test sent a message and hoped that the "delete server" would cause
the server object in the QDBusConnectionManager thread be deleted before
it could receive and process the message. That's racy, because on some
CI machines, it did and then sent back an error reply indicating the
object sought was not found.

Instead, let's use a child process that we can kill to make it exit at
the right time.

I've chosen to use dbus-daemon itself, because that lets us test the
actual conditions that triggered the original bug: the daemon getting
killed during a desktop session shutdown on Linux.

Change-Id: I87e17314d8b24ae983b1fffd1454483aea87c921
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2016-06-06 11:39:53 +00:00
Allan Sandfeld Jensen
d5ac97e36f Fix font-weight regression
Do not override the requested font-weight. This was a wrong rewrite of
a now redundant if-statement.

Change-Id: I20a745cac02d896fdeaa853f20c6b6647084fceb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-06-04 22:49:31 +00:00
Friedemann Kleint
fd70978693 Diaglib: Extend class information for QWidget dumps.
Output the class hierarchy until a base class within QtWidgets is found.

Change-Id: I0ecee22e2ead1dea8b39cce8ca2f0739290aac22
Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com>
2016-06-04 18:49:27 +00:00
Friedemann Kleint
95f1f6f719 tst_QTemporaryFile: Run in temporary directory.
The test leaks a file (named qt_...xxx) in QDir::tempPath(). Moreover,
when tests fail, it can happen that more files are leaked and subsequent
runs do not recover since the check for non-existence of those files fails.

Change-Id: Iaea6d09ee7c271903a1b9c63e263c19f9e90bba9
Reviewed-by: David Faure <david.faure@kdab.com>
2016-06-04 18:48:52 +00:00
Friedemann Kleint
23bed9f820 Remove tst_QWidget::immediateRepaintAfterShow().
It tested whether a paint event was received when calling QWidget::repaint()
right after QWidget::show() without waiting for the window to be exposed.

This caused a QEvent::UpdateRequest to be sent, which ended up in
QWidgetBackingStore::sync() which returns after checking
QWidgetBackingStore::discardSyncRequest(), since Qt::WA_Mapped is not set
on the non-exposed widget.

The test passed on Windows since it contains one call to
QCoreApplication::processEvents() which causes the the initial WM_PAINT
message to be processed in QWindowsWindow::handleWmPaint() which calls
QWindowSystemInterface::flushWindowSystemEvents() and causes Qt::WA_Mapped
to be set. This seems counter to the intention of the test.

Remove the test since it won't pass anymore in Qt 5 unless Qt::WA_Mapped is set.

Task-number: QTBUG-26424
Task-number: QTBUG-38327
Task-number: QTBUG-39842
Change-Id: Iede026d52825dcf1f2e9014a316d26d260309214
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-04 18:47:54 +00:00
Gabriel de Dietrich
cf19b06f22 Cocoa QPA: Mute mouse dragging warnings
While probably valid, these warnings are beyond the
user's control, and more likely a sign of Qt's own
expectations or misbehavior. So, we should not annoy
the users with them.

This change introduces the same logging category as
3ee01f7403 in 5.7 as is a partial backport to
simplify a subsequent 5.6 to 5.7 merge.

Change-Id: Ica2e3b1c5bc372923fd823b5d7d537d319835685
Task-number: QTBUG-42846
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-06-04 18:39:33 +00:00
Morten Johan Sørvig
22667483e1 Blacklist modalDialogClosingOneOfTwoModal on OS X
Passes locally (on 10.10), but seems to have become
unstable on the CI system.

Task-number: QTBUG-53790
Change-Id: I0432fca4121b97bcdd6cec529fc4e148dfb8c1ab
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-06-04 18:36:04 +00:00