generic: replace globs with MIME types in KFileDialog method calls

see the previous commit

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-08-27 00:40:03 +03:00
parent c7173b98af
commit fe7f483647
2 changed files with 2 additions and 4 deletions

View file

@ -554,9 +554,7 @@ void KAccessConfig::selectSound()
QString start;
if (list.count()>0)
start = list[0];
QString fname = KFileDialog::getOpenFileName(start,
i18n("*.wav *.ogg *.oga|All Sounds\n*.wav|WAV Files\n*.ogg *.oga|OGG Files\n*|All Files")
);
QString fname = KFileDialog::getOpenFileName(start, "audio/x-wav audio/ogg");
if (!fname.isEmpty())
soundEdit->setText(fname);
}

View file

@ -189,7 +189,7 @@ bool Workspace::saveOnQuit()
void Workspace::importWorkSheet()
{
KUrl url = KFileDialog::getOpenUrl( QString(), i18n("*.sgrd|Sensor Files (*.sgrd)"), this, i18n( "Select Tab File to Import" ) );
KUrl url = KFileDialog::getOpenUrl( QString(), "application/x-ksysguard", this, i18n( "Select Tab File to Import" ) );
importWorkSheet( url );
}