Re-factor code that do lazy property registration into a function.

The code was repeated in a different form 3 times.

Change-Id: I6d0deb5dd9a317e1aab6a97d5eb2fd647f597661
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Fix QMetaProperty::write so it tries to register a property type.

We can not assume that the property type is always registered, because
QVariant argument may contain an instance of a different type.

Change-Id: I4fc9593b826e13c401dbdacec4d60db36edc7102
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Fix maximal literal string limitation in moc.

C++ standard advise to place 64k char limit for string literals, this
patch improves moc output so it is not affected anymore.

Task-number: QTBUG-36500
Change-Id: Iece630faaef45baebe8c7afe4fc51e0362c713de
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Fix memory leaks in tst_moc

Change-Id: Id17c4253e7e7a2e4ab7fd9b290481ca90914b782
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
QSortFilterProxyModel: honor the roles parameter of dataChanged

When the source model emits dataChanged, it may tell which roles
have been changed. That information was lost when using a
QSortFilterProxyModel -- the proxy simply dropped that argument
(meaning "all roles may have changed"). It's instead a good idea
to forward the roles argument, as it may minimize hits on the
proxy (on unchanged roles).

[ChangeLog][QtCore][QSortFilterProxyModel] QSortFilterProxyModel
now properly forwards the roles that have been changed when
the source model emits dataChanged().

Task-number: QTBUG-35440
Change-Id: Ifa5213866ba04dfd57d50b5fbd47638f2191eb8e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: David Faure <david.faure@kdab.com>