diff options
author | Ken Moore <moorekou@gmail.com> | 2016-05-02 14:14:41 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2016-05-02 14:14:41 -0400 |
commit | 644e61d60eeca66d65488988c9081550507eea6e (patch) | |
tree | 1680c8e2832a222a4ff1235d997661b622f11901 /src-qt5/desktop-utils/lumina-screenshot | |
parent | Adjust the single-replace logic in lumina-textedit. Have it replace the curre... (diff) | |
download | lumina-644e61d60eeca66d65488988c9081550507eea6e.tar.gz lumina-644e61d60eeca66d65488988c9081550507eea6e.tar.bz2 lumina-644e61d60eeca66d65488988c9081550507eea6e.zip |
Make the "quicksave" option in lumina-screenshot a bit more flexible with regard to which dir the screenshot is saved.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-screenshot')
-rw-r--r-- | src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp index f6b89a03..47828cdd 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp @@ -83,7 +83,10 @@ void MainUI::saveScreenshot(){ } void MainUI::quicksave(){ if(mousegrabbed){ return; } - QString savedir = QDir::homePath() + "/Pictures/"; + QString savedir = QDir::homePath()+"/"; + if(QFile::exists(savedir + "Pictures/")){ savedir.append("Pictures/"); } + else if(QFile::exists(savedir + "Images/")){ savedir.append("Images/"); } + QString path = savedir + QString( "Screenshot-%1.png" ).arg( QDateTime::currentDateTime().toString("yyyy-MM-dd-hh-mm-ss") ); IMG->image().save(path, "png"); QProcess::startDetached("lumina-open \""+path+"\""); |