summaryrefslogtreecommitdiffstats
path: root/scriptrunner.h
diff options
context:
space:
mode:
Diffstat (limited to 'scriptrunner.h')
-rw-r--r--scriptrunner.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/scriptrunner.h b/scriptrunner.h
index 861c478..7cc65d1 100644
--- a/scriptrunner.h
+++ b/scriptrunner.h
@@ -41,6 +41,15 @@
namespace Scripting {
namespace Internal {
+struct ErrorMessage {
+ ErrorMessage() : hasError(false) {}
+ ErrorMessage(int line, const QString& message) : hasError(true), line(line), message(message) {}
+
+ bool hasError;
+ int line;
+ QString message;
+};
+
/**
* \brief Script Runner
*
@@ -57,7 +66,7 @@ public:
virtual ~ScriptRunner();
// Run a script
- bool runScript(const QString &sourceCode, const QString fileName=QString());
+ ErrorMessage runScript(const QString &sourceCode, const QString fileName=QString());
QScriptEnginePtr scriptEngine() { return ensureEngineInitialized(); }