From b42fa1fb9b5f29c6e1a2cd80689948ac254edd09 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 12 Feb 2021 12:53:25 +0200 Subject: [PATCH] QmlPreview: Don't force explicit restart on shader change Shader changes seem to be reflected to preview even without explicit restart, and the explicit restart will cause preview to crash when shader files are modified in QDS. Fixes: QDS-3741 Change-Id: Iacba712bcfe38831d76febd8074c683e2124223a Reviewed-by: Mahmoud Badri Reviewed-by: Thomas Hartmann --- src/plugins/qmlpreview/qmlpreviewplugin.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/plugins/qmlpreview/qmlpreviewplugin.cpp b/src/plugins/qmlpreview/qmlpreviewplugin.cpp index bf3a66289ed..137c51b4b3d 100644 --- a/src/plugins/qmlpreview/qmlpreviewplugin.cpp +++ b/src/plugins/qmlpreview/qmlpreviewplugin.cpp @@ -99,22 +99,8 @@ static QByteArray defaultFileLoader(const QString &filename, bool *success) static bool defaultFileClassifier(const QString &filename) { - const QStringList list = { - ".glsl", - ".glslv", - ".glslf", - ".vsh", - ".fsh", - ".frag", - ".vert", - "qtquickcontrols2.conf" }; - - for (const QString &suffix : list) - if (filename.endsWith(suffix)) - return false; - - // We cannot dynamically load changes in qtquickcontrols2.conf and shaders - return true; + // We cannot dynamically load changes in qtquickcontrols2.conf + return !filename.endsWith("qtquickcontrols2.conf"); } static void defaultFpsHandler(quint16 frames[8])