Don't use exec() to open dialogs
ClosedPublic

Authored by elvisangelaccio on Nov 7 2017, 6:37 PM.

Details

Summary

exec() is blocking and should not be used if possible.

Currently it makes impossible to interact with a 2nd okular window
if the first window has the Properties or Embedded Files dialog open.

It also causes a double delete crash when closing okular via dbus
while either of those dialogs is open.

We can use open() instead which does not block the event loop and fixes
both the problems.

Test Plan
  1. Open the Properties or Embedded Files dialog, then close okular via dbus.
  2. Open two okular windows, then open the Properties or Embedded Files dialog in one of them and try to use the other window.

Diff Detail

Repository
R223 Okular
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
elvisangelaccio created this revision.Nov 7 2017, 6:37 PM
Restricted Application added a project: Okular. · View Herald TranscriptNov 7 2017, 6:37 PM
ngraham added a subscriber: ngraham.Nov 7 2017, 7:12 PM
aacid accepted this revision.Nov 11 2017, 11:21 PM
This revision is now accepted and ready to land.Nov 11 2017, 11:21 PM
This revision was automatically updated to reflect the committed changes.