qt6-bb10/tests/auto/corelib
Ahmad Samir 4bc0834bc1 Timers: add Qt::TimerId enum class
Which will be used to represent timer IDs. Thanks to Marc for the idea
to use "a strongly typed int".

QTimer got a new id() method that returns Qt::TimerId (can't overload
timerId()). Various classes in qtbase have a member named timerId(), but
a new method is needed anyway in QTimer so id() it is (this is the
reason QChronoTimer only has id() and no timerId()). Besides
timer.timerId() has an extra "timer".

This commit fixes the inconsistency between QObject using `0` timer id
to indicate "failed to start", while QTimer::timerId() returned `-1` to
indicate "timer is inactive". QTimer::id(), being a new method and all,
now returns Qt::TimerId::Invalid, which has value `0`, so that the
values match between the two classes. Extend the unittests to ensure
QTimer::timerId()'s behavior is preserved.

[ChangeLog][Core][QObject] Added Qt::TimerId enum class, that is used to
represent timer IDs.

Change-Id: I0e8564c1461884106d8a797cc980a669035d480a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-03-03 19:56:55 +02:00
..
animation Change license for tests files 2024-02-04 09:56:42 +01:00
global tst_qmessagehandler: disable the backtrace tests outside of x86 2024-02-26 23:29:39 -08:00
io Add QDirListing, an STL-style iterator for directory entries 2024-02-29 16:35:57 +02:00
ipc Change license for tests files 2024-02-04 09:56:42 +01:00
itemmodels Change license for tests files 2024-02-04 09:56:42 +01:00
kernel Timers: add Qt::TimerId enum class 2024-03-03 19:56:55 +02:00
mimetypes Change license for tests files 2024-02-04 09:56:42 +01:00
platform Change license for tests files 2024-02-04 09:56:42 +01:00
plugin Remove extra semi-colons 2024-02-06 20:17:18 +09:00
serialization QCborStreamReader: rename toType(Type&) -> appendToType(Type&) 2024-02-29 15:35:57 +01:00
text QLocal8Bit::convertToUnicode[win]: rewrite remainingChars handling as recursive 2024-03-02 22:57:09 +01:00
thread tst_QMutex: use the new QCOMPARE_* macros 2024-03-02 21:57:09 +00:00
time QIcuTimeZonePrivate constructor: save iteration over all zone IDs 2024-02-08 15:40:03 +01:00
tools QList: add uninitialized resizes 2024-02-16 14:20:50 +01:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00