Reset QNAM's NetworkConfiguration when state changes.

Since QNAM is initialized with defaultConfiguration, we need to
reset the internal configuration used to the current
defaultConfiguration when the state changes and a new configuration
becomes the default.

Task-number: QTBUG-40234
Change-Id: I50f23c62804f29370915eecac2c92301c5f3ead2
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Use a property cache to cut down on blocking calls

Refactor old code
Stop memory leaks
Properly support mobile data (ofono)

Change-Id: I7f23882ee0ee345a049a4a93ddd452b6d2e53710
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
moc: use Q_NULLPTR instead of 0 in generated code.

This commit changes several instances where moc was generating code that
used 0 as a null pointer constant. The Q_NULLPTR define is the more
idiomatic way to do this, and additionally this silences warnings
generated by e.g. GCC's -Wzero-as-null-pointer-constant.

[ChangeLog][Tools][moc] Fixed "zero as null pointer constant" warnings
in moc's generated code.

Change-Id: Ibe382b7bdbdddaf20cb4bdfd075fcdd1f363f9d3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Do not pass a null pointer to unlink()

Found by clang static analyzer.

Change-Id: I8f15ae1a8e6afb91eafa6cee1d1b21e3539af6c1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Android: Fix for build issue on x86

In the toolchain for x86 the va_list type is defined as char *, which
in itself isn't strange, but it was somewhat unexpected as it differs
from the arm toolchains. Either way we should not make assumption about
the va_list type as there is no guarantee it won't cause conflicts when
overloading. This fix simply renames the private overloads.

Change-Id: I7808619d0fa3ca63b75796308cfdff6aa41a7fd0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Doc: updated documentation QString::toDouble

Task-number: QTBUG-35543
Change-Id: I60d5cc253e6d6a24e9b031758e16a547a9a07443
Reviewed-by: Martin Smith <martin.smith@digia.com>
iOS: Detect when inputMethodAccepted() is out of sync with focus object

The GraphicsView stack still seems to have issues emitting focusObject
change signals when the focus object changes inside the item hierarchy.

To be on the safe side we use our own view of whether or not IM is
enabled, and try to detect and warn if we find a case where the two
are out of sync.

Change-Id: I9fde896ea14ea5b65784723110887e06453edbd4
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
eglfs: obey QT_NO_REGULAREXPRESSION define

Not all platforms do have QRegularExpression as it is based on
pcre.

Change-Id: I6b8e701ff7cf30e776ee34e5dc836cd24c9543b5
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Merge TextFormat attributes for identical ranges in QInputMethodEvents

IBus can hand us multiple attributes for different formatting properties
of the same text range for events. The IBus input method plugin used to
convert these straight into multiple QInputMethodEvent::Attributes, each
with their own QTextCharFormat instance.

According to the QInputMethodEvent documentation, behavior with multiple
TextFormat attributes for the same text range is undefined. In at least
one known user, KDE's Kate text editor, it causes invisible text for
pre-edit text events as the QTextCharFormats are applied in turn with
partially default-constructed foreground/background brushes:

https://bugs.kde.org/show_bug.cgi?id=339467

This patch makes an effort to merge formatting information for identical
text ranges into a single QTextCharFomat, while otherwise preserving
existing behavior (attribute order is unchanged and attributes deseria-
lized from D-Bus as having invalid QTextFormats remain untouched).

No attempt is made to cope with overlapping text ranges. Segmenting into
smaller ranges and merging for the overlaps would be conceivable, but
until a case of an input method creating events with overlapping ranges
is known seems not worth the effort.

It's worth noting that the IBus input method plugin for Qt 4 also
attempts to merge formatting information into a single QTextCharFormat,
but with a distinct implementation from this one.

Change-Id: Ie3dc38b353724ffb7b5f2d7f316393027373baf2
Task-number: 41640
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Remove incorrect read from QSslSocket::readData()

QIODevice makes readData() call only when its read buffer is empty.
Also data argument points to the user or reserved read buffer area.
So, no need in data transfer from read buffer at this point at all.

Task-number: QTBUG-41797
Change-Id: Ieb4afdf7eec37fdf288073e4a060e64424f22b9c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 1853579dad1bbb44599314213a1d8a203ecae1c9)
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Support dual sim in QtBearer's networkmanager backend

Task-number: QTBUG-42368
Change-Id: I306733b5de7871fdeaa0accb512a3610753c84a5
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>