Showing the changes to libraries/script-engine/src/ScriptManager.cpp (1 of 8 files). Show all
Unified · Split
| @@ -573,21 +573,38 @@ void ScriptManager::loadURL(const QUrl& scriptURL, bool reload) { · 572 unmodified lines | ||
| 573 | 573 | void ScriptManager::scriptErrorMessage(const QString& message) { |
| 574 | 574 | qCCritical(scriptengine, "[%s] %s", qUtf8Printable(getFilename()), qUtf8Printable(message)); |
| 575 | 575 | emit errorMessage(message, getFilename()); |
| 576 | + if (!currentEntityIdentifier.isInvalidID()) { | |
| 577 | + // TODO: add line number and proper file name | |
| 578 | + //if (engine() && engine()->currentContext() && engine()->currentContext()->) | |
| 579 | + emit errorEntityMessage(message, getFilename(), currentEntityIdentifier); | |
| 580 | + } | |
| 576 | 581 | } |
| 577 | 582 | |
| 578 | 583 | void ScriptManager::scriptWarningMessage(const QString& message) { |
| 579 | 584 | qCWarning(scriptengine, "[%s] %s", qUtf8Printable(getFilename()), qUtf8Printable(message)); |
| 580 | 585 | emit warningMessage(message, getFilename()); |
| 586 | + if (!currentEntityIdentifier.isInvalidID()) { | |
| 587 | + // TODO: add line number and proper file name | |
| 588 | + emit warningEntityMessage(message, getFilename(), currentEntityIdentifier); | |
| 589 | + } | |
| 581 | 590 | } |
| 582 | 591 | |
| 583 | 592 | void ScriptManager::scriptInfoMessage(const QString& message) { |
| 584 | 593 | qCInfo(scriptengine, "[%s] %s", qUtf8Printable(getFilename()), qUtf8Printable(message)); |
| 585 | 594 | emit infoMessage(message, getFilename()); |
| 595 | + if (!currentEntityIdentifier.isInvalidID()) { | |
| 596 | + // TODO: add line number and proper file name | |
| 597 | + emit infoEntityMessage(message, getFilename(), currentEntityIdentifier); | |
| 598 | + } | |
| 586 | 599 | } |
| 587 | 600 | |
| 588 | 601 | void ScriptManager::scriptPrintedMessage(const QString& message) { |
| 589 | 602 | qCDebug(scriptengine, "[%s] %s", qUtf8Printable(getFilename()), qUtf8Printable(message)); |
| 590 | 603 | emit printedMessage(message, getFilename()); |
| 604 | + if (!currentEntityIdentifier.isInvalidID()) { | |
| 605 | + // TODO: add line number and proper file name | |
| 606 | + emit printedEntityMessage(message, getFilename(), currentEntityIdentifier); | |
| 607 | + } | |
| 591 | 608 | } |
| 592 | 609 | |
| 593 | 610 | void ScriptManager::clearDebugLogWindow() { |