mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
Ref T644, allow to fetch notifications sounds from an arbitrary directory
* added settings * utility functions
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user