Commit 3fe1df07 authored by Andreas Traczyk's avatar Andreas Traczyk

file open dialogs: don't translate file type filters

- prevent strings like "(*.wav *.ogg *.opus *.mp3 *aiff *wma)"
  from becoming "( wav, ogg, opus, mp3, aiff, wma)" through the
  translation process

Change-Id: I64fc58cd5ac2b0f00e18d2655bde3703f3c632ec
parent 00184747
......@@ -178,7 +178,7 @@ AdvancedSettingsWidget::openFileCustomRingtone()
QString fileUrl;
auto oldPath = QString::fromStdString(LRCInstance::getCurrAccConfig().Ringtone.ringtonePath);
auto openPath = oldPath.isEmpty() ? QDir::currentPath() + QString("/ringtones/") : QFileInfo(oldPath).absolutePath();
fileUrl = QFileDialog::getOpenFileName(this, QString("Select a new ringtone"), openPath, tr("Audio Files (*.wav *.ogg *.opus *.mp3 *aiff *wma)"));
fileUrl = QFileDialog::getOpenFileName(this, QString("Select a new ringtone"), openPath, tr("Audio Files") + " (*.wav *.ogg *.opus *.mp3 *.aiff *.wma)");
if (!fileUrl.isEmpty()) {
auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId());
confProps.Ringtone.ringtonePath = fileUrl.toStdString();
......
......@@ -139,7 +139,7 @@ void AdvancedSIPSettingsWidget::openFileCustomRingtone()
QString fileUrl;
auto oldPath = QString::fromStdString(LRCInstance::getCurrAccConfig().Ringtone.ringtonePath);
auto openPath = oldPath.isEmpty() ? QDir::currentPath() + QString("/ringtones/") : QFileInfo(oldPath).absolutePath();
fileUrl = QFileDialog::getOpenFileName(this, QString("Select a new ringtone"), openPath, tr("Audio Files (*.wav *.ogg *.opus *.mp3 *aiff *wma)"));
fileUrl = QFileDialog::getOpenFileName(this, QString("Select a new ringtone"), openPath, tr("Audio Files") + " (*.wav *.ogg *.opus *.mp3 *.aiff *.wma)");
if (!fileUrl.isEmpty()) {
auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId());
......
......@@ -473,7 +473,7 @@ Q_INVOKABLE int
PrivateBridging::sendFile()
{
qDebug() << "JS bridging - MessageWebView::sendFile";
QString filePath = QFileDialog::getOpenFileName((QWidget*)this->parent(), tr("Choose File"), "", tr("Files (*)"));
QString filePath = QFileDialog::getOpenFileName((QWidget*)this->parent(), tr("Choose File"), "", tr("Files") + " (*)");
QFileInfo fi(filePath);
QString fileName = fi.fileName();
try {
......
......@@ -74,7 +74,7 @@ NewWizardWidget::NewWizardWidget(QWidget* parent) :
filePath = QFileDialog::getOpenFileName(this,
tr("Open File"),
QString(),
tr("Jami archive files (*.gz); All files (*)"));
tr("Jami archive files") + " (*.gz);" + tr("All files") + " (*)");
fileToImport_ = QDir::toNativeSeparators(filePath);
if (!fileToImport_.isEmpty()) {
QFileInfo fi(filePath);
......
......@@ -89,7 +89,7 @@ PhotoboothWidget::on_importButton_clicked()
auto picturesDir = QStandardPaths::standardLocations(QStandardPaths::PicturesLocation).first();
fileName_ = QFileDialog::getOpenFileName(this, tr("Choose File"),
picturesDir,
tr("Image Files (*.jpg *.jpeg *.png)"));
tr("Image Files") + " (*.jpg *.jpeg *.png)");
if (fileName_.isEmpty()) {
LRCInstance::avModel().startPreview();
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment