summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-12-09 08:07:40 (GMT)
committerEdwin Mons <edwin.mons@isode.com>2016-12-09 08:43:04 (GMT)
commit52b10e51563939db8a19bb9336e3280f198b771e (patch)
treec5841e71ce5221329204c26b2f9c16ca879c3cba /Swift/QtUI/QtTabbable.cpp
parent7b34ce22fd646c252791a3eda5005178ab3f19bf (diff)
downloadswift-52b10e51563939db8a19bb9336e3280f198b771e.zip
swift-52b10e51563939db8a19bb9336e3280f198b771e.tar.bz2
Do not emit windowClosing signal in QtTabbable dtor
Instead, handle the QCloseEvent and emit the windowClosing signal there. This is an attempt to fix a crash I am unable to reproduce but which crash stack includes the signal emit in ~QtTabbable. Test-Information: Builds on macOS 10.12.1 with clang master. All unit and integration tests pass. Manual login and close of Swift worked without a crash. Change-Id: I470f3c5362fd0f502c542560854424e87fc0727e
Diffstat (limited to 'Swift/QtUI/QtTabbable.cpp')
-rw-r--r--Swift/QtUI/QtTabbable.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/Swift/QtUI/QtTabbable.cpp b/Swift/QtUI/QtTabbable.cpp
index ed0963b..df2cbfe 100644
--- a/Swift/QtUI/QtTabbable.cpp
+++ b/Swift/QtUI/QtTabbable.cpp
@@ -22,7 +22,7 @@ QtTabbable::QtTabbable() : QWidget() {
}
QtTabbable::~QtTabbable() {
- emit windowClosing();
+
}
bool QtTabbable::isWidgetSelected() {
@@ -65,4 +65,9 @@ bool QtTabbable::event(QEvent* event) {
return QWidget::event(event);
}
+void QtTabbable::closeEvent(QCloseEvent* event) {
+ emit windowClosing();
+ event->accept();
+}
+
}