Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def rebuild_rev_file_async(self):
self.statusLabel.setText("Indexing...")
self.rebuild_task = MaestralBackgroundTask(self, "rebuild_index")
self.rebuild_task.sig_done.connect(self.on_rebuild_done)
def accept(self):
self.buttonBox.setEnabled(False)
self.progressIndicator.startAnimation()
self.unlink_thread = MaestralBackgroundTask(self, "unlink")
self.unlink_thread.sig_done.connect(self.restart_func)
def auto_check_for_updates(self):
last_update_check = self.mdbx.get_conf("app", "update_notification_last")
interval = self.mdbx.get_conf("app", "update_notification_interval")
if interval == 0: # checks disabled
return
elif time.time() - last_update_check > interval:
checker = MaestralBackgroundTask(self, "check_for_updates")
checker.sig_done.connect(self._notify_updates_auto)
def on_check_for_updates_clicked(self):
checker = MaestralBackgroundTask(self, "check_for_updates")
self._progress_dialog = MaestralBackgroundTaskProgressDialog("Checking for Updates")
self._progress_dialog.show()
self._progress_dialog.rejected.connect(checker.sig_done.disconnect)
checker.sig_done.connect(self._progress_dialog.accept)
checker.sig_done.connect(self._notify_updates_user_requested)