Skip to content

Commit

Permalink
remove processEvents since export doesnt block gui
Browse files Browse the repository at this point in the history
  • Loading branch information
Allie Crevier committed Nov 26, 2019
1 parent bbdbbb1 commit d519846
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions securedrop_client/gui/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1875,14 +1875,7 @@ def _on_export_clicked(self):
return

dialog = ExportDialog(self.controller, self.file.uuid)
# The underlying function of the `export` method makes a blocking call that can potentially
# take a long time to run (if the Export VM is not already running and needs to start, this
# can take 15 or more seconds). Calling `QApplication.processEvents` ensures that the `show`
# event is processed before the blocking call so that the user can see the dialog with a
# message to wait before the blocking call. We also call `exec` afterwards in order to give
# control to the dialog for the rest of the export process.
dialog.show()
QApplication.processEvents()
dialog.export()
dialog.exec()

Expand All @@ -1896,14 +1889,7 @@ def _on_print_clicked(self):
return

dialog = PrintDialog(self.controller, self.file.uuid)
# The underlying function of the `export` method makes a blocking call that can potentially
# take a long time to run (if the Export VM is not already running and needs to start, this
# can take 15 or more seconds). Calling `QApplication.processEvents` ensures that the `show`
# event is processed before the blocking call so that the user can see the dialog with a
# message to wait before the blocking call. We also call `exec` afterwards in order to give
# control to the dialog for the rest of the export process.
dialog.show()
QApplication.processEvents()
dialog.print()
dialog.exec()

Expand Down

0 comments on commit d519846

Please sign in to comment.