qt5base-lts/src
Alex Trotsenko 6dac45b246 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>
2020-12-11 18:08:31 +02:00
..
3rdparty CMake: Regenerate projects using pro2cmake one last time 2020-12-10 11:52:30 +01:00
android Android: Qml accessibility fixes 2020-12-08 10:02:34 +01:00
concurrent Clean up qtconcurrent.qdocconf file 2020-12-10 12:02:06 +02:00
corelib QSocketNotifier: extend API to provide more flexible startup 2020-12-11 18:08:31 +02:00
dbus Use (new) erase()/erase_if() algorithms 2020-12-05 00:47:44 +01:00
entrypoint CMake: Fix entrypoint output directory when multi-config build 2020-11-23 19:54:08 +08:00
gui Avoid overflowing QFixed in text layout 2020-12-10 13:29:45 +01:00
network Http2: set the reply's error code and string on error 2020-12-07 22:34:49 +00:00
opengl Use (new) erase()/erase_if() algorithms 2020-12-05 00:47:44 +01:00
openglwidgets Member-initialize QOpenGLWidgetPrivate 2020-11-09 13:49:56 +01:00
platformsupport Replace qt_make_unique with std::make_unique 2020-11-23 09:50:21 +01:00
plugins QHeaderView: respect the font role while calculating the elided text 2020-12-10 19:40:57 +01:00
printsupport Doc: Use explicit linkage with target_link_libraries 2020-11-30 05:39:21 +01:00
sql Doc: Use explicit linkage with target_link_libraries 2020-11-30 05:39:21 +01:00
testlib QTestLib: add a abort-on-fail environment variable 2020-12-04 14:09:46 +00:00
tools CMake: Fix FEATURE_static_runtime build 2020-12-09 22:12:17 +01:00
widgets Remove already-set option style feature for QCommandLinkButton 2020-12-11 14:32:53 +01:00
xml Add qt5compat as a dependency to qtxml documentation 2020-12-02 06:01:20 +01:00
CMakeLists.txt cmake: Remove indirection via Startup target for EntryPoint 2020-11-12 18:43:43 +01:00
src.pro Move iOS entrypoint logic to entrypoint library 2020-11-10 16:53:31 +01:00