Commit fc3c6ce2 authored by Alain Laporte's avatar Alain Laporte Committed by Christoph Cullmann
Browse files

When present, replace new text file entry by a real empty file

* not useful to be able to create a text file (which is not empty)
* due to empty file template introduced in KIO 5.96 (https://commits.kde.org/kio/da65b36c78644ce39fcb8c2db1b02461644eb81d), when KIO at lower version is used, we fallback to text file template

BUG: 297003
parent 3ce45f5f
Pipeline #199165 passed with stage
in 10 minutes and 47 seconds
......@@ -30,6 +30,7 @@
#include <KSharedConfig>
#include <KToolBar>
#include <KUrlNavigator>
#include <kio_version.h>
#include <QAbstractItemView>
#include <QAction>
......@@ -79,9 +80,12 @@ KateFileBrowser::KateFileBrowser(KTextEditor::MainWindow *mainWindow, QWidget *p
// Mime filter for the KDirOperator
QStringList filter;
filter << QStringLiteral("text/plain") << QStringLiteral("text/html") << QStringLiteral("inode/directory") << QStringLiteral("application/x-zerosize");
filter << QStringLiteral("text/html") << QStringLiteral("inode/directory");
#if KIO_VERSION < QT_VERSION_CHECK(5, 96, 0)
filter << QStringLiteral("text/plain");
#else
filter << QStringLiteral("application/x-zerosize");
#endif
m_dirOperator->setNewFileMenuSupportedMimeTypes(filter);
setFocusProxy(m_dirOperator);
......
Supports Markdown
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