Added PropertiesChanged signal to dbus introspection data

QtDBus adheres to the org.freedesktop.DBus.Properties
interface, however there is no current way to include the
PropertiesChanged signal in exposed introspection data.
This change adds that signal to the introspection data,
whether the adaptor uses the signal or not is up to the user.

[ChangeLog][QtDBus][Important Behavior Changes]
QtDBus adaptors now include the PropertiesChanged signal in introspection data

Change-Id: Iee26528b59b30696689a79fb692f93859b42bb49
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add a new UTF-8 encoder and use it from QString

This is a new and faster UTF-8 encoder, based on the code from QUrl. This code
specializes for ASCII, which is the most common case anyway, especially since
QString's "ascii" mode is actually UTF-8 now.

In addition, make QString::toUtf8 use a stateless encoder. Stateless means that
the function doesn't handle state between calls in the form of
QTextCodec::ConverterState. This allows it to be faster than otherwise.

The new code is in the form of a template so that it can be used from
QJsonDocument and QUrl, which have small modifications to how the
encoding is handled.

Change-Id: I305ee0fd8523cc4ec74c2678cb9ea88b75bac7ac
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add a new UTF-8 decoder, similar to the encoder we've just added

Like before, this is taken from the existing QUrl code and is optimized for
ASCII handling (for the same reasons). And like previously, make
QString::fromUtf8 use a stateless version of the codec, which is faster.

There's a small change in behavior in the decoding: we insert a U+FFFD for
each byte that cannot be decoded properly. Previously, it would "eat" all bad
high-bit bytes and replace them all with one single U+FFFD. Either behavior is
allowed by the UTF-8 specifications, even though this new behavior will cause
misalignment in the Bradley Kuhn sample UTF-8 text.

Change-Id: Ib1b1f0b4291293bab345acaf376e00204ed87565
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use the new UTF-8 codec in QJsonDocument

The encoder is in qjsonwriter.cpp, which requires special handling for
ASCII due to the use of escape sequences. The decoder is in
qjsonparser.cpp, which only scan one character at a time.

As a side-effect, the JSON parser now reports the UTF-8 error in the
first character with error, instead of the last. This is probably what
should have been expected.

Change-Id: I52e5bc30d71466b6a36098b4150c61b2e385d8e9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use the new UTF-8 codec in QUrl and QUrlQuery

The new code is based on what QUrl already had, so this should have no
net effect in performance.

Change-Id: Ibb2fabd5a108e99a44e0e6e3f713ce2f8b26e4d7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Add QTypeInfo<T>::isIntegral trait

This allows us to know whether a given type is an integer or not. It's
going to be useful for QAtomicInteger, to know whether certain
operations can be performed on the type.

Change-Id: Ie64b24993e4021b44c97952d7d3973759fef3d4c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>