Delete dialogs on close. Fixes #456 (#922)

This commit is contained in:
Manu 2021-03-16 14:24:56 +08:00 committed by GitHub
parent 08797aba77
commit 064ba7c50a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View File

@ -14,6 +14,7 @@ class AddProfileWindow(AddProfileBase, AddProfileUI):
def __init__(self, parent=None): def __init__(self, parent=None):
super().__init__(parent) super().__init__(parent)
self.setupUi(self) self.setupUi(self)
self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
self.edited_profile = None self.edited_profile = None
self.buttonBox.rejected.connect(self.close) self.buttonBox.rejected.connect(self.close)

View File

@ -21,6 +21,7 @@ class AddRepoWindow(AddRepoBase, AddRepoUI):
def __init__(self, parent=None): def __init__(self, parent=None):
super().__init__(parent) super().__init__(parent)
self.setupUi(self) self.setupUi(self)
self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
self.result = None self.result = None
self.is_remote_repo = True self.is_remote_repo = True

View File

@ -1,6 +1,6 @@
import os import os
from PyQt5 import uic from PyQt5 import uic
from PyQt5.QtCore import QProcess from PyQt5.QtCore import QProcess, Qt
from PyQt5.QtWidgets import QApplication from PyQt5.QtWidgets import QApplication
from paramiko.rsakey import RSAKey from paramiko.rsakey import RSAKey
@ -23,6 +23,7 @@ class SSHAddWindow(SSHAddBase, SSHAddUI):
def __init__(self): def __init__(self):
super().__init__() super().__init__()
self.setupUi(self) self.setupUi(self)
self.setAttribute(Qt.WA_DeleteOnClose)
self.closeButton.clicked.connect(self.accept) self.closeButton.clicked.connect(self.accept)
self.generateButton.clicked.connect(self.generate_key) self.generateButton.clicked.connect(self.generate_key)