Showing the changes to libraries/script-engine/src/ScriptManager.cpp (1 of 11 files). Show all
Unified · Split
| @@ -79,9 +79,6 @@ static const ScriptValue::PropertyFlags READONLY_HIDDEN_PROP_FLAGS{ READONLY_PRO · 78 unmodified lines | ||
| 79 | 79 | |
| 80 | 80 | static const bool HIFI_AUTOREFRESH_FILE_SCRIPTS { true }; |
| 81 | 81 | |
| 82 | −Q_DECLARE_METATYPE(ScriptEngine::FunctionSignature) | |
| 83 | −int functionSignatureMetaID = qRegisterMetaType<ScriptEngine::FunctionSignature>(); | |
| 84 | − | |
| 85 | 82 | int scriptManagerPointerMetaID = qRegisterMetaType<ScriptManagerPointer>(); |
| 86 | 83 | |
| 87 | 84 | Q_DECLARE_METATYPE(ExternalResource::Bucket); |
| @@ -1054,7 +1051,7 @@ void ScriptManager::timerFired() { · 966 unmodified lines | ||
| 1054 | 1051 | } |
| 1055 | 1052 | } |
| 1056 | 1053 | |
| 1057 | −QObject* ScriptManager::setupTimerWithInterval(const ScriptValue& function, int intervalMS, bool isSingleShot) { | |
| 1054 | +QTimer* ScriptManager::setupTimerWithInterval(const ScriptValue& function, int intervalMS, bool isSingleShot) { | |
| 1058 | 1055 | // create the timer, add it to the map, and start it |
| 1059 | 1056 | QTimer* newTimer = new QTimer(this); |
| 1060 | 1057 | newTimer->setSingleShot(isSingleShot); |
| @@ -1078,7 +1075,7 @@ QObject* ScriptManager::setupTimerWithInterval(const ScriptValue& function, int · 17 unmodified lines | ||
| 1078 | 1075 | return newTimer; |
| 1079 | 1076 | } |
| 1080 | 1077 | |
| 1081 | −QObject* ScriptManager::setInterval(const ScriptValue& function, int intervalMS) { | |
| 1078 | +QTimer* ScriptManager::setInterval(const ScriptValue& function, int intervalMS) { | |
| 1082 | 1079 | if (isStopped()) { |
| 1083 | 1080 | scriptWarningMessage("Script.setInterval() while shutting down is ignored... parent script:" + getFilename()); |
| 1084 | 1081 | return NULL; // bail early |
| @@ -1087,7 +1084,7 @@ QObject* ScriptManager::setInterval(const ScriptValue& function, int intervalMS) · 2 unmodified lines | ||
| 1087 | 1084 | return setupTimerWithInterval(function, intervalMS, false); |
| 1088 | 1085 | } |
| 1089 | 1086 | |
| 1090 | −QObject* ScriptManager::setTimeout(const ScriptValue& function, int timeoutMS) { | |
| 1087 | +QTimer* ScriptManager::setTimeout(const ScriptValue& function, int timeoutMS) { | |
| 1091 | 1088 | if (isStopped()) { |
| 1092 | 1089 | scriptWarningMessage("Script.setTimeout() while shutting down is ignored... parent script:" + getFilename()); |
| 1093 | 1090 | return NULL; // bail early |