mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 14:41:39 +00:00
qt: save prefs on close more predictably
Ticket #379 reports crashes on quit due to `willSavePrefs` being called when result and details dialogs are already freed. I can't reproduce the crash, but it's still a bad idea to rely on the timing of `aboutToQuit()` to launch this process. This commits uses a more predictable place to emit `willSavePrefs` and I'm pretty sure it will fix the crash at #379.
This commit is contained in:
@@ -8,7 +8,7 @@ from PyQt5.QtCore import QRect, Qt
|
||||
from PyQt5.QtWidgets import (
|
||||
QWidget, QFileDialog, QHeaderView, QVBoxLayout, QHBoxLayout, QTreeView,
|
||||
QAbstractItemView, QSpacerItem, QSizePolicy, QPushButton, QMainWindow, QMenuBar, QMenu, QLabel,
|
||||
QApplication, QComboBox
|
||||
QComboBox
|
||||
)
|
||||
from PyQt5.QtGui import QPixmap, QIcon
|
||||
|
||||
@@ -232,7 +232,7 @@ class DirectoriesDialog(QMainWindow):
|
||||
if not self.app.confirm(title, msg):
|
||||
event.ignore()
|
||||
if event.isAccepted():
|
||||
QApplication.quit()
|
||||
self.app.shutdown()
|
||||
|
||||
#--- Events
|
||||
def addFolderTriggered(self):
|
||||
|
||||
Reference in New Issue
Block a user