Commit Graph

21249 Commits

Author SHA1 Message Date
Eskil Abrahamsen Blomfeldt
14c94240f9 Android: Fix some QStyle tests
This adds the testdata to a qrc to make them available on Android.
There are still some failures which might be actual errors, and which
will be addressed separately.

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

Change-Id: I41ef5b10879bbd4bb8ef8d52ecaccf5e8e894075
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-01-08 10:07:00 +01:00
Eskil Abrahamsen Blomfeldt
7ad75cd8ef Android: Fix QTemporaryFile tests
Fixed a few instances of files that should be deployed to the
file system. The way we do this on Android is via qrc. We also
need a special case for the resources/test.txt, because
QFINDTESTDATA will find this in qrc, but that's not the one
we are looking for.

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

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

Change-Id: I5a1c212f6108abf2a82288a2c84cfb31eda5e101
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-01-08 10:02:23 +01:00
Richard Moe Gustavsen
05b96ae5d7 iOS: bump QMAKE_IOS_DEPLOYMENT_TARGET to 5.1.1
AppStore validation requires deployment target to be
at least 5.1.1 for 64-bit applications.

Change-Id: I4d857ad983e6d4059f541bff523dd63479aca849
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-08 09:45:18 +01:00
Ashish Kulkarni
da6a706eb3 fix error when cross-compiling with --system-zlib
This is broken since 1f461ac45b, where
Z_PREFIX was defined to namespace the bundled zlib symbols. The
bundled zlib is used by bootstrap.pro when cross-compiling which uses
the namespaced symbols. This breaks linking of rcc when --system-zlib
is used, as it will try to link to compress2 instead of z_compress2.

To fix this, the aliases are pulled in via zconf.h and the bundled
zlib is prepended to the INCLUDEPATH (i.e. before the system zlib).

Change-Id: Iec76cbdead40f888e2ac6a887ec8f3b7bc7db501
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-01-08 09:31:49 +01:00
Lorn Potter
72bc032ca8 Refactor networkmanager QtBearer backend to use QDBusAbstractInterface.
Using QDBusInterface causes introspection, which may not be permitted
by some platforms.

Change-Id: I953d27b9c0fc7c21d52fefeb8c7760a7235aed9d
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-01-08 06:42:44 +01:00
Marc Mutz
d511aa906c QVersionNumber: test more version numbers
QVersionNumber will gain a small-version-number optimization, which
stores sequences of less than 4 (32bit) or 8 (64bit) 8-bit signed
segments inside the class instead of a QVector. Make sure the tests
cover those cases, too.

Change-Id: If1d875c75d284908756b305f767a7218cab5226f
Reviewed-by: Keith Gardner <kreios4004@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-08 01:46:41 +01:00
Gatis Paeglis
d40b66a8ef Fix use-after-free bug
xcb_image_destroy() calls free on m_xcb_image
and then few lines down we access member of
m_xcb_image. Swap order of these two actions.

Change-Id: I01fb43a066459cce462df6af22161c35cef524eb
Task-number: QTBUG-43623
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-01-08 01:06:21 +01:00
Thiago Macieira
8190291fb0 Autotest: don't leak a socket every call to QtNetworkSettings::hasIPv6
Change-Id: I87e31945052233cee17460ee6f59c02ec416b27b
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-01-08 01:06:17 +01:00
Oswald Buddenhagen
85af7f4538 use the major qt version for the library stem also in cmake files
amends 7ef2f9f65c.

Change-Id: I1b7a029d8c73f5ce20d216e3b40a7c118eca4891
Reviewed-by: Titta Heikkala <titta.heikkala@theqtcompany.com>
Reviewed-by: Stephen Kelly <steveire@gmail.com>
2015-01-08 01:06:14 +01:00
Kai Pastor
1daa7aff4d Remove extra ';' after QPrint namespace block
The extra ';' causes a warning when gcc is used with -Wpedantic.

Change-Id: I3d99aca6f160e46dbe2173106160474664e06b2c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-08 01:06:07 +01:00
Tim Blechmann
099075427b QCoreTextFontDatabase: close memory leak in themeFont
if the CTFontDescriptorRef is already contained in m_systemFontDescriptors
we leak a reference, unless we explicitly release it.

Change-Id: I5b263aa52b4433e7e28cc01164098892cc9cd2ae
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-07 21:32:05 +01:00
Tim Blechmann
b0088967c3 QCoreTextFontDatabase: release CTFontDescriptorRef references in dtor
QCoreTextFontDatabase::m_systemFontDescriptors owns the references to the
underlying CTFontDescriptorRef objects. in order to avoid a leak, we should
release them

Change-Id: I8fc6c158908e0173696cd91058ac34efb3de01d5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-07 21:32:05 +01:00
Tor Arne Vestbø
8f9ced9857 iOS: Raise window level instead of hiding statusbar during VKB scroll
Hiding the statusbar using the normal iOS APIs result in QScreen
reporting new availableGeometry, which is not what we want. The
scroll of the screen is a purely visual effect, and shouldn't
have any effect on observable Qt APIs besides the keyboard rect
changing.

Instead of actually hiding the statusbar, we achieve the same
effect by raising the key window (and any other application
windows, including the keyboard) to the level of the statusbar,
effectively putting them above the statusbar. This still leaves
popups and alert windows above the key window, as normal.

Change-Id: Ib7694240ca86cfb9000de35bf0c49343ffb37e32
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-07 21:32:04 +01:00
Daniel Molkentin
83bd9393e5 Fix crash if PAC script retrieval returns a null CFData instance
The documentation for CFURLCreateDataAndPropertiesFromResource()
does not make this clear but from looking at the CFNetwork implementation
and a user stacktrace it appears that this function can return true
but not set the data argument under certain circumstances.

Change-Id: I48034a640d6f47a51cd5883bbafacad4bcbd0415
Task-number: QTBUG-36787
Patch-By: Robert Knight
Reviewed-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2015-01-07 10:29:13 +01:00
Daniel Molkentin
a83e4d1d9d Fix possible crash when passing an invalid PAC URL
This commit checks whether CFURLCreateWithString() succeeded.

It does not appear to be possible to enter an empty URL directly in the
PAC configuration dialog but I can't rule out the possibility
that it could find its way into the settings via some other means.

Change-Id: I6c2053d385503bf0330f5ae9fb1ec36a473d425d
Patch-By: Robert Knight
Task-number: QTBUG-36787
Reviewed-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2015-01-07 10:29:09 +01:00
Daniel Molkentin
ea4dcc5931 Fix crash on Mac OS if PAC URL contains non-URL legal chars
macQueryInternal() was retrieving the PAC URL string as-entered by
the user in the 'Proxies' tab of the system network settings dialog
and passing it to CFURLCreateWithString().

CFURLCreateWithString() returns null if the input string contains
non-URL legal chars or is empty.

Change-Id: I9166d0433a62c7b2274b5435a7dea0a16997d10e
Patch-By: Robert Knight
Task-number: QTBUG-36787
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Markus Goetz <markus@woboq.com>
2015-01-07 10:29:06 +01:00
Andy Shaw
e7210a4945 Remove redundant code
The non client mouse events have the right information regarding the
modifiers now so the old code covered with Q_WS_WIN can be removed.

Change-Id: I3e4ebc0debdd66970b18233f189b5d9e880e40a9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-07 09:57:21 +01:00
Andy Shaw
bca693e0c1 Remove the -load_all option from the linker enabling static builds
With the -load_all option turned on then it will cause a problem with
the network bearer plugins as they share the same files and on OS X
two plugins will be built and potentially linked against when building
statically.

This only effects gcc builds because clang does not turn this option on
when linking by default either.

Task-number: QTBUG-39238
Change-Id: Ib259304c3da74b6b4f6fcc6e3766427303af3bbe
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-01-07 09:57:07 +01:00
Andy Shaw
bb16ceac68 Prevent buffer overrun when getting the glyph images
The change 35bc3dc45a moved some padding out
of QTextureGlyphCache into the font engines directly, however this was not
done for the DirectWrite font engine so it caused a buffer overrun.

Task-number: QTBUG-41782
Change-Id: I4e643159036f06c5edd8a742dc6694d517a47826
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-01-07 09:42:32 +01:00
Friedemann Kleint
5517d1fde5 Windows: Remove check for minimum/maximum size constraints.
The warning was triggered when increasing the fixed size of a window.
If there is a real violation of the size constraints, the below
warning will show.

Task-number: QTBUG-43420
Change-Id: I85d7d0a91d040aa3ddeff8c3d105351efd5e14a9
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-01-07 09:17:51 +01:00
Friedemann Kleint
58fc02241a Windows: Release mouse capture when window is blocked by modal window.
The capture needs to be cleared when for example a modal dialog
is opened from a timer slot or similar while moving the window.

Task-number: QTBUG-43308
Change-Id: Id0c01080d67d1057004a7f85b037dce5e220de42
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-01-07 09:17:41 +01:00
Friedemann Kleint
d74d0a3b30 Disable ANGLE builds for MSVC <= 2008.
Task-number: QTBUG-43475
Change-Id: If0f68ed6823564fd67219812334256936031f35f
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-01-07 09:17:27 +01:00
Friedemann Kleint
6796f2337e Windows: Fix OS version determination for Windows >= 8
First, try to determine the version of kernel32.dll by
using the version API. If that fails, loop using the
version macros, taking the major version into account.

Hangs in the minor version loop have been observed, potentially
related to the major version.

Task-number: QTBUG-43413
Change-Id: I982e78873510e7598c7cf839177e59812acd86f6
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-01-07 09:17:18 +01:00
Thiago Macieira
cf4b413fa4 Make QtDBus unit tests compile with runtime dbus-1 too
There's a change in Qt 5.4.0 that makes Qt compile with its own set of
D-Bus headers, which means QT_CFLAGS_DBUS may be empty. Thus, we can't
compile or link if we're using the actual libdbus-1 API to build the
test.

This commit makes these unit tests use the same dynamic loading
mechanism.

Change-Id: I56b2a7320086ef88793f6552cb54ca6224010451
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2015-01-06 18:16:32 +01:00
Thiago Macieira
1fc4053337 Allow the QtDBus type benchmark to run without libdbus-1 found
Change-Id: I1086e6cd6534dc96311e981cc9c73f501c1128ac
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-01-06 18:16:09 +01:00
Thiago Macieira
12d32b017d Complete the work for the runtime libdbus-1 support
Commit a2da88712f was incomplete. Though
it did enable building of QtDBus without the libdbus-1 headers, but it
still kept looking for it. We don't need to do it anymore if CFG_DBUS is
the default (runtime), so skip the actual check.

This commit does not change behavior. All it does is skip the D-Bus
tests if we're about to use dlopen'ed libdbus-1.

Change-Id: I3947443c9ef6cc409cb6b154564f8af6fb5de84e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2015-01-06 18:16:08 +01:00
Simon Hausmann
182bb7c3d0 Fix build on Linux when dbus headers cannot be found
When CFG_DBUS != "no", we enable the build of linuxaccessibility in
src/platformsupport, which requires QT += dbus to work. When no dbus
headers are found, CFG_DBUS is set to runtime, which means we'll
enable a11y but "dbus" will not end up in qconfig.pri and therefore
src/dbus is not built at all (and not before platformsupport). Therefore
the build in platformsupport breaks.

So even if CFG_DBUS is set to "runtime" we need to make sure that dbus appears
in qconfig.pri.

Task-number: QTBUG-43205
Change-Id: Ibbe5e66552226cdcc1ce16fb83556406f3bb0e09
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-06 18:16:07 +01:00
Orgad Shaneh
a457bf3ff7 Doc: Fixed date format doc bug in QDateTime/Qt namespace
MM stands for month, SS is invalid

mostly cherry picked from Qt4 commit 670f460fab6a386407c07281cf6417ccf6430970.

Task-number: QTBUG-12236
Change-Id: I7af4be655d2d10f1befa1366abb48225c60d31dc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-06 17:54:58 +01:00
Thiago Macieira
acf80b9a2b Fix build error with Intel Compiler 15 on Windows
If the constructor is inline, the generated code needs access to the
vtable, which gets emitted with the first virtual function (in QtGui),
but somehow icl.exe can't find it in debug. Looking at the .obj files it
generates and comparing to MSVC, it seems that:

 - both generate and export the inline constructor from Qt5Guid.dll
 - MSVC will call that constructor from qoffscreenintegration.obj
 - icl.exe will inline the constructor and requires a symbol not
   exported from Qt5Guid.dll

I can't explain why (probably a compiler bug).

Change-Id: I0ab9c078ae4fc794826025d68d364124c7247e80
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-01-06 17:48:29 +01:00
Thiago Macieira
9d9b785259 Give ICC-as-Clang a Q_CC_CLANG version number too
Give it version number 3.5 for current compatibility.

Change-Id: Ia023d29b3b3946f8642a0550279ae63cbb803fc5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-06 17:39:03 +01:00
Tor Arne Vestbø
2bdcea9d31 iOS: Remove QIOSKeyboardListener self-change assert/guard
We're fairly confident self won't change in that case, and the
assert was causing warnings in release builds.

Change-Id: I4a826579bb4cedef8423e8d43cb370e1f3b80407
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-06 17:38:59 +01:00
Thiago Macieira
624ee454ec Make QDBusConnection and QDBusServer return an error on default objects
The error of "Not connected".

This incidentally solves a crash when QDBusServer().lastError() is
called but libdbus-1 couldn't be found.

Change-Id: Id93f447d00c0aa6660d4528c4bbce5998d9186a8
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-01-06 17:37:00 +01:00
Thiago Macieira
aa83bacb14 Autotest: fix a race condition in verifying a peer D-Bus connected
On the unit test side, everything is sequential: we first ask for the
connection, verify that it is connected, then ask the remote side via
the session bus if it is connected. Unfortunately, the remote site may
handle things in a different order: it may handle the incoming function
call to "isConnected" before doing accept(2) on the listening socket.

So, instead, make the local side block until the connection is received
on the other side. On the remote, we don't block, instead we use the
feature of delayed replies.

Change-Id: Ie386938b8b39dd94a9d7e5913668125fb4a3c7da
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-01-06 17:36:58 +01:00
Thiago Macieira
01fc82e357 Re-enable constexpr for ICC 15
The bug noted in d88e4edcd5 appears to be
resolved.

Change-Id: Id20906ff83f74bd16267d44bf447626b81187e71
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-01-06 17:36:49 +01:00
Thiago Macieira
f3e9f11265 Fix change-of-sign warnings with ICC
qlocale_p.h(427): error #68: integer conversion resulted in a change of sign

We hadn't enabled Q_COMPILER_CONSTEXPR for ICC.

Change-Id: Ie7e3070b9f8f2cf512d2745001312865e698596b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-01-06 17:36:47 +01:00
Maurice Kalinowski
f2c247921d windeployqt: add clean step to toplevel makefile
Currently you could only invoke windeployqt for debug and release
builds, but not windeployqt_clean resulting in artifacts after
the clean step.

Change-Id: I3a93e4909a017f3594cc5b0c2249ed25b777c008
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Andrew Knight <qt@panimo.net>
2015-01-06 16:50:54 +01:00
Eskil Abrahamsen Blomfeldt
ce40b8b7ef Android: Fix QCryptographicHash test
Include test data in qrc when building on Android.

Change-Id: I611ca24fe8764eb709b6ce27e814840ea919d4f1
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-01-06 16:44:38 +01:00
Eskil Abrahamsen Blomfeldt
8057ce61d0 Android: Fix QCommandLineParser test
Skip the tests that require building and deploying an external
command line application, since that's not how we do things on
Android, and it's really not very relevant for that platform.

Change-Id: I2c1985687e25fb0cf124b1d57c8ba60e37d2ff96
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-01-06 16:44:36 +01:00
Eskil Abrahamsen Blomfeldt
4613e1d2c1 Android: Fix QCollator test
On Android the POSIX implementation of QCollator is used, and
this does not support setting other locales than the default.

Change-Id: I25d23949341fc555e8be4f6836ae68cc8813cc46
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-01-06 16:44:34 +01:00
Eskil Abrahamsen Blomfeldt
463835b306 Android: Fix QChar test
Include test data in qrc when building on Android.

Change-Id: Id80623324788dac21bd5ddbeef8108f54d6bc8f7
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-01-06 16:44:32 +01:00
Eskil Abrahamsen Blomfeldt
6a4704cc64 Android: Fix QByteArray test
Include test data in qrc so it can be found on Android.

Change-Id: Iaca8422120f1ef842aafeb0cc209cb9fdd70f05f
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-01-06 16:44:30 +01:00
Eskil Abrahamsen Blomfeldt
75f0578124 Android: Fix QTranslator tests
Bundle test data in qrc on Android. Extract it, as the tests
expect to find it in the file system.

Change-Id: I251eca3c23141a608b1cbac5ee0b7164c068f9b4
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-01-06 16:44:27 +01:00
BogDan Vatra
af32727362 Android: Check XML output and optionally stop on fail.
The failures will be printed in red color.
Use -f param to stop on fail.

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

Change-Id: I8f7c5dc5bfc10c02e090d3654aaefa047229a962
Task-number: QTBUG-43563
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-06 14:26:00 +01:00
Sérgio Martins
38a3158d2f Windows: Fix QColorDialog's live updates while picking outside color
Microsoft's SetCapture() doesn't work on windows owned by other processes,
so instead we use a timer. This is the same approach as used by qttools/src/pixeltool.

The mouse move approach however is more elegant and doesn't hammer the CPU with
QCursor::pos() calls when idle. For this reason the workaround is Q_OS_WIN only.

Task-number: QTBUG-34538
Change-Id: I40a6f7df5bf2a3a29ade8fe4a92f5b5c4ece7efb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-06 14:22:21 +01:00
Thiago Macieira
b699ac070c Don't bind to QHostAddress::Any if we want to do IPv4 multicast ops
Linux gracefully allows us to do that and treat the v6 socket as if it
were v4. Other OS (notably OS X) aren't so forgiving.

Change-Id: I13dd3274be2a4b13e8b1eef93cbc2dd17b648f96
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-01-05 08:07:10 +01:00
Marc Mutz
4560ce4ec6 tst_QLockFile: simulate a crash better
Instead of leaking the QLockFile instance, which causes
leak-checkers to emit false positives, simply call exit(),
which doesn't run the destructors, yet doesn't lead to
leak-checker warnings.

Change-Id: Ia61010671e5218ae412e2bcf873e66255a2c5a99
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-04 09:43:25 +01:00