mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
style fixes
This commit is contained in:
parent
09c7a61599
commit
b2bbf21fb0
2 changed files with 8 additions and 8 deletions
|
@ -426,9 +426,9 @@ QString ScriptEngine::getFilename() const {
|
|||
}
|
||||
|
||||
bool ScriptEngine::hasValidScriptSuffix(const QString& scriptFileName) {
|
||||
QFileInfo fileInfo(scriptFileName);
|
||||
QString scriptSuffixToLower = fileInfo.completeSuffix().toLower();
|
||||
return scriptSuffixToLower.contains(QString("js"), Qt::CaseInsensitive);
|
||||
QFileInfo fileInfo(scriptFileName);
|
||||
QString scriptSuffixToLower = fileInfo.completeSuffix().toLower();
|
||||
return scriptSuffixToLower.contains(QString("js"), Qt::CaseInsensitive);
|
||||
}
|
||||
|
||||
void ScriptEngine::loadURL(const QUrl& scriptURL, bool reload) {
|
||||
|
@ -441,10 +441,10 @@ void ScriptEngine::loadURL(const QUrl& scriptURL, bool reload) {
|
|||
_isReloading = reload;
|
||||
|
||||
// Check that script has a supported file extension
|
||||
if (!hasValidScriptSuffix(_fileNameString)) {
|
||||
scriptErrorMessage("File extension of file: " + _fileNameString + " is not a currently supported script type");
|
||||
emit errorLoadingScript(_fileNameString);
|
||||
return;
|
||||
if (!hasValidScriptSuffix(_fileNameString)) {
|
||||
scriptErrorMessage("File extension of file: " + _fileNameString + " is not a currently supported script type");
|
||||
emit errorLoadingScript(_fileNameString);
|
||||
return;
|
||||
}
|
||||
|
||||
const auto maxRetries = 0; // for consistency with previous scriptCache->getScript() behavior
|
||||
|
|
|
@ -146,7 +146,7 @@ public:
|
|||
/// to run... NOTE - this is used by Application currently to load the url. We don't really want it to be exposed
|
||||
/// to scripts. we may not need this to be invokable
|
||||
void loadURL(const QUrl& scriptURL, bool reload);
|
||||
bool hasValidScriptSuffix(const QString& scriptFileName);
|
||||
bool hasValidScriptSuffix(const QString& scriptFileName);
|
||||
|
||||
Q_INVOKABLE QString getContext() const;
|
||||
Q_INVOKABLE bool isClientScript() const { return _context == CLIENT_SCRIPT; }
|
||||
|
|
Loading…
Reference in a new issue