Commit c62dfd0
committed
Don't crash during a slow (>= 60 seconds) startup on X11
The upstream bug report: QTBUG-58709.
A quick benchmark shows that the added QCoreApplication::processEvents()
call takes the same time in Debug and Release builds of YACReader and
YACReaderLibrary - from 0.5 to 0.6 milliseconds. 0.6 milliseconds is not
a noticeable startup slowdown, especially considering that the event
loop does useful work: processes events, which would have to be handled
eventually anyway.
I haven't restricted the workaround to Linux/X11: no need to introduce
a potential behavior difference between supported platforms.
The same workaround can be applied to YACReaderLibraryServer, but I
don't use the server and cannot test it.1 parent e5526de commit c62dfd0
2 files changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
101 | 106 | | |
102 | 107 | | |
103 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
123 | 128 | | |
124 | 129 | | |
125 | 130 | | |
| |||
0 commit comments