Skip to content

Commit

Permalink
Handle deleting in VM Settings without silent fails
Browse files Browse the repository at this point in the history
Deleting qube will now show a Delete in Progress dialog box and
not exit QApplication before QThread finishes.

fixes QubesOS/qubes-issues#5515

(cherry picked from commit e17332d)
  • Loading branch information
marmarta committed Jan 30, 2020
1 parent ed218af commit 35523aa
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion qubesmanager/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,8 +655,17 @@ def remove_vm(self):

if ok and answer == self.vm.name:
thread = common_threads.RemoveVMThread(self.vm)
thread.finished.connect(self.clear_threads)
self.threads_list.append(thread)

self.progress = QtWidgets.QProgressDialog(
self.tr("Deleting Qube..."), "", 0, 0)
self.progress.setCancelButton(None)
self.progress.setModal(True)
self.thread_closes = True
self.progress.show()

thread.start()
self.done(0)

elif ok:
QtGui.QMessageBox.warning(
Expand Down

0 comments on commit 35523aa

Please sign in to comment.