Skip to content
Snippets Groups Projects
Commit 7d5aa7c2 authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

settings: allow multiple audio file types

Change-Id: I2d73bdee9d8f98d2b4534008091facfa1637ce3d
parent 2771e2ee
No related branches found
No related tags found
No related merge requests found
...@@ -155,7 +155,7 @@ AdvancedSettingsWidget::openFileCustomRingtone() ...@@ -155,7 +155,7 @@ AdvancedSettingsWidget::openFileCustomRingtone()
QString fileUrl; QString fileUrl;
auto oldPath = QString::fromStdString(LRCInstance::getCurrAccConfig().Ringtone.ringtonePath); auto oldPath = QString::fromStdString(LRCInstance::getCurrAccConfig().Ringtone.ringtonePath);
auto openPath = oldPath.isEmpty() ? QDir::currentPath() + QString("/ringtones/") : QFileInfo(oldPath).absolutePath(); auto openPath = oldPath.isEmpty() ? QDir::currentPath() + QString("/ringtones/") : QFileInfo(oldPath).absolutePath();
fileUrl = QFileDialog::getOpenFileName(this, QString("Select a new ringtone"), openPath, tr("Opus Files (*.opus)")); fileUrl = QFileDialog::getOpenFileName(this, QString("Select a new ringtone"), openPath, tr("Audio Files (*.wav, *.ogg, *.opus, *.mp3)"));
if (!fileUrl.isEmpty()) { if (!fileUrl.isEmpty()) {
auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId());
confProps.Ringtone.ringtonePath = fileUrl.toStdString(); confProps.Ringtone.ringtonePath = fileUrl.toStdString();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment