diff options
author | Alex Trotsenko <alex1973tr@gmail.com> | 2020-12-09 20:54:00 +0200 |
---|---|---|
committer | Alex Trotsenko <alex1973tr@gmail.com> | 2020-12-11 18:08:31 +0200 |
commit | 6dac45b24647aba4f5274e3908fc7bb661bcbef5 (patch) | |
tree | 3ab123dd42223e9883d2954467e57d4b6d2607b5 /coin/instructions | |
parent | 7715b186c79a968950fd1c8e0993641f2f58b3be (diff) |
QSocketNotifier: extend API to provide more flexible startup
Technically, having a single constructor limits the use-cases for this
class. We should take into account that:
- an opened socket descriptor must be available at the moment of
construction;
- the constructor unconditionally enables the notifier (the possible
solution
notifier = new QSocketNotifier(...);
notifier->setEnabled(false);
is suboptimal due to heavy operations inside the event dispatcher);
- for these reasons, QSocketNotifier most often cannot be a member of
another class (we have an extra allocation and indirect access).
This patch addresses this shortcoming by making it possible to set the
socket descriptor at a later point:
[ChangeLog][QtCore][QSocketNotifier] Added setSocket() and an additional
constructor which requires no socket.
Change-Id: I2eb2edf33ddafe99e528aac7d3774ade40795e7a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Diffstat (limited to 'coin/instructions')
0 files changed, 0 insertions, 0 deletions