From 9f8df4426f0b010786f20c7aa4172d156995982b Mon Sep 17 00:00:00 2001 From: q5sys Date: Fri, 25 Mar 2016 11:15:28 -0400 Subject: Update MainUI.cpp condensed quicksave file name function --- lumina-screenshot/MainUI.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lumina-screenshot') diff --git a/lumina-screenshot/MainUI.cpp b/lumina-screenshot/MainUI.cpp index d1522202..ced5193f 100644 --- a/lumina-screenshot/MainUI.cpp +++ b/lumina-screenshot/MainUI.cpp @@ -70,12 +70,8 @@ void MainUI::saveScreenshot(){ } void MainUI::quicksave(){ QString savedir = QDir::homePath() + "/Pictures/"; - QDate date = QDate::currentDate(); - QString dateString = date.toString(); - QTime time = QTime::currentTime(); - QString timeString = time.toString(); - QString path = savedir + QString("Screenshot-[%1 - %2].png").arg(dateString).arg(timeString); - cpic.save(path, "png"); + QString path = savedir + QString( "Screenshot-%1.png" ).arg( QDateTime::currentDateTime().toString("yyyy-MM-dd-hh-mm-ss") ); + cpic.save(path, "png"); } void MainUI::editScreenshot(){ -- cgit