Commit 384f9bc1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Start to port deprecated method

parent 7b028dd5
Pipeline #57840 passed with stage
in 29 minutes and 5 seconds
......@@ -62,10 +62,9 @@ void SoundTestWidget::openSoundDialog(KUrlRequester *)
QFileDialog *fileDialog = m_urlRequester->fileDialog();
fileDialog->setWindowTitle(i18nc("@title:window", "Select Sound File"));
QStringList filters;
filters << QStringLiteral("audio/x-wav") << QStringLiteral("audio/mpeg") << QStringLiteral("application/ogg") << QStringLiteral("audio/x-adpcm");
const QStringList filters{QStringLiteral("audio/x-wav"), QStringLiteral("application/ogg"), QStringLiteral("audio/x-adpcm")};
fileDialog->setMimeTypeFilters(filters);
m_urlRequester->setMimeTypeFilters(filters);
const QStringList soundDirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("sound/"), QStandardPaths::LocateDirectory);
......@@ -78,7 +77,7 @@ void SoundTestWidget::openSoundDialog(KUrlRequester *)
dir = soundDir;
if (dir.isReadable() && dir.count() > 2) {
soundURL.setPath(soundDir);
fileDialog->setDirectoryUrl(soundURL);
m_urlRequester->setUrl(soundURL);
break;
}
}
......
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