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 <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Miikka Heikkinen
2021-02-12 12:53:25 +02:00
parent b72c1d11e6
commit b42fa1fb9b

View File

@@ -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])