qt5base-lts/src
Thiago Macieira 878b2047b5 QList::iterator: use templates for advancing operators
Because of the addition of the operator T*(), the expression "it + N"
where N was not exactly qsizetype but any other integer type was a
compilation failure because of ambiguous overload resolution.

With GCC it's apparently a warning:

 warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
 note: candidate 1: ‘QList<T>::iterator QList<T>::iterator::operator+(qsizetype) const [with T = char; qsizetype = long long int]’
 note: candidate 2: ‘operator+(char*, ptrdiff_t {aka long int})’ (built-in)

With Clang, it's an error:

 error: use of overloaded operator '+' is ambiguous (with operand types 'QList<int>::const_iterator' and 'ptrdiff_t' (aka 'long'))
 note: candidate function
        inline const_iterator operator+(qsizetype j) const { return const_iterator(i+j); }
 note: built-in candidate operator+(const int *, long)

Pick-to: 6.2
Fixes: QTBUG-96128
Change-Id: Ie72b0dd0fbe84d2caae0fffd16a06f23dd56b060
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-10-12 08:46:31 -07:00
..
3rdparty Update Harfbuzz to version 3.0.0 2021-10-05 21:53:10 +02:00
android Android: Update and add missing gradle files for jar folders 2021-10-06 16:05:19 +03:00
concurrent concurrent: Fix typo in documentation 2021-10-12 10:52:03 +00:00
corelib QList::iterator: use templates for advancing operators 2021-10-12 08:46:31 -07:00
dbus Doc: Fix usage of \summary macro 2021-10-12 14:08:08 +02:00
entrypoint Adjust the EntryPoint target name according to the internal module naming policy 2021-06-15 12:51:49 +02:00
gui freetype/no-fc: Disambiguate fonts with different widths 2021-10-12 13:33:19 +02:00
network Don't send the default SETTINGS_INITIAL_WINDOW_SIZE 2021-10-12 14:08:08 +02:00
opengl Add some debug warnings to the GL paint engine regarding stencil 2021-09-23 16:27:59 +02:00
openglwidgets Migrate to autogenerated cpp exports 2021-06-25 19:33:12 +02:00
platformsupport evdevtouch: Fix loading screen name for output mapping 2021-10-12 12:52:01 +02:00
plugins wasm: Fix source code comment typos 2021-10-12 15:55:53 +02:00
printsupport Doc: Remove unsupported customFilters 2021-09-03 15:14:59 +00:00
sql Doc: Prettify -G cmake arguments in SQL drivers documentation 2021-10-08 14:16:51 +02:00
testlib QTest: support initMain() in QTEST_APPLESS_MAIN 2021-10-05 21:53:10 +02:00
tools tools: Fix typos in source code comments 2021-10-12 12:52:02 +02:00
widgets Doc: Fix usage of \summary macro 2021-10-12 14:08:08 +02:00
xml xml: Fix typos in documentation 2021-10-12 12:52:02 +02:00
CMakeLists.txt Make it possible to disable the PrintSupport module 2021-02-09 09:17:21 +01:00