diff --git a/src/plugins/texteditor/texteditor_plg.cpp b/src/plugins/texteditor/texteditor_plg.cpp index 4e745da..86bbb04 100644 --- a/src/plugins/texteditor/texteditor_plg.cpp +++ b/src/plugins/texteditor/texteditor_plg.cpp @@ -143,13 +143,20 @@ int TextEditorPlugin::canOpenFile(const QString fileName) { } static const QStringList extensions = { - ".c", ".cpp", ".cxx", ".h", ".hpp", ".hxx", ".inc", ".pro", ".pri", ".txt", ".inc", - ".java", ".js", ".py", ".rb", ".pas", "bas", ".swift", ".bat", ".sh", ".md"}; + ".c", ".cpp", ".cxx", ".h", ".hpp", ".hxx", ".inc", + ".pro", ".pri", ".txt", ".inc", ".java", ".js", ".py", + ".rb", ".pas", "bas", ".swift", ".mk", ".bat", ".sh", + ".md", ".user", ".bak", ".txt", ".text", ".dox", ".desktop", + ".old", "license", "readme", "copying", "Makefile", "Doxyfile"}; for (const QString &ext : extensions) { if (fileName.endsWith(ext, Qt::CaseInsensitive)) { return 5; } } + + if (fileName.startsWith(".")) { + return 5; + } return 2; }