History

style fixes

Liv committed 9 years ago

Commit b2bbf211 parent 09c7a612 files · +8 −8Browse files

Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 2 files). Show all

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+7−7
@@ -426,9 +426,9 @@ QString ScriptEngine::getFilename() const { · 425 unmodified lines
426}426}
427 427
428bool ScriptEngine::hasValidScriptSuffix(const QString& scriptFileName) {428bool ScriptEngine::hasValidScriptSuffix(const QString& scriptFileName) {
429 QFileInfo fileInfo(scriptFileName);429 QFileInfo fileInfo(scriptFileName);
430 QString scriptSuffixToLower = fileInfo.completeSuffix().toLower();430 QString scriptSuffixToLower = fileInfo.completeSuffix().toLower();
431 return scriptSuffixToLower.contains(QString("js"), Qt::CaseInsensitive);431 return scriptSuffixToLower.contains(QString("js"), Qt::CaseInsensitive);
432}432}
433 433
434void ScriptEngine::loadURL(const QUrl& scriptURL, bool reload) {434void ScriptEngine::loadURL(const QUrl& scriptURL, bool reload) {
@@ -441,10 +441,10 @@ void ScriptEngine::loadURL(const QUrl& scriptURL, bool reload) { · 6 unmodified lines
441 _isReloading = reload;441 _isReloading = reload;
442 442
443 // Check that script has a supported file extension443 // Check that script has a supported file extension
444 if (!hasValidScriptSuffix(_fileNameString)) {444 if (!hasValidScriptSuffix(_fileNameString)) {
445 scriptErrorMessage("File extension of file: " + _fileNameString + " is not a currently supported script type");445 scriptErrorMessage("File extension of file: " + _fileNameString + " is not a currently supported script type");
446 emit errorLoadingScript(_fileNameString);446 emit errorLoadingScript(_fileNameString);
447 return;447 return;
448 }448 }
449 449
450 const auto maxRetries = 0; // for consistency with previous scriptCache->getScript() behavior450 const auto maxRetries = 0; // for consistency with previous scriptCache->getScript() behavior