| 638 | } |
| 639 | |
| 640 | void 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 | |
| 667 | void LightscreenWindow::showUploaderError(const QString &error) |
| 668 | { |
nothing calls this directly
no outgoing calls
no test coverage detected