Merge branch 'master_nc' into feature/RND-597-flameshot-save-to-the-default-path-without-confirmation

This commit is contained in:
Yurii Puchkov
2020-09-04 02:37:08 -07:00
committed by GitHub
23 changed files with 724 additions and 505 deletions

View File

@@ -83,9 +83,14 @@ bool ScreenshotSaver::saveToFilesystemGUI(const QPixmap &capture) {
ok = capture.save(savePath);
if (ok) {
ConfigHandler config;
QString pathNoFile = savePath.left(savePath.lastIndexOf(QLatin1String("/")));
ConfigHandler().setSavePath(pathNoFile);
config.setSavePath(pathNoFile);
QString msg = QObject::tr("Capture saved as ") + savePath;
if(config.copyPathAfterSaveEnabled()) {
QApplication::clipboard()->setText(savePath);
msg = QObject::tr("Capture saved and copied to the clipboard as ") + savePath;
}
SystemNotification().sendMessage(msg, savePath);
} else {
QString msg = QObject::tr("Error trying to save as ") + savePath;