Commit Graph

27762 Commits

Author SHA1 Message Date
Liang Qi
23a36fd2bf Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/io/qprocess_win.cpp
	src/widgets/itemviews/qheaderview.cpp

Change-Id: I0a59ade9cd6e91f770fdf298a7d72a41e79fd761
2016-04-27 09:18:05 +02:00
Konstantin Ritt
c003a18ee3 Fix font fallback for an overridden Common script cases
Always prefer the requested font, even if it doesn't support the
script of interest, and fallback to a font that *does* support that
script, so that the best-matching font always takes a precedence.
The result looks much closer to what CT and GDI/DW does.

Task-number: QTBUG-35836
Task-number: QTBUG-39377
Task-number: QTBUG-43408
Change-Id: I6a89593565683f318f7292ec5ecf271dadc4142a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-04-27 00:40:02 +00:00
Thiago Macieira
6e306e8d94 Disallow non-character Unicode codepoints in QUrl/QUrlQuery
Since they are non-characters and should not be used for text
interchange, it stands to reason that they should not appear in
unencoded for in a URL. To change the behavior, we just need to toggle
a simple flag for QUtf8Functions.

This behavior also matches the recommendation from RFC 3987. We do not
usually follow recommendations from that RFC (as it is generally
believed to be a bad RFC), but this one seems like a good idea.

Change-Id: Ifea6e497f11a461db432ffff1447486c623c12bd
Reviewed-by: David Faure <david.faure@kdab.com>
2016-04-26 23:08:11 +00:00
Marc Mutz
40e4f75786 xcb: eradicate Q_FOREACH loops [rvalues]
... by replacing them with C++11 range-for loops.

This is the simplest of the patch series: Q_FOREACH took a
copy, so we do, too. Except we don't, since we're just
catching the return value that comes out of the function
(RVO). We can't feed the rvalues into range-for, because
they are non-const and would thus detach.

Change-Id: I982851f15868e62b7a191676ddf4ba6b92c0a42d
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-26 13:28:28 +00:00
Marc Mutz
ee2e441018 QXcbConnection: add some qAsConst()
... to prevent hidden detach(es| attempts).

Saves ~160b in text size on optimized GCC 6.0
Linux AMD64 builds.

Change-Id: I74e1f1304c522b9a4349918e99f562853ec8684e
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-26 13:28:19 +00:00
Marc Mutz
80fd691340 QXcbIntegration: simplify a switch
... by aggregating similar blocks under multiple case
labels, and caching functions's return values.

Even saves a few bytes in text size on optimized GCC 6.0
Linux AMD64 builds.

Change-Id: I5784567a09732b4e55b64163b69e7a946f0783ae
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-26 13:28:16 +00:00
Marc Mutz
1a7e5cdeab QXcbConnection: mark some more methods const
... because we can.

Change-Id: Ib5fd281a63ced9dce0de1f74fc849da6c6fc162a
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-26 13:28:11 +00:00
Marc Mutz
cd964c0442 QPdf: replace a hand-written qWarning with Q_UNIMPLEMENTED
But keep the 'Implement me' as a comment.

Remove default label from the switch to indicate that
the warning is only for the conical gradient case,
and not for the NoGradient case. Also enables
compiler warnings should we ever decide to add
another gradient type.

Change-Id: I891e652ff0293b4b4c254c7a55ebc6120b4fbcb6
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2016-04-26 12:30:00 +00:00
Anton Kudryavtsev
943a658c07 QJsonObject: use reserve() to reduce memory allocations
Change-Id: I97821ffa0c485815c781dc4f98012b0b490da90a
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-26 12:20:49 +00:00
Eskil Abrahamsen Blomfeldt
1880e8432f Disable Directwrite 2 when Directwrite is disabled
While this wouldn't have any consequences in practice, it was
perceived as confusing to users that Directwrite 2 was listed
as enabled in the summary when Qt was configured with -no-directwrite.
To give a better presentation of what will actually be compiled,
we force disable Directwrite 2 when Directwrite is disabled.

Task-number: QTBUG-52952
Change-Id: I779772ecc4d47b20854588cedde2b097ae22ded4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-04-26 12:17:37 +00:00
Tor Arne Vestbø
8996776f1e iOS: Handle old exclusive build CONFIG names for simulator and device
Qt Creator uses e.g. CONFIG+=iphoneos to make the default build target
be device. Now that the exclusive build is named simulator_and_device
to support e.g. tvOS, we need to handle the old CONFIG names for
backwards compatibility.

Task-number: QTBUG-52970
Change-Id: I0f864bebf11e657eb4225a182753037205f450b8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-26 11:33:22 +00:00
Friedemann Kleint
172f7e618e Windows/Configure tests: Test for DirectWrite2 more extensively.
Previously, the test succeeded for MinGW 64 5.3, which is still missing
IDWriteFontFace2. Amends change 33044b83c2.

Task-number: QTBUG-52952
Change-Id: I959f604d6bb9aa0efc765f2e26ec58d852ab92de
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-04-26 11:14:48 +00:00
Liang Qi
75d4742e04 Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7 2016-04-26 11:08:23 +00:00
Liang Qi
bb4b86618d Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	config.tests/unix/compile.test
	configure
	src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java
	src/corelib/global/qglobal.cpp
	src/widgets/kernel/qapplication.cpp
	src/widgets/styles/qwindowsvistastyle.cpp
	tests/auto/corelib/kernel/qobject/tst_qobject.cpp

Change-Id: I067083f34e5290aa5f7565e40c30a069cc37b83a
2016-04-25 14:03:45 +02:00
Anton Kudryavtsev
84330007e1 QLockFile: move early out earlier to avoid allocations.
Saves reading two lines and allocating storage for them.

Change-Id: I71f6c7019f4c097897945eea52851e4623b75dc2
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
2016-04-25 07:46:02 +00:00
Anton Kudryavtsev
be6c14211e qTopLevelDomain: use QStringRef more
qIsEffectiveTLD() and containsTLDEntry() now
have overloaded versions with QStringRef arg.

Change-Id: Ic2b7fd56c8ea1579d3e4bdf4ed0e10405515d417
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-25 07:45:56 +00:00
Marc Mutz
ebbfc55667 QtGui: mark more types as primitive/movable
These types are held in QVarLengthArrays, so benefit
from being trivially relocatable. They are also part
of the private API, so there's no BC issues with
potential uses of these types in QList, except for
QPainter::PixmapFragment, which consequently has been
marked as relocatable only.

Change-Id: I90fb9a19231c6f5c71c593602fc997ffafe8f047
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-25 07:43:27 +00:00
Marc Mutz
0d19a571cd Android: eradicate Q_FOREACH loops [rvalues]
... by replacing them with C++11 range-for loops.

This is the simplest of the patch series: Q_FOREACH took a
copy, so we do, too. Except we don't, since we're just
catching the return value that comes out of the function
(RVO). We can't feed the rvalues into range-for, because
they are non-const and would thus detach.

Change-Id: Ia086b1f3d072dd56c3545780490be03346df2880
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2016-04-25 07:42:48 +00:00
Eskil Abrahamsen Blomfeldt
3010c38713 Android: Make SDK detection its own qmake feature
To allow reusing the logic which detects the appropriate
Android SDK version to use for building the Java code,
this is now separated into its own .prf file. This is
required by Qt Purchasing to avoid duplicating the logic
there.

Change-Id: Ief5f5e70dab79751ef9e5a9c4a019bfda686cd09
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-25 07:41:54 +00:00
Marc Mutz
7ba9863e32 Simplify code in QSpdyProtocolHandler::parseHttpHeaders()
Instead of checking for the presence of a NUL,
then splitting the QByteArray at NUL separators
just to join the parts with different binders,
simply use replace('\0', ...).

Change-Id: I0e0453b80f63cffce4a0ff152120ece754211166
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-25 07:39:58 +00:00
Marc Mutz
db27f3d5a7 QtNetwork: eradicate Q_FOREACH loops [const-& returns]
... by replacing them with C++11 range-for loops.

The function QObject::children() returns by const-reference,
so its result can be passed to range-for without further changes.

Change-Id: Ic330a8e110d6dd5624b9e328ece2a614d5c71e4f
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-25 07:39:10 +00:00
Marc Mutz
bac6da10dd QtNetwork: eradicate Q_FOREACH loops [needing qAsConst()]
... by replacing them with C++11 range-for loops.
To avoid detaches of these mutable Qt containers,
wrap the container in qAsConst().

Change-Id: I47c5308a6ad220b4c5495e55a3b0d38547bfa8d9
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-25 07:38:59 +00:00
Marc Mutz
036b404032 QtNetwork: eradicate Q_FOREACH loops [already const]
... (or trivially marked const) local variables or
parameters, by replacing them with C++11 range-for
loops.

Also ported one indexed loop.

Change-Id: Idddcac48ce7527b1ea674671ceb9aaf4d31fb42e
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-25 07:38:50 +00:00
Oliver Wolff
a1dec825f9 winrt: Skip context validation in ANGLE
The flag causes context validation to be skipped by ANGLE. If validation
is active nothing is rendered on Windows Phone (just a black screen) for
widget applications.
Everything works as expected without validation so we do without it.

Change-Id: I6f9ea249b653ba5a602bc33e75105c57b686b92d
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-04-25 05:57:42 +00:00
Oliver Wolff
e12ba07322 Update ANGLE to chromium/2651
Change-Id: I1cd32b780b1a0b913fab870e155ae1f4f9ac40d7
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-04-25 05:57:38 +00:00
Richard Moe Gustavsen
d3dcc6f610 QWidgetTextControl: respect run-time changes to cursorFlashTime
cursorFlashTime will now change dynamically from QPA while platform
controlled text selection (on mobile) is ongoing. This patch
will therefore update QWidgetTextControl so that it listens to the
cursorFlashTimeChanged signal and changes the blinking rate when
triggered.

Change-Id: I89bdfaab0e93d1d055baba6b132a7911d2ae84f6
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2016-04-25 05:56:13 +00:00
Richard Moe Gustavsen
2a740b9cf5 Darwin: set SH_BlinkCursorWhenTextSelected to false on Darwin
When text is selected on e.g iOS or OS X, the cursor should not
blink (or be visible), regardless of style.

Note that SH_BlinkCursorWhenTextSelected is actually
implemented to mean "hide cursor when text selected"
in e.g QWidgetTextControl. If this is a bug or not
is hard to say, but it is anyway the desired behavior
on Apple platforms.

Change-Id: I541dabbe1945c266107ba39e3adb006bec0258bf
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2016-04-25 05:56:01 +00:00
Richard Moe Gustavsen
1b5bc9723c QWidgetLineControl: respect run-time changes to cursorFlashTime
cursorFlashTime will now change dynamically from QPA while platform
controlled text selection (on mobile) is ongoing. This patch
will therefore update QWidgetLineControl so that it listens to the
cursorFlashTimeChanged signal and changes the blinking rate when
triggered.

The previous code had a function setBlinkingRate, which is now
changed to setBlinkingCursorEnabled (like in QWidgetTextControl).
This is because all callers of the function did either pass
"QApplication::cursorFlashTime" or "0", which basically means enable
or disable blinking. This moves the control of the blinking rate
fully to QWidgetLineControl, which simplifies the code a bit, especially
when cursorFlashTime can change.

Note that when setting a blink period to 0, it means "show the
cursor without blinking". AFAICS, the current implementation did
not guarantee that. This is now made more explicit in the code. If
hiding the cursor is needed, a separate function "setCursorVisible"
is already available for controlling that.

Change-Id: I7d39882de192a23e6e7ba370749892c7702c3d3b
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2016-04-25 05:55:57 +00:00
Anton Kudryavtsev
e36f03f97a ConfigureApp: fix warning -Wsign-compare.
Use size_t as index type for C array.

Change-Id: I0980f47ef881108c9639a2a73fbb878b7d8161d2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-25 05:33:54 +00:00
Shawn Rutledge
6e850af09d OSX: remove tablet->mouse event synth
The synthesis of mouse events for unhandled tablet events is now in
cross-platform code, so the platform plugins don't need to do it.

Task-number: QTBUG-47007
Change-Id: I948be398e4b1ab627a8dc97ca20c08dba4390238
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-04-25 05:22:42 +00:00
Marc Mutz
83b2c97713 Android: don't iterate over .keys()
... iterate over the container itself instead. Avoids
temporary QList creation as well as the lookup cost
when actually calling value(key).

Change-Id: I63a11e6f8f19919145ea142309ddbacd99c3bfc3
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-04-25 05:11:35 +00:00
Marc Mutz
bb71bd8de9 Android: eradicate Q_FOREACH loops [needing qAsConst()]
... by replacing them with C++11 range-for loops.
To avoid detaches of these mutable Qt containers,
wrap the container in qAsConst().

Change-Id: I9158c507f9249a7322b11c982bfcab1e6ed4a38a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-04-25 05:11:31 +00:00
Marc Mutz
54d26804d7 Android: eradicate Q_FOREACH loops [already const]
... (or trivially marked const) local variables,
parameters, or data members with trivial loop bodies,
by replacing them with C++11 range-for loops.

Change-Id: I25e9e2148abd7676305ebd18754dc647f217e48b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-04-25 05:11:28 +00:00
Marc Mutz
0909a94af2 QtCore: mark more types as primitive/movable
These types are held in QVarLengthArrays, so benefit
from being trivially relocatable. They are also part
of the private API, so there's no BC issues with
potential uses of these types in QList.

Change-Id: I8adc0c801885f8fffa05eb1f173d7e4bb085ba7b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-04-25 05:11:12 +00:00
Marc Mutz
4579d966af QMutexPool: avoid QVarLengthArray of QAtomicPointers
QAtomicPointer is CopyConstructible, but std::atomic<T*> is not,
for a reason. So avoid putting them in a QVarLengthArray, using
a dynamic heap allocation instead. This sounds wasteful until
you realize that virtually all users of QMutexPool (and we know
them all) use the global instance(), and that each QMutex (131,
by default) is heap-allocated, too.

Change-Id: Ie9c95671ec42a1f51919c18631b623aad2c0d6ba
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-04-24 18:22:02 +00:00
Volker Krause
072f5b513e Also update filter rules if there is a custom filter installed.
This is relevant if the custom filter passes through some categories to
the previous one (which might be the default one). In this case changes
to the filter rules never took effect.

Change-Id: I1a3ab569857d43621ce5df4e690c6e64e6bc7a66
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2016-04-24 15:09:50 +00:00
Friedemann Kleint
2fe10c8dd0 QWindowsVistaStyle: Fix CE_MenuBarItem with QStyleSheetStyle.
Do not paint over CE_MenuBarItem when the palette is set
to transparent by QStyleSheetStyle.

Task-number: QTBUG-49115
Change-Id: Ib364017179d0852490daad094361eae0ead4fd5f
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2016-04-23 17:44:10 +00:00
Thiago Macieira
721d7d383d QMessagePattern: Fix indentation and use QVector for a large struct
struct BacktraceParams is too big (more than one pointer), so using it
with QList is inefficient. Let's use QVector instead.

Change-Id: Id75834dab9ed466e94c7ffff144572c1eb3fb0e5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-04-23 12:33:22 +00:00
David Faure
16fa29352b QMimeDatabase: fix mimeTypeForUrl for mailto URLs
The "path" of a mailto URL isn't a file, so we shouldn't try to do
glob-based matching. I was getting application/x-ms-dos-executable
for a .com domain and application/x-perl for a .pl domain...

Change-Id: Ifc346c3bba83ba1a8476db3202492f4c2e4d52bb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-04-23 08:44:45 +00:00
Maurice Kalinowski
d9c187b390 winrt: emit application activation
Previously the user only got informed about the application getting
inactive or hidden, but not when the application was reactivated again.
This can cause problems with applications using for instance a camera as
that gets disabled when not being active and never return to a active
state again.

Change-Id: I5c1d8750db8e75043ecf261616a0bc98434a3863
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-04-23 06:26:54 +00:00
Friedemann Kleint
ab83912c79 Windows/QProcess::startDetached(): Fall back to ShellExecuteEx() for UAC prompt.
When running a process that requires elevated privileges (such as
regedt32 or an installer), the Win32 API CreateProcess fails
with error ERROR_ELEVATION_REQUIRED.
Fall back to ShellExecuteEx() using the verb "runas" in that case,
bringing up the UAC prompt.

Task-number: QTBUG-7645
Change-Id: Iee82a86a30f78c5a49246d2c0d4566306f3afc71
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-04-23 06:12:24 +00:00
Friedemann Kleint
759b3f49c5 OpenGL/contextinfo-Example: Add command line options and status label.
Add command line options to be able to set the QCoreApplication attributes
that influence Open GL context creation and add a status label at the
bottom that displays it besides the QT_OPENGL environment variable.

Task-number: QTBUG-52693
Change-Id: Id9793292596e0feb3da5220fde2e5b2e495f87ff
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-04-23 06:10:45 +00:00
Friedemann Kleint
84a49594d0 Windows/tst_QTcpServer: Suppress crash notification of crashingServer.
Suppress message dialog of the test helper as does QTestlib.

Task-number: QTBUG-52714
Change-Id: I5efd7d72f77c7689500ecaccf46f1f9dfb312140
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-04-23 06:09:44 +00:00
Alex Trotsenko
21b3e2265a QAbstractSocket:waitForReadyRead(): fix handling UDP
Allow sockets in bound state to wait for notifications.

Task-number: QTBUG-52449
Change-Id: I5c02bd61db68abca652312d4d59023963b05b3c5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-04-23 06:03:09 +00:00
Błażej Szczygieł
c511466d74 xcb: Properly process enter/leave events
Ignore enter/leave events when there is a window under mouse button.
Unset window under mouse button if other window is grabbed.
Smarter ignoring (un)grab ancestor enter/leave event.
Ignore ungrab inferior leave event.

Amends: b9f76db30d

Task-number: QTBUG-46576
Task-number: QTBUG-51573
Task-number: QTBUG-52332
Task-number: QTBUG-52488
Change-Id: I8d926309aa60bb8929728691c31ecf93d1e299ad
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-04-22 13:58:03 +00:00
Peter Wu
1b9d082bb8 dbus: make QDBusArgumentPrivate destructor virtual
Make the destructor of QDBusArgumentPrivate virtual as it may store
other types (QDBusDemarshaller). Suggested by Thiago.

Fixes a "new-delete-type-mismatch" error reported by AddressSanitizer.

Task-number: QTBUG-52176
Change-Id: I9ac19050840530ca9cae893b10093185d31e0448
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2016-04-22 13:46:15 +00:00
Timur Pocheptsov
a9e7bf9ffd _q_networkSessionStateChanged - fix weird logic
a != A || a != B looks suspiciously wrong.
Found, unfortunately, only by Coverity (CIDs 152247, 152249).

Change-Id: Ia7ec810dde2a3a33ae6fc5644a4eebf279dcffe8
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-04-22 10:05:45 +00:00
Alexander Volkov
e27fae353c QFileSystemModel: fix updating QFileInfo for a node after a file rename
Use the correct parent path for the renamed file when creating
QFileInfo. It must be a path to the parent directory, not to the
root directory of the model.

Modify tst_QFileSystemModel::setData() to test renames in subdirs
of the root directory of the model.

Change-Id: I69d9e3a937616857a81617791ed118af3f6eea05
Task-number: QTBUG-52561
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-22 09:49:53 +00:00
Timur Pocheptsov
ea64dc9a11 qlockfile_unix - code cleanup
Coverity's CID 157687: QCache::insert, indeed, can delete (immediately)
the object we're trying to insert. While this never happens actually in
qlockfile_unix since we have max cost 10 and insert with cost 1, the
code does not look good and Coverity is not happy.

Change-Id: I16a428017bf86e151afe5256906e4cab1ef4044a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-04-22 08:45:48 +00:00
Richard Moe Gustavsen
8586cccc07 iOS: (crash fix) ensure we don't clear focus object in a text responder transition
When IM hints changes (e.g as a result of transferring focus
between Qt objects), we sometimes need to reconfigure the keyboard.
And the way we do that is to create a new QIOSTextResponder that
matches the new configuration and tell it to become first responder.
And in that process we need to ensure that we don't clear the
focus object when the old text responder resigns. After all, it was
the one requesting the new IM configuration in the first place.

Since we set FirstResponderCandidate to point to the new text responder
just before telling the old one to resign, we can use that variable
to check if were in a first responder transition before clearing the
focus object.

Change-Id: I05bfb8180700a92a8f14f496044457583bcd38d3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-04-22 06:36:59 +00:00