MCPcopy Create free account
hub / github.com/ckaiser/Lightscreen / quit

Method quit

lightscreenwindow.cpp:421–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419}
420
421void 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
453void LightscreenWindow::restoreNotification()
454{

Callers 1

executeArgumentMethod · 0.80

Calls 2

activeCountMethod · 0.80
uploadingMethod · 0.80

Tested by

no test coverage detected