def mouseDoubleClickEvent(self, event): if event.button() is QtCore.Qt.LeftButton: if (not self.cred.code.code or self.expired) and \ self.cred.cred_type in [CredentialType.HOTP, CredentialType.TOUCH]: connect_once(self.cred.changed, self._copy) self.cred.calculate() self.window().close() else: self._copy() # TODO: Type code out with keyboard? self.window().close() event.accept()
def mouseDoubleClickEvent(self, event): if event.button() is QtCore.Qt.LeftButton: if (not self.entry.code.code or self.expired) and \ self.entry.manual: def copy_close(): self._copy() self.window().close() connect_once(self.entry.changed, copy_close) self.entry.calculate() else: self._copy() # TODO: Type code out with keyboard? self.window().close() event.accept()