Commit Graph

25672 Commits

Author SHA1 Message Date
Marc Mutz
1c9f53c4e5 examples: remove use of obsolete QStyleOption*V<N> typedefs
These are obsolete since Qt 5.0.

Change-Id: I297477eff129558553f52a04bb7828d95db27969
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-11-02 18:43:26 +00:00
Ulf Hermann
8c2ca33073 Replace qdtoa and qstrtod implementation by a 3rdparty library
This also fixes the underlying cause of QTBUG-44039 and QTBUG-43885.

You can choose between system, qt, and no libdouble-conversion
support. If you choose "no", snprintf_l and sscanf_l will be
used.

By default, system double conversion is used if the system provides a
double-conversion library. Otherwise the bundled libdouble-conversion
is built. sscanf_l and snprintf_l are not used by default as the
planned "shortest" conversion mode to produce the shortest possible
string will give less precise results when implemented with snprintf_l.

Change-Id: I8ca08a0fca5c54cf7009e48e771385614f6aa031
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-11-02 17:00:50 +00:00
Peter Kümmel
8c5acf6573 configure: add link-time-optimization option
Windows' configure.exe supports -ltcg since several years,
this patch adds -ltcg to Unix's configure script.

Change-Id: I3f39086c67c3f4cacd252f63de30e3cfc4aa22bb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-02 14:45:57 +00:00
Joerg Bornemann
dfaffcbf2a QWindowsPipeReader: fix occasional "Unknown error 995"
After canceling the asynchronous read operation, the
notified() slot receives ERROR_OPERATION_ABORTED.
We must not handle this situation as an error.

This amends commit 5ce567c5.

Task-number: QTBUG-48336
Change-Id: Iff948ceb3ad1f805a9de8c188fbc39ed4c76ba82
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-02 12:38:50 +00:00
Paul Olav Tvete
317b9e9c5f Support for Wayland servers on i.MX6
A wayland compositor on i.MX6 needs to create the wl_display
before creating the EGL display. This wl_display then needs to be
exposed so that QWaylandCompositor can use it.

Change-Id: Id60f6dd2fbba05140ca0671da6f17dbc2ecce3a3
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-11-02 09:43:29 +00:00
Edward Welbourne
ab1a5f1003 Fix pauseEvents() test to test what should be true, not what is.
If the future is finished when a watcher starts watching it, it is
perfectly reasonable for the watcher to get the finished message
promptly.  If you pause the watcher before any message loops get to
run, the message presently won't get through until the watcher is
resumed, but there is no reason to guarantee that; indeed, one could
consider it somewhat perverse behavior.

So move the reportFinished() calls to after the pause()s.
Also eliminate a used-once local variable and use QTRY_VERIFY() in one
place where qWait() was used before.

Change-Id: I4bc6091fd7437a4d341be511b7a140f3d72d850e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-11-02 09:40:32 +00:00
Edward Welbourne
ada4b4aaa5 Attach all signal spies before setting the watcher's future.
Attaching spies afterwards was provoking a warning during tests:
QFutureWatcher::connect: connecting after calling setFuture() is likely to produce race

Change-Id: I6ee8c3613cecebd1c69b0337139d8a19a33f4a11
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-11-02 09:40:09 +00:00
Topi Reinio
70eb137768 Doc: Fix snippet tags for QString::[last]indexOf() overloads
Duplicate identifiers were introduced for QString code snippets,
resulting in the wrong snippets to be quoted.

Change-Id: I75e9c99cbc73bf39262079f7f53342a6ac90c2a7
Task-number: QTBUG-49111
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2015-11-02 09:17:24 +00:00
Laszlo Agocs
635394c84a WinRT: Fix wrong mouse event position for non-fullscreen windows
When calling handleMouseEvent and similar, there are two choices when it
comes to the global and local position: by specifying the window it is the
caller's responsibility to provide a valid local position. When the window
is null, QGuiApplication calculates the local position. The winrt plugin
chose the former and therefore passing the global position as local is
wrong.

Task-number: QTBUG-48208
Change-Id: I3e1137cdb5d023296c4d73899da016641303c7df
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-11-02 09:16:31 +00:00
Laszlo Agocs
9b735a4618 WinRT: Add support for QOpenGLWidget
Also involves adding support for sharing contexts.

Task-number: QTBUG-48663
Change-Id: I0b18846ae70b63a0a21132f820a12ea744c0e936
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-11-02 08:48:51 +00:00
Friedemann Kleint
97b564374b qcoreapplication_win.cpp: Correct FIXME comment on qWinMain().
Mention that it is still used by Active Qt.

Task-number: QTBUG-49148
Change-Id: Ic31b2f60b25886cd55c5fa516082d79311ab84cc
Reviewed-by: Fredrik Orderud <forderud@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-11-02 08:48:16 +00:00
Takao Fujiwara
550cd1d68c IBus: Implement QPlatformInputContext::locale()
Listen to "GlobalEngineChanged" dbus signal.

Task-number: QTBUG-48772
Change-Id: Ia186a66c75fb3ce2fdf5ef9e358c1807f674594b
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-02 01:16:01 +00:00
Marc Mutz
7796562998 QDataBuffer: disable copy special member functions
The compiler-generated ones would break class
invariants.

This internal class so far isn't copied. This patch makes sure
that it stays that way.

Change-Id: I8bf75058edaf2adf148ae9edff4bf4e9a3b3368d
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-10-31 18:50:38 +00:00
Morten Johan Sørvig
8793ad8175 QMacStyle: Select high-dpi pixmaps from icons
Pass a QWindow pointer to QIcon::pixmap(), which
allows it to select a pixmap based on the target
device pixel ratio.

Change-Id: Ifb8e49c0eff0a42233a90eee3dfb995c2441bfd6
Task-number: QTBUG-38100
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-10-30 22:02:23 +00:00
Morten Johan Sørvig
74a2e29705 QCommonStyle: Select high-dpi pixmaps from icons
Pass a QWindow pointer to QIcon::pixmap(), which
allows it to select a pixmap based on the target
device pixel ratio.

Change-Id: Ib592de2a25060658b70b4e4ab7ff5fbaa9b60260
Task-number: QTBUG-44424
Task-number: QTBUG-38100
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2015-10-30 22:02:05 +00:00
Timur Pocheptsov
25717bedfb tst_qudpsocket::multicast - blacklist several combinations
Different multicast tests fail on different platforms for different reasons.
Blacklist them to get rid of insignificant and later fix/un-blacklist.

Change-Id: I91548366c7666478ea1cc446bbf337becfdefd49
Task-number: QTBUG-46612
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
2015-10-30 22:01:50 +00:00
Maurice Kalinowski
b347697a9d winrt: Only destroy existing egl surfaces
Running for instance the widget auto tests reveals a lot of egl warnings
due to items being created and not shown. Hence no surface was created
but tried to be destroyed when window was deleted.

Change-Id: I5c99eeb94a8fc2cfeb98f85445e013de61ff9ca9
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-10-30 21:50:58 +00:00
Maurice Kalinowski
25dcc90d79 winrt: Exit application properly
After returning from main() it is not sufficient to exit the main
thread, it also needs to be ensured that the Xaml::IApplication object
gets notified by invoking Exit.

Task-number: QTBUG-49141
Change-Id: I8ca434be5f17ddddd465ede2a79585c28c51b3ef
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-10-30 21:50:43 +00:00
Maurice Kalinowski
ccbb1b4409 winrt: store egldisplay globally
The QWinRTEGLContext must not store the display, as it might get
destroyed while other objects still need it, for instance QWinRTWindow
to delete the surface. Rather create a global static for creating the
display once and delete it when application lifecycle ends.

Change-Id: Id176b6934e1d1327f5bb70ad0d258de91f675041
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-10-30 21:50:09 +00:00
Andrew Knight
5814cd9d27 winrt: initialize EGL display with automatic Trim and WARP
The minimum feature level is now detected before requesting a display.
If it is less than 9_3, use the WARP device instead.

Task-Id: QTBUG-44495
Task-Id: QTBUG-44694
Change-Id: I9f81f4f92269fab73c291f7373aa07236c7e5f98
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-10-30 21:49:54 +00:00
Friedemann Kleint
d946507727 Testlib: Avoid formatting unneeded messages.
Brings down gui/painting/qcolor from 7s to 3s, reducing the calls
to printf() helpers from 16E6 to 10E6.

Task-number: QTBUG-38890
Change-Id: I34065e6f09fc9a14920b06aa6936908229f3f9c4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-10-30 21:28:20 +00:00
Jarek Kobus
11638dad10 Add a test case for conflicting transitions
This tests a fix: ff3ba1045e

Change-Id: I623b4e270c7eba1af0c4c023e83b6eea50fb45a1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-30 21:15:38 +00:00
Friedemann Kleint
84042523f2 Testlib: Output total test time in plain text logger.
This makes it easier to spot slow tests.

Produces:

Totals: 314 passed, 0 failed, 0 skipped, 0 blacklisted, 137ms
********* Finished testing of tst_QStringRef *********

Task-number: QTBUG-38890
Change-Id: Iaee4dd677fd8f18b82f7c9c4934eb5b1119ade43
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-10-30 19:19:10 +00:00
Dyami Caliri
5a7f69f824 Fix Vista style compilation with QT_NO_ACCESSIBILITY
A recent change uses an accessibility function even if accessibility
is disabled.

Change-Id: Ibf9afbb90120772065743b2f9dd3615e4e6a2f37
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-10-30 16:42:25 +00:00
David Schulz
c23a086e4f configure: Separate host and build platform.
This separation makes it possible to make a
canadian cross build of Qt on a linux build machine.
The canadian cross build requires an external Qt that
runs on the build system.

Change-Id: Ifd83a4c6376d3299647e74bb349a3452a6f433fc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-10-30 13:14:51 +00:00
Erik Verbruggen
a2b58c1643 Implement qt_is_{inf,nan,finite} using std. library functions.
The previous implementations did not check the full mantissa. The result
was that certain NaN values were seen as +/-Infinity.

A nice benefit is that the generated code for this implementation is also
faster.

Task-number: QTBUG-47692
Change-Id: I1507ec579ccd9a2ab97da8cf83dabbc5d6e28597
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-30 13:07:19 +00:00
Ulf Hermann
0659bb810b Add thorough tests for QLocale string/double conversions
We want to be sure that the conversions are independent of the current
locale set by setlocale(3) and we want to test both directions of the
conversion.

Change-Id: I01be19e680588478d07fd65a48796e806e681863
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-30 10:43:19 +00:00
Edward Welbourne
f86e6643b6 Compile-fix: add missing declaration in debug.
QAbstractSocketPrivate::readFromSocket() had a qDebug() that
references its q->... so it also needs its Q_Q() declaration.
Only relevant when QABSTRACTSOCKET_DEBUG is enabled (which it
normally isn't).

Change-Id: Ib82fd032fb2c4143a0987b9162377d0d7e968e95
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-10-30 09:58:15 +00:00
Jarek Kobus
ff3ba1045e State machine: fix removeConflictingTransitions()
Since QSet<>::intersect() modifies the original
set, exitSetT1 has wrong content for next iterations.
Use intersects() instead.

Change-Id: I09e0961ec6dfb34ade88d48d1e009529aeab82b4
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-30 08:20:01 +00:00
Rafael Roquetto
f7f4dde80e Fix C++11 compiler detection for QNX.
1. _HAS_DINKUM_CLIB is defined whenever a C header is included, even when
Dinkum is disabled.

2. _HAS_* macros are always defined, as either 0 or 1.

Change-Id: I727b854a6a733e2028e6facc327e264d0c4c9e90
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-10-29 16:07:02 +00:00
Marc Mutz
132b032a2f src/gui/painting/painting.pri: add missing qdatabuffer_p.h
Change-Id: I40ae6beb14058948030e63a2535ff72a6b8072c1
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-10-29 11:26:39 +00:00
Frederik Gladhorn
0667ba3f24 Disable tst_QSslCertificate::subjectAndIssuerAttributes completely
As a follow-up for 5c1b9bbdf1 disable the
test on all platforms, since it fails on newer openssl. This was now
also happening on Windows, so until a fix is there, skip the test.

Change-Id: I6c8822c0ac5411b1114e9cd426219574ab1c9b54
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-10-29 10:13:57 +00:00
Thiago Macieira
d020e0781c Workaround: don't create ELF version scripts for Android
Somehow qmake doesn't add the correct rules for the Android makefiles,
so the build fails when cross-compiling from Windows. The reason for
that is unknown (could be related to that "qt_android_deps" config, but
that isn't used anywhere in qmake or the buildsystem).

This isn't likely to be a problem, since there are no global installs of
Qt on Android.

Change-Id: I1d0f78915b5942aab07cffff140f95ce32324030
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-10-29 10:04:04 +00:00
Joni Poikelin
b20d6cded7 Fix QDomNamedNodeMap::item crash with negative index
Task-number: QTBUG-49113
Change-Id: I62dee4c112b73a25628657bc3d2ae675f26b87d8
Reviewed-by: David Faure <david.faure@kdab.com>
2015-10-29 08:05:45 +00:00
Romain Pokrzywka
26238aca8c Fix crash on process exit when the evdevtouch plugin is loaded
The QGuiApplicationPrivate object is already destroyed by the time
the plugins are cleaned up during the application destruction, causing
a segmentation fault in updateInputDeviceCount().
There's no point in calling updateInputDeviceCount() in the destructor
anyway as the whole process is on its way out that stage, and we
don't support unloading plugins during the application lifetime
otherwise, so the call can just be removed from the destructor.

Change-Id: Id819d73cb8234ccedb6ea7c3e39950589ee680a1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-10-28 21:38:23 +00:00
Ulf Hermann
6c72a4a95b Fix building with QT_NO_BEARERMANAGEMENT
Some of the examples make no sense without bearer management and
QNetworkSession is not defined if QT_NO_BEARERMANAGEMENT, so
tst_qnetworkreply.cpp has to be adjusted.

Change-Id: Ic2f73746cba74f670ae5b5e99b0be1461ff6d182
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-28 21:25:36 +00:00
Thiago Macieira
a90869861c QLocale: Actually get the language script for the system locale
The Windows code was always returning AnyScript, which in turn made
QLocale::textDirection() for the default and system locales always
return LTR, even if the Windows UI was in RTL mode.

[ChangeLog][QtCore][QLocale] Fixed a bug that caused
QLocale::textDirection() to always return Qt::LeftToRight and
QLocale::script() to return QLocale::AnyScript on for the Windows system
locale.

Task-number: QTBUG-49031
Change-Id: I7e6338336dd6468ead24ffff14112c8d348eedba
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-28 21:02:56 +00:00
Thiago Macieira
9b30c15942 QLocale: Add Q_ENUM for QLocale::Script
Change-Id: I7e6338336dd6468ead24ffff141129d557330f00
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-28 18:38:12 +00:00
Tor Arne Vestbø
81c2ca7f22 Update QPlatformIntegration::createPlatformWindow() documentation
The function is not limited to creating top level windows.

Change-Id: Iedeeba0093f251c852e9b7c9ba23c567a79a53f8
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-28 14:07:10 +00:00
Nico Vertriest
07a6f15a94 Doc: corrected minor language mistake
Task-number: QTBUG-42977
Change-Id: Icdd70a41c9ef72224992d59342f4f97c65de78fc
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-10-28 13:09:15 +00:00
Topi Reinio
616f690761 Doc: Use a navigation separator in the simple offline template
As we cannot style the navigation elements freely with the restricted
version of CSS that QTextBrowser supports, we need to inject
separator elements between the prev/next page links.

This change adds a 'bullet' character wrapped in a <span> as a
separator. A rule is added to the standard offline CSS to hide the
separator as it's not needed there.

Change-Id: I13220a2a60e2d3063f94bc7dff0e4320d0bed4f6
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-10-28 11:55:05 +00:00
Friedemann Kleint
7daae2c2c7 Windows: Delay-initialize pluggable touch devices.
Move touch device initialization code to QWindowsContext and
replace the assert on the touch device in QWindowsMouseHandler
by a call to the initTouch().

Task-number: QTBUG-48849
Change-Id: If8573b8283ef94e7fd015f6edc626e3c8cc0b139
Reviewed-by: Joni Poikelin <joni.poikelin@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-10-28 09:23:46 +00:00
Albert Astals Cid
b05ba48281 Better debug info for the "_q_startOperation was called more than once" warnings
Change-Id: I50a3e5584a1bc2553acd4bbec1b9a290b8475e47
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-10-28 08:03:20 +00:00
Thiago Macieira
60e0441538 Remove support for MSVC earlier than 2012
We need C++11 support. The ChangeLog is in the previous commit.

Change-Id: Ib056b47dde3341ef9a52ffff13ef6bfa55462a22
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-27 23:26:52 +00:00
Joerg Bornemann
c66b492ced fix vcxproj linker options
Commit 4bb004de94 broke the linker
options in generated Visual Studio projects.
We need to call fixLibFlags on QMAKE_LIBS and QMAKE_LIBS_PRIVATE.

Task-number: QTBUG-48936
Change-Id: I2f12bf0117d27104cd34f2f43fdeb7b948fa375e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-10-27 18:30:27 +00:00
Marc Mutz
474bee61e4 QtNetwork: convert some QDateTime::currentDateTime() to currentDateTimeUtc()
The latter is much faster as it doesn't have to deal with
time zones.

This change is safe, because the QDateTimes are only used for
comparison with other QDateTimes, which, from a quick glance around,
seem to be mostly, if not exclusively, in UTC. Comparsions work
across time zones, but the comparison between UTC date-times is
fastest.

Credits to Milian Wolff, from whose QtWS15 talk this advice is
taken.

Change-Id: I6859d886d8dc8e0a52fbe394fbb7b93a87b4739a
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-27 18:27:59 +00:00
Alex Trotsenko
1e32ade79c QIODevice: fix interleaving read() and write() in text mode under Windows
Skip the correct number of bytes in the read buffer when expanding '\n'
into "\r\n" upon writing.

Change-Id: I5b01fc47c330dee5c83001abf0acd7d63d790b96
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-10-27 18:24:34 +00:00
Andy Shaw
a91c40868b Check if the session is valid before connecting to it
Since there are circumstances where the session is not yet created after
start() is called then we should check if the session is valid before
connecting to it.

Change-Id: I94236f76e4be2433a8c96eb91ce2d4b4d42f2fd9
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-10-27 18:00:22 +00:00
Andy Shaw
95b1982e47 Return early if there is no text at the offset
Change-Id: I9d0b1e6e054a48bac34fb4e51b656c475f5638b4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-10-27 18:00:14 +00:00
Dmitry Shachnev
08be8691f7 Fix QStorageInfo on BSD4 systems
- On NetBSD, the defines were not properly defined;
- On all other BSD systems, we use statfs which does not have f_frsize
  member, revert to using f_bsize there.

Task-number: QTBUG-48267
Change-Id: Ia1ed484ac61a615fcbb5b45affb516b5e86a64b0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-10-27 17:59:44 +00:00