forked from qt-creator/qt-creator
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:
@@ -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])
|
||||
|
Reference in New Issue
Block a user