Drop outdated QT_USE_FAST_OPERATOR_PLUS
ClosedPublic

Authored by kossebau on Jun 29 2018, 6:40 PM.

Details

Summary

QT_USE_FAST_OPERATOR_PLUS has been deprecated in Qt 4.8, in favour of
QT_USE_QSTRINGBUILDER. The latter also covers QByteArray.

Qt5 headers still supports QT_USE_FAST_OPERATOR_PLUS (at least 5.11.1),
as subset of QT_USE_QSTRINGBUILDER as it was introduced in Qt4.8,
but not as documented build flag.

Given QT_USE_QSTRINGBUILDER is set here and thus triggers anything that
QT_USE_FAST_OPERATOR_PLUS would trigger in Qt code, removing it should
clean up the macro from undocumented features and thus reduce confusion.

No non-Qt is known at least in KDE repos which checks this build flag
otherwise, so no regression should be expected here as well.

Diff Detail

Repository
R240 Extra CMake Modules
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau created this revision.Jun 29 2018, 6:40 PM
Restricted Application added projects: Frameworks, Build System. · View Herald TranscriptJun 29 2018, 6:40 PM
Restricted Application added subscribers: kde-buildsystem, kde-frameworks-devel. · View Herald Transcript
kossebau requested review of this revision.Jun 29 2018, 6:40 PM

Some context from Olivier:
[15:06] <frinring> isn't QT_USE_FAST_CONCATENATION no more a thing since late 4.8, and in qt5 only QT_USE_FAST_OPERATOR_PLUS is still considered?
[15:12] <frinring> and QT_USE_QSTRINGBUILDER is a superset of QT_USE_FAST_OPERATOR_PLUS, so with the initial the latter is not needed, or?
[15:13] <frinring> ogoffart: hi. can you confirm that^ ?
[16:52] <ogoffart> frinring: yes, QT_USE_QSTRINGBUILDER is the new name
[16:55] <frinring> ogoffart: not just the new name, but also covers qbytearray, right? so QT_USE_FAST_CONCATENATION is defunc in qt5, QT_USE_FAST_OPERATOR_PLUS undocumented but still covering qstring, and QT_USE_QSTRINGBUILDER the documented thing, which covers both qstring & qbytearray
[16:55] <frinring> so dropping QT_USE_FAST_CONCATENATION from code is dead code clean up, replacing QT_USE_FAST_OPERATOR_PLUS with QT_USE_QSTRINGBUILDER needs some check first, right?
[16:57] <ogoffart> yes, right

And related old blog post: http://blog.qt.io/blog/2011/06/13/string-concatenation-with-qstringbuilder/

vkrause accepted this revision.Jun 29 2018, 7:27 PM
This revision is now accepted and ready to land.Jun 29 2018, 7:27 PM
This revision was automatically updated to reflect the committed changes.