Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all
Unified · Split
| @@ -1094,8 +1094,9 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co · 1093 unmodified lines | ||
| 1094 | 1094 | testConstructorType = "empty"; |
| 1095 | 1095 | } |
| 1096 | 1096 | QString testConstructorValue = testConstructor.toString(); |
| 1097 | − if (testConstructorValue.size() > 80) { | |
| 1098 | − testConstructorValue = testConstructorValue.mid(0, 80) + "..."; | |
| 1097 | + const int maxTestConstructorValueSize = 80; | |
| 1098 | + if (testConstructorValue.size() > maxTestConstructorValueSize) { | |
| 1099 | + testConstructorValue = testConstructorValue.mid(0, maxTestConstructorValueSize) + "..."; | |
| 1099 | 1100 | } |
| 1100 | 1101 | qCDebug(scriptengine) << "Error -- ScriptEngine::loadEntityScript() entity:" << entityID |
| 1101 | 1102 | << "failed to load entity script -- expected a function, got " + testConstructorType |