Commit Graph

37930 Commits

Author SHA1 Message Date
Allan Sandfeld Jensen
2393551665 Fix precision in parsing hex format QColors
We document being able to parse more than 8-bit per color, but were
ignoring everything after the first 8 bits.

Change-Id: Ic85ab04b0836e6979a623e294eebd5084c1a9478
Fixes: QTBUG-71373
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-11-12 22:18:43 +00:00
Andy Shaw
1446cde812 Android: Make sure that the path is using / for separators
When passing \ to Gradle it will strip these out, so by using / it
ensures that it is able to find the Android SDK directory fine.

Change-Id: I053f087438ade6c30d015abe00e9958beb90a947
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-11-12 18:59:45 +00:00
Edward Welbourne
15b1c3fd9b Purge some unused code for the OpenGL library name
We had a global static, a setter for it (that's nowhere used within Qt
code) and a getter for it whose only use was commented out.  Neither
was declared in any header; the getter's commented-out client had a
local extern declaration at the point of (non-)use.

Found while reviewing a change to the next few lines of code after the
commented-out use of the getter.

Change-Id: I393d56219cb7dd7cf836ca80e1bdd605a2914003
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-11-12 14:58:54 +00:00
Christian Ehrlicher
8c685b765b Itemviews: Cleanup examples
Cleanup some minor issues in the chart example:
 - remove unused members
 - use initializer list for members
 - pass a proper role to dataChanged()
 - honor roles parameter in PieView::dataChanged()
 - use nullptr instead 0
 - use new-style connect
 - fix indentation and other whitespaces

Change-Id: Idb212b07c006fe3ae31bee9cd9b1ba4d03043b5e
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2018-11-12 13:01:30 +00:00
Dmitry Shachnev
1c957bb8e5 Fix ambiguous definition of atime/mtime/ctime on alpha
One of the implementations is enabled when the stat struct has
::st_atim member, another — when it has ::st_atimensec member.

On alpha, the stat struct has both members, defined as union here:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/alpha/bits/stat.h#l48

and then used here:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/alpha/bits/stat.h#l92

This commit forcefully disables the second implementation on alpha.

Change-Id: Ifc284d72b68b9bac590b518f31960288df3a087d
Done-with: Michael Cree <mcree@orcon.net.nz>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-11-12 13:01:25 +00:00
Samuel Gaist
178bc49ac2 QImageWriter: improve documentation regarding use of resources
QImageWriter's plugin can open devices while operating and only free
them on destruction which means that if one wants to act on the file
written if must first destroy the writer's instance. This patch adds
the suggestion to use a scope to avoid that problem.

Change-Id: I239157ea86c4a93faab237fe1860312a3c7ac7a2
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-11-12 13:01:20 +00:00
Filippo Cucchetto
104200d688 Fix QFileSystemWatcher::removePath after move operations
Foreword:
- During a file or directory move the inotify id for an
  entity is not changed.
- QFileSystemWatcher implementation uses a QMultiHash for
  mapping an id to its path.

Suppose this filesystem hypothetical directory structure
- A
|--> B
and user watches both A and B directories.

Suppose that the B directory gets moved by calling "mv B B1".
The user receives a directoryChanged event for parent directory
A and scan filesystem for changes. During this scan the
user notices:
- a new directory B1
- a deleted directory B
The user simply invoke QFileSystemWatcher::addPath(B1) and
QFileSystemWatcher::removePath(B).

With the actual implementation the second operation could fail:
- The call QFileSystemWatcher::addPath(B1) insert a duplicated
  records in the QFileSystemWatcher::idToPath
  multihash ( {0, "A"}, {1, "A/B"} {1, "A/B1"}
- The call QFileSystemWatcher::removePath(B) fails because
  - it first retrieves the the id for path B ---> pathToId("A/B")  <-- return 1
  - Then it calls idToPath.take with the id obtain in the
    previous step <--- idToPath.take(1)
This last operation could take the record {1, "A/B1"} instead
of the {1, "A/B"} (because both have the same key) meaning that
the next check "x != path" evaluates to true (making the
removePath function fail).

This patch fixes the problem in the following way:
- Use idToPath.equal_range in order to obtain all paths with
  the given id
- Remove the correct record that match (id, path)
- Prevent the removal of the inotify watch if another record
  with the same id is still present in the multihash (like a
  simple reference counting).

Change-Id: I9c8480b2a869d91e500af5c4aded596b9aa53b46
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-11-12 13:01:15 +00:00
Paul Olav Tvete
ac4f075274 Make sure mouse release events are delivered to correct widget
The initial mouse press should create an implicit mouse grab so
that all subsequent mouse events are delivered to the widget that
was pressed first. After commit a4f7bb8733, every mouse press
would reset the implicit grab. This change checks the previous
button state, and does not reset the mouse grab if other buttons
are already pressed.

Fixes: QTBUG-70816
Change-Id: Icdd215c2f4aaee3c3f34607d68c1d8878155ec17
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-11-12 13:01:10 +00:00
Friedemann Kleint
79ed504f10 Manual dialogs test: Add option to turn off the printer panel
On Linux, the printer panel impacts the application startup time,which
can be annoying when testing other dialogs.

Change-Id: Id13446047cf50765951a6bb5182ee50cae983457
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-11-12 13:01:05 +00:00
Timur Pocheptsov
49bbc9df99 QMacStyle: remove weird frame translation
Numbers look completely out of thin air, and while I trust it was not
an error back then it was introduced, today we end up with QComboBox
vertically translated and thus misaligned.

Task-number: QTBUG-69908
Change-Id: I784e06f00e4c92c4af67e9bd885b86648183f2e0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-11-12 13:01:01 +00:00
Allan Sandfeld Jensen
7581858148 Make QThreadPool::waitForDone more atomic
Avoid having the reset in waitForDone interfere with other uses of the
thread-pool by locking the mutex higher, and maintaining the state
so the queues doesn't have threads not in allThreads.

Task-number: QTBUG-62865
Change-Id: I17ee95d5f0e138ec15e785c6d61bb0fe064d3659
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-11-12 13:00:56 +00:00
Lars Knoll
a6a5e81cd6 Fix a typo in the docs
Change-Id: I0f1b015a34b8caffa3b60927cedbccf7db50b383
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-11-12 07:16:54 +00:00
Tor Arne Vestbø
27fb51fa52 macOS: Remove blacklist entries for no longer supported OS versions
Change-Id: Iae6552f1fdcf1dea07a03d3788d378af9140d1a7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-11-12 07:16:30 +00:00
Tor Arne Vestbø
74828aa657 macOS: Disable main thread checker for Xcode test target
Change-Id: If9bf63a94b8f2ca1846a502879af5bada9918cd7
Fixes: QTBUG-71636
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-11-12 07:16:26 +00:00
Morten Johan Sørvig
c9f375f4e3 Document QScreen::grabWindow high-DPI behavior
Change-Id: Ib32510ff30e907365e64921fda14e686a495c77c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-11-12 07:15:16 +00:00
Luca Weiss
b26ce2f0bf qdbuscpp2xml: Don't silently ignore unregistered property types
Change-Id: Icf23804cc4992314785f07cdc6aaf76eeea56465
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-11-12 07:14:34 +00:00
Edward Welbourne
d38f635355 Clean up and update Unicode character data 3rd-party infrastructure
Document how to do an update, fix the bit-rot that had crept into
main.cpp since last it was compiled, correct the qt_attribution.json
to use the actual version number of UCD (its Revision number) instead
of the (admittedly correlated) Unicode release number.  Updated to
Release 22 (which came with Unicode 11.0.0) in the process; but this
doesn't change our actual qunicodetables.cpp (so is incidental).

Task-number: QTBUG-71281
Change-Id: Ieb7a6e1a4d49f639993f76ff82c8f12a572db3c3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-11 22:09:27 +00:00
Edward Welbourne
45764e07eb Document provenance and version of sha3_keccak
Task-number: QTBUG-71327
Change-Id: Iccfda0320d61e60df53ba30c12b4ffd0fc60d1ef
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-11 22:09:21 +00:00
Vitaly Fanaskov
ee91993997 Change the wording for license type in the About Qt box
"the GNU LGPL version 3" -> "GNU (L)GPL" because some parts of Qt are
GPL v3 (Qt Charts, Qt VirtualKeyboard, etc.).

Fixes: QTBUG-57697
Change-Id: Iceb88244e28b6900c5282b070468fb65b2bf52d2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-11 22:09:15 +00:00
Maurice Kalinowski
6857cd60dd win32: Fix text prediction with on screen keyboard
When the on-screen keyboard completes a word via text prediction, the
message contains VK_PACKET as identifier for a character sequence.
While each character is send, the code only contains the first character
of the sequence.
Hence, resolve the actual code manually in case of a sequence.
This does not modify the virtual key, so that users are able to
distinguish between manual and predictive input.

Fixes: QTBUG-71210
Change-Id: I787f1f2d83acaf124dfbbab6c4614a1bfe7bb2eb
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-11-11 22:09:10 +00:00
Allan Sandfeld Jensen
508b9b49b9 Fix image grab when XCB is rgb-swapping
The rgbSwap produces an image that fits the X-server, but not one that
fits our internal image definitions, so instead return our internal
image.

Task-number: QTBUG-56806
Change-Id: I25aedf7279bcd86792213b11dbd07a77b49538de
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-11-11 22:09:05 +00:00
Eirik Aavitsland
c7275f6723 Doc: fix formatting error in QLineF
This is a whitespace-only change; removing a couple of newlines that
broke qdoc formatting of the enum values documentation.

Change-Id: Id371a4519922c71d79a11f3cda131e6683812696
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-11-11 22:09:00 +00:00
Sven Erdem
6f251c567c Use timeout error for TCP timeouts on unix
When a TCP connection timed out a QAbstractSocket::NetworkError was set.
To enable a more precise error handling for timeouts
QAbstractSocket::SocketTimeoutError is now set instead.
Separated ETIMEDOUT from other errors in nativeRead() and take over
responsibility for setting the error, which was previously handled by read().

Change-Id: Iccd45bdbb3d944cd160ae50c257d3256e05b1ae5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2018-11-11 22:08:54 +00:00
Morten Johan Sørvig
f018e315fd QWidgetBackingStore: Don't flush foreign windows
Foreign windows do not have Qt backingstore content,
and are also not capable of accepting Qt content.

Change-Id: I959c7cdc32e6f4322497e132a436ce7d610a4106
Fixes: QTBUG-71183
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-11-11 09:10:42 +00:00
Morten Johan Sørvig
e72613000e wasm: skip examples by default
This removes the need for specifying "-nomake examples"
on the configure line.

We are using static builds; building all of the examples
is too space and time consuming (especially time).

Change-Id: Iff23239ca7304b1d1cf734c8bf69ad3f8ef31844
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2018-11-11 09:10:17 +00:00
Morten Johan Sørvig
98c789eb0f macOS: Make QScreen::grabWindow() work again
Commit 17b73b0d2b introduced a regression where the
grab rect position was added to the size when bounding
to the display size. This is incorrect.

Change-Id: I11d7ba7f53b96badfdead190ef9ddb525ed4ba99
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-11-11 09:10:12 +00:00
Morten Johan Sørvig
ae5f440c33 macOS: set dpr on pixmap returned by grabWindow()
This matches the behavior of QScreen::grabWindow(),
and gives the caller direct access to the scale factor.

Change-Id: Ia3ed165a62eaa0f386f8b508ea6b1128ba6be604
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-11-11 09:10:09 +00:00
Morten Johan Sørvig
8802826de6 Make grabWindow return pixmap with correct dpr
The devicePixelRatio on the returned pixmap should
be the product of the Qt and platform scale factors.

This handles the corner case of setting QT_SCALE_FACTOR
on macOS with a high-dpi display.

Change-Id: I3600165d47c03c4e043bcc5e375932cc3fc0c544
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-11-11 09:10:05 +00:00
Thomas Miller
fbbe8aba9d Add Windows Desktop arm64 target to Qtbase
Allows a qt build to be configured to target arm64 desktop apps cross
platform and build them with nmake.

Change-Id: I99fed12047b45a504a1644201bcc19b18c69f3e6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-11-11 09:05:10 +00:00
Friedemann Kleint
59a09022f3 Windows QPA: Extend the debug operator for IShellItem
Output URL string and file system name, too.

Task-number: QTBUG-67932
Change-Id: Ic5d1927d70d98f7c081bee06af85b9f3a2a09812
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
2018-11-11 08:23:27 +00:00
Allan Sandfeld Jensen
1b0080a456 Fix no-opengl developer builds
Change-Id: I0c8fb7d0aa9a0d95a13447315bd8c1104089fed1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-11-10 08:03:50 +00:00
Friedemann Kleint
b20c15f204 QtGui: Check event type in QWindowSystemInterface::handleMouseEvent()
Assert on receiving double clicks which are currently not implemented.

Task-number: QTBUG-71263
Task-number: QTBUG-70999
Change-Id: I85cd21665ecaf118584053de63745044728d8f5b
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-11-09 21:43:38 +00:00
Oliver Wolff
4be8168ff7 Revert "Revert "qmake: Work around MSVC compiler bug.""
The assert still happens on MSVC 2015 64 bit when running
qmake -tp vc -r.

This reverts commit f4169a633b.

Fixes: QTBUG-71228
Change-Id: I05bd3e0677414edb970f07e0555cdc95ce32f592
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-11-09 21:43:30 +00:00
Kevin Funk
fe4448e9e8 moc: Modernize generated code a bit, use auto
Makes clang-tidy not trip over generated code while running the
modernize-use-auto checker. In theory clang-tidy just shouldn't look at
generated code of course; but in this case just modernizing the
generated code is easy, so let's do it.

Example:
.../moc_kastentoolviewwidget.cpp:78:9: warning: use auto when initializing with
 a cast to avoid duplicating the type name [modernize-use-auto]
        KastenToolViewWidget *_t = static_cast<KastenToolViewWidget *>(_o);
        ^~~~~~~~~~~~~~~~~~~~
        auto

Change-Id: I10c287320e1d5b5b8e66da3e0a22d517d0275dd1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-11-09 21:43:12 +00:00
Eirik Aavitsland
1cc30fe77d QSpinBox: don't allow series of thousands-separator chars when editing
The input validation did not check for unreasonable use of the group
separator character.

Fixes: QTBUG-65024
Change-Id: If9d70d990fc6d5b298f3bde5b1604bf7e16dce24
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-11-09 21:43:00 +00:00
Allan Sandfeld Jensen
60f5329854 Fix test for multiscreen
QTBUG_7714_fullUpdateDiscardingOpacityUpdate2() would fail when
it moved to another screen if there is one to the left.

Change-Id: I3f8edc04c31dffc5a3bd005d9e5170dd68151df7
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-11-09 21:42:57 +00:00
Oswald Buddenhagen
c69f43594f Merge 5.11 into 5.11.3
Change-Id: I9a84ca8038a65daab50b6205bc7e1e3b5b5098aa
2018-11-09 13:27:12 +01:00
Edward Welbourne
0dae641331 QAbstractSocket::Bind: clarify some details
The function's documentation needlessly repeated parts of its first
line.  The BindFlag enum it takes as a parameter confused readers by
saying an option is ignored on Windows, failing to make clear that it
is so because that option is what Windows does by default.
Tidied some phrasing and typos in the process.

Fixes: QTBUG-52364
Change-Id: Ia6510caff7ec80216eefccf41fb009b1357e4b2e
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2018-11-09 10:30:45 +00:00
Liang Qi
bc07958f92 Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	.qmake.conf
	qmake/Makefile.unix
	src/gui/text/qtextdocument.cpp
	src/gui/text/qtextdocument.h

Change-Id: Iba26da0ecbf2aa4ff4b956391cfb373f977f88c9
2018-11-09 10:34:33 +01:00
Tor Arne Vestbø
2697148775 macOS: Only enable layer-backed views on 10.14 if built against 10.14 SDK
Instead of explicitly enabling layer-backing for Qt 5.12 on all macOS
version, we follow the macOS default to enable it for 10.14 if the
application binary was built against the 10.14 SDK.

Aligning ourselves with Apple's switch to forced layer-backing means
we have an easier story when it comes to supporting different runtime
configurations.

Fixes: QTBUG-71499
Change-Id: I34ee49b3daeb6ed8df444a3759d3573ebc9ea30f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-11-09 08:10:45 +00:00
Tor Arne Vestbø
d0e66df1a5 macOS: Skip tst_QGLThreads::renderInThread
It crashes in the render thread:

thread #7, name = 'SceneRenderingThread'
   frame #0: libsystem_kernel.dylib`__wait4_nocancel + 10
   frame #1: libsystem_c.dylib`system + 452
   frame #2: QtTest`stackTrace() + 325
   frame #3: QtTest`QTest::FatalSignalHandler::signal(int) + 207
   frame #4: libsystem_platform.dylib`_sigtramp + 26
   frame #5: libsystem_platform.dylib`_platform_bzero$VARIANT$Base + 23
   frame #6: GLRendererFloat`gldSetZero + 63
   frame #7: GLRendererFloat`gldClearDrawBuffer + 3792
   frame #8: GLRendererFloat`gldClearFramebufferData + 49
   frame #9: GLEngine`glClear_Exec + 541
   frame #10: tst_qglthreads`SceneRenderingThread::run() + 227

Task-number: QTBUG-68524
Change-Id: I6bc67cb342f77dc1a590a25af535f9bb7f0d325a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-11-09 08:10:36 +00:00
Friedemann Kleint
9137691e74 Windows QPA: Fix crash showing QSystemTrayIcon's context menu with PROCESS_DPI_UNAWARE
The coordinates of the WM_CONTEXT message may be out of any screen in
PROCESS_DPI_UNAWARE mode since hi-res coordinates are delivered in this case
(Windows issue). Default to primary screen with check to prevent a crash.

Fixes: QTBUG-67966
Change-Id: I1950360520e93cbf3509611b3057635769f6543a
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
2018-11-09 08:06:18 +00:00
Mårten Nordheim
dec7961709 QSyntaxHighlighter: Delay all highlights until first rehighlight
When calling setDocument (directly or through the constructor) a delayed
rehighlight is initiated. Previously, if any text was changed before
this rehighlight could run it would cancel the rehighlight, even if the
changed text only caused a new block of text to be highlighted.

Fixes: QTBUG-71307
Change-Id: Ib09b664d90906f5b4427105f0e45469806f3a779
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-11-08 16:38:27 +00:00
Thiago Macieira
b01a53fe32 QStyleSheet: use the << form of qWarning to get more info
%p just prints a pointer. The operator<<(QObject*) member will print the
class type and object name.

Change-Id: Iba4b5c183776497d8ee1fffd1564951da0c6bebc
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2018-11-08 15:20:03 +00:00
Thiago Macieira
9d90c0edac QImage: merge the size calculations with proper (non-UB) checks
This check, which was only done once, was wrong:
    const int bytes_per_line = ((width * depth + 31) >> 5) << 2;

    // sanity check for potential overflows
    if (std::numeric_limits<int>::max()/depth < width

If width*height overflows, then it's already UB and checking afterwards
with a division is pointless and slow.

The other instances weren't properly guarding against overflows.

Change-Id: I343f2beed55440a7ac0bfffd1563350d4cfa639c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-11-08 15:20:01 +00:00
Thiago Macieira
f80ed83cd9 Correct which codecs QTextStream::autoDetectUnicode detects
Fixes: QTBUG-67187
Change-Id: If7e743cf8476463880ccfffd155f86b78a279f81
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-11-08 15:19:58 +00:00
Thiago Macieira
99baa0d440 Optimize QTextCodec::codecForUtfText a little
Instead of doing byte comparisons, let the compiler do 16- and 32-bit
comparisons on its own.

Change-Id: If7e743cf8476463880ccfffd155f8629991b0b87
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-11-08 15:19:55 +00:00
Thiago Macieira
66a2d15907 QTextCodec: update the docs for codecForUtfText
It can detect the standard UTF codecs, but not non-standard like
UTF-7[1], UTF-9 or UTF-18[2].

[1] https://tools.ietf.org/html/rfc2152
[2] https://tools.ietf.org/html/rfc4042

Fixes: QTBUG-67188
Change-Id: If7e743cf8476463880ccfffd155f853dc947421a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-11-08 15:19:53 +00:00
Thiago Macieira
570ef11c28 QUtf8Codec: Use one 32-byte load instead of two 16-byte ones on AVX2
The number of instructions is the same. But if the CPU can issue
32-byte-wide loads, this will be faster. For CPUs that would do two
16-byte loads, this is no worse than current code.

Change-Id: I8f261579aad648fdb4f0fffd1553d060b4fc852f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-11-08 15:19:50 +00:00
Thiago Macieira
a0907e6ac1 Fix warning about missing initializer for a struct member
GCC 4.8 is complaining about perfectly valid (and recommended) code but
we still support it, so...

qcborvalue.h:74:25: warning: missing initializer for member ‘QCborError::c’

Fixes: QTBUG-71222
Change-Id: If7e743cf8476463880ccfffd155e8775b6b95469
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-11-08 15:19:48 +00:00