| 419 | } |
| 420 | |
| 421 | void LightscreenWindow::quit() |
| 422 | { |
| 423 | settings()->setValue("position", pos()); |
| 424 | |
| 425 | int answer = 0; |
| 426 | QString doing; |
| 427 | |
| 428 | if (ScreenshotManager::instance()->activeCount() > 0) { |
| 429 | doing = tr("processing"); |
| 430 | } |
| 431 | |
| 432 | if (Uploader::instance()->uploading() > 0) { |
| 433 | if (doing.isEmpty()) { |
| 434 | doing = tr("uploading"); |
| 435 | } else { |
| 436 | doing = tr("processing and uploading"); |
| 437 | } |
| 438 | } |
| 439 | |
| 440 | if (!doing.isEmpty()) { |
| 441 | answer = QMessageBox::question(this, |
| 442 | tr("Are you sure you want to quit?"), |
| 443 | tr("Lightscreen is currently %1 screenshots. Are you sure you want to quit?").arg(doing), |
| 444 | tr("Quit"), |
| 445 | tr("Don't Quit")); |
| 446 | } |
| 447 | |
| 448 | if (answer == 0) { |
| 449 | emit finished(); |
| 450 | } |
| 451 | } |
| 452 | |
| 453 | void LightscreenWindow::restoreNotification() |
| 454 | { |
no test coverage detected