StelScriptMgr.cpp   StelScriptMgr.cpp 
skipping to change at line 433 skipping to change at line 433
void StelScriptMgr::debug(const QString& msg) void StelScriptMgr::debug(const QString& msg)
{ {
emit(scriptDebug(msg)); emit(scriptDebug(msg));
} }
void StelScriptMgr::scriptEnded() void StelScriptMgr::scriptEnded()
{ {
if (engine.hasUncaughtException()) if (engine.hasUncaughtException())
{ {
// NOTE: engine.uncaughtExceptionLineNumber() gives incorrec QString msg = QString("script error: \"%1\" @ line %2").arg(
t line number (probably Qt bug). Correct line number can be engine.uncaughtException().toString()).arg(engine.uncaughtExceptionLineNumb
// calculate as (engine.uncaughtExceptionLineNumber()+1)/2 er());
// More info: https://bugs.launchpad.net/stellarium/+bug/104
6518 and
// http://sourceforge.net/projects/stellarium/forums/forum/2
78769/topic/5591465
QString msg = QString("script error: \"%1\" @ line %2").arg(
engine.uncaughtException().toString()).arg((engine.uncaughtExceptionLineNum
ber() + 1)/2);
emit(scriptDebug(msg)); emit(scriptDebug(msg));
qWarning() << msg; qWarning() << msg;
} }
GETSTELMODULE(StelMovementMgr)->setMovementSpeedFactor(1.0); GETSTELMODULE(StelMovementMgr)->setMovementSpeedFactor(1.0);
emit(scriptStopped()); emit(scriptStopped());
} }
QMap<QString, QString> StelScriptMgr::mappify(const QStringList& args, bool lowerKey) QMap<QString, QString> StelScriptMgr::mappify(const QStringList& args, bool lowerKey)
{ {
 End of changes. 1 change blocks. 
10 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/