StelScriptMgr.cpp   StelScriptMgr.cpp 
skipping to change at line 21 skipping to change at line 21
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#include "StelScriptOutput.hpp"
#include "StelScriptMgr.hpp" #include "StelScriptMgr.hpp"
#include "StelMainScriptAPI.hpp" #include "StelMainScriptAPI.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "LabelMgr.hpp" #include "LabelMgr.hpp"
#include "ScreenImageMgr.hpp" #include "ScreenImageMgr.hpp"
#include "StelActionMgr.hpp" #include "StelActionMgr.hpp"
#include "StelTranslator.hpp" #include "StelTranslator.hpp"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
skipping to change at line 424 skipping to change at line 425
double StelScriptMgr::getScriptRate() double StelScriptMgr::getScriptRate()
{ {
return engine.globalObject().property("scriptRateReadOnly").toNumber (); return engine.globalObject().property("scriptRateReadOnly").toNumber ();
} }
void StelScriptMgr::debug(const QString& msg) void StelScriptMgr::debug(const QString& msg)
{ {
emit(scriptDebug(msg)); emit(scriptDebug(msg));
} }
void StelScriptMgr::output(const QString &msg)
{
StelScriptOutput::writeLog(msg);
emit(scriptOutput(msg));
}
void StelScriptMgr::scriptEnded() void StelScriptMgr::scriptEnded()
{ {
if (engine.hasUncaughtException()) if (engine.hasUncaughtException())
{ {
QString msg = QString("script error: \"%1\" @ line %2").arg( engine.uncaughtException().toString()).arg(engine.uncaughtExceptionLineNumb er()); QString msg = QString("script error: \"%1\" @ line %2").arg( engine.uncaughtException().toString()).arg(engine.uncaughtExceptionLineNumb er());
emit(scriptDebug(msg)); emit(scriptDebug(msg));
qWarning() << msg; qWarning() << msg;
} }
GETSTELMODULE(StelMovementMgr)->setMovementSpeedFactor(1.0); GETSTELMODULE(StelMovementMgr)->setMovementSpeedFactor(1.0);
 End of changes. 2 change blocks. 
0 lines changed or deleted 7 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/