Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit f51fada4 authored by Alexey Bogdanenko's avatar Alexey Bogdanenko Committed by Christoph Cullmann

Allow creating empty file in filesystem browser

This commit allows user to create new empty files from filesystem
browser plugin. Filenames without extension are supported.

Menu items which produce such files were missing from Create New menu.
This is due to the way MIME type filter was configured. The filter
included files of type text/plain. However, empty files without
extension, for example, an empty file named "empty", do not belong to
class text/plain.

Both kmimetypefinder5 and xdg-mime utilities classify such a file as
application/x-zerosize. According to the current Shared MIME-Info
database, application/x-zerosize MIME type is not a subclass of type
text/plain, see

This commit extends the filter accordingly.

Reviewers: #kate, cullmann

Reviewed By: #kate, cullmann

Subscribers: cullmann, dhaumann, ngraham, kwrite-devel

Tags: #kate

Differential Revision:
parent 7203979f
......@@ -82,7 +82,12 @@ KateFileBrowser::KateFileBrowser(KTextEditor::MainWindow *mainWindow,
// Mime filter for the KDirOperator
QStringList filter;
filter << QStringLiteral("text/plain") << QStringLiteral("text/html") << QStringLiteral("inode/directory");
filter << QStringLiteral("text/plain")
<< QStringLiteral("text/html")
<< QStringLiteral("inode/directory")
<< QStringLiteral("application/x-zerosize");
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