forked from qt-creator/qt-creator
QmlPreview: Restart if a shader is modified
If a shader is modified we have to restart the preview. Task-number: QDS-3179 Change-Id: I7d1fbde4a0db0ecd9ac1f2c7eb60d2e919935c73 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -99,8 +99,19 @@ static QByteArray defaultFileLoader(const QString &filename, bool *success)
|
||||
|
||||
static bool defaultFileClassifier(const QString &filename)
|
||||
{
|
||||
// We cannot dynamically load changes in qtquickcontrols2.conf
|
||||
return !filename.endsWith("qtquickcontrols2.conf");
|
||||
const QStringList list = {
|
||||
".glslv",
|
||||
".glslf",
|
||||
".vsh",
|
||||
".fsh",
|
||||
"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;
|
||||
}
|
||||
|
||||
static void defaultFpsHandler(quint16 frames[8])
|
||||
|
Reference in New Issue
Block a user