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

Method showScreenshotMessage

lightscreenwindow.cpp:640–665  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

638}
639
640void LightscreenWindow::showScreenshotMessage(const Screenshot::Result &result, const QString &fileName)
641{
642 if (result == Screenshot::Cancel) {
643 return;
644 }
645
646 // Showing message.
647 QString title;
648 QString message;
649
650 if (result == Screenshot::Success) {
651 title = QFileInfo(fileName).fileName();
652
653 if (settings()->value("file/target").toString().isEmpty()) {
654 message = QDir::toNativeSeparators(QCoreApplication::applicationDirPath());
655 } else {
656 message = tr("Saved to \"%1\"").arg(settings()->value("file/target").toString());
657 }
658 } else {
659 title = tr("The screenshot was not taken");
660 message = tr("An error occurred.");
661 }
662
663 mLastMessage = 1;
664 mTrayIcon->showMessage(title, message);
665}
666
667void LightscreenWindow::showUploaderError(const QString &error)
668{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected