Skip to content
Snippets Groups Projects
Commit 5b2d6139 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

calls: set default recording path

If no recording path for calls is selected by the user,
set Movies as the default recording path.

Change-Id: I405dfc2bd6e1e85fae8900512615943760b3151c
parent 6298932c
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,11 @@ UtilsAdapter::UtilsAdapter(AppSettingsManager* settingsManager,
, clipboard_(QApplication::clipboard())
, systemTray_(systemTray)
, settingsManager_(settingsManager)
{}
{
if (lrcInstance_->avModel().getRecordPath().isEmpty()) {
lrcInstance_->avModel().setRecordPath(getDefaultRecordPath());
}
}
const QString
UtilsAdapter::getProjectCredits()
......@@ -91,6 +95,18 @@ UtilsAdapter::getCachePath()
dataDir.cdUp();
return dataDir.absolutePath() + "/jami";
}
QString
UtilsAdapter::getDefaultRecordPath() const
{
auto defaultDirectory = QStandardPaths::writableLocation(QStandardPaths::MoviesLocation)
+ "/Jami";
QDir dir(defaultDirectory);
if (!dir.exists())
dir.mkpath(".");
return defaultDirectory;
}
bool
UtilsAdapter::createStartupLink()
{
......
......@@ -101,5 +101,6 @@ private:
AppSettingsManager* settingsManager_;
QMetaObject::Connection debugMessageReceivedConnection_;
QString getDefaultRecordPath() const;
};
Q_DECLARE_METATYPE(UtilsAdapter*)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment