Commit 129985f0 authored by Andreas Traczyk's avatar Andreas Traczyk

misc: fix file-picker filters

Change-Id: Ifa422aabbc2a593248f49c3c85ca4be18f42a11c
parent a493d5bf
......@@ -155,7 +155,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)"));
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();
......
......@@ -90,7 +90,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()) {
Video::PreviewManager::instance().startPreview();
return;
......
......@@ -23,6 +23,7 @@
#include <QWindow>
#include <QtMultimedia\QCameraImageCapture>
#include <QBuffer>
#include <QStandardPaths>
#include "setavatardialog.h"
#include "ui_setavatardialog.h"
......@@ -137,8 +138,9 @@ SetAvatarDialog::editMode()
void
SetAvatarDialog::openFileManager()
{
auto picturesDir = QStandardPaths::standardLocations(QStandardPaths::PicturesLocation).first();
rawPixmap_.load(QFileDialog::getOpenFileName(this,
tr("Open Image"), "", tr("Image Files (*.png *.jpg *.bmp)")));
tr("Open Image"), picturesDir, tr("Image Files (*.jpg *.jpeg *.png *.bmp)")));
editMode();
}
......
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