Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all
Unified · Split
| @@ -428,7 +428,7 @@ QString ScriptEngine::getFilename() const { · 427 unmodified lines | ||
| 428 | 428 | bool ScriptEngine::hasValidScriptSuffix(const QString& scriptFileName) { |
| 429 | 429 | QFileInfo fileInfo(scriptFileName); |
| 430 | 430 | QString scriptSuffixToLower = fileInfo.completeSuffix().toLower(); |
| 431 | − return ((scriptSuffixToLower == "js") || (scriptSuffixToLower == "json")); | |
| 431 | + return scriptSuffixToLower.contains(QString("js"), Qt::CaseInsensitive); | |
| 432 | 432 | } |
| 433 | 433 | |
| 434 | 434 | void ScriptEngine::loadURL(const QUrl& scriptURL, bool reload) { |