Always exit after notification is closed
AbandonedPublic

Authored by ngraham on Feb 10 2018, 2:05 PM.

Details

Reviewers
rkflx
anemeth
Group Reviewers
Spectacle
Summary

BUG: 389694

Test Plan

Spectacle's Save & Quit item now always totally exits Spectacle after the notification goes away

Steps to reproduce (taken from the bug):

  • $ spectacle
  • Save & Exit
  • Configure Notifications in Plasma popup, Cancel
  • Spectacle returns to the shell prompt instead of keeping running in the shell

Diff Detail

Repository
R166 Spectacle
Branch
arcpatch-D10424
Lint
No Linters Available
Unit
No Unit Test Coverage
ngraham requested review of this revision.Feb 10 2018, 2:05 PM
ngraham created this revision.
alexeymin added inline comments.
src/Main.cpp
143

I don't get the difference..?

ngraham added inline comments.Feb 10 2018, 5:38 PM
src/Main.cpp
143

Me neither, but somehow this works for me.

anthonyfieroni added inline comments.
src/Main.cpp
143

qApp is setted after calling exec(). So this line should be

QObject::connect(&core, &SpectacleCore::allDone, &app, &QApplication::quit);
ngraham updated this revision to Diff 26886.Feb 10 2018, 5:48 PM

Implement review changes

ngraham marked 3 inline comments as done.Feb 10 2018, 5:48 PM

Thanks for working on this ;)

However, either it's not working for me, or you should improve your test plan so it has instructions for reproducing behaviour which is broken without your patch and fixed with your patch.

It's been implemented this way to make sure that Spectacle doesn't quit before its notification appears on the screen, but there's doubtless a better way to do this.

Do you know why this is a requirement, i.e. does the notification break when we quit right away? How are other apps handling this?

See also D10301#204185, where it seems to work in one case.

Thanks for working on this ;)

However, either it's not working for me, or you should improve your test plan so it has instructions for reproducing behaviour which is broken without your patch and fixed with your patch.

For me, without the patch, Save & Exit is always broken in the way indicated in the Bugzilla ticket, and with the patch, Save & Exit always works.

It's been implemented this way to make sure that Spectacle doesn't quit before its notification appears on the screen, but there's doubtless a better way to do this.

Do you know why this is a requirement, i.e. does the notification break when we quit right away?

Yes, without the existing workaround/implementation in Spectacle, the app quits before the notification appears.

How are other apps handling this?

I don't know.

rkflx edited the test plan for this revision. (Show Details)Feb 11 2018, 11:22 AM

I tried again for quite some time, but for me the patch does not change anything at all.

Note again that with D10301, I get Save As to exit immediately while also showing the notification. Could we get every operation to behave like that?

ngraham abandoned this revision.Feb 14 2018, 10:51 PM