From f45ae57741e7c909217030a69e46137f5ea6ecaf Mon Sep 17 00:00:00 2001 From: Rafael Date: Wed, 20 Apr 2016 12:14:19 +0200 Subject: [PATCH] auto picture title improved --- ExportDialog.h | 3 +++ SnapmaticPicture.cpp | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/ExportDialog.h b/ExportDialog.h index d5fc4a7..5054036 100755 --- a/ExportDialog.h +++ b/ExportDialog.h @@ -33,6 +33,9 @@ public: explicit ExportDialog(QWidget *parent = 0); ~ExportDialog(); +private slots: + void on_cmdSnapmaticClose_clicked(); + private: Ui::ExportDialog *ui; }; diff --git a/SnapmaticPicture.cpp b/SnapmaticPicture.cpp index 1e57e8c..742e56c 100755 --- a/SnapmaticPicture.cpp +++ b/SnapmaticPicture.cpp @@ -233,7 +233,16 @@ void SnapmaticPicture::parseSnapmaticExportAndSortString() monthStr = dateStrList.at(0); } QString cmpPicTitl = titlStr; + cmpPicTitl.replace("\"", "''"); cmpPicTitl.replace(" ", "_"); + cmpPicTitl.replace(":", "-"); + cmpPicTitl.replace("\\", ""); + cmpPicTitl.replace("/", ""); + cmpPicTitl.replace("<", ""); + cmpPicTitl.replace(">", ""); + cmpPicTitl.replace("*", ""); + cmpPicTitl.replace("?", ""); + cmpPicTitl.replace(".", ""); sortStr = yearStr + monthStr + dayStr + timeStr; picExportFileName = sortStr + "_" + cmpPicTitl + ".jpg"; }