1
0
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:
Virgil Dupras
2016-08-14 21:11:24 -04:00
parent 28d2aa8197
commit 20dc2d63fd
2 changed files with 9 additions and 9 deletions

View File

@@ -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):