Commit 90e94f00 authored by Laurent Montel's avatar Laurent Montel 😁

Use setMimeTypeFilters

parent c0f72593
......@@ -295,7 +295,7 @@ void CSVImportDialog::initGUI()
mUrlRequester = new KUrlRequester(page);
mainLayout->addWidget(mUrlRequester);
mUrlRequester->setFilter(QStringLiteral("*.csv"));
mUrlRequester->setMimeTypeFilters({QStringLiteral("text/csv")});
mUrlRequester->lineEdit()->setTrapReturnKey(true);
mUrlRequester->setToolTip(
i18nc("@info:tooltip", "Select a csv file to import"));
......
......@@ -47,9 +47,9 @@ ExternalComposerConfigureWidget::ExternalComposerConfigureWidget(QWidget *parent
mEditorRequester->setObjectName(QStringLiteral("mEditorRequester"));
hbox->addWidget(mEditorRequester);
mEditorRequester->setFilter(QStringLiteral("application/x-executable "
"application/x-shellscript "
"application/x-desktop"));
mEditorRequester->setMimeTypeFilters({QStringLiteral("application/x-executable"),
QStringLiteral("application/x-shellscript"),
QStringLiteral("application/x-desktop")});
mEditorRequester->setMode(KFile::File | KFile::ExistingOnly | KFile::LocalOnly);
mEditorRequester->setEnabled(false); // !mExternalEditorCheck->isChecked()
......
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