History

removed extra debugging

ZappoMan committed 11 years ago

Commit eab09ea1 parent 25ae0012 files · +10 −31Browse 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+8−19
@@ -117,8 +117,6 @@ bool ScriptEngine::_stoppingAllScripts = false; · 116 unmodified lines
117bool ScriptEngine::_doneRunningThisScript = false;117bool ScriptEngine::_doneRunningThisScript = false;
118 118
119void ScriptEngine::stopAllScripts(QObject* application) {119void ScriptEngine::stopAllScripts(QObject* application) {
120 qDebug() << "ScriptEngine::stopAllScripts() ------- BEGIN -------";
121
122 _allScriptsMutex.lock();120 _allScriptsMutex.lock();
123 _stoppingAllScripts = true;121 _stoppingAllScripts = true;
124 122
@@ -148,14 +146,10 @@ void ScriptEngine::stopAllScripts(QObject* application) { · 23 unmodified lines
148 146
149 scriptEngine->waitTillDoneRunning();147 scriptEngine->waitTillDoneRunning();
150 i.remove();148 i.remove();
151 } else {
152 qDebug() << "ScriptEngine::stopAllScripts() " << scriptName << " - will be freed on it's own.";
153 }149 }
154 }150 }
155 _stoppingAllScripts = false;151 _stoppingAllScripts = false;
156 _allScriptsMutex.unlock();152 _allScriptsMutex.unlock();
157 qDebug() << "ScriptEngine::stopAllScripts() _allKnownScriptEngines.count:" << _allKnownScriptEngines.count();
158 qDebug() << "ScriptEngine::stopAllScripts() ------- DONE -------";
159}153}
160 154
161 155
@@ -693,8 +687,7 @@ QObject* ScriptEngine::setupTimerWithInterval(const QScriptValue& function, int · 531 unmodified lines
693 687
694QObject* ScriptEngine::setInterval(const QScriptValue& function, int intervalMS) {688QObject* ScriptEngine::setInterval(const QScriptValue& function, int intervalMS) {
695 if (_stoppingAllScripts) {689 if (_stoppingAllScripts) {
696 qDebug() << "Script.setInterval() while shutting down is ignored...";690 qDebug() << "Script.setInterval() while shutting down is ignored... parent script:" << getFilename();
697 qDebug() << " parent script:" << getFilename() << "[" << this << "]";
698 return NULL; // bail early691 return NULL; // bail early
699 }692 }
700 693
@@ -703,8 +696,7 @@ QObject* ScriptEngine::setInterval(const QScriptValue& function, int intervalMS) · 2 unmodified lines
703 696
704QObject* ScriptEngine::setTimeout(const QScriptValue& function, int timeoutMS) {697QObject* ScriptEngine::setTimeout(const QScriptValue& function, int timeoutMS) {
705 if (_stoppingAllScripts) {698 if (_stoppingAllScripts) {
706 qDebug() << "Script.setTimeout() while shutting down is ignored...";699 qDebug() << "Script.setTimeout() while shutting down is ignored... parent script:" << getFilename();
707 qDebug() << " parent script:" << getFilename() << "[" << this << "]";
708 return NULL; // bail early700 return NULL; // bail early
709 }701 }
710 702
@@ -754,9 +746,8 @@ void ScriptEngine::print(const QString& message) { · 43 unmodified lines
754// all of the files have finished loading.746// all of the files have finished loading.
755void ScriptEngine::include(const QStringList& includeFiles, QScriptValue callback) {747void ScriptEngine::include(const QStringList& includeFiles, QScriptValue callback) {
756 if (_stoppingAllScripts) {748 if (_stoppingAllScripts) {
757 qDebug() << "Script.include() while shutting down is ignored...";749 qDebug() << "Script.include() while shutting down is ignored..."
758 qDebug() << " includeFiles:" << includeFiles;750 << "includeFiles:" << includeFiles << "parent script:" << getFilename();
759 qDebug() << " parent script:" << getFilename() << "[" << this << "]";
760 return; // bail early751 return; // bail early
761 }752 }
762 QList<QUrl> urls;753 QList<QUrl> urls;
@@ -799,9 +790,8 @@ void ScriptEngine::include(const QStringList& includeFiles, QScriptValue callbac · 36 unmodified lines
799 790
800void ScriptEngine::include(const QString& includeFile, QScriptValue callback) {791void ScriptEngine::include(const QString& includeFile, QScriptValue callback) {
801 if (_stoppingAllScripts) {792 if (_stoppingAllScripts) {
802 qDebug() << "Script.include() while shutting down is ignored...";793 qDebug() << "Script.include() while shutting down is ignored... "
803 qDebug() << " includeFile:" << includeFile;794 << "includeFile:" << includeFile << "parent script:" << getFilename();
804 qDebug() << " parent script:" << getFilename() << "[" << this << "]";
805 return; // bail early795 return; // bail early
806 }796 }
807 797
@@ -815,9 +805,8 @@ void ScriptEngine::include(const QString& includeFile, QScriptValue callback) { · 7 unmodified lines
815// the Application or other context will connect to in order to know to actually load the script805// the Application or other context will connect to in order to know to actually load the script
816void ScriptEngine::load(const QString& loadFile) {806void ScriptEngine::load(const QString& loadFile) {
817 if (_stoppingAllScripts) {807 if (_stoppingAllScripts) {
818 qDebug() << "Script.load() while shutting down is ignored...";808 qDebug() << "Script.load() while shutting down is ignored... "
819 qDebug() << " loadFile:" << loadFile;809 << "loadFile:" << loadFile << "parent script:" << getFilename();
820 qDebug() << " parent script:" << getFilename() << "[" << this << "]";
821 return; // bail early810 return; // bail early
822 }811 }
823 812