The Following User Says Thank You to xerxes2 For This Useful Post: | ||
![]() |
2013-10-14
, 13:53
|
Posts: 3,328 |
Thanked: 4,476 times |
Joined on May 2011
@ Poland
|
#2
|
At my desktop in x11 when closing my app with the window button the aboutToQuit signal is called ... but in the Sailfish emulator it's not. Anyone else noticed this? The qml Component.onDestruction signal doesn't seem to work either, on desktop or emulator. Shouldn't aboutToQuit be called when closing app with the Sailfish UX? This could be a Wayland related problem but hopefully it's fixable.
![]() |
2013-10-14
, 14:06
|
|
Posts: 513 |
Thanked: 651 times |
Joined on Feb 2011
@ Sweden
|
#3
|
The Following User Says Thank You to xerxes2 For This Useful Post: | ||
![]() |
2013-10-14
, 15:08
|
Posts: 3,328 |
Thanked: 4,476 times |
Joined on May 2011
@ Poland
|
#4
|
![]() |
2013-10-14
, 16:27
|
|
Posts: 3,404 |
Thanked: 4,474 times |
Joined on Oct 2005
@ Germany
|
#5
|
bool MyClass::eventFilter(QObject* obj, QEvent* ev) { if (obj == myView && ev->type() == QEvent::Close) { // do something... } return QObject::eventFilter(obj, ev); }
![]() |
2013-10-14
, 20:27
|
|
Posts: 513 |
Thanked: 651 times |
Joined on Feb 2011
@ Sweden
|
#6
|
![]() |
2013-10-15
, 13:54
|
Posts: 3,328 |
Thanked: 4,476 times |
Joined on May 2011
@ Poland
|
#7
|
I use python but I've not tried it like that. Even if it works, shouldn't the aboutToQuit signal work when closing from the Sailfish UX?
http://qt-project.org/doc/qt-5.1/qtc...ml#aboutToQuit
"This signal is emitted when the application is about to quit the main event loop, e.g. when the event loop level drops to zero. This may happen either after a call to quit() from inside the application or when the users shuts down the entire desktop session."
Or if the user closes the app from the window/UX.
Edit: I got aboutToQuit to work in a small test code now so will try some more ...
Edit2: It seems like aboutToQuit is called but the process is killed before the callback returns.
Edit3: Hmm, I have one thing in the aboutToQuit callback that takes some time to return and the process is killed before that happens. It works on my desktop though.
![]() |
2013-10-17
, 21:56
|
|
Posts: 1,055 |
Thanked: 4,107 times |
Joined on Oct 2009
@ Norway
|
#8
|
![]() |
2013-10-20
, 10:10
|
|
Posts: 513 |
Thanked: 651 times |
Joined on Feb 2011
@ Sweden
|
#9
|
The Following User Says Thank You to xerxes2 For This Useful Post: | ||
![]() |
2013-10-22
, 19:28
|
|
Posts: 513 |
Thanked: 651 times |
Joined on Feb 2011
@ Sweden
|
#10
|
The Following 6 Users Say Thank You to xerxes2 For This Useful Post: | ||
But the WM7 "horse" has a blood lineage tracing back to donkeys such as WM6.5, 6.1, 6.0, 5.1 that was fully neglected for too many years and Microsoft did sweet F all to maintain it (still running on Pocket IE4/6!!).