Commit Graph

31079 Commits

Author SHA1 Message Date
Marc Mutz
11ed95ac9c Improve QStringBuilder docs
- Mention you can build QByteArrays, too
- Nicer list of types that can be used, separate for QByteArray and
  QString

Change-Id: Ia91445f0cb4872bab12a55f4812c283e9c38dba4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-04-12 06:46:12 +00:00
Thiago Macieira
cdc5f47aeb Restore compatibility with Qt 5.7.0 and 5.6.1
QSysInfo::productType() returned "osx" for all versions of macOS, even
10.12. Change 3e2bde3578 was incorrect.

[ChangeLog][Important Behavior Changes] QSysInfo::productType() and
QFileSelector behavior on macOS was restored to match what Qt used to
return in version 5.7.0 and earlier. The behavior found in Qt 5.6.2,
5.7.1 and 5.8.0 is removed.

[ChangeLog][Future Compatibility Notice] The identifiers that
QSysInfo::productType() and QFileSelector will use to identify macOS
systems will change in Qt 6.0 to match the Apple naming guidelines which
will be current then.

Task-number: QTBUG-59849
Change-Id: Ib0e40a7a3ebc44329f23fffd14b2b39392210c4f
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-04-12 05:14:19 +00:00
Gatis Paeglis
e893e657e5 configure: fix detection of xcb extensions
- Properly detect xcb-render and xkb features.
  a) when -qt-xcb, use bundled versions
  b) when -system-xcb, detect from system

- Be consistent with other features (jpeg, png)
  in "enable"/"disable" field handling.

- And move the "xkb" feature higer up in configure.json.
  It is an X11 extension, so keep them all together (instead
  of grouping it with libxkbcommon).

Task-number: QTBUG-59064
Change-Id: I60f95fb37060b8abde4c611cdef178ba3795982c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-11 13:23:15 +00:00
Christian Strømme
9091a058bc Android: Fix application state tracking
- Make sure we don't process state changes before the platform plugin
is completely created and registered.
- Protect shared data with mutexes.
- Don't update the application state from different threads.

This was causing issues when testing run-time permission checks, when
the application quickly switches state due to permission dialog being
shown. In this case the states would be incorrectly delivered when the
application was made active again.

Change-Id: I3446eab9414ee5437cd788c27d65f808d1314aa5
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-04-11 11:58:02 +00:00
Oswald Buddenhagen
05b3295a57 write Libs.private to .pc files only in static builds
projects using a dynamic build are not supposed to access this variable
anyway.

Task-number: QTBUG-51598
Change-Id: I81b55ea9ba460b80919f40ed7fe3d52129636b9e
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Reviewed-by: Jonathan Liu <net147@gmail.com>
2017-04-11 11:19:01 +00:00
Nico Vertriest
850c5dbcd3 Doc: minor language issues in Qt Sql doc
Change-Id: If9ad86644c097d78895e392acdf017f176d8f95d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-04-11 07:38:51 +00:00
BogDan Vatra
eda7f6ea78 Don't hide critical info
The developer should see what's wrong even on release builds.
That code hides any mistakes we do in JNI which are pretty critical
for developers because they can't see what's wrong with their code. e.g.

 QtAndroid::activity().callMethod<void>("wrongMethodName")

*silently* fails, which is so wrong!

Change-Id: I8b6a24946dfef716fcd86ab9bba82666974e3991
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-04-11 06:19:58 +00:00
BogDan Vatra
187427c0ae Use latest stable version of the android:gradle plugin
Change-Id: I15418015c6a206dd1a8e4b52894ec83ddaeb9fc2
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-04-11 05:56:49 +00:00
BogDan Vatra
6c4cbd4122 Android: Fix crash at exit
We need to remove and release the surface imediately, otherwise
setSurface might be called after the object is deleted.

Task-number: QTBUG-59818
Change-Id: I3a09e3de1ceecc22d8d7a48e2fc1cfe40cf09f0a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Mathias Hasselmann <mathias.hasselmann@kdab.com>
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
2017-04-10 15:27:20 +00:00
BogDan Vatra
2099709a72 Fix build: Remove unused variable
Change-Id: Ib5e7782e23eb1ff976caedd167d3df8b857d9883
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-04-10 10:46:43 +00:00
Marc Mutz
9d1203bf02 QVariant: fix docs regarding QUuid
- toUuid(): QUuid is a built-in type, so use type(), not userType()
- canConvert()/toUuid(): QUuid converts to and from QString

Change-Id: I5262ff7ab093040cb943b6ab9cfffe95491d2b9b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-10 05:18:14 +00:00
Thiago Macieira
75cdf654bc QMap: fix UB (invalid cast) in QMapData::end()
The end() pointer, like in all other containers, is a sentinel value
that must never be dereferenced. But unlike array-based containers,
end() in QMap is not "last element plus one", but points to a base class
of Node, not a full Node.

Therefore, the casting from QMapNodeBase to QMapNode must not be a
static_cast, reinterpret_cast is required.

libstdc++-v3's red-black tree had the exact same problem:
 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60734

Change-Id: I43f05fedf0b44314a2dafffd14b33697861ae589
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-04-09 17:06:41 +00:00
Filipe Azevedo
07bd5a90a3 Fix hidpi support for opengl window grabbing
Now set the QImage devicePixelRatio so the content is correct on all
screens.

Task-number: QTBUG-53795
Change-Id: Ic92eee98f691ebb1e0212498c1ae13ede74bca93
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-04-09 13:42:34 +00:00
Jesus Fernandez
944bf6867f Add more information about how to get a QString from qgetenv
Change-Id: Ic712654c8d4735a59bf02cf6a7e1c689ca9a886c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-08 12:02:50 +00:00
Jesus Fernandez
4a6cb89f29 Fix reusing FTP connection after abort
The QNetworkAccessCache was keeping the connection alive and it was
trying to reuse it for subsequent calls to download files from the
same server. After closing the connection, it is not usable anymore
and a new one should be created.

Task-number: QTBUG-40368
Change-Id: I1a0d08956a94eb36f39d14112cdcab6c1e2add82
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-04-07 11:37:13 +00:00
Thiago Macieira
872bff5b24 Enable a given SIMD feature if the compiler has enabled it
Change-Id: I09100678ff4443e6be06fffd1482c08125adc0a4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-04-06 19:37:02 +00:00
Morten Johan Sørvig
5e76cb1692 Fix menu position when highdpi scaling
Certain display and scale factor configurations would
cause menus to pop up in incorrect locations or not
be shown at all.

This was due to QDesktopWidget::screenNumber() having
a toNativePixels(QRect, QWindow) call which requires
that QWindow::screen() returns the correct screen.

Break the circular dependency by converting coordinates
the other way for the intersection test: transform screen
geometry to device independent coordinates.

Task-number: QTBUG-58329
Change-Id: I5621de89a9a2b8df44bdae528baf011fc111eba3
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-06 09:42:23 +00:00
Allan Sandfeld Jensen
efb84b6189 Copy stretch to multifont fontDef
If we do not the fontDef of the multifont will be the default 0.

Task-number: QTBUG-59443
Change-Id: Ib223517975b2a57b2371e309d12cd8f918d30825
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-04-05 11:27:15 +00:00
Allan Sandfeld Jensen
b67b80b715 Fix stretch of QRawFonts
Set stretch to always have no transform on raw fonts.

Task-number: QTBUG-59799
Change-Id: Ibfacc5c247e0b4a8410572e207f09f6e67b74f9d
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-04-05 10:26:14 +00:00
Marco Martin
9ae028f507 Environment variable enabling the workaround FBO readback bug
On some ARM devices the font glyph generation is broken
Add an environment variable to enable workaround_brokenFBOReadBack
in QOpenGLContext, to fix font rendering on such devices as
Mali and Adreno

Change-Id: I9cc99ecb8b71a35bc369ec9dd11b877016b1179e
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-04-05 10:04:54 +00:00
Hendrick Melo
6b52039866 qbmphandler fix: use qint64 for caching QIODevice file position
Changed the file position and offset types so they can properly handle
files larger than the 32bit limit

Task-number: QTBUG-59493
Change-Id: I00e1741c7682c4c79f35fef808fe1ea26e67c8b5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Hendrick Melo
2017-04-04 16:25:33 +00:00
Jesus Fernandez
83486f362b Adds a note to QSqlDatabase::~QSqlDatabase documentation
When the last QSqlDatabase object is destroyed the destructor implicitly
calls close() to release the database connection.

Task-number: QTBUG-59919
Change-Id: I04c15c4999cdaaa8800a44a1a1006f977a90d8a6
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-04-04 15:52:33 +00:00
Giuseppe D'Angelo
ecceaec858 GCC 7: fix -Werror=implicit-fallthrough
More fallthrough-are-errors fixed.

Change-Id: I9a6cb6efe988400ed3f9cb95d1e426dac317e6c4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-04-04 14:26:34 +00:00
Morten Johan Sørvig
5b78fcd03b QRasterBackingStore: Correct high-dpi image size
Fix QT_SCALE_FACTOR usage on macOS. Follow-up to
2d2d9078

QRasterBackingStore should account for native scaling
only. Any Qt scaling will have already been factored
into the size argument.

Change-Id: I26a67addfcbec3d45f4ed87f03b8dd79fd99cb62
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-04-04 11:14:38 +00:00
Thiago Macieira
6a83f9aa98 Fix qReallocAligned for reallocation when alignment > 2*sizeof(void*)
When we call realloc, the alignment of the new block may be different
from the old one. When that happens, we need to memmove the data to the
new position, before we start overwriting things.

Task-number: QTBUG-59804
Change-Id: I27b55fdf514247549455fffd14b07ea78918a3d0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-04 07:08:16 +00:00
Giuseppe D'Angelo
c807dc3c12 Use fallthrough attributes only in C++ mode
GCC 7 defines __has_cpp_attribute even when invoked as "gcc" (possibly,
Clang does the same, according to a comment in the code, did not test
myself).

Hence, define the fallthrough declaration (as C++11 attributes)
only when compiling as C++, otherwise we pick them up even in C mode,
and they cause build failures.

Change-Id: I3f13205e014bb1dea59ee3664b29111521a7eae3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-04-03 21:26:09 +00:00
Eric Lemanissier
e1d3c8e203 qtconcurrent: correct whitespaces
Change-Id: Idaec09b75767a072bd817416c3cc2b19e3a0e03b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-03 17:15:27 +00:00
Gatis Paeglis
c9f5607500 xcb: fix build when xlib is not present
Remove Xutil.h include from qxcbmime.cpp as it does
not use any Xlib APIs. Using API from Xutil.h requires
Xlib as noted in Xutil.h:

/* You must include <X11/Xlib.h> before including this file */

Everywhere else we do check for presence of Xlib, before
including Xutil.h

And remove some useless #undef(s)

Task-number: QTBUG-39665
Change-Id: Ibfd2341338fe7e902b47eae2df6b9dafe4ab962d
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-04-03 11:35:45 +00:00
Gatis Paeglis
e0e6cbdacb xcb: prevent dangling pointer when window focus changes
With the current implementation, the QXcbConnection::m_focusWindow
was holding a dangling pointer during the focus transition from a
dying modal window to other modal window.

1) QXcbConnection::m_focusWindow holds a pointer to A;
2) A is closed;
3) relayFocusToModalWindow B;
   => m_focusWindow now points to a dead window.
4) We get a reply back from WM in a respone to
   relayFocusToModalWindow (_NET_ACTIVE_WINDOW)
   => m_focusWindow now points to a valid window.

The fix is to update m_focusWindow to nullptr, when the current
focus window was destroyed and the new focus window has not been
set yet by WM.

This patch actually solves a more general case - whenever we get a
focus-out event, we should set m_focusWindow to nullptr. It is ok
for none of the windows to be in-focus while focus transition is
happening. The focusInPeeker will make sure to "optimize out" (when possible)
this no-window-in-focus state, and GUI won't be bothered by this
extra event. This is how things were working before relayFocusToModalWindow
was introduced. Having a focus-relay mechanism in-between is ok,
but it should not have changed the original behavior.

Task-number: QTBUG-48391
Task-number: QTBUG-55197
Change-Id: I6fdda9de73f999dad84000059ce4b89c0d1a964c
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-04-03 10:20:53 +00:00
Thiago Macieira
a03390a8b0 Detect the (stated) C++ standard edition at build time
The configure-time detection (cxx11default) isn't enough if the compiler
can be changed. This is especially necessary if Qt is compiled with a
compiler that defaults to >= C++11 (e.g., GCC 6) and then the user
selects a compiler another compiler (e.g., Clang) via -spec option. In
that case, we'd miss adding the -std=c++11 or -std=gnu++11 option to the
command-line, causing the compilation to fail.

As a nice side-effect, even moc without moc_predefs.h will now get the
__cplusplus setting.

Task-number: QTBUG-58321
Change-Id: I74966ed02f674a7295f8fffd14a8be35da9640e1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-31 21:08:32 +00:00
Thiago Macieira
62013d7772 Mark to remove const from function parameters in QtCore public headers
Some compilers are known to complain about this with a warning. GCC
complains about const on return values on -Wignored-qualifiers (enabled
at -Wextra), so it's not too much of a jump to assume that others do
too. Besides, this is not Qt Library API policy. As maintainer for
QtCore, I'm exercising my prerrogative in specifying certain unspecified
parts of the coding style, like I've done for constructor initializer
lists.

Since all the classes involved are exported (including QVector, through
derived classes), we can't remove the qualifier until Qt 6, since there
are compilers known to encode the qualifier in the mangled name
(suncc). I'm not introducing #ifdef to silence unknown compilers unless
we get an actual complaint.

Change-Id: I33850dcdb2ce4a47878efffd14a876edef843c46
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-31 21:08:14 +00:00
Tobias Sung
507223a218 Don't use non-POD type as variadic argument
Implicit conversion from QByteArray to const char* works for most gtk
functions. But gtk_file_chooser_dialog_new() uses varargs and passing
the non-POD QByteArray through varargs does not work (it's UB).

Task-number: QTBUG-59763
Change-Id: I85f9323d99342896e6921cdeb85f5a1af7377b4f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-31 20:29:35 +00:00
Giuseppe D'Angelo
88a8feeacb QCryptographicHash: make SHA3 calculate SHA3, not Keccak
The SHA3 family is a modified version of Keccak. We were
incorrectly calculating Keccak (and even *testing* Keccak!),
but claiming it was SHA3.

To actually calculate SHA3, we need invoke Keccak on the original
message followed by the two bits sequence 0b01, cf. §6.1 [1].

[1] http://dx.doi.org/10.6028/NIST.FIPS.202

[ChangeLog][QtCore][QCryptographicHash] QCryptographicHash now
properly calculates SHA3 message digests. Before, when asked
to calculate a SHA3 digest, it calculated a Keccak digest instead.

Task-number: QTBUG-59770
Change-Id: Iae694d1a1668aa676922e3e00a292cddc30d3e0d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-31 07:58:35 +00:00
Giuseppe D'Angelo
cd9e850f9e QCryptographicHash: fix documentation of the supported algorithms
Change-Id: Idfa7843ef8a8e3410ae0a8cf5311b8b598299730
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-31 07:57:55 +00:00
Thiago Macieira
9a0d47bcf1 tst_largefile: fix the mapOffsetOverflow case to match actual behavior
Unix mmap(2) system calls do allow for mapping beyond the end of the
file, though what happens after you try to dereference the pointers it
gives is unspecified. POSIX[1] says that implementations shouldn't allow
it:
 The system shall always zero-fill any partial page at the end of an
 object. Further, the system shall never write out any modified portions
 of the last page of an object which are beyond its end. References
 within the address range starting at pa and continuing for len bytes to
 whole pages following the end of an object shall result in delivery of
 a SIGBUS signal.

However, Linux allows this in read-write mode and extends the file
(depending on the filesystem).

Windows MapViewOfFile never allows mapping beyond the end.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/mmap.html

Change-Id: Ie67d35dff21147e99ad9fffd14acc8d9a1a0c38d
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-31 06:31:25 +00:00
Neils Nesse
9b5b44207e Add new mkspec for cross-compiling Qt5 for AArch64
This mkspec provides default compiler settings for cross-compiling
Qt5 for AArch64

Change-Id: I6318e150d7b48ad9c7364fce2a04ee49220a6b7e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-03-31 00:34:48 +00:00
Błażej Szczygieł
2fbc143202 QtWidgets: Fix white text color on tabs on macOS for non-macOS styles
Apply white text only for macOS style.

Amends 2c0033983b

Task-number: QTBUG-59784
Change-Id: I9e66e929699efd715ed4565394f1aba763aeb32a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-03-30 07:05:31 +00:00
Sami Nurmenniemi
b387257261 Fix layout tests for GCC 5.2.x/5.3.x
GCC bug 68949 causes tst_QGraphicsGridLayout and tst_QGraphicsLinearLayout
to fail on 5.2.x/5.3.x: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68949.
This change adds aggregate initialization to QSizeF arrays to work around
the bug. The bug was discovered when compiling and running tests on ARM
with GCC 5.3.0.

Change-Id: I9ecf7b032b6ca1477c29dca3bd7d0ec8d69a0454
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-30 06:58:07 +00:00
Tobias Koenig
781b5a6198 Fix generation of gradient shader function in PDF
Add the missing endobj tag for the shader function object.

Change-Id: Ieb3cfa5a5d0e27d04164a80b028d41371507fb94
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-28 07:01:30 +00:00
Allan Sandfeld Jensen
d3fd3171ce Annotate more implicit fallthroughs
Reduces our number of gcc 7 warnings

Change-Id: I792d658cbc11cad15cf45da3a36fc93fcdcc67ea
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-27 14:11:57 +00:00
BogDan Vatra
1ab60b0430 Make sure we quit qt when the service is destroyed
Task-number: QTBUG-58471
Change-Id: I37f162717f57323136811a8f80d53e3c3b7d6f22
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
2017-03-27 12:20:40 +00:00
Dmitry Shachnev
41750492db Make sure QDBusMenuBar is restored when the window is hidden and shown
Task-number: QTBUG-58723
Change-Id: Ib4c3dac8a8cce717f4d47ab619c05b9e1719f311
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-03-27 12:14:27 +00:00
Marius Kittler
38550c562d json encoder: Harmonize number serialization with ES6
Ensures that numbers representable as 64-bit integer
are not printed using exponent notation.

Some JSON implementations such as the one of the Go
standard library expect this in the default
conversion to int.

Change-Id: Ic3ac718b7fd36462b4fcabbfb100a528a87798c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-25 14:26:30 +00:00
Marc Mutz
5ca7d56aca QVarLengthArray: fix compilation with GCC 7
This fixes a warning-turned-Werror in qdistancefield.cpp:

  In member function ‘void QVarLengthArray<T, Prealloc>::realloc(int, int) [with T = bool; int Prealloc = 256]’,
      inlined from ‘void makeDistanceField(QDistanceFieldData*, const QPainterPath&, int, int)’ at ../../include/QtCore/../../../../qt5/qtbase/src/corelib/tools/qvarlengtharray.h:275:10:
  ../../include/QtCore/../../../../qt5/qtbase/src/corelib/tools/qvarlengtharray.h:390:19: error: ‘void* memcpy(void*, const void*, size_t)’: specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=]
               memcpy(ptr, oldPtr, copySize * sizeof(T));
               ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Apparently GCC cannot rule out that copySize may be negative in the
call to memcpy. Put GCC on the right track by adding a Q_ASSUME.

Change-Id: I63e3801e52ebe2a7f77e3a97ef03ec3869319c8c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-03-25 08:02:31 +00:00
Thiago Macieira
e19fda916a Fix some warnings found by QNX's compiler
-Werror is now disabled for that compiler, but it doesn't hurt to fix.

io/qstandardpaths_unix.cpp:149:32: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
qtestcase.cpp:2330:31: error: narrowing conversion of '(ms / 1000)' from 'int' to '_Timet {aka unsigned int}' inside { } [-Werror=narrowing]

Change-Id: Id92f4a61915b49ddaee6fffd14aea2c1e686e8f2
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
2017-03-25 04:51:01 +00:00
Thiago Macieira
e26bcc4d5d Disable -Werror for QNX's compiler
The compiler is mostly GCC in disguise, but the libraries are not. Since
the toolchain is not open, it's difficult to fix issues in it.

Task-number: QTBUG-59671
Task-number: QTBUG-59672
Change-Id: Id92f4a61915b49ddaee6fffd14aea2639153f073
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-03-25 04:50:44 +00:00
Edward Welbourne
e5c0371d18 Fix propagation of locale from widget to its children
Fix the condition in QWidgetPrivate::resolveLocale() to decide whether
to propagate locale: make it match setLocale_helper()'s condition when
deciding whether to propagate to descendants.  This lead to a
QDateTimeEdit's calendar popup not getting told what locale to use
correctly, unless we setLocale() on it overtly, which then blocked
propagation of locale changes to it unless QDateTimeEdit manually
propagated the changes.

Fix the documentation of WA_WindowPropagation to mention locale as
also being propagated (which it was in several places, only neglecting
this one in resolveLocale).

[ChangeLog][QWidget][Qt::WA_WindowPropagation] Propagate locale
consistently, along with font and palette, within the widget
hierarchy.  Previously, locale was propagated on ancestral
setLocale(), but not on creation of the descendant.

Task-number: QTBUG-59106
Change-Id: I92270f7789c8eda66a458274a658c84c7b0df754
Reviewed-by: David Faure <david.faure@kdab.com>
2017-03-24 13:57:22 +00:00
Olivier Goffart
d82d2f6716 QSslSocket: fix connection to a international domain name
RFC6125 section 6.4.2 specify we need to convert the IDN to ascii
before comparison. Note that we don't need to toLower anymore
because toAce takes care of it.

Section 7.2 recommands that we dod not attempt to check for wildcard
character embedded within the A-labels or U-labels of an
internationalized domain name. So we reject names that contiains a
'*' but starts with 'xn--'.

Change-Id: Ib0830520a1f82bbf9fd11818718277a479527ee3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-03-23 16:11:15 +00:00
BogDan Vatra
12a0e1b4f8 Add gradle wrapper to Qt & update default Andriod gradle plugin
We need to add gradle wrapper to Qt because it was removed from latest Android SDK.
Adding it to Qt, will give us more control and will save us from pain in the future.

Task-number: QTBUG-59237
Change-Id: I6419876f8be11c0feeac448b228a46f811065264
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-03-23 13:04:51 +00:00
BogDan Vatra
da4b91e2b2 Fix hang on sleep/wakeup
This patch fixes the followings:
- call "it.value()" only on valid iterators
- destroySurface() doesn't remove the surfaceId from m_surfaces
- the surfaceId is removed from m_surfaces when the QtSurface is really
destroyed

Task-number: QTBUG-59185
Change-Id: Iee37dde16fee16f19906812c55c1f0b0279b033c
Reviewed-by: Mathias Hasselmann <mathias.hasselmann@kdab.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-03-23 08:06:30 +00:00