Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/scripting/kexiscripting/kexiscriptpart.cpp
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | 93 | { | |||
---|---|---|---|---|---|
99 | 99 | | |||
100 | QString p = loadData(item); | 100 | QString p = loadData(item); | ||
101 | 101 | | |||
102 | QJSValue result = execute(p); | 102 | QJSValue result = execute(p); | ||
103 | 103 | | |||
104 | if (result.isError()) { | 104 | if (result.isError()) { | ||
105 | QString errormessage = result.toString(); | 105 | QString errormessage = result.toString(); | ||
106 | long lineno = result.property("lineNumber").toInt(); | 106 | long lineno = result.property("lineNumber").toInt(); | ||
107 | QMessageBox mb(xi18n("Kexi Script"), xi18n("Error executing script at line %1:\n%2").arg(lineno).arg(errormessage), QMessageBox::Critical, QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); | 107 | QMessageBox mb(xi18n("KEXI Script"), xi18n("Error executing script at line %1:\n%2").arg(lineno).arg(errormessage), QMessageBox::Critical, QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); | ||
108 | mb.exec(); | 108 | mb.exec(); | ||
109 | return false; | 109 | return false; | ||
110 | } | 110 | } | ||
111 | return true; | 111 | return true; | ||
112 | } | 112 | } | ||
113 | 113 | | |||
114 | QJSValue KexiScriptPart::execute(const QString& program) | 114 | QJSValue KexiScriptPart::execute(const QString& program) | ||
115 | { | 115 | { | ||
▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines |