Make the default name scheme Windows compatable

This commit is contained in:
ArsenArsen 2017-07-04 22:35:34 +02:00
parent c93cb560ac
commit 52b6872f85
3 changed files with 3 additions and 3 deletions

View File

@ -41,7 +41,7 @@ SettingsDialog::SettingsDialog(QWidget *parent) : QDialog(parent), ui(new Ui::Se
for (Uploader *u : UploaderSingleton::inst().uploaderList()) newUploader(u);
// Set filename scheme
setScheme(settings::settings().value("fileFormat", "Screenshot %(yyyy-MM-dd HH:mm:ss)date.%ext").toString());
setScheme(settings::settings().value("fileFormat", "Screenshot %(yyyy-MM-dd HH-mm-ss)date.%ext").toString());
// Set delay
if ((settings::settings().contains("delay")))

View File

@ -84,7 +84,7 @@
<string>%(date format)date and %ext are supported</string>
</property>
<property name="text">
<string>Screenshot %(yyyy-MM-dd HH:mm:ss)date.%ext</string>
<string>Screenshot %(yyyy-MM-dd HH-mm-ss)date.%ext</string>
</property>
</widget>
</item>

View File

@ -82,7 +82,7 @@ void UploaderSingleton::upload(QPixmap pixmap) {
}
QString format = settings::settings().value("captureformat", "PNG").toString();
QFile file(saveDir.absoluteFilePath(
formatter::format(settings::settings().value("fileFormat", "Screenshot %(yyyy-MM-dd HH:mm:ss)date.%ext").toString(),
formatter::format(settings::settings().value("fileFormat", "Screenshot %(yyyy-MM-dd HH-mm-ss)date.%ext").toString(),
format.toLower())));
if (file.open(QFile::ReadWrite)) {