QTimer::singleShot(3000, this, SLOT(suspend()));
Yep, it is risky. What if you switch to away from the app, then switch back to it, then switch away, all within 2900ms. Then app only gets 100ms before is frozen.
I would not bother abstracting the QProcess code just yet, as it will be replaced by upstart launch code soon, and that will provide the refactoring.
QTimer: :singleShot( 3000, this, SLOT(suspend()));
Yep, it is risky. What if you switch to away from the app, then switch back to it, then switch away, all within 2900ms. Then app only gets 100ms before is frozen.
I would not bother abstracting the QProcess code just yet, as it will be replaced by upstart launch code soon, and that will provide the refactoring.