From 42d2a3033a1b637a987a60a0e81a5c69b9b0553e Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Tue, 16 Jan 2018 11:20:40 +0100 Subject: [PATCH] fix(Call): saved videos/images/sounds avoid usage of `:` separator in filename (unsupported on windows) (close #115) --- src/components/call/CallModel.cpp | 6 +++--- src/components/conference/ConferenceModel.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/call/CallModel.cpp b/src/components/call/CallModel.cpp index 423985302..e8cb95c29 100644 --- a/src/components/call/CallModel.cpp +++ b/src/components/call/CallModel.cpp @@ -80,8 +80,8 @@ void CallModel::setRecordFile (shared_ptr &callParams) { callParams->setRecordFile( ::Utils::appStringToCoreString( QStringLiteral("%1%2.mkv") - .arg(CoreManager::getInstance()->getSettingsModel()->getSavedVideosFolder()) - .arg(QDateTime::currentDateTime().toString("yyyy-MM-dd_hh:mm:ss")) + .arg(CoreManager::getInstance()->getSettingsModel()->getSavedVideosFolder()) + .arg(QDateTime::currentDateTime().toString("yyyy-MM-dd_hh-mm-ss")) ) ); } @@ -197,7 +197,7 @@ void CallModel::rejectVideoRequest () { void CallModel::takeSnapshot () { static QString oldName; - QString newName = QDateTime::currentDateTime().toString("yyyy-MM-dd_hh:mm:ss") + ".jpg"; + QString newName = QDateTime::currentDateTime().toString("yyyy-MM-dd_hh-mm-ss") + ".jpg"; if (newName == oldName) { qWarning() << QStringLiteral("Unable to take snapshot. Wait one second."); diff --git a/src/components/conference/ConferenceModel.cpp b/src/components/conference/ConferenceModel.cpp index 8a060d67d..fa1d71038 100644 --- a/src/components/conference/ConferenceModel.cpp +++ b/src/components/conference/ConferenceModel.cpp @@ -79,8 +79,8 @@ void ConferenceModel::startRecording () { coreManager->getCore()->startConferenceRecording( ::Utils::appStringToCoreString( QStringLiteral("%1%2.mkv") - .arg(coreManager->getSettingsModel()->getSavedVideosFolder()) - .arg(QDateTime::currentDateTime().toString("yyyy-MM-dd_hh:mm:ss")) + .arg(coreManager->getSettingsModel()->getSavedVideosFolder()) + .arg(QDateTime::currentDateTime().toString("yyyy-MM-dd_hh-mm-ss")) ) ); mRecording = true;