History

Add comment to ScriptEngine::include()

Ryan Huffman committed 11 years ago

Commit e6caefa1 parent ce9e8911 file · +7 −1Browse files

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

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+7−1
@@ -112,7 +112,7 @@ void ScriptEngine::setIsAvatar(bool isAvatar) { · 111 unmodified lines
112112 _avatarIdentityTimer->start(AVATAR_IDENTITY_PACKET_SEND_INTERVAL_MSECS);
113113 _avatarBillboardTimer->start(AVATAR_BILLBOARD_PACKET_SEND_INTERVAL_MSECS);
114114 }
115−
115+
116116 if (!_isAvatar) {
117117 delete _avatarIdentityTimer;
118118 _avatarIdentityTimer = NULL;
@@ -596,6 +596,12 @@ void ScriptEngine::print(const QString& message) { · 477 unmodified lines
596596 emit printedMessage(message);
597597 }
598598
599+/**
600+ * If a callback is specified, the included files will be loaded asynchronously and the callback will be called
601+ * when all of the files have finished loading.
602+ * If no callback is specified, the included files will be loaded synchronously and will block execution until
603+ * all of the files have finished loading.
604+ */
599605 void ScriptEngine::include(const QStringList& includeFiles, QScriptValue callback) {
600606 QList<QUrl> urls;
601607 for (QString file : includeFiles) {