Exit the application instead of just stopping the event loop
Details
Diff Detail
- Repository
- R293 Baloo
- Branch
- exit_monitor
- Lint
No Linters Available - Unit
No Unit Test Coverage
This is the second time I could "resolve" a problem by throwing in a oneshot timer, see also D9590.
I have the feeling something else is wrong here and regard this more as a workaround than a solution. Please comment.
quit() and exit(0) do the same thing - they all stop event loop, caused by QCoreApplication::exec(). See - https://code.woboq.org/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp.html#_ZN16QCoreApplication4quitEv
And I don't understand how does timer help? What is happening without singleshot timer?
src/tools/balooctl/monitorcommand.cpp | ||
---|---|---|
55 | QCoreApplication::exit() is a static member function and can be called directly without using instance(). |
@alexeymin: Sorry, for the huge delay.
And I don't understand how does timer help? What is happening without singleshot timer?
I don't quite understand either.
Without it you won't get your prompt back until you Ctrl+C.