qt5base-lts/tests/auto/corelib
Mårten Nordheim 487dd80bce Introduce QSocketNotifier::activate(QSocketDescriptor, QSN::Type)
The pre-existing overload passes an int, but this can mean the
descriptor gets truncated in compilations where the descriptor
is 64-bit.

The old overload with int is visible when querying the metaobject system
so string-based connects still work as before, and connecting to it will
produce a deprecation warning in the output.
At the same time the PMF-based connect will, on recompile, pick the
QSocketDescriptor overload. As an added improvement it also comes with
the notification type, removing the need for separate slots where the
code would be mostly shared anyway.

The QSocketDescriptor type can be implicitly converted to and from
qintptr to ensure existing code still compiles. It can also be
constructed from Qt::HANDLE on Windows.

In this same patch I also update the existing string-based connects in
this module, which then includes updating the parameters for some slots
as well.

[ChangeLog][QtCore][QSocketNotifier] Added
QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type).
This replaces the activated(int) signal which in 64-bit environments
could truncate the socket descriptor. If you use "activated" with the
string-based connect() then you need to update the parameter type of the
signal and slot if it had one. If you use it with the pointer to member
function based connect() then all you need to do is update your slot's
parameter type if it has one. If you need to compile your source code
with multiple versions of Qt then connect() to this function using
pointer to member function and update the slot's parameter type if
needed.

Task-number: QTBUG-70441
Change-Id: Ic43d6bc4c5bcb4040867b2ffad8d36fb01eed8af
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-04-16 13:52:11 +02:00
..
animation Try to stabilize flaky test cases of tst_qsequentialanimationgroup 2020-03-12 09:40:43 +01:00
codecs Port from QStringViewLiteral to u"" 2019-07-29 11:17:28 +03:00
global Make tst_QRandomGenerator::qualityReal() test more stable 2020-03-25 22:19:24 +01:00
io tst_QFileInfo: fix running with systems without /etc/passwd 2020-04-09 10:55:25 -03:00
itemmodels QIdentityProxyModel: implement moveRows / moveColumns 2020-01-02 17:48:07 +01:00
kernel Introduce QSocketNotifier::activate(QSocketDescriptor, QSN::Type) 2020-04-16 13:52:11 +02:00
mimetypes Core: Use Qt::SplitBehavior in preference to QString::SplitBehavior 2020-02-28 15:37:11 +01:00
plugin Merge remote-tracking branch 'origin/5.14' into 5.15 2020-03-11 11:27:49 +01:00
serialization QCborValue: fix the move-assignment operator 2020-04-11 12:04:25 +00:00
statemachine std::chrono overload added to QStateMachine::postDelayedEvent() 2020-02-10 15:04:39 +01:00
text Fix deprecation warning in tst_QLocale()'s use of QProcess::start() 2020-04-03 15:13:23 +02:00
thread Add a constructor for QRunnable from anonymous functions 2020-01-31 19:20:43 +01:00
time Deprecate locale-related DateFormat enum members 2020-01-31 19:20:43 +01:00
tools tst_QScopeGuard: Fix build by giving template parameters explicitly 2020-04-06 09:27:01 +02:00
corelib.pro Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00