Ref T644, allow to fetch notifications sounds from an arbitrary directory

* added settings
* utility functions
This commit is contained in:
Klaus Basan
2019-04-29 02:14:47 +02:00
parent ecc203cf2e
commit e4b0655129
8 changed files with 81 additions and 47 deletions

View File

@@ -12,6 +12,8 @@
#include <QtGlobal>
#include <QStringBuilder>
#include "blackmisc/fileutils.h"
using namespace BlackMisc::Audio;
namespace BlackMisc
@@ -40,6 +42,19 @@ namespace BlackMisc
}
}
void CSettings::setNotificationSoundDirectory(const QString &dir)
{
QString d = dir.trimmed();
if (d.isEmpty())
{
// reset
m_notificationSoundDir.clear();
return;
}
d = CFileUtils::fixWindowsUncPath(d);
m_notificationSoundDir = d;
}
QString CSettings::convertToQString(bool i18n) const
{
Q_UNUSED(i18n);