From 9285cf9105c9060457046b9fdd6121de000f5f67 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Fri, 19 May 2023 05:07:37 +0300 Subject: [PATCH] drop now unused scripttools component Signed-off-by: Ivailo Monev --- CMakeLists.txt | 3 +- data/scripts/advance.qs | 41 - data/scripts/backtrace.qs | 26 - data/scripts/break.qs | 59 - data/scripts/clear.qs | 59 - data/scripts/complete.qs | 14 - data/scripts/condition.qs | 52 - data/scripts/continue.qs | 22 - data/scripts/delete.qs | 36 - data/scripts/disable.qs | 56 - data/scripts/down.qs | 33 - data/scripts/enable.qs | 56 - data/scripts/eval.qs | 21 - data/scripts/finish.qs | 16 - data/scripts/frame.qs | 36 - data/scripts/help.qs | 71 - data/scripts/ignore.qs | 51 - data/scripts/info.qs | 128 - data/scripts/interrupt.qs | 14 - data/scripts/list.qs | 90 - data/scripts/next.qs | 27 - data/scripts/print.qs | 23 - data/scripts/return.qs | 20 - data/scripts/step.qs | 26 - data/scripts/tbreak.qs | 59 - data/scripts/up.qs | 37 - data/scripttools/breakpoint.png | Bin 1046 -> 0 bytes data/scripttools/breakpoint.svg | 154 - data/scripttools/closetab.png | Bin 375 -> 0 bytes data/scripttools/d_breakpoint.png | Bin 1056 -> 0 bytes data/scripttools/d_breakpoint.svg | 154 - data/scripttools/location.png | Bin 712 -> 0 bytes data/scripttools/location.svg | 121 - data/scripttools/runtocursor.png | Bin 243 -> 0 bytes data/scripttools/runtonewscript.png | Bin 534 -> 0 bytes data/scripttools/stepinto.png | Bin 278 -> 0 bytes data/scripttools/stepout.png | Bin 273 -> 0 bytes data/scripttools/stepover.png | Bin 275 -> 0 bytes package/freebsd/pkg-plist | 3 - scripts/namefsck.py | 2 - src/core/global/qglobal.cpp | 22 - src/core/global/qnamespace.h | 7 - src/core/kernel/qcoreapplication.cpp | 7 - src/scripttools/CMakeLists.txt | 197 -- .../debugging/qscriptbreakpointdata.cpp | 372 -- .../debugging/qscriptbreakpointdata_p.h | 109 - .../debugging/qscriptbreakpointsmodel.cpp | 478 --- .../debugging/qscriptbreakpointsmodel_p.h | 87 - .../debugging/qscriptbreakpointswidget.cpp | 359 -- .../debugging/qscriptbreakpointswidget_p.h | 70 - .../qscriptbreakpointswidgetinterface.cpp | 47 - .../qscriptbreakpointswidgetinterface_p.h | 72 - .../qscriptbreakpointswidgetinterface_p_p.h | 52 - .../qscriptcompletionproviderinterface_p.h | 58 - .../debugging/qscriptcompletiontask.cpp | 273 -- .../debugging/qscriptcompletiontask_p.h | 70 - .../qscriptcompletiontaskinterface.cpp | 91 - .../qscriptcompletiontaskinterface_p.h | 86 - .../qscriptcompletiontaskinterface_p_p.h | 61 - src/scripttools/debugging/qscriptdebugger.cpp | 1962 ----------- src/scripttools/debugging/qscriptdebugger_p.h | 202 -- .../debugging/qscriptdebuggeragent.cpp | 710 ---- .../debugging/qscriptdebuggeragent_p.h | 115 - .../debugging/qscriptdebuggeragent_p_p.h | 106 - .../debugging/qscriptdebuggerbackend.cpp | 972 ------ .../debugging/qscriptdebuggerbackend_p.h | 136 - .../debugging/qscriptdebuggerbackend_p_p.h | 117 - .../qscriptdebuggercodefinderwidget.cpp | 230 -- .../qscriptdebuggercodefinderwidget_p.h | 72 - ...criptdebuggercodefinderwidgetinterface.cpp | 47 - ...criptdebuggercodefinderwidgetinterface_p.h | 73 - ...iptdebuggercodefinderwidgetinterface_p_p.h | 52 - .../debugging/qscriptdebuggercodeview.cpp | 231 -- .../debugging/qscriptdebuggercodeview_p.h | 76 - .../qscriptdebuggercodeviewinterface.cpp | 47 - .../qscriptdebuggercodeviewinterface_p.h | 86 - .../qscriptdebuggercodeviewinterface_p_p.h | 52 - .../debugging/qscriptdebuggercodewidget.cpp | 285 -- .../debugging/qscriptdebuggercodewidget_p.h | 79 - .../qscriptdebuggercodewidgetinterface.cpp | 47 - .../qscriptdebuggercodewidgetinterface_p.h | 81 - .../qscriptdebuggercodewidgetinterface_p_p.h | 52 - .../debugging/qscriptdebuggercommand.cpp | 687 ---- .../debugging/qscriptdebuggercommand_p.h | 248 -- .../qscriptdebuggercommandexecutor.cpp | 492 --- .../qscriptdebuggercommandexecutor_p.h | 67 - ...scriptdebuggercommandschedulerfrontend.cpp | 300 -- ...scriptdebuggercommandschedulerfrontend_p.h | 128 - ...criptdebuggercommandschedulerinterface_p.h | 55 - .../qscriptdebuggercommandschedulerjob.cpp | 62 - .../qscriptdebuggercommandschedulerjob_p.h | 67 - .../qscriptdebuggercommandschedulerjob_p_p.h | 56 - .../debugging/qscriptdebuggerconsole.cpp | 598 ---- .../debugging/qscriptdebuggerconsole_p.h | 100 - .../qscriptdebuggerconsolecommand.cpp | 125 - .../qscriptdebuggerconsolecommand_p.h | 85 - .../qscriptdebuggerconsolecommand_p_p.h | 50 - ...qscriptdebuggerconsolecommandgroupdata.cpp | 106 - ...qscriptdebuggerconsolecommandgroupdata_p.h | 75 - .../qscriptdebuggerconsolecommandjob.cpp | 65 - .../qscriptdebuggerconsolecommandjob_p.h | 66 - .../qscriptdebuggerconsolecommandjob_p_p.h | 58 - .../qscriptdebuggerconsolecommandmanager.cpp | 224 -- .../qscriptdebuggerconsolecommandmanager_p.h | 76 - .../qscriptdebuggerconsoleglobalobject.cpp | 444 --- .../qscriptdebuggerconsoleglobalobject_p.h | 152 - ...criptdebuggerconsolehistorianinterface_p.h | 54 - .../qscriptdebuggerconsolewidget.cpp | 419 --- .../qscriptdebuggerconsolewidget_p.h | 78 - .../qscriptdebuggerconsolewidgetinterface.cpp | 75 - .../qscriptdebuggerconsolewidgetinterface_p.h | 83 - ...scriptdebuggerconsolewidgetinterface_p_p.h | 58 - .../debugging/qscriptdebuggerevent.cpp | 299 -- .../debugging/qscriptdebuggerevent_p.h | 144 - .../qscriptdebuggereventhandlerinterface_p.h | 52 - .../debugging/qscriptdebuggerfrontend.cpp | 215 -- .../debugging/qscriptdebuggerfrontend_p.h | 82 - .../debugging/qscriptdebuggerfrontend_p_p.h | 73 - .../debugging/qscriptdebuggerjob.cpp | 90 - .../debugging/qscriptdebuggerjob_p.h | 69 - .../debugging/qscriptdebuggerjob_p_p.h | 58 - .../qscriptdebuggerjobschedulerinterface_p.h | 54 - .../debugging/qscriptdebuggerlocalsmodel.cpp | 939 ----- .../debugging/qscriptdebuggerlocalsmodel_p.h | 82 - .../debugging/qscriptdebuggerlocalswidget.cpp | 388 --- .../debugging/qscriptdebuggerlocalswidget_p.h | 65 - .../qscriptdebuggerlocalswidgetinterface.cpp | 60 - .../qscriptdebuggerlocalswidgetinterface_p.h | 72 - ...qscriptdebuggerlocalswidgetinterface_p_p.h | 56 - .../qscriptdebuggerobjectsnapshotdelta_p.h | 58 - .../debugging/qscriptdebuggerresponse.cpp | 320 -- .../debugging/qscriptdebuggerresponse_p.h | 120 - ...scriptdebuggerresponsehandlerinterface_p.h | 53 - .../qscriptdebuggerscriptedconsolecommand.cpp | 408 --- .../qscriptdebuggerscriptedconsolecommand_p.h | 88 - .../debugging/qscriptdebuggerscriptsmodel.cpp | 316 -- .../debugging/qscriptdebuggerscriptsmodel_p.h | 81 - .../qscriptdebuggerscriptswidget.cpp | 134 - .../qscriptdebuggerscriptswidget_p.h | 64 - .../qscriptdebuggerscriptswidgetinterface.cpp | 47 - .../qscriptdebuggerscriptswidgetinterface_p.h | 72 - ...scriptdebuggerscriptswidgetinterface_p_p.h | 52 - .../debugging/qscriptdebuggerstackmodel.cpp | 150 - .../debugging/qscriptdebuggerstackmodel_p.h | 67 - .../debugging/qscriptdebuggerstackwidget.cpp | 122 - .../debugging/qscriptdebuggerstackwidget_p.h | 64 - .../qscriptdebuggerstackwidgetinterface.cpp | 47 - .../qscriptdebuggerstackwidgetinterface_p.h | 71 - .../qscriptdebuggerstackwidgetinterface_p_p.h | 52 - .../qscriptdebuggerstandardwidgetfactory.cpp | 89 - .../qscriptdebuggerstandardwidgetfactory_p.h | 65 - .../debugging/qscriptdebuggervalue.cpp | 385 --- .../debugging/qscriptdebuggervalue_p.h | 98 - .../qscriptdebuggervalueproperty.cpp | 212 -- .../qscriptdebuggervalueproperty_p.h | 81 - .../qscriptdebuggerwidgetfactoryinterface_p.h | 68 - .../debugging/qscriptdebugoutputwidget.cpp | 137 - .../debugging/qscriptdebugoutputwidget_p.h | 63 - .../qscriptdebugoutputwidgetinterface.cpp | 47 - .../qscriptdebugoutputwidgetinterface_p.h | 64 - .../qscriptdebugoutputwidgetinterface_p_p.h | 52 - src/scripttools/debugging/qscriptedit.cpp | 441 --- src/scripttools/debugging/qscriptedit_p.h | 112 - .../debugging/qscriptenginedebugger.cpp | 628 ---- .../debugging/qscriptenginedebugger.h | 114 - .../qscriptenginedebuggerfrontend.cpp | 316 -- .../qscriptenginedebuggerfrontend_p.h | 69 - .../debugging/qscripterrorlogwidget.cpp | 113 - .../debugging/qscripterrorlogwidget_p.h | 63 - .../qscripterrorlogwidgetinterface.cpp | 47 - .../qscripterrorlogwidgetinterface_p.h | 64 - .../qscripterrorlogwidgetinterface_p_p.h | 52 - .../qscriptmessagehandlerinterface_p.h | 55 - .../debugging/qscriptobjectsnapshot.cpp | 126 - .../debugging/qscriptobjectsnapshot_p.h | 66 - .../debugging/qscriptscriptdata.cpp | 190 - .../debugging/qscriptscriptdata_p.h | 86 - .../debugging/qscriptstdmessagehandler.cpp | 79 - .../debugging/qscriptstdmessagehandler_p.h | 65 - .../debugging/qscriptsyntaxhighlighter.cpp | 519 --- .../debugging/qscriptsyntaxhighlighter_p.h | 75 - .../qscripttooltipproviderinterface_p.h | 54 - .../debugging/qscriptvalueproperty.cpp | 140 - .../debugging/qscriptvalueproperty_p.h | 74 - .../debugging/qscriptxmlparser.cpp | 156 - .../debugging/qscriptxmlparser_p.h | 61 - src/scripttools/qscripttoolscommon_p.h | 58 - src/scripttools/qscripttoolsresources_p.h | 3056 ----------------- src/tools/qscript/CMakeLists.txt | 3 +- src/tools/qscript/qscript.1 | 5 +- src/tools/qscript/qscript.cpp | 17 +- src/tools/qscript/qscript.pod | 3 - src/tools/uic/cpp/cppwriteincludes.cpp | 1 - tests/CMakeLists.txt | 1 - translations/qt.pot | 399 +-- translations/qt_tools.pot | 2 +- 196 files changed, 83 insertions(+), 28783 deletions(-) delete mode 100644 data/scripts/advance.qs delete mode 100644 data/scripts/backtrace.qs delete mode 100644 data/scripts/break.qs delete mode 100644 data/scripts/clear.qs delete mode 100644 data/scripts/complete.qs delete mode 100644 data/scripts/condition.qs delete mode 100644 data/scripts/continue.qs delete mode 100644 data/scripts/delete.qs delete mode 100644 data/scripts/disable.qs delete mode 100644 data/scripts/down.qs delete mode 100644 data/scripts/enable.qs delete mode 100644 data/scripts/eval.qs delete mode 100644 data/scripts/finish.qs delete mode 100644 data/scripts/frame.qs delete mode 100644 data/scripts/help.qs delete mode 100644 data/scripts/ignore.qs delete mode 100644 data/scripts/info.qs delete mode 100644 data/scripts/interrupt.qs delete mode 100644 data/scripts/list.qs delete mode 100644 data/scripts/next.qs delete mode 100644 data/scripts/print.qs delete mode 100644 data/scripts/return.qs delete mode 100644 data/scripts/step.qs delete mode 100644 data/scripts/tbreak.qs delete mode 100644 data/scripts/up.qs delete mode 100644 data/scripttools/breakpoint.png delete mode 100644 data/scripttools/breakpoint.svg delete mode 100644 data/scripttools/closetab.png delete mode 100644 data/scripttools/d_breakpoint.png delete mode 100644 data/scripttools/d_breakpoint.svg delete mode 100644 data/scripttools/location.png delete mode 100644 data/scripttools/location.svg delete mode 100644 data/scripttools/runtocursor.png delete mode 100644 data/scripttools/runtonewscript.png delete mode 100644 data/scripttools/stepinto.png delete mode 100644 data/scripttools/stepout.png delete mode 100644 data/scripttools/stepover.png delete mode 100644 src/scripttools/CMakeLists.txt delete mode 100644 src/scripttools/debugging/qscriptbreakpointdata.cpp delete mode 100644 src/scripttools/debugging/qscriptbreakpointdata_p.h delete mode 100644 src/scripttools/debugging/qscriptbreakpointsmodel.cpp delete mode 100644 src/scripttools/debugging/qscriptbreakpointsmodel_p.h delete mode 100644 src/scripttools/debugging/qscriptbreakpointswidget.cpp delete mode 100644 src/scripttools/debugging/qscriptbreakpointswidget_p.h delete mode 100644 src/scripttools/debugging/qscriptbreakpointswidgetinterface.cpp delete mode 100644 src/scripttools/debugging/qscriptbreakpointswidgetinterface_p.h delete mode 100644 src/scripttools/debugging/qscriptbreakpointswidgetinterface_p_p.h delete mode 100644 src/scripttools/debugging/qscriptcompletionproviderinterface_p.h delete mode 100644 src/scripttools/debugging/qscriptcompletiontask.cpp delete mode 100644 src/scripttools/debugging/qscriptcompletiontask_p.h delete mode 100644 src/scripttools/debugging/qscriptcompletiontaskinterface.cpp delete mode 100644 src/scripttools/debugging/qscriptcompletiontaskinterface_p.h delete mode 100644 src/scripttools/debugging/qscriptcompletiontaskinterface_p_p.h delete mode 100644 src/scripttools/debugging/qscriptdebugger.cpp delete mode 100644 src/scripttools/debugging/qscriptdebugger_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggeragent.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggeragent_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggeragent_p_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerbackend.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerbackend_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerbackend_p_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggercodefinderwidget_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggercodefinderwidgetinterface.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggercodefinderwidgetinterface_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggercodefinderwidgetinterface_p_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggercodeview.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggercodeview_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggercodeviewinterface.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggercodeviewinterface_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggercodeviewinterface_p_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggercodewidget.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggercodewidget_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggercodewidgetinterface.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggercodewidgetinterface_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggercodewidgetinterface_p_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggercommand.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggercommand_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggercommandexecutor.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggercommandexecutor_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggercommandschedulerfrontend.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggercommandschedulerfrontend_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggercommandschedulerinterface_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggercommandschedulerjob.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggercommandschedulerjob_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggercommandschedulerjob_p_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerconsole.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerconsole_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerconsolecommand.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerconsolecommand_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerconsolecommand_p_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerconsolecommandgroupdata.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerconsolecommandgroupdata_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerconsolecommandjob.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerconsolecommandjob_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerconsolecommandjob_p_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerconsolecommandmanager.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerconsolecommandmanager_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerconsoleglobalobject.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerconsoleglobalobject_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerconsolehistorianinterface_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerconsolewidget.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerconsolewidget_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerconsolewidgetinterface.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerconsolewidgetinterface_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerconsolewidgetinterface_p_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerevent.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerevent_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggereventhandlerinterface_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerfrontend.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerfrontend_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerfrontend_p_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerjob.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerjob_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerjob_p_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerjobschedulerinterface_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerlocalsmodel_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerlocalswidget_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerlocalswidgetinterface.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerlocalswidgetinterface_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerlocalswidgetinterface_p_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerobjectsnapshotdelta_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerresponse.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerresponse_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerresponsehandlerinterface_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerscriptsmodel.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerscriptsmodel_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerscriptswidget.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerscriptswidget_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerscriptswidgetinterface.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerscriptswidgetinterface_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerscriptswidgetinterface_p_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerstackmodel.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerstackmodel_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerstackwidget.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerstackwidget_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerstackwidgetinterface.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerstackwidgetinterface_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerstackwidgetinterface_p_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerstandardwidgetfactory.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggerstandardwidgetfactory_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggervalue.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggervalue_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggervalueproperty.cpp delete mode 100644 src/scripttools/debugging/qscriptdebuggervalueproperty_p.h delete mode 100644 src/scripttools/debugging/qscriptdebuggerwidgetfactoryinterface_p.h delete mode 100644 src/scripttools/debugging/qscriptdebugoutputwidget.cpp delete mode 100644 src/scripttools/debugging/qscriptdebugoutputwidget_p.h delete mode 100644 src/scripttools/debugging/qscriptdebugoutputwidgetinterface.cpp delete mode 100644 src/scripttools/debugging/qscriptdebugoutputwidgetinterface_p.h delete mode 100644 src/scripttools/debugging/qscriptdebugoutputwidgetinterface_p_p.h delete mode 100644 src/scripttools/debugging/qscriptedit.cpp delete mode 100644 src/scripttools/debugging/qscriptedit_p.h delete mode 100644 src/scripttools/debugging/qscriptenginedebugger.cpp delete mode 100644 src/scripttools/debugging/qscriptenginedebugger.h delete mode 100644 src/scripttools/debugging/qscriptenginedebuggerfrontend.cpp delete mode 100644 src/scripttools/debugging/qscriptenginedebuggerfrontend_p.h delete mode 100644 src/scripttools/debugging/qscripterrorlogwidget.cpp delete mode 100644 src/scripttools/debugging/qscripterrorlogwidget_p.h delete mode 100644 src/scripttools/debugging/qscripterrorlogwidgetinterface.cpp delete mode 100644 src/scripttools/debugging/qscripterrorlogwidgetinterface_p.h delete mode 100644 src/scripttools/debugging/qscripterrorlogwidgetinterface_p_p.h delete mode 100644 src/scripttools/debugging/qscriptmessagehandlerinterface_p.h delete mode 100644 src/scripttools/debugging/qscriptobjectsnapshot.cpp delete mode 100644 src/scripttools/debugging/qscriptobjectsnapshot_p.h delete mode 100644 src/scripttools/debugging/qscriptscriptdata.cpp delete mode 100644 src/scripttools/debugging/qscriptscriptdata_p.h delete mode 100644 src/scripttools/debugging/qscriptstdmessagehandler.cpp delete mode 100644 src/scripttools/debugging/qscriptstdmessagehandler_p.h delete mode 100644 src/scripttools/debugging/qscriptsyntaxhighlighter.cpp delete mode 100644 src/scripttools/debugging/qscriptsyntaxhighlighter_p.h delete mode 100644 src/scripttools/debugging/qscripttooltipproviderinterface_p.h delete mode 100644 src/scripttools/debugging/qscriptvalueproperty.cpp delete mode 100644 src/scripttools/debugging/qscriptvalueproperty_p.h delete mode 100644 src/scripttools/debugging/qscriptxmlparser.cpp delete mode 100644 src/scripttools/debugging/qscriptxmlparser_p.h delete mode 100644 src/scripttools/qscripttoolscommon_p.h delete mode 100644 src/scripttools/qscripttoolsresources_p.h diff --git a/CMakeLists.txt b/CMakeLists.txt index eaf41e776..7a31e3c2f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,7 +97,7 @@ endif() set(KATIE_TYPE SHARED CACHE STRING "Build type") # components and tools that will be build, changed depending on the requirements availability -set(KATIE_COMPONENTS "Core Gui Declarative Network Svg Xml Script ScriptTools Test UiTools") +set(KATIE_COMPONENTS "Core Gui Declarative Network Svg Xml Script Test UiTools") set(KATIE_TOOLS "moc uic qscript qtconfig") set(KATIE_HEADERS_PATH "${CMAKE_INSTALL_FULL_INCLUDEDIR}/katie" CACHE PATH "Headers installation path") @@ -445,7 +445,6 @@ add_subdirectory(src/imports) add_subdirectory(src/network) add_subdirectory(src/plugins) add_subdirectory(src/script) -add_subdirectory(src/scripttools) add_subdirectory(src/svg) add_subdirectory(src/test) add_subdirectory(src/uitools) diff --git a/data/scripts/advance.qs b/data/scripts/advance.qs deleted file mode 100644 index 2647dc17e..000000000 --- a/data/scripts/advance.qs +++ /dev/null @@ -1,41 +0,0 @@ -name = "advance"; - -group = "running"; - -shortDescription = "Continue the program up to the given location"; - -longDescription = "This command has the same syntax as the \"break\" command."; - -seeAlso = [ "break", "tbreak" ]; - -argumentTypes = [ "script-filename" ]; - -function execute() { - if (arguments.length == 0) { - message("Missing argument(s)."); - return; - } - var arg = arguments[0]; - var colonIndex = arg.lastIndexOf(':'); - if (colonIndex == -1) { - lineNumber = parseInt(arg); - if (isNaN(lineNumber)) { - message("Location must be of the form : or ."); - return; - } - var sid = getCurrentScriptId(); - if (sid == -1) { - message("No script."); - return; - } - scheduleRunToLocation(sid, lineNumber); - } else { - fileName = arg.slice(0, colonIndex); - lineNumber = parseInt(arg.slice(colonIndex+1)); - // ### resolve the script to see if it's loaded or not? (e.g. so we can issue a warning) - scheduleRunToLocation(fileName, lineNumber); - } -} - -function handleResponse(resp) { -} diff --git a/data/scripts/backtrace.qs b/data/scripts/backtrace.qs deleted file mode 100644 index 4e959fd6b..000000000 --- a/data/scripts/backtrace.qs +++ /dev/null @@ -1,26 +0,0 @@ -name = "backtrace"; - -group = "stack"; - -shortDescription = "Print backtrace of stack frames"; - -longDescription = ""; - -aliases = [ "bt" ]; - -seeAlso = [ "frame", "info" ]; - -function execute() { - scheduleGetBacktrace(); -}; - -function handleResponse(resp) { - var strings = resp.result; - var msg = ""; - for (var i = 0; i < strings.length; ++i) { - if (i > 0) - msg += "\n"; - msg += "#" + i + " " + strings[i]; - } - message(msg); -} diff --git a/data/scripts/break.qs b/data/scripts/break.qs deleted file mode 100644 index 836368592..000000000 --- a/data/scripts/break.qs +++ /dev/null @@ -1,59 +0,0 @@ -name = "break"; - -group = "breakpoints"; - -shortDescription = "Set a breakpoint at specified location"; - -longDescription = "break : : Sets a breakpoint at the given location."; -longDescription += "\nbreak : Sets a breakpoint at the given line of the current file."; - -argumentTypes = [ "script-filename" ]; - -aliases = [ "b" ]; - -seeAlso = [ "condition", "delete", "disable", "tbreak" ]; - -function execute() { - if (arguments.length == 0) { - message("Missing argument."); - return; - } - var arg = arguments[0]; - var colonIndex = arg.lastIndexOf(':'); - if (colonIndex == -1) { - lineNumber = parseInt(arg); - if (isNaN(lineNumber)) { - message("Breakpoint location must be of the form : or ."); - return; - } - var sid = getCurrentScriptId(); - if (sid == -1) { - message("No script."); - return; - } - scheduleGetScriptData(sid); - scriptId = sid; - state = 1; - } else { - fileName = arg.slice(0, colonIndex); - lineNumber = parseInt(arg.slice(colonIndex+1)); - // ### resolve the script to see if it's loaded or not? (e.g. so we can issue a warning) - scheduleSetBreakpoint({ fileName: fileName, lineNumber: lineNumber}); - state = 2; - } -} - -function handleResponse(resp) { - if (state == 1) { - fileName = resp.result.fileName; - if (fileName.length == 0) - fileName = ""; - scheduleSetBreakpoint({ scriptId: scriptId, lineNumber: lineNumber}); - state = 2; - } else if (state == 2) { - if (resp.error == 0) { - var id = resp.result; - message("Breakpoint " + id + ": " + fileName + ", line " + lineNumber + "."); - } - } -} diff --git a/data/scripts/clear.qs b/data/scripts/clear.qs deleted file mode 100644 index 3a22587fa..000000000 --- a/data/scripts/clear.qs +++ /dev/null @@ -1,59 +0,0 @@ -name = "clear"; - -group = "breakpoints"; - -shortDescription = "Clear breakpoint at specified location"; - -longDescription = "clear : : Clear breakpoints at the given location."; -longDescription += "\nclear : Clear breakpoints at the given line of the current script."; - -seeAlso = [ "delete" ]; - -argumentTypes = [ "script-filename" ]; - -function execute() { - if (arguments.length == 0) { - message("Missing argument."); - return; - } - var arg = arguments[0]; - var colonIndex = arg.lastIndexOf(':'); - if (colonIndex == -1) { - lineNumber = parseInt(arg); - if (isNaN(lineNumber)) { - message("Breakpoint location must be of the form : or ."); - return; - } - var sid = getCurrentScriptId(); - if (sid == -1) { - message("No script."); - return; - } - scriptId = sid; - } else { - fileName = arg.slice(0, colonIndex); - lineNumber = parseInt(arg.slice(colonIndex+1)); - } - scheduleGetBreakpoints(); - state = 1; -} - -function handleResponse(resp) { - if (state == 1) { - var breakpoints = resp.result; - if (breakpoints == undefined) - return; - for (var id in breakpoints) { - var data = breakpoints[id]; - if ((data.lineNumber == lineNumber) - && (data.fileName == fileName) - || ((data.scriptId != -1) && (data.scriptId = scriptId))) { - scheduleDeleteBreakpoint(id); - message("Deleted breakpoint " + id + "."); - } - } - state = 2; - } else if (state == 2) { - - } -} diff --git a/data/scripts/complete.qs b/data/scripts/complete.qs deleted file mode 100644 index 9d6031242..000000000 --- a/data/scripts/complete.qs +++ /dev/null @@ -1,14 +0,0 @@ -name = "complete"; - -group = "void"; - -shortDescription = "List the completions for the rest of the line as a command"; - -longDescription = ""; - -function execute() { - var prefix = (arguments.length > 0) ? arguments[0] : ""; - var completions = getCommandCompletions(prefix); - for (var i = 0; i < completions.length; ++i) - message(completions[i]); -} diff --git a/data/scripts/condition.qs b/data/scripts/condition.qs deleted file mode 100644 index 9bf6ae272..000000000 --- a/data/scripts/condition.qs +++ /dev/null @@ -1,52 +0,0 @@ -name = "condition"; - -group = "breakpoints"; - -shortDescription = "Specify breakpoint condition"; - -longDescription = "condition : Specify that the breakpoint with the given id should only be triggered if the given expression evaluates to true."; - -argumentTypes = [ "breakpoint-id", "script" ]; - -seeAlso = [ "ignore" ]; - -function execute() { - if (arguments.length == 0) { - message("Missing arguments (breakpoint number and condition)."); - return; - } - var arg = arguments[0]; - var spaceIndex = arg.indexOf(' '); - if (spaceIndex == -1) - spaceIndex = arg.length; - var id = parseInt(arg.slice(0, spaceIndex)); - if (isNaN(id)) { - message("First argument must be a number (breakpoint id)."); - return; - } - var cond = arg.slice(spaceIndex+1); - if ((cond.length != 0) && !checkSyntax(cond)) { - message("The condition has a syntax error."); - return; - } - scheduleGetBreakpointData(id); - breakpointId = id; - condition = cond; - state = 1; -} - -function handleResponse(resp) { - if (state == 1) { - var data = resp.result; - if (data == undefined) { - message("No breakpoint number " + breakpointId + "."); - return; - } - data.condition = condition; - scheduleSetBreakpointData(breakpointId, data); - state = 2; - } else if (state == 2) { - if (condition.length == 0) - message("Breakpoint " + breakpointId + " now unconditional."); - } -} diff --git a/data/scripts/continue.qs b/data/scripts/continue.qs deleted file mode 100644 index a940f1362..000000000 --- a/data/scripts/continue.qs +++ /dev/null @@ -1,22 +0,0 @@ -name = "continue"; - -group = "running"; - -shortDescription = "Continue evaluation"; - -longDescription = "Evaluation will continue until an uncaught exception occurs, " -longDescription += "a breakpoint is hit or evaluation is explicitly interrupted."; - -aliases = [ "c", "fg" ]; - -seeAlso = [ "step", "interrupt" ]; - -function execute() { - scheduleContinue(); -}; - -function handleResponse(resp) { - if (!resp.async) { - message("The target is not evaluating code."); - } -} diff --git a/data/scripts/delete.qs b/data/scripts/delete.qs deleted file mode 100644 index 84497a77f..000000000 --- a/data/scripts/delete.qs +++ /dev/null @@ -1,36 +0,0 @@ -name = "delete"; - -group = "breakpoints"; - -shortDescription = "Delete breakpoint(s)"; - -longDescription = "delete : Deletes the breakpoint with the given id."; - -seeAlso = [ "clear", "disable" ]; - -function execute() { - if (arguments.length == 0) { - // delete all breakpoints - scheduleClearBreakpoints(); - state = 1; - } else { - var id = parseInt(arguments[0]); - if (isNaN(id)) { - message("Breakpoint id expected."); - return; - } - scheduleDeleteBreakpoint(id); - breakpointId = id; - state = 2; - } -} - -function handleResponse(resp) { - if (state == 1) { - } else if (state == 2) { - if (resp.error != 0) { - message("No breakpoint number " + breakpointId + "."); - return; - } - } -} diff --git a/data/scripts/disable.qs b/data/scripts/disable.qs deleted file mode 100644 index 91bf44bb4..000000000 --- a/data/scripts/disable.qs +++ /dev/null @@ -1,56 +0,0 @@ -name = "disable"; - -group = "breakpoints"; - -shortDescription = "Disable breakpoint(s)"; - -longDescription = "disable : Disables the breakpoint with the given id."; - -seeAlso = [ "enable", "delete", "ignore" ]; - -function execute() { - if (arguments.length == 0) { - // disable all breakpoints - state = 1; - scheduleGetBreakpoints(); - } else { - var id = parseInt(arguments[0]); - if (isNaN(id)) { - message("Breakpoint id expected."); - return; - } - scheduleGetBreakpointData(id); - breakpointId = id; - state = 3; - } -}; - -function handleResponse(resp) { - if (state == 1) { - var breakpoints = resp.result; - if (breakpoints == undefined) - return; - for (var id in breakpoints) { - var data = breakpoints[id]; - if (data.enabled) { - data.enabled = false; - scheduleSetBreakpointData(id, data); - } - } - state = 2; - } else if (state == 2) { - state = 0; - } else if (state == 3) { - var data = resp.result; - if (data == undefined) { - message("No breakpoint number " + breakpointId + "."); - return; - } else if (data.enabled) { - data.enabled = false; - scheduleSetBreakpointData(breakpointId, data); - state = 4; - } - } else if (state == 4) { - state = 0; - } -} diff --git a/data/scripts/down.qs b/data/scripts/down.qs deleted file mode 100644 index dc0429b5b..000000000 --- a/data/scripts/down.qs +++ /dev/null @@ -1,33 +0,0 @@ -name = "down"; - -group = "stack"; - -shortDescription = "Select and print the stack frame below the current one"; - -longDescription = ""; - -seeAlso = [ "up", "frame" ]; - -function execute() { - var idx = getCurrentFrameIndex(); - if (idx == 0) { - warning("Already at bottom (innermost) frame."); - return; - } - setCurrentFrameIndex(idx - 1); - scheduleGetContextInfo(idx - 1); - state = 1; -} - -function handleResponse(resp, id) { - if (state == 1) { - var info = resp.result; - setCurrentScriptId(info.scriptId); - setCurrentLineNumber(info.lineNumber); - scheduleGetBacktrace(); - state = 2; - } else if (state == 2) { - var backtrace = resp.result; - message("#" + getCurrentFrameIndex() + " " + backtrace[getCurrentFrameIndex()]); - } -} diff --git a/data/scripts/enable.qs b/data/scripts/enable.qs deleted file mode 100644 index 6468d0a1f..000000000 --- a/data/scripts/enable.qs +++ /dev/null @@ -1,56 +0,0 @@ -name = "enable"; - -group = "breakpoints"; - -shortDescription = "Enable breakpoint(s)"; - -longDescription = "enable : Enable the breakpoint with the given id."; - -seeAlso = [ "disable" ]; - -function execute() { - if (arguments.length == 0) { - // enable all breakpoints - state = 1; - scheduleGetBreakpoints(); - } else { - var id = parseInt(arguments[0]); - if (isNaN(id)) { - message("Breakpoint id expected."); - return; - } - scheduleGetBreakpointData(id); - breakpointId = id; - state = 3; - } -}; - -function handleResponse(resp) { - if (state == 1) { - var breakpoints = resp.result; - if (breakpoints == undefined) - return; - for (var id in breakpoints) { - var data = breakpoints[id]; - if (!data.enabled) { - data.enabled = true; - scheduleSetBreakpointData(id, data); - } - } - state = 2; - } else if (state == 2) { - state = 0; - } else if (state == 3) { - var data = resp.result; - if (data == undefined) { - message("No breakpoint number " + breakpointId + "."); - return; - } else if (!data.enabled) { - data.enabled = true; - scheduleSetBreakpointData(breakpointId, data); - state = 4; - } - } else if (state == 4) { - state = 0; - } -} diff --git a/data/scripts/eval.qs b/data/scripts/eval.qs deleted file mode 100644 index 02a1b9f9e..000000000 --- a/data/scripts/eval.qs +++ /dev/null @@ -1,21 +0,0 @@ -name = "eval"; - -group = "running"; - -shortDescription = "Evaluate program"; - -longDescription = ""; - -argumentTypes = [ "script" ]; - -function execute() { - if (arguments.length == 0) { - message("Missing argument (program)."); - return; - } - setEvaluateAction(0); - scheduleEvaluate(getCurrentFrameIndex(), arguments[0], "console input (" + Date() + ")"); -}; - -function handleResponse(resp, id) { -} diff --git a/data/scripts/finish.qs b/data/scripts/finish.qs deleted file mode 100644 index bf19fc00a..000000000 --- a/data/scripts/finish.qs +++ /dev/null @@ -1,16 +0,0 @@ -name = "finish"; - -group = "running"; - -shortDescription = "Execute until the current stack frame returns"; - -longDescription = "Upon return, the value returned is printed."; - -seeAlso = [ "next", "continue" ]; - -function execute() { - scheduleStepOut(); -}; - -function handleResponse(resp) { -} diff --git a/data/scripts/frame.qs b/data/scripts/frame.qs deleted file mode 100644 index 5dc46110c..000000000 --- a/data/scripts/frame.qs +++ /dev/null @@ -1,36 +0,0 @@ -name = "frame"; - -group = "stack"; - -shortDescription = "Select and print a stack frame"; - -longDescription = ""; - -aliases = [ "f" ]; - -function execute() { - if (arguments.length == 0) - requestedFrameIndex = getCurrentFrameIndex(); - else - requestedFrameIndex = parseInt(arguments[0]); - scheduleGetContextInfo(requestedFrameIndex); - state = 1; -}; - -function handleResponse(resp, id) { - if (state == 1) { - var info = resp.result; - if (info == undefined) { - message("Frame index out of range."); - return; - } - setCurrentFrameIndex(requestedFrameIndex); - setCurrentScriptId(info.scriptId); - setCurrentLineNumber(info.lineNumber); - scheduleGetBacktrace(); - state = 2; - } else if (state == 2) { - var backtrace = resp.result; - message("#" + getCurrentFrameIndex() + " " + backtrace[getCurrentFrameIndex()]); - } -} diff --git a/data/scripts/help.qs b/data/scripts/help.qs deleted file mode 100644 index 121db116b..000000000 --- a/data/scripts/help.qs +++ /dev/null @@ -1,71 +0,0 @@ -name = "help"; - -group = "void"; - -shortDescription = "Print list of commands"; - -longDescription = ""; - -argumentTypes = [ "command-or-group-name" ]; - -function execute() { - if (arguments.length == 0) { - var groups = getCommandGroups(); - message("List of command categories:"); - message(""); - for (var name in groups) { - if (name == "void") - continue; - var data = groups[name]; - message(name + " :: " + data.shortDescription); - } - message(""); - message("Type \"help\" followed by a category name for a list of commands in that category."); - message("Type \"help all\" for the list of all commands."); - message("Type \"help\" followed by a command name for full documentation."); - message("Command name abbreviations are allowed if they are unambiguous."); - } else { - var arg = arguments[0]; - if (arg == "all") { - var groups = getCommandGroups(); - for (var name in groups) { - if (name == "void") - continue; - message("Command category: " + name); - message(""); - var commands = getCommandsInGroup(name); - for (var i = 0; i < commands.length; ++i) { - var data = commands[i]; - message(data.name + " :: " + data.shortDescription); - } - message(""); - } - } else { - var data = findCommand(arg); - if (data != undefined) { - message(data.shortDescription + "."); - if (data.longDescription.length != 0) - message(data.longDescription); - if (data.aliases.length != 0) - message("Aliases: " + data.aliases.join(", ")); - if (data.seeAlso.length != 0) - message("See also: " + data.seeAlso.join(", ")); - } else { - data = getCommandGroups()[arg]; - if (data != undefined) { - message(data.shortDescription + "."); - message(""); - message("List of commands:"); - message(""); - var commands = getCommandsInGroup(arg); - for (var i = 0; i < commands.length; ++i) { - var data = commands[i]; - message(data.name + " :: " + data.shortDescription); - } - } else { - message("Undefined command \"" + arg + "\". Try \"help\"."); - } - } - } - } -}; diff --git a/data/scripts/ignore.qs b/data/scripts/ignore.qs deleted file mode 100644 index b625baefa..000000000 --- a/data/scripts/ignore.qs +++ /dev/null @@ -1,51 +0,0 @@ -name = "ignore"; - -group = "breakpoints"; - -shortDescription = "Set ignore-count of a breakpoint"; - -longDescription = "ignore : Ignores the breakpoint with the given id the next count times it is hit."; - -seeAlso = [ "condition" ]; - -function execute() { - if (arguments.length < 1) { - message("Missing arguments (breakpoing number and ignore-count)."); - return; - } - if (arguments.length < 2) { - message("Missing argument (ignore-count)."); - return; - } - var id = parseInt(arguments[0]); - if (isNaN(id)) { - message("First argument (breakpoint id) must be a number."); - return; - } - var count = parseInt(arguments[1]); - if (isNaN(count)) { - message("Second argument (ignore-count) must be a number."); - return; - } - scheduleGetBreakpointData(id); - breakpointId = id; - if (count < 0) - count = 0; - ignoreCount = count; - state = 1; -} - -function handleResponse(resp) { - if (state == 1) { - var data = resp.result; - if (data == undefined) { - message("No breakpoint number " + breakpointId + "."); - return; - } - data.ignoreCount = ignoreCount; - scheduleSetBreakpointData(breakpointId, data); - state = 2; - } else if (state == 2) { - message("Breakpoint " + breakpointId + " will be ignored the next " + ignoreCount + " time(s)."); - } -} diff --git a/data/scripts/info.qs b/data/scripts/info.qs deleted file mode 100644 index 2577e922b..000000000 --- a/data/scripts/info.qs +++ /dev/null @@ -1,128 +0,0 @@ -name = "info"; - -group = "status"; - -shortDescription = "Display information about something"; - -longDescription = "info scripts : Names of scripts being debugged"; -longDescription += "\ninfo breakpoints : Status of breakpoints currently set"; -longDescription += "\ninfo locals : Local variables of current stack frame"; - -argumentTypes = [ "subcommand-name" ]; - -subCommands = [ "breakpoints", "locals", "scripts" ]; - -function execute() { - var arg = arguments[0]; - if (arg == undefined) { - message("\"info\" must be followed by the name of an info command."); - return; - } else if (arg == "scripts") { - scheduleGetScripts(); - state = 1; - } else if (arg == "breakpoints") { - if (arguments.length > 1) { - var id = parseInt(arguments[1]); - if (isNaN(id)) { - message("Breakpoint id expected."); - return; - } - scheduleGetBreakpointData(id); - breakpointId = id; - state = 3; - } else { - scheduleGetBreakpoints(); - state = 2; - } - } else if (arg == "locals") { - scheduleGetActivationObject(getCurrentFrameIndex()); - state = 4; - } else { - warning("Undefined info command \"" + arg + "\". Try \"help info\"."); - } -} - -function breakpointString(id, data) { - var fn = data.fileName; - if (fn.length == 0) - fn = ""; - var ret = id + "\t" + (data.enabled ? "yes" : "no") - + "\t" + fn + ":" + data.lineNumber; - if (data.condition.length != 0) { - ret += "\n\tstop only if " + data.condition; - } - return ret; -} - -function handleResponse(resp) { - if (state == 1) { - // info scripts - var scripts = resp.result; - if (scripts == undefined) { - message("No scripts loaded."); - return; - } - for (var id in scripts) { - var fn = scripts[id].fileName; - if (fn.length == 0) - fn = ""; - message("\t" + fn); - } - } - - else if (state == 2) { - // info breakpoints - var breakpoints = resp.result; - if (breakpoints == undefined) { - message("No breakpoints set."); - return; - } - message("Id\tEnabled\tWhere"); - for (var id in breakpoints) { - var data = breakpoints[id]; - message(breakpointString(id, data)); - } - } else if (state == 3) { - // info breakpoints N - var data = resp.result; - if (data == undefined) { - message("No breakpoint number " + breakpointId + "."); - return; - } - message("Id\tEnabled\tWhere"); - message(breakpointString(breakpointId, data)); - } - - else if (state == 4) { - // info locals - var act = resp.result; - scheduleNewScriptValueIterator(act); - state = 5; - } else if (state == 5) { - var id = resp.result; - scheduleGetPropertiesByIterator(id, 100); - iteratorId = id; - state = 6; - } else if (state == 6) { - var props = resp.result; - if (props.length == 0) { - scheduleDeleteScriptValueIterator(iteratorId); - state = 7; - return; - } - var maxLength = 0; - for (var i = 0; i < props.length; ++i) - maxLength = Math.max(props[i].name.length, maxLength); - for (var i = 0; i < props.length; ++i) { - var prop = props[i]; - var msg = prop.name; - var pad = maxLength - prop.name.length; - for (var j = 0; j < pad; ++j) - msg += ' '; - message(msg + " : " + prop.valueAsString); - } - scheduleGetPropertiesByIterator(iteratorId, 100); - } else if (state == 7) { - // done - } -} diff --git a/data/scripts/interrupt.qs b/data/scripts/interrupt.qs deleted file mode 100644 index d4b66ccd9..000000000 --- a/data/scripts/interrupt.qs +++ /dev/null @@ -1,14 +0,0 @@ -name = "interrupt"; - -group = "running"; - -shortDescription = "Interrupt evaluation"; - -longDescription = "Interruption will occur as soon as a new script statement is reached."; - -function execute() { - scheduleInterrupt(); -} - -function handleResponse(resp) { -} diff --git a/data/scripts/list.qs b/data/scripts/list.qs deleted file mode 100644 index 312b123d5..000000000 --- a/data/scripts/list.qs +++ /dev/null @@ -1,90 +0,0 @@ -name = "list"; - -group = "files"; - -shortDescription = "List lines of a script"; - -longDescription = "list : : Lists lines around the given location."; -longDescription += "\nlist : Lists lines in the current file."; - -argumentTypes = [ "script-filename" ]; - -listLineNumber = 1; -listScriptId = -1; -lastSessionId = -1; -lastFrameIndex = -1; - -function execute() { - state = 0; - if (arguments.length > 0) { - var arg = arguments[0]; - var colonIndex = arg.lastIndexOf(':'); - var fileName; - var lineNumber; - if (colonIndex == -1) { - lineNumber = parseInt(arg); - if (isNaN(lineNumber)) { - fileName = arg; - lineNumber = 1; - } - } else if (colonIndex == 0) { - fileName = arg; - lineNumber = 1; - } else { - fileName = arg.slice(0, colonIndex); - lineNumber = parseInt(arg.slice(colonIndex+1)); - } - listLineNumber = Math.max(lineNumber, 1); - if (fileName != undefined) { - scheduleResolveScript(fileName); - state = 1; - } else { - setCurrentLineNumber(listLineNumber); - execute(); - } - } else { - if ((getSessionId() != lastSessionId) - || (getCurrentFrameIndex() != lastFrameIndex) - || (listScriptId == -1)) { - listScriptId = getCurrentScriptId(); - listLineNumber = getCurrentLineNumber(); - lastSessionId = getSessionId(); - lastFrameIndex = getCurrentFrameIndex(); - } - scheduleGetScriptData(listScriptId); - state = 2; - } -}; - -function handleResponse(resp) { - if (state == 1) { - var id = resp.result; - if (id == -1) { - message("That script isn't loaded."); - state = 0; - return; - } - listScriptId = id; - scheduleGetScriptData(listScriptId); - state = 2; - } else if (state == 2) { - var data = resp.result; - if (data == undefined) { - message("No script."); - state = 0; - return; - } - var base = data.baseLineNumber; - var lines = data.contents.split('\n'); - var start = Math.max(listLineNumber - 5, base); - for (var i = start; i < start + 10; ++i) { - var ln = lines[i - base]; - var msg = String(i); - if (ln != undefined) - msg += "\t" + ln; - message(msg); - } - listLineNumber += 10; - state = 0; - } -} diff --git a/data/scripts/next.qs b/data/scripts/next.qs deleted file mode 100644 index bc37a012f..000000000 --- a/data/scripts/next.qs +++ /dev/null @@ -1,27 +0,0 @@ -name = "next"; - -group = "running"; - -shortDescription = "Step program, proceeding through subroutine calls"; - -longDescription = "Like the \"step\" command as long as subroutine calls do not happen;"; -longDescription += "\nwhen they do, the call is treated as one instruction."; -longDescription += "\nIf a number N is given as argument, this will be done N times before execution is stopped."; -aliases = [ "n" ]; - -seeAlso = [ "step", "continue", "finish", "advance" ]; - -function execute() { - var count = 1; - if (arguments.length != 0) { - var arg = arguments[0]; - // ### evaluate the expression in the current frame? - var num = parseInt(arg); - if (!isNaN(num) && (num >= 1)) - count = num; - } - scheduleStepOver(count); -}; - -function handleResponse(resp) { -} diff --git a/data/scripts/print.qs b/data/scripts/print.qs deleted file mode 100644 index 9b98d169f..000000000 --- a/data/scripts/print.qs +++ /dev/null @@ -1,23 +0,0 @@ -// ### exactly the same as eval, but provided for convenience - -name = "print"; - -group = "status"; - -shortDescription = "Print value of an expression"; - -longDescription = ""; - -argumentTypes = [ "script" ]; - -function execute() { - if (arguments.length == 0) { - message("Missing argument (expression)."); - return; - } - setEvaluateAction(0); - scheduleEvaluate(getCurrentFrameIndex(), arguments[0], "console input (" + Date() + ")"); -}; - -function handleResponse(resp, id) { -} diff --git a/data/scripts/return.qs b/data/scripts/return.qs deleted file mode 100644 index 372c818d1..000000000 --- a/data/scripts/return.qs +++ /dev/null @@ -1,20 +0,0 @@ -name = "return"; - -group = "running"; - -shortDescription = "Make selected stack frame return to its caller"; - -longDescription = ""; - -argumentTypes = [ "script" ]; - -function execute() { - // TODO: - // 1. schedule evaluate of the expression. - // 2. install event handler/filter, so that we're notified when the evaluate is done. - // - what if another event occurs while we evaluate? (e.g. an exception or breakpoint) - // - the event filter needs to uninstall itself, or the event needs to be consumed internally - // 3. in the event handler, schedule forced return with the result as argument. - setEvaluateAction(1); - scheduleEvaluate(getCurrentFrameIndex(), arguments[0], "console input (" + Date() + ")"); -}; diff --git a/data/scripts/step.qs b/data/scripts/step.qs deleted file mode 100644 index 1aacec029..000000000 --- a/data/scripts/step.qs +++ /dev/null @@ -1,26 +0,0 @@ -name = "step"; - -group = "running"; - -shortDescription = "Step program until a new statement is reached"; - -longDescription = "If a number N is given as argument, this will be done N times before execution is stopped."; - -aliases = [ "s" ]; - -seeAlso = [ "next" ]; - -function execute() { - var count = 1; - if (arguments.length != 0) { - var arg = arguments[0]; - // ### evaluate the expression in the current frame? - var num = parseInt(arg); - if (!isNaN(num) && (num >= 1)) - count = num; - } - scheduleStepInto(count); -}; - -function handleResponse(resp) { -} diff --git a/data/scripts/tbreak.qs b/data/scripts/tbreak.qs deleted file mode 100644 index 66a8224df..000000000 --- a/data/scripts/tbreak.qs +++ /dev/null @@ -1,59 +0,0 @@ -name = "tbreak"; - -group = "breakpoints"; - -shortDescription = "Set a temporary breakpoint"; - -longDescription = "The same as the \"break\" command, except that the breakpoint is automatically deleted as soon as it is triggered."; - -seeAlso = [ "break", "ignore" ]; - -argumentTypes = [ "script-filename" ]; - -// ### merge with break.qs: only difference is the "singleShot: true" in call to scheduleSetBreakpoint() -// ### maybe an include() function so commands can share code? - -function execute() { - if (arguments.length == 0) { - message("Missing argument."); - return; - } - var arg = arguments[0]; - var colonIndex = arg.lastIndexOf(':'); - if (colonIndex == -1) { - lineNumber = parseInt(arg); - if (isNaN(lineNumber)) { - message("Breakpoint location must be of the form : or ."); - return; - } - var sid = getCurrentScriptId(); - if (sid == -1) { - message("No script."); - return; - } - scheduleGetScriptData(sid); - scriptId = sid; - state = 1; - } else { - fileName = arg.slice(0, colonIndex); - lineNumber = parseInt(arg.slice(colonIndex+1)); - // ### resolve the script to see if it's loaded or not? (e.g. so we can issue a warning) - scheduleSetBreakpoint({ fileName: fileName, lineNumber: lineNumber, singleShot: true }); - state = 2; - } -} - -function handleResponse(resp) { - if (state == 1) { - fileName = resp.result.fileName; - if (fileName.length == 0) - fileName = ""; - scheduleSetBreakpoint({ scriptId: scriptId, lineNumber: lineNumber, singleShot: true }); - state = 2; - } else if (state == 2) { - if (resp.error == 0) { - var id = resp.result; - message("Breakpoint " + id + ": " + fileName + ", line " + lineNumber + "."); - } - } -} diff --git a/data/scripts/up.qs b/data/scripts/up.qs deleted file mode 100644 index 2d49df3b9..000000000 --- a/data/scripts/up.qs +++ /dev/null @@ -1,37 +0,0 @@ -name = "up"; - -group = "stack"; - -shortDescription = "Select and print the stack frame above the current one"; - -longDescription = ""; - -seeAlso = [ "down", "frame" ]; - -function execute() { - scheduleGetContextCount(); - state = 1; -} - -function handleResponse(resp) { - if (state == 1) { - var count = resp.result; - var idx = getCurrentFrameIndex() + 1; - if (idx == count) { - warning("Already at top (outermost) frame."); - return; - } - setCurrentFrameIndex(idx); - scheduleGetContextInfo(idx); - state = 2; - } else if (state == 2) { - var info = resp.result; - setCurrentScriptId(info.scriptId); - setCurrentLineNumber(info.lineNumber); - scheduleGetBacktrace(); - state = 3; - } else if (state == 3) { - var backtrace = resp.result; - message("#" + getCurrentFrameIndex() + " " + backtrace[getCurrentFrameIndex()]); - } -} diff --git a/data/scripttools/breakpoint.png b/data/scripttools/breakpoint.png deleted file mode 100644 index 21c4376a8ba7712f72d50a21bb884a2f2865be15..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1046 zcmV+x1nK*UP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01ejw01ejxLMWSf00007bV*G`2iON5 z4GRFCZp4&ACeXTni#uP{0Jws+#hNmDHPX}i50t*zZenWScQ27OOqEai0>S(-OkkMWa@Sgs?))>+vuGgUO0D7>1y@m z6h7bIu?8@(q&!c?j~`b#P`X`QuZIf)q}M}&02c(=XWcHc3paxS)iY-R7V7X?4)*GB zR$#6+J&kKNaitRYKFaf;P{=INde;d7YavY`Nsu%};+XNVF*?RLv33#o0Kfy@*Gjp{ z(W5%OcMm;2jw+XtViD#0pfwnC04!+=ag4+<_Q3-bFjlLX{?^tzD^NNQkyh}QU#Vza zC?Ii6a`!H_)5(5z5FlZgX)r+gePm~6WQ%?H5c}v6${5PkDgt9An9Dn!HhE`SBT0hW z*g#KAK&1ku65{))-8G40Bn-1dgCI+c)_BEY9<%8jT-I8TB9-S)(iEZyL{QEl#$?bq zMutOh?m!er_WT1HcpbH44KQvDS=kJeM(` z6q0x6Ty{vBX0mpqVZRSR0e;In{>~+di94MUaOCB1m?^g)w;@-OWP7Y7Y_*(%TQl%y z4*mw{wb$20k|f(0$61^PgG^Dh_na#~C`ssVZW4!~cJSrs&D$M)pG3W$>aDM5U)~Q2 z!z^a|V;4n86hRzggMe0}VSz>gzRJM{;3N2X2=@idQV6jUkO=hW$QatL5S_)Cw9FKAeZue;o9A zt-`As78P6+7(28q3T^>k82EYyl7IaNIb17Hs=(_GPAMn?O#{E@k@{ci2`KA<5Knsl QM*si-07*qoM6N<$g7l!* - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/data/scripttools/closetab.png b/data/scripttools/closetab.png deleted file mode 100644 index ef9e02086c67814fd00c89620fd0d981b997e6cc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 375 zcmV--0f_#IP)fruJ3jc8<|8pe&b0zCL@6z2E5pzd+(iAlUs$!iqI4S^6p4AC9Nf@vzUPSy(P~ z1SuhEk+Uxp0002ovPDHLkV1ikVxH|v< diff --git a/data/scripttools/d_breakpoint.png b/data/scripttools/d_breakpoint.png deleted file mode 100644 index 867b30dbbb86f48b73917921bb91d01ea91f5f61..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1056 zcmV+*1mF9KP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01ejw01ejxLMWSf00007bV*G`2iON5 z4Gjc}MB!Ng00W>&L_t(I%f*#JXk1kkhQD*~n>Ul0gtlTVl~zItnUrclBpS54h;Bp? z1t~NLZrpZNsvEOv<01$Z5nZ?!bYXB;EZr!@60DX$DJjNg(MFTdX8LC4-S_T2F5b*! zCK|i+!Qnmbz2`swIp@FU341*A6B8#9c`F_nd9}2E|BO=M75fT2*|G3s-TLha_{O@Ru>n4%+vJE4_8+H`d8rd_4=9G!GoXF zXJ@hHG8j{U?g5M{gutKIuIZgimzLAv;TPtXmYUsT5y1T9z{t^~Vyo4s%SrM%@NO5_0B8sc29!9Kw9%m5XplAQG{3v)*>Co+DTu% z2k#-z(JUitw*i8xo(0|kh*aclAV?gW?X@*bwTi?s(hXqkPFX@IfU^wkfVS4x@v300 z74Ki08yl<4t**8sRA0szgSF&Y#)GvrDx;&Ap&_JHf>NnqE>bYfbI3B(Io$pGv^O>o zW6&r9@2llXWg55=0f+k=l{-gsYYSVeVXIZ7T!uIoWd@5S~QU_MAfKbsdp{U8i}PWks;A^$`HT+F!dm{tmD>Hz1*&Iftg{j%67* z2U%7G&hxHc5Y_AFmY44UnAH1kRCQaOQ_XX<({*+Ow%a@3-8y&9YnpN z02ju`pVcTjE2^&p)m__)>UA;ZivzXVSN-Wf61bPa*jS}fDm{-ePX#C=vTm&Xtt+Yj a<@p2?F0000 - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/data/scripttools/location.png b/data/scripttools/location.png deleted file mode 100644 index 0d49b1a04417a0eac168a36453be3f1ba207f2c7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 712 zcmV;(0yq7MP)Px#32;bRa{vGh*8l(w*8xH(n|J^K0Z>p(R7Ff_aj}XT zzkmR+j2N+t8?uWVwvrODiyO3$9=4Jov5OnAkQTFx8?%5Kv5OqAiyEpRj2yF$AiSJBvyUCJiyEY)v5Oq#*{-yY zAF+!Yv5Oq8ix;tr9JiAzvyL3GiyX0w8?cHRv5OkAjUcp<9`Wj*)v0qRp4!4f>fCPf?!C&eWVMhc_4B^*?8)27 zmFU@D%B(xPm@LYyN#)g0@8*%Vk|5*JLFwLW?c;;%;C1QUY3ST#>E3F_s4LjTZn%{% zw|TC%Tz8>fm$5s4AOcNJRhu05Nn@PE!D+1S*z74!a`#qZc^}iiqz02QhvT z=hfo={rgf#{+a%g-2VLjoEGBk8(ghdxc&Wmrgb3z006{EL_t&-(_>(uD$v!!D$Ek9 zjZK)*Dnv&ei)yQITTK}lj{^quY{P<;UAaUd!a1fe5Mg8EX74B_3l`3{GJydL3kwG) zIZ1gopm1)MAqog^_mE&^V93nKOG`~jOiqe3g92|KKRyQId~*m$h>Z+#wzl^2RPYsG zW-v}SLIM6#(jrU@493Qs5MU5*X=xegVk|BUatS*O7#rK!MX3n#3!(YaI40Uyi3h{; u#`>y?yqG~{tig&cVAa^L1uQoaQ3U|RwkT|x#;@c60000 - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/data/scripttools/runtocursor.png b/data/scripttools/runtocursor.png deleted file mode 100644 index e82656a0d2303260797bb919422a678ec3a09838..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 243 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@I3?$8F6>NS%G}U;vjb? zhIQv;UIICs1s;*b3=G`DAk4@xYmNj^P%*$K#MLLW5Xi&@{{R2KZ`O`9pfqPmkY6x^ zBnvZ#pco^!&Y#sfKtVT87sn8Z%gG4}QU&Lp%&}xV7H3*4I>)wHG)6|lu#vI(Z0DJI z45{Z?7*oEnw9J|rab@w$!wr*r-^hiOE8XE|73)-dB_PJoqNU2>!nI@q$Q7QhelF{r G5}E*un>-x= diff --git a/data/scripttools/runtonewscript.png b/data/scripttools/runtonewscript.png deleted file mode 100644 index fb5fe5a7d759effeffd2d8fe67a8ca4127a90c88..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 534 zcmV+x0_pvUP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iOM@ z3@#}sldvoR000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}0004TNklY$|u$%SO%2cGSMued({QFcaOai zy;+Y%xS;Y-A?$|?h6Co4xmhmmbvcVhqp@+lqdKbf+De~CGr-dfXY zwaRolC7MNPWzWD6_(<=c=npm>dzFgcfEI8A6pbkYlz>xh{|QjoQ_6zgBR~SofI0B> Y16h9Mk$u*ltpET307*qoM6N<$f_%u>b^rhX diff --git a/data/scripttools/stepinto.png b/data/scripttools/stepinto.png deleted file mode 100644 index 6a9a4118a2ec09eb0086d1e650b5acdc362f8ae5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 278 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@I3?$8F6>NS%G}U;vjb? zhIQv;UIICs1s;*b3=G`DAk4@xYmNj^P(8pW#MLLW5Xi&>{yzapPIC`i3Z%G8g8YIR z7@1fEc{wDR#kg&4-kk;tCwjU#hDcm4J-=7*fC2|wz=az-eWsl#h*UToapQErC&zOM zf?PG_e`JLIwsyF9>wG<5s=cOeGjDI&vF0VSt>&17=1TOQjj)O;3*REPy;t_gX;lmM mVuM`2_g`NS%G}U;vjb? zhIQv;UIICs1s;*b3=G`DAk4@xYmNj^P(8pW#MLLW5Xi&>{yzapPIC`i3Z%G8g8YIR z7@1fEc{wDR#kg&4-kk;t$9TFphDcnFJ$F#B!GMFs!Q+d&u~}lFS%TrmgYjKllXwK) zZ!JEY%4Faypjg()!Jc~U*2L=@zs{9gb#mGJNS%G}U;vjb? zhIQv;UIICs1s;*b3=G`DAk4@xYmNj^P(8pW#MLLW5Xi(2{y$;Rj-3b8&%j+02%J*zS>+pu-(mK)cS-DKIqxQnhondEbF j#u|GQzmvstem{F98muF+Xomj-kSjf1{an^LB{Ts5G#5-; diff --git a/package/freebsd/pkg-plist b/package/freebsd/pkg-plist index f5f6350b8..b5cbf7020 100644 --- a/package/freebsd/pkg-plist +++ b/package/freebsd/pkg-plist @@ -943,9 +943,6 @@ include/katie/QtScript/qscriptprogram.h include/katie/QtScript/qscriptstring.h include/katie/QtScript/qscriptvalue.h include/katie/QtScript/qscriptvalueiterator.h -include/katie/QtScriptTools/QScriptEngineDebugger -include/katie/QtScriptTools/QtScriptTools -include/katie/QtScriptTools/qscriptenginedebugger.h include/katie/QtSvg/QSvgRenderer include/katie/QtSvg/QtSvg include/katie/QtSvg/qsvgrenderer.h diff --git a/scripts/namefsck.py b/scripts/namefsck.py index cd356b42e..ddff1bdb0 100755 --- a/scripts/namefsck.py +++ b/scripts/namefsck.py @@ -393,7 +393,6 @@ classlist = [ "QScriptContextInfoList", "QScriptEngine", "QScriptEngineAgent", - "QScriptEngineDebugger", "QScriptExtensionInterface", "QScriptExtensionPlugin", "QScriptProgram", @@ -666,7 +665,6 @@ classlist = [ "QtPlugin", "QtPluginInstanceFunction", "QtScript", - "QtScriptTools", "QtSvg", "QtTest", "QtTestGui", diff --git a/src/core/global/qglobal.cpp b/src/core/global/qglobal.cpp index eb567d8cc..c54d668ab 100644 --- a/src/core/global/qglobal.cpp +++ b/src/core/global/qglobal.cpp @@ -1621,28 +1621,6 @@ int qrand() with meaningful parameter names in their signatures. */ -Q_GLOBAL_STATIC(QStdVector, qGlobalCallbacks) - -void QInternal::registerCallback(qInternalCallback callback) -{ - qGlobalCallbacks()->append(callback); -} - -void QInternal::unregisterCallback(qInternalCallback callback) -{ - qGlobalCallbacks()->removeAll(callback); -} - -bool QInternal::activateCallbacks(void **parameters) -{ - QStdVector *callbacks = qGlobalCallbacks(); - bool ret = false; - for (int i = 0; i < callbacks->size(); i++) { - ret |= (callbacks->at(i))(parameters); - } - return ret; -} - /*! \macro Q_BYTE_ORDER \relates diff --git a/src/core/global/qnamespace.h b/src/core/global/qnamespace.h index bbdbc153a..394056c95 100644 --- a/src/core/global/qnamespace.h +++ b/src/core/global/qnamespace.h @@ -1106,8 +1106,6 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::ItemFlags) Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::MatchFlags) Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::TextInteractionFlags) -typedef bool (*qInternalCallback)(void **); - class Q_CORE_EXPORT QInternal { public: enum PaintDeviceFlags { @@ -1125,11 +1123,6 @@ public: BottomDock, DockCount }; - - static void registerCallback(qInternalCallback); - static void unregisterCallback(qInternalCallback); - - static bool activateCallbacks(void **); }; QT_END_NAMESPACE diff --git a/src/core/kernel/qcoreapplication.cpp b/src/core/kernel/qcoreapplication.cpp index d441fdec7..8a2e98a62 100644 --- a/src/core/kernel/qcoreapplication.cpp +++ b/src/core/kernel/qcoreapplication.cpp @@ -419,13 +419,6 @@ bool QCoreApplication::testAttribute(Qt::ApplicationAttribute attribute) */ bool QCoreApplication::notifyInternal(QObject *receiver, QEvent *event) { - // only script debugger uses the callbacks - bool result = false; - void *cbdata[] = { receiver, event, &result }; - if (Q_UNLIKELY(QInternal::activateCallbacks(cbdata))) { - return result; - } - // Qt enforces the rule that events can only be sent to objects in // the current thread, so receiver->d_func()->threadData is // equivalent to QThreadData::current(), just without the function diff --git a/src/scripttools/CMakeLists.txt b/src/scripttools/CMakeLists.txt deleted file mode 100644 index 143d21b7a..000000000 --- a/src/scripttools/CMakeLists.txt +++ /dev/null @@ -1,197 +0,0 @@ -# add_definitions() -set(EXTRA_SCRIPTTOOLS_LIBS - KtCore KtXml KtGui KtScript -) - -set(SCRIPTTOOLS_PUBLIC_HEADERS - QScriptEngineDebugger -) - -include_directories( - ${CMAKE_BINARY_DIR}/include - ${CMAKE_BINARY_DIR}/privateinclude - ${CMAKE_BINARY_DIR}/include/QtCore - ${CMAKE_BINARY_DIR}/include/QtGui - ${CMAKE_BINARY_DIR}/include/QtScript - ${CMAKE_BINARY_DIR}/include/QtScriptTools -) - -set(SCRIPTTOOLS_HEADERS - ${SCRIPTTOOLS_HEADERS} - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggervalue_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggervalueproperty_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerobjectsnapshotdelta_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercommand_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercommandschedulerinterface_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercommandschedulerfrontend_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerresponse_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerresponsehandlerinterface_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerevent_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercommandexecutor_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerbackend_p_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerbackend_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggeragent_p_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggeragent_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerfrontend_p_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerfrontend_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptmessagehandlerinterface_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptstdmessagehandler_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptenginedebuggerfrontend_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerjob_p_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerjob_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercommandschedulerjob_p_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercommandschedulerjob_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerjobschedulerinterface_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggereventhandlerinterface_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptvalueproperty_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptobjectsnapshot_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptscriptdata_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptxmlparser_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptbreakpointdata_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebugger_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerconsole_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerconsolecommand_p_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerconsolecommand_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerconsolecommandjob_p_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerconsolecommandjob_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerconsolecommandgroupdata_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerconsolecommandmanager_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerconsolehistorianinterface_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptcompletionproviderinterface_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptcompletiontaskinterface_p_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptcompletiontaskinterface_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptcompletiontask_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscripttooltipproviderinterface_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerconsoleglobalobject_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerscriptedconsolecommand_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerconsolewidgetinterface_p_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerconsolewidgetinterface_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerconsolewidget_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerstackwidgetinterface_p_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerstackwidgetinterface_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerstackwidget_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerstackmodel_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerscriptswidgetinterface_p_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerscriptswidgetinterface_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerscriptswidget_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerscriptsmodel_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerlocalswidgetinterface_p_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerlocalswidgetinterface_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerlocalswidget_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerlocalsmodel_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercodewidgetinterface_p_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercodewidgetinterface_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercodewidget_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercodeviewinterface_p_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercodeviewinterface_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercodeview_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercodefinderwidgetinterface_p_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercodefinderwidgetinterface_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercodefinderwidget_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebugoutputwidgetinterface_p_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebugoutputwidgetinterface_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebugoutputwidget_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptbreakpointswidgetinterface_p_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptbreakpointswidgetinterface_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptbreakpointswidget_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptbreakpointsmodel_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscripterrorlogwidgetinterface_p_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscripterrorlogwidgetinterface_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscripterrorlogwidget_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerwidgetfactoryinterface_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerstandardwidgetfactory_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptedit_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptsyntaxhighlighter_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptenginedebugger.h - ${CMAKE_CURRENT_SOURCE_DIR}/qscripttoolscommon_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/qscripttoolsresources_p.h -) - -set(SCRIPTTOOLS_SOURCES - ${SCRIPTTOOLS_SOURCES} - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggervalue.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggervalueproperty.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercommand.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerresponse.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerevent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercommandexecutor.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercommandschedulerfrontend.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerbackend.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggeragent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerfrontend.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptstdmessagehandler.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptenginedebuggerfrontend.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerjob.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercommandschedulerjob.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptvalueproperty.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptobjectsnapshot.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptscriptdata.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptxmlparser.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptbreakpointdata.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebugger.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerconsole.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerconsolecommand.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerconsolecommandjob.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerconsolecommandgroupdata.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerconsolecommandmanager.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptcompletiontaskinterface.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptcompletiontask.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerconsoleglobalobject.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerscriptedconsolecommand.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerconsolewidgetinterface.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerconsolewidget.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerstackwidgetinterface.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerstackwidget.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerstackmodel.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerscriptswidgetinterface.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerscriptswidget.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerscriptsmodel.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerlocalswidgetinterface.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerlocalswidget.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerlocalsmodel.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercodewidgetinterface.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercodewidget.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercodeviewinterface.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercodeview.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercodefinderwidgetinterface.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggercodefinderwidget.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebugoutputwidgetinterface.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebugoutputwidget.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptbreakpointswidgetinterface.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptbreakpointswidget.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptbreakpointsmodel.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscripterrorlogwidgetinterface.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscripterrorlogwidget.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptdebuggerstandardwidgetfactory.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptedit.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptsyntaxhighlighter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debugging/qscriptenginedebugger.cpp -) - -katie_generate_misc("${SCRIPTTOOLS_HEADERS}" QtScriptTools) -katie_generate_public("${SCRIPTTOOLS_PUBLIC_HEADERS}" QtScriptTools) -katie_generate_package(KtScriptTools "KtCore KtXml KtGui KtScript") -katie_setup_target(KtScriptTools ${SCRIPTTOOLS_SOURCES} ${SCRIPTTOOLS_HEADERS}) - -add_library(KtScriptTools ${KATIE_TYPE} ${KtScriptTools_SOURCES}) -target_link_libraries(KtScriptTools PRIVATE ${EXTRA_SCRIPTTOOLS_LIBS}) -set_target_properties(KtScriptTools PROPERTIES - VERSION ${KATIE_MAJOR}.${KATIE_MINOR} - SOVERSION ${KATIE_VERSION} - EXPORT_NAME ScriptTools -) - -install( - TARGETS KtScriptTools - EXPORT KatieTargets - DESTINATION ${KATIE_LIBRARIES_PATH} - COMPONENT Runtime -) - -install( - DIRECTORY ${CMAKE_BINARY_DIR}/include/QtScriptTools - DESTINATION ${KATIE_HEADERS_PATH} - COMPONENT Devel -) - -katie_optimize_headers(${KATIE_HEADERS_PATH}/QtScriptTools) diff --git a/src/scripttools/debugging/qscriptbreakpointdata.cpp b/src/scripttools/debugging/qscriptbreakpointdata.cpp deleted file mode 100644 index 4597c12d6..000000000 --- a/src/scripttools/debugging/qscriptbreakpointdata.cpp +++ /dev/null @@ -1,372 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptbreakpointdata_p.h" - -#include -#include -#include - -QT_BEGIN_NAMESPACE - -/*! - \since 4.5 - \class QScriptBreakpointData - \internal - - \brief The QScriptBreakpointData class contains data associated with a breakpoint. -*/ - -class QScriptBreakpointDataPrivate -{ -public: - QScriptBreakpointDataPrivate(); - ~QScriptBreakpointDataPrivate(); - - void init(int ln); - - qint64 scriptId; - QString fileName; - int lineNumber; - bool enabled; - bool singleShot; - int ignoreCount; - QString condition; - QVariant data; - int hitCount; -}; - -QScriptBreakpointDataPrivate::QScriptBreakpointDataPrivate() -{ -} - -QScriptBreakpointDataPrivate::~QScriptBreakpointDataPrivate() -{ -} - -void QScriptBreakpointDataPrivate::init(int ln) -{ - scriptId = -1; - lineNumber = ln; - enabled = true; - singleShot = false; - ignoreCount = 0; - hitCount = 0; -} - -/*! - Constructs an empty QScriptBreakpointData. -*/ -QScriptBreakpointData::QScriptBreakpointData() - : d_ptr(new QScriptBreakpointDataPrivate) -{ - d_ptr->init(/*lineNumber=*/-1); -} - -/*! - Constructs a QScriptBreakpointData with the given \a lineNumber. -*/ -QScriptBreakpointData::QScriptBreakpointData(qint64 scriptId, int lineNumber) - : d_ptr(new QScriptBreakpointDataPrivate) -{ - d_ptr->init(lineNumber); - d_ptr->scriptId = scriptId; -} - -/*! - Constructs a QScriptBreakpointData with the given \a lineNumber. -*/ -QScriptBreakpointData::QScriptBreakpointData(const QString &fileName, int lineNumber) - : d_ptr(new QScriptBreakpointDataPrivate) -{ - d_ptr->init(lineNumber); - d_ptr->fileName = fileName; -} - -/*! - Constructs a QScriptBreakpointData that is a copy of \a other. -*/ -QScriptBreakpointData::QScriptBreakpointData(const QScriptBreakpointData &other) - : d_ptr(new QScriptBreakpointDataPrivate) -{ - Q_ASSERT(other.d_ptr != 0); - *d_ptr = *other.d_ptr; -} - -/*! - Destroys this QScriptBreakpointData. -*/ -QScriptBreakpointData::~QScriptBreakpointData() -{ -} - -/*! - Assigns \a other to this QScriptBreakpointData. -*/ -QScriptBreakpointData &QScriptBreakpointData::operator=(const QScriptBreakpointData &other) -{ - Q_ASSERT(d_ptr != 0); - Q_ASSERT(other.d_ptr != 0); - *d_ptr = *other.d_ptr; - return *this; -} - -qint64 QScriptBreakpointData::scriptId() const -{ - Q_D(const QScriptBreakpointData); - return d->scriptId; -} - -void QScriptBreakpointData::setScriptId(qint64 id) -{ - Q_D(QScriptBreakpointData); - d->scriptId = id; -} - -QString QScriptBreakpointData::fileName() const -{ - Q_D(const QScriptBreakpointData); - return d->fileName; -} - -void QScriptBreakpointData::setFileName(const QString &fileName) -{ - Q_D(QScriptBreakpointData); - d->fileName = fileName; -} - -/*! - Returns the breakpoint line number. -*/ -int QScriptBreakpointData::lineNumber() const -{ - Q_D(const QScriptBreakpointData); - return d->lineNumber; -} - -/*! - Sets the breakpoint line number to \a lineNumber. -*/ -void QScriptBreakpointData::setLineNumber(int lineNumber) -{ - Q_D(QScriptBreakpointData); - d->lineNumber = lineNumber; -} - -/*! - Returns true if the breakpoint is enabled, false otherwise. -*/ -bool QScriptBreakpointData::isEnabled() const -{ - Q_D(const QScriptBreakpointData); - return d->enabled; -} - -/*! - Sets the \a enabled state of the breakpoint. -*/ -void QScriptBreakpointData::setEnabled(bool enabled) -{ - Q_D(QScriptBreakpointData); - d->enabled = enabled; -} - -/*! - Returns true if the breakpoint is single-shot, false otherwise. -*/ -bool QScriptBreakpointData::isSingleShot() const -{ - Q_D(const QScriptBreakpointData); - return d->singleShot; -} - -/*! - Sets the \a singleShot state of the breakpoint. -*/ -void QScriptBreakpointData::setSingleShot(bool singleShot) -{ - Q_D(QScriptBreakpointData); - d->singleShot = singleShot; -} - -/*! - Returns the ignore count of the breakpoint. -*/ -int QScriptBreakpointData::ignoreCount() const -{ - Q_D(const QScriptBreakpointData); - return d->ignoreCount; -} - -/*! - Sets the ignore \a count of the breakpoint. -*/ -void QScriptBreakpointData::setIgnoreCount(int count) -{ - Q_D(QScriptBreakpointData); - d->ignoreCount = count; -} - -/*! - If the ignore count is 0, this function increments the hit count and - returns true. Otherwise, it decrements the ignore count and returns - false. -*/ -bool QScriptBreakpointData::hit() -{ - Q_D(QScriptBreakpointData); - if (d->ignoreCount == 0) { - ++d->hitCount; - return true; - } - --d->ignoreCount; - return false; -} - -/*! - Returns the hit count of the breakpoint (the number of times the - breakpoint has been triggered). -*/ -int QScriptBreakpointData::hitCount() const -{ - Q_D(const QScriptBreakpointData); - return d->hitCount; -} - -/*! - Returns the condition of the breakpoint. -*/ -QString QScriptBreakpointData::condition() const -{ - Q_D(const QScriptBreakpointData); - return d->condition; -} - -/*! - Sets the \a condition of the breakpoint. -*/ -void QScriptBreakpointData::setCondition(const QString &condition) -{ - Q_D(QScriptBreakpointData); - d->condition = condition; -} - -/*! - Returns custom data associated with the breakpoint. -*/ -QVariant QScriptBreakpointData::data() const -{ - Q_D(const QScriptBreakpointData); - return d->data; -} - -/*! - Sets custom \a data associated with the breakpoint. -*/ -void QScriptBreakpointData::setData(const QVariant &data) -{ - Q_D(QScriptBreakpointData); - d->data = data; -} - -bool QScriptBreakpointData::isValid() const -{ - Q_D(const QScriptBreakpointData); - return (((d->scriptId != -1) || !d->fileName.isEmpty()) - && (d->lineNumber != -1)); -} - -/*! - Returns true if this QScriptBreakpointData is equal to the \a other - data, otherwise returns false. -*/ -bool QScriptBreakpointData::operator==(const QScriptBreakpointData &other) const -{ - Q_D(const QScriptBreakpointData); - const QScriptBreakpointDataPrivate *od = other.d_func(); - if (d == od) - return true; - if (!d || !od) - return false; - return ((d->scriptId == od->scriptId) - && (d->fileName == od->fileName) - && (d->lineNumber == od->lineNumber) - && (d->enabled == od->enabled) - && (d->singleShot == od->singleShot) - && (d->condition == od->condition) - && (d->ignoreCount == od->ignoreCount) - && (d->data == od->data) - && (d->hitCount == od->hitCount)); -} - -/*! - Returns true if this QScriptBreakpointData is not equal to the \a - other data, otherwise returns false. -*/ -bool QScriptBreakpointData::operator!=(const QScriptBreakpointData &other) const -{ - return !(*this == other); -} - -/*! - \fn QDataStream &operator<<(QDataStream &stream, const QScriptBreakpointData &data) - \relates QScriptBreakpointData - - Writes the given \a data to the specified \a stream. -*/ -QDataStream &operator<<(QDataStream &out, const QScriptBreakpointData &data) -{ - const QScriptBreakpointDataPrivate *d = data.d_ptr.data(); - out << d->scriptId; - out << d->fileName; - out << d->lineNumber; - out << d->enabled; - out << d->singleShot; - out << d->ignoreCount; - out << d->condition; - out << d->data; - out << d->hitCount; - return out; -} - -/*! - \fn QDataStream &operator>>(QDataStream &stream, QScriptBreakpointData &data) - \relates QScriptBreakpointData - - Reads a QScriptBreakpointData from the specified \a stream into the - given \a data. -*/ -QDataStream &operator>>(QDataStream &in, QScriptBreakpointData &data) -{ - QScriptBreakpointDataPrivate *d = data.d_ptr.data(); - in >> d->scriptId; - in >> d->fileName; - in >> d->lineNumber; - in >> d->enabled; - in >> d->singleShot; - in >> d->ignoreCount; - in >> d->condition; - in >> d->data; - in >> d->hitCount; - return in; -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptbreakpointdata_p.h b/src/scripttools/debugging/qscriptbreakpointdata_p.h deleted file mode 100644 index 13921a50a..000000000 --- a/src/scripttools/debugging/qscriptbreakpointdata_p.h +++ /dev/null @@ -1,109 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTBREAKPOINTDATA_P_H -#define QSCRIPTBREAKPOINTDATA_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QDataStream; -class QVariant; - -class QScriptBreakpointDataPrivate; -class Q_AUTOTEST_EXPORT QScriptBreakpointData -{ -public: - friend Q_AUTOTEST_EXPORT QDataStream &operator<<(QDataStream &, const QScriptBreakpointData &); - friend Q_AUTOTEST_EXPORT QDataStream &operator>>(QDataStream &, QScriptBreakpointData &); - - QScriptBreakpointData(); - QScriptBreakpointData(qint64 scriptId, int lineNumber); - QScriptBreakpointData(const QString &fileName, int lineNumber); - QScriptBreakpointData(const QScriptBreakpointData &other); - ~QScriptBreakpointData(); - QScriptBreakpointData &operator=(const QScriptBreakpointData &other); - - bool isValid() const; - - // location - qint64 scriptId() const; - void setScriptId(qint64 id); - - QString fileName() const; - void setFileName(const QString &fileName); - - int lineNumber() const; - void setLineNumber(int lineNumber); - - // data - bool isEnabled() const; - void setEnabled(bool enabled); - - bool isSingleShot() const; - void setSingleShot(bool singleShot); - - int ignoreCount() const; - void setIgnoreCount(int count); - - QString condition() const; - void setCondition(const QString &condition); - - QVariant data() const; - void setData(const QVariant &data); - - bool hit(); - - // statistics - int hitCount() const; - - - bool operator==(const QScriptBreakpointData &other) const; - bool operator!=(const QScriptBreakpointData &other) const; - -private: - QScopedPointer d_ptr; - - Q_DECLARE_PRIVATE(QScriptBreakpointData) -}; - -typedef QMap QScriptBreakpointMap; - -Q_AUTOTEST_EXPORT QDataStream &operator<<(QDataStream &, const QScriptBreakpointData &); -Q_AUTOTEST_EXPORT QDataStream &operator>>(QDataStream &, QScriptBreakpointData &); - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptbreakpointsmodel.cpp b/src/scripttools/debugging/qscriptbreakpointsmodel.cpp deleted file mode 100644 index 28965d2aa..000000000 --- a/src/scripttools/debugging/qscriptbreakpointsmodel.cpp +++ /dev/null @@ -1,478 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptbreakpointsmodel_p.h" -#include "qscriptdebuggerjobschedulerinterface_p.h" -#include "qscriptdebuggercommandschedulerjob_p.h" -#include "qscriptdebuggercommandschedulerfrontend_p.h" - -#include "qabstractitemmodel_p.h" - -#include -#include -#include - -QT_BEGIN_NAMESPACE - -/*! - \since 4.5 - \class QScriptBreakpointsModel - \internal -*/ - -class QScriptBreakpointsModelPrivate - : public QAbstractItemModelPrivate -{ - Q_DECLARE_PUBLIC(QScriptBreakpointsModel) -public: - QScriptBreakpointsModelPrivate(); - ~QScriptBreakpointsModelPrivate(); - - QScriptDebuggerJobSchedulerInterface *jobScheduler; - QScriptDebuggerCommandSchedulerInterface *commandScheduler; - QList > breakpoints; -}; - -QScriptBreakpointsModelPrivate::QScriptBreakpointsModelPrivate() -{ -} - -QScriptBreakpointsModelPrivate::~QScriptBreakpointsModelPrivate() -{ -} - -QScriptBreakpointsModel::QScriptBreakpointsModel( - QScriptDebuggerJobSchedulerInterface *jobScheduler, - QScriptDebuggerCommandSchedulerInterface *commandScheduler, - QObject *parent) - : QAbstractItemModel(*new QScriptBreakpointsModelPrivate, parent) -{ - Q_D(QScriptBreakpointsModel); - d->jobScheduler = jobScheduler; - d->commandScheduler = commandScheduler; -} - -QScriptBreakpointsModel::~QScriptBreakpointsModel() -{ -} - -namespace -{ - -class SetBreakpointJob : public QScriptDebuggerCommandSchedulerJob -{ -public: - SetBreakpointJob(const QScriptBreakpointData &data, - QScriptDebuggerCommandSchedulerInterface *scheduler) - : QScriptDebuggerCommandSchedulerJob(scheduler), - m_data(data) - { } - - void start() - { - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - frontend.scheduleSetBreakpoint(m_data); - } - - void handleResponse(const QScriptDebuggerResponse &, int) - { - finish(); - } - -private: - QScriptBreakpointData m_data; -}; - -} // namespace - -/*! - Sets a breakpoint defined by the given \a data. - A new row will be inserted into the model if the breakpoint could be - successfully set. -*/ -void QScriptBreakpointsModel::setBreakpoint(const QScriptBreakpointData &data) -{ - Q_D(QScriptBreakpointsModel); - QScriptDebuggerJob *job = new SetBreakpointJob(data, d->commandScheduler); - d->jobScheduler->scheduleJob(job); -} - -namespace -{ - -class SetBreakpointDataJob : public QScriptDebuggerCommandSchedulerJob -{ -public: - SetBreakpointDataJob(int id, const QScriptBreakpointData &data, - QScriptDebuggerCommandSchedulerInterface *scheduler) - : QScriptDebuggerCommandSchedulerJob(scheduler), - m_id(id), m_data(data) - { } - - void start() - { - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - frontend.scheduleSetBreakpointData(m_id, m_data); - } - - void handleResponse(const QScriptDebuggerResponse &, int) - { - finish(); - } - -private: - int m_id; - QScriptBreakpointData m_data; -}; - -} // namespace - -/*! - Sets the \a data associated with the breakpoint identified by \a id. - A dataChanged() signal will be emitted if the breakpoint data could - be successfully changed. -*/ -void QScriptBreakpointsModel::setBreakpointData(int id, const QScriptBreakpointData &data) -{ - Q_D(QScriptBreakpointsModel); - QScriptDebuggerJob *job = new SetBreakpointDataJob(id, data, d->commandScheduler); - d->jobScheduler->scheduleJob(job); -} - -namespace -{ - -class DeleteBreakpointJob : public QScriptDebuggerCommandSchedulerJob -{ -public: - DeleteBreakpointJob(int id, QScriptDebuggerCommandSchedulerInterface *scheduler) - : QScriptDebuggerCommandSchedulerJob(scheduler), - m_id(id) - { } - - void start() - { - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - frontend.scheduleDeleteBreakpoint(m_id); - } - - void handleResponse(const QScriptDebuggerResponse &, int) - { - finish(); - } - -private: - int m_id; -}; - -} // namespace - -/*! - Deletes the breakpoint with the given \a id. - The corresponding row in the model will be removed if the breakpoint - was successfully deleted. -*/ -void QScriptBreakpointsModel::deleteBreakpoint(int id) -{ - Q_D(QScriptBreakpointsModel); - QScriptDebuggerJob *job = new DeleteBreakpointJob(id, d->commandScheduler); - d->jobScheduler->scheduleJob(job); -} - -/*! - Adds a breakpoint to the model. This function does not actually set - a breakpoint (i.e. it doesn't communicate with the debugger). -*/ -void QScriptBreakpointsModel::addBreakpoint(int id, const QScriptBreakpointData &data) -{ - Q_D(QScriptBreakpointsModel); - int rowIndex = d->breakpoints.size(); - beginInsertRows(QModelIndex(), rowIndex, rowIndex); - d->breakpoints.append(qMakePair(id, data)); - endInsertRows(); -} - -/*! - Modify the \a data of breakpoint \a id. -*/ -void QScriptBreakpointsModel::modifyBreakpoint(int id, const QScriptBreakpointData &data) -{ - Q_D(QScriptBreakpointsModel); - for (int i = 0; i < d->breakpoints.size(); ++i) { - if (d->breakpoints.at(i).first == id) { - d->breakpoints[i] = qMakePair(id, data); - emit dataChanged(createIndex(i, 0), createIndex(i, columnCount()-1)); - break; - } - } -} - -/*! - Remove the breakpoint identified by \a id from the model. This - function does not delete the breakpoint (i.e. it doesn't communicate - with the debugger). -*/ -void QScriptBreakpointsModel::removeBreakpoint(int id) -{ - Q_D(QScriptBreakpointsModel); - for (int i = 0; i < d->breakpoints.size(); ++i) { - if (d->breakpoints.at(i).first == id) { - beginRemoveRows(QModelIndex(), i, i); - d->breakpoints.removeAt(i); - endRemoveRows(); - break; - } - } -} - -/*! - Returns the id of the breakpoint at the given \a row. -*/ -int QScriptBreakpointsModel::breakpointIdAt(int row) const -{ - Q_D(const QScriptBreakpointsModel); - return d->breakpoints.at(row).first; -} - -/*! - Returns the data for the breakpoint at the given \a row. -*/ -QScriptBreakpointData QScriptBreakpointsModel::breakpointDataAt(int row) const -{ - Q_D(const QScriptBreakpointsModel); - return d->breakpoints.at(row).second; -} - -QScriptBreakpointData QScriptBreakpointsModel::breakpointData(int id) const -{ - Q_D(const QScriptBreakpointsModel); - for (int i = 0; i < d->breakpoints.size(); ++i) { - if (d->breakpoints.at(i).first == id) - return d->breakpoints.at(i).second; - } - return QScriptBreakpointData(); -} - -/*! - Tries to find a breakpoint with the given \a scriptId and \a - lineNumber. Returns the id of the first breakpoint that matches, or - -1 if no such breakpoint is found. -*/ -int QScriptBreakpointsModel::resolveBreakpoint(qint64 scriptId, int lineNumber) const -{ - Q_D(const QScriptBreakpointsModel); - for (int i = 0; i < d->breakpoints.size(); ++i) { - if ((d->breakpoints.at(i).second.scriptId() == scriptId) - && (d->breakpoints.at(i).second.lineNumber() == lineNumber)) { - return d->breakpoints.at(i).first; - } - } - return -1; -} - -int QScriptBreakpointsModel::resolveBreakpoint(const QString &fileName, int lineNumber) const -{ - Q_D(const QScriptBreakpointsModel); - for (int i = 0; i < d->breakpoints.size(); ++i) { - if ((d->breakpoints.at(i).second.fileName() == fileName) - && (d->breakpoints.at(i).second.lineNumber() == lineNumber)) { - return d->breakpoints.at(i).first; - } - } - return -1; -} - -/*! - \reimp -*/ -QModelIndex QScriptBreakpointsModel::index(int row, int column, const QModelIndex &parent) const -{ - Q_D(const QScriptBreakpointsModel); - if (parent.isValid()) - return QModelIndex(); - if ((row < 0) || (row >= d->breakpoints.size())) - return QModelIndex(); - if ((column < 0) || (column >= columnCount())) - return QModelIndex(); - return createIndex(row, column); -} - -/*! - \reimp -*/ -QModelIndex QScriptBreakpointsModel::parent(const QModelIndex &) const -{ - return QModelIndex(); -} - -/*! - \reimp -*/ -int QScriptBreakpointsModel::columnCount(const QModelIndex &parent) const -{ - if (!parent.isValid()) - return 6; - return 0; -} - -/*! - \reimp -*/ -int QScriptBreakpointsModel::rowCount(const QModelIndex &parent) const -{ - Q_D(const QScriptBreakpointsModel); - if (!parent.isValid()) - return d->breakpoints.size(); - return 0; -} - -/*! - \reimp -*/ -QVariant QScriptBreakpointsModel::data(const QModelIndex &index, int role) const -{ - Q_D(const QScriptBreakpointsModel); - if (!index.isValid() || (index.row() >= d->breakpoints.size())) - return QVariant(); - const QPair &item = d->breakpoints.at(index.row()); - if (role == Qt::DisplayRole) { - if (index.column() == 0) - return item.first; - else if (index.column() == 1) { - QString loc = item.second.fileName(); - if (loc.isEmpty()) - loc = QString::fromLatin1("").arg(item.second.scriptId()); - loc.append(QString::fromLatin1(":%0").arg(item.second.lineNumber())); - return loc; - } else if (index.column() == 2) { - if (!item.second.condition().isEmpty()) - return item.second.condition(); - } else if (index.column() == 3) { - if (item.second.ignoreCount() != 0) - return item.second.ignoreCount(); - } else if (index.column() == 5) { - return item.second.hitCount(); - } - } else if (role == Qt::CheckStateRole) { - if (index.column() == 0) { - return item.second.isEnabled() ? Qt::Checked : Qt::Unchecked; - } else if (index.column() == 4) { - return item.second.isSingleShot() ? Qt::Checked : Qt::Unchecked; - } - } else if (role == Qt::EditRole) { - if (index.column() == 2) - return item.second.condition(); - else if (index.column() == 3) - return item.second.ignoreCount(); - } - return QVariant(); -} - -/*! - \reimp -*/ -bool QScriptBreakpointsModel::setData(const QModelIndex &index, const QVariant &value, int role) -{ - Q_D(QScriptBreakpointsModel); - if (!index.isValid() || (index.row() >= d->breakpoints.size())) - return false; - const QPair &item = d->breakpoints.at(index.row()); - QScriptBreakpointData modifiedData; - int col = index.column(); - if ((col == 0) || (col == 4)) { - if (role == Qt::CheckStateRole) { - modifiedData = item.second; - if (col == 0) - modifiedData.setEnabled(value.toInt() == Qt::Checked); - else - modifiedData.setSingleShot(value.toInt() == Qt::Checked); - } - } else if (col == 2) { - if (role == Qt::EditRole) { - modifiedData = item.second; - modifiedData.setCondition(value.toString()); - } - } else if (col == 3) { - if (role == Qt::EditRole) { - modifiedData = item.second; - modifiedData.setIgnoreCount(value.toInt()); - } - } - if (!modifiedData.isValid()) - return false; - QScriptDebuggerJob *job = new SetBreakpointDataJob(item.first, modifiedData, d->commandScheduler); - d->jobScheduler->scheduleJob(job); - return true; -} - -/*! - \reimp -*/ -QVariant QScriptBreakpointsModel::headerData(int section, Qt::Orientation orient, int role) const -{ - if (orient == Qt::Horizontal) { - if (role == Qt::DisplayRole) { - if (section == 0) - return QCoreApplication::translate("QScriptBreakpointsModel", "ID"); - else if (section == 1) - return QCoreApplication::translate("QScriptBreakpointsModel", "Location"); - else if (section == 2) - return QCoreApplication::translate("QScriptBreakpointsModel", "Condition"); - else if (section == 3) - return QCoreApplication::translate("QScriptBreakpointsModel", "Ignore-count"); - else if (section == 4) - return QCoreApplication::translate("QScriptBreakpointsModel", "Single-shot"); - else if (section == 5) - return QCoreApplication::translate("QScriptBreakpointsModel", "Hit-count"); - } - } - return QVariant(); -} - -/*! - \reimp -*/ -Qt::ItemFlags QScriptBreakpointsModel::flags(const QModelIndex &index) const -{ - if (!index.isValid()) - return 0; - Qt::ItemFlags ret = Qt::ItemIsEnabled | Qt::ItemIsSelectable; - switch (index.column()) { - case 0: - ret |= Qt::ItemIsUserCheckable; - break; - case 1: - break; - case 2: - ret |= Qt::ItemIsEditable; - break; - case 3: - ret |= Qt::ItemIsEditable; - break; - case 4: - ret |= Qt::ItemIsUserCheckable; - break; - } - return ret; -} - -QT_END_NAMESPACE -#include "moc_qscriptbreakpointsmodel_p.h" diff --git a/src/scripttools/debugging/qscriptbreakpointsmodel_p.h b/src/scripttools/debugging/qscriptbreakpointsmodel_p.h deleted file mode 100644 index 8ae4d0f0a..000000000 --- a/src/scripttools/debugging/qscriptbreakpointsmodel_p.h +++ /dev/null @@ -1,87 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTBREAKPOINTSMODEL_P_H -#define QSCRIPTBREAKPOINTSMODEL_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include "qscriptbreakpointdata_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerJobSchedulerInterface; -class QScriptDebuggerCommandSchedulerInterface; - -class QScriptBreakpointsModelPrivate; -class Q_AUTOTEST_EXPORT QScriptBreakpointsModel - : public QAbstractItemModel -{ - Q_OBJECT -public: - QScriptBreakpointsModel(QScriptDebuggerJobSchedulerInterface *jobScheduler, - QScriptDebuggerCommandSchedulerInterface *commandScheduler, - QObject *parent = nullptr); - ~QScriptBreakpointsModel(); - - void setBreakpoint(const QScriptBreakpointData &data); - void setBreakpointData(int id, const QScriptBreakpointData &data); - void deleteBreakpoint(int id); - - void addBreakpoint(int id, const QScriptBreakpointData &data); - void modifyBreakpoint(int id, const QScriptBreakpointData &data); - void removeBreakpoint(int id); - - int breakpointIdAt(int row) const; - QScriptBreakpointData breakpointDataAt(int row) const; - QScriptBreakpointData breakpointData(int id) const; - - int resolveBreakpoint(qint64 scriptId, int lineNumber) const; - int resolveBreakpoint(const QString &fileName, int lineNumber) const; - - QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; - QModelIndex parent(const QModelIndex &child) const; - int columnCount(const QModelIndex &parent = QModelIndex()) const; - int rowCount(const QModelIndex &parent = QModelIndex()) const; - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; - bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); - QVariant headerData(int section, Qt::Orientation, int role = Qt::DisplayRole) const; - Qt::ItemFlags flags(const QModelIndex &index) const; - -private: - Q_DECLARE_PRIVATE(QScriptBreakpointsModel) - Q_DISABLE_COPY(QScriptBreakpointsModel) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptbreakpointswidget.cpp b/src/scripttools/debugging/qscriptbreakpointswidget.cpp deleted file mode 100644 index 290410af7..000000000 --- a/src/scripttools/debugging/qscriptbreakpointswidget.cpp +++ /dev/null @@ -1,359 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptbreakpointswidget_p.h" -#include "qscriptbreakpointswidgetinterface_p_p.h" -#include "qscriptbreakpointsmodel_p.h" -#include "qscriptdebuggerscriptsmodel_p.h" -#include "qscripttoolsresources_p.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QScriptNewBreakpointWidget : public QWidget -{ - Q_OBJECT -public: - QScriptNewBreakpointWidget(QWidget *parent = nullptr) - : QWidget(parent) { - QHBoxLayout *hboxLayout = new QHBoxLayout(this); - hboxLayout->setSpacing(6); - hboxLayout->setMargin(0); - - toolClose = new QToolButton(this); - QPixmap pix; - pix.loadFromData( - scripttools_closetab_png, scripttools_closetab_png_len, - qt_images_format - ); - toolClose->setIcon(QIcon(pix)); - toolClose->setAutoRaise(true); - toolClose->setText(tr("Close")); - hboxLayout->addWidget(toolClose); - - fileNameEdit = new QLineEdit(); - setFocusProxy(fileNameEdit); - QRegExp locationRegExp(QLatin1String(".+:[0-9]+")); - QRegExpValidator *validator = new QRegExpValidator(locationRegExp, fileNameEdit); - fileNameEdit->setValidator(validator); - hboxLayout->addWidget(fileNameEdit); - - toolOk = new QToolButton(this); - toolOk->setIcon(QIcon::fromTheme("list-add")); - toolOk->setAutoRaise(true); - toolOk->setEnabled(false); - hboxLayout->addWidget(toolOk); - - QObject::connect(toolClose, SIGNAL(clicked()), this, SLOT(hide())); - QObject::connect(toolOk, SIGNAL(clicked()), this, SLOT(onOkClicked())); - QObject::connect(fileNameEdit, SIGNAL(textChanged(QString)), - this, SLOT(onTextChanged())); - QObject::connect(fileNameEdit, SIGNAL(returnPressed()), - this, SLOT(onOkClicked())); - } - - void setCompleter(QCompleter *comp) - { fileNameEdit->setCompleter(comp); } - -Q_SIGNALS: - void newBreakpointRequest(const QString &fileName, int lineNumber); - -protected: - void keyPressEvent(QKeyEvent *e) - { - if (e->key() == Qt::Key_Escape) - hide(); - else - QWidget::keyPressEvent(e); - } - -private Q_SLOTS: - void onOkClicked() - { - QString location = fileNameEdit->text(); - fileNameEdit->clear(); - QString fileName = location.left(location.lastIndexOf(QLatin1Char(':'))); - int lineNumber = location.mid(fileName.length()+1).toInt(); - emit newBreakpointRequest(fileName, lineNumber); - } - - void onTextChanged() - { - toolOk->setEnabled(fileNameEdit->hasAcceptableInput()); - } - -private: - QLineEdit *fileNameEdit; - QToolButton *toolClose; - QToolButton *toolOk; -}; - - - -class QScriptBreakpointsWidgetPrivate - : public QScriptBreakpointsWidgetInterfacePrivate -{ - Q_DECLARE_PUBLIC(QScriptBreakpointsWidget) -public: - QScriptBreakpointsWidgetPrivate(); - ~QScriptBreakpointsWidgetPrivate(); - - void _q_newBreakpoint(); - void _q_deleteBreakpoint(); - void _q_onCurrentChanged(const QModelIndex &index); - void _q_onNewBreakpointRequest(const QString &fileName, int lineNumber); - - QTreeView *view; - QScriptNewBreakpointWidget *newBreakpointWidget; - QAction *deleteBreakpointAction; - QScriptDebuggerScriptsModel *scriptsModel; -}; - -QScriptBreakpointsWidgetPrivate::QScriptBreakpointsWidgetPrivate() -{ -} - -QScriptBreakpointsWidgetPrivate::~QScriptBreakpointsWidgetPrivate() -{ -} - -void QScriptBreakpointsWidgetPrivate::_q_newBreakpoint() -{ - newBreakpointWidget->show(); - newBreakpointWidget->setFocus(Qt::OtherFocusReason); -} - -void QScriptBreakpointsWidgetPrivate::_q_deleteBreakpoint() -{ - Q_Q(QScriptBreakpointsWidget); - QModelIndex index = view->currentIndex(); - if (index.isValid()) { - int id = q->breakpointsModel()->breakpointIdAt(index.row()); - q->breakpointsModel()->deleteBreakpoint(id); - } -} - -void QScriptBreakpointsWidgetPrivate::_q_onCurrentChanged(const QModelIndex &index) -{ - deleteBreakpointAction->setEnabled(index.isValid()); -} - -void QScriptBreakpointsWidgetPrivate::_q_onNewBreakpointRequest(const QString &fileName, int lineNumber) -{ - QScriptBreakpointData data(fileName, lineNumber); - q_func()->breakpointsModel()->setBreakpoint(data); -} - -class QScriptBreakpointsItemDelegate : public QStyledItemDelegate -{ - Q_OBJECT -public: - QScriptBreakpointsItemDelegate(QObject *parent = nullptr) - : QStyledItemDelegate(parent) {} - - QWidget *createEditor(QWidget *parent, - const QStyleOptionViewItem &option, - const QModelIndex &index) const - { - QWidget *editor = QStyledItemDelegate::createEditor(parent, option, index); - if (index.column() == 2) { - // condition - QLineEdit *le = qobject_cast(editor); - if (le) { - QObject::connect(le, SIGNAL(textEdited(QString)), - this, SLOT(validateInput(QString))); - } - } - return editor; - } - - bool eventFilter(QObject *editor, QEvent *event) - { - if (QLineEdit *le = qobject_cast(editor)) { - if (event->type() == QEvent::KeyPress) { - int key = static_cast(event)->key(); - if ((key == Qt::Key_Enter) || (key == Qt::Key_Return)) { - if (QScriptEngine::checkSyntax(le->text()).state() != QScriptSyntaxCheckResult::Valid) { - // ignore when script contains syntax error - return true; - } - } - } - } - return QStyledItemDelegate::eventFilter(editor, event); - } - - void setModelData(QWidget *editor, QAbstractItemModel *model, - const QModelIndex &index) const - { - if (index.column() == 2) { - // check that the syntax is OK - QString condition = qobject_cast(editor)->text(); - if (QScriptEngine::checkSyntax(condition).state() != QScriptSyntaxCheckResult::Valid) - return; - } - QStyledItemDelegate::setModelData(editor, model, index); - } - -private Q_SLOTS: - void validateInput(const QString &text) - { - QWidget *editor = qobject_cast(sender()); - QPalette pal = editor->palette(); - QColor col; - bool ok = (QScriptEngine::checkSyntax(text).state() == QScriptSyntaxCheckResult::Valid); - if (ok) { - col = Qt::white; - } else { - QScriptSyntaxCheckResult result = QScriptEngine::checkSyntax( - text + QLatin1Char('\n')); - if (result.state() == QScriptSyntaxCheckResult::Intermediate) - col = QColor(255, 240, 192); - else - col = QColor(255, 102, 102); - } - pal.setColor(QPalette::Active, QPalette::Base, col); - editor->setPalette(pal); - } -}; - -QScriptBreakpointsWidget::QScriptBreakpointsWidget(QWidget *parent) - : QScriptBreakpointsWidgetInterface(*new QScriptBreakpointsWidgetPrivate, parent, 0) -{ - Q_D(QScriptBreakpointsWidget); - d->view = new QTreeView(); -// d->view->setEditTriggers(QAbstractItemView::NoEditTriggers); - d->view->setEditTriggers(QAbstractItemView::AllEditTriggers); -// d->view->setAlternatingRowColors(true); - d->view->setRootIsDecorated(false); - d->view->setSelectionBehavior(QAbstractItemView::SelectRows); -// d->view->header()->hide(); -// d->view->header()->setDefaultAlignment(Qt::AlignLeft); -// d->view->header()->setResizeMode(QHeaderView::ResizeToContents); - d->view->setItemDelegate(new QScriptBreakpointsItemDelegate(this)); - - d->newBreakpointWidget = new QScriptNewBreakpointWidget(); - d->newBreakpointWidget->hide(); - QObject::connect(d->newBreakpointWidget, SIGNAL(newBreakpointRequest(QString,int)), - this, SLOT(_q_onNewBreakpointRequest(QString,int))); - - QAction *newBreakpointAction = new QAction(QIcon::fromTheme("document-new"), tr("New"), this); - QObject::connect(newBreakpointAction, SIGNAL(triggered()), - this, SLOT(_q_newBreakpoint())); - - d->deleteBreakpointAction = new QAction(QIcon::fromTheme("edit-delete"), tr("Delete"), this); - d->deleteBreakpointAction->setEnabled(false); - QObject::connect(d->deleteBreakpointAction, SIGNAL(triggered()), - this, SLOT(_q_deleteBreakpoint())); - -#ifndef QT_NO_TOOLBAR - QToolBar *toolBar = new QToolBar(); - toolBar->addAction(newBreakpointAction); - toolBar->addAction(d->deleteBreakpointAction); -#endif - - QVBoxLayout *vbox = new QVBoxLayout(this); - vbox->setMargin(0); -#ifndef QT_NO_TOOLBAR - vbox->addWidget(toolBar); -#endif - vbox->addWidget(d->newBreakpointWidget); - vbox->addWidget(d->view); -} - -QScriptBreakpointsWidget::~QScriptBreakpointsWidget() -{ -} - -/*! - \reimp -*/ -QScriptBreakpointsModel *QScriptBreakpointsWidget::breakpointsModel() const -{ - Q_D(const QScriptBreakpointsWidget); - return qobject_cast(d->view->model()); -} - -/*! - \reimp -*/ -void QScriptBreakpointsWidget::setBreakpointsModel(QScriptBreakpointsModel *model) -{ - Q_D(QScriptBreakpointsWidget); - d->view->setModel(model); - d->view->header()->resizeSection(0, 50); - QObject::connect(d->view->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), - this, SLOT(_q_onCurrentChanged(QModelIndex))); -} - -/*! - \reimp -*/ -QScriptDebuggerScriptsModel *QScriptBreakpointsWidget::scriptsModel() const -{ - Q_D(const QScriptBreakpointsWidget); - return d->scriptsModel; -} - -/*! - \reimp -*/ -void QScriptBreakpointsWidget::setScriptsModel(QScriptDebuggerScriptsModel *model) -{ - Q_D(QScriptBreakpointsWidget); - d->scriptsModel = model; - QCompleter *completer = new QCompleter(model, this); - completer->setCompletionRole(Qt::DisplayRole); - d->newBreakpointWidget->setCompleter(completer); -} - -/*! - \reimp -*/ -void QScriptBreakpointsWidget::keyPressEvent(QKeyEvent *e) -{ - Q_D(QScriptBreakpointsWidget); - if (e->key() == Qt::Key_Delete) { - QModelIndex index = d->view->currentIndex(); - if (!index.isValid()) - return; - int id = breakpointsModel()->breakpointIdAt(index.row()); - breakpointsModel()->deleteBreakpoint(id); - } -} - -QT_END_NAMESPACE - -#include "moc_qscriptbreakpointswidget.cpp" -#include "moc_qscriptbreakpointswidget_p.h" diff --git a/src/scripttools/debugging/qscriptbreakpointswidget_p.h b/src/scripttools/debugging/qscriptbreakpointswidget_p.h deleted file mode 100644 index dcc8cd2f2..000000000 --- a/src/scripttools/debugging/qscriptbreakpointswidget_p.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTBREAKPOINTSWIDGET_P_H -#define QSCRIPTBREAKPOINTSWIDGET_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qscriptbreakpointswidgetinterface_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptBreakpointsWidgetPrivate; -class Q_AUTOTEST_EXPORT QScriptBreakpointsWidget: - public QScriptBreakpointsWidgetInterface -{ - Q_OBJECT -public: - QScriptBreakpointsWidget(QWidget *parent = nullptr); - ~QScriptBreakpointsWidget(); - - QScriptBreakpointsModel *breakpointsModel() const; - void setBreakpointsModel(QScriptBreakpointsModel *model); - - QScriptDebuggerScriptsModel *scriptsModel() const; - void setScriptsModel(QScriptDebuggerScriptsModel *model); - -protected: - void keyPressEvent(QKeyEvent *e); - -private: - Q_PRIVATE_SLOT(d_func(), void _q_newBreakpoint()) - Q_PRIVATE_SLOT(d_func(), void _q_deleteBreakpoint()) - Q_PRIVATE_SLOT(d_func(), void _q_onCurrentChanged(const QModelIndex &)) - Q_PRIVATE_SLOT(d_func(), void _q_onNewBreakpointRequest(const QString &, int)) - - Q_DECLARE_PRIVATE(QScriptBreakpointsWidget) - Q_DISABLE_COPY(QScriptBreakpointsWidget) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptbreakpointswidgetinterface.cpp b/src/scripttools/debugging/qscriptbreakpointswidgetinterface.cpp deleted file mode 100644 index 430dbe1ab..000000000 --- a/src/scripttools/debugging/qscriptbreakpointswidgetinterface.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptbreakpointswidgetinterface_p.h" -#include "qscriptbreakpointswidgetinterface_p_p.h" - -QT_BEGIN_NAMESPACE - -QScriptBreakpointsWidgetInterfacePrivate::QScriptBreakpointsWidgetInterfacePrivate() -{ -} - -QScriptBreakpointsWidgetInterfacePrivate::~QScriptBreakpointsWidgetInterfacePrivate() -{ -} - -QScriptBreakpointsWidgetInterface::~QScriptBreakpointsWidgetInterface() -{ -} - -QScriptBreakpointsWidgetInterface::QScriptBreakpointsWidgetInterface( - QScriptBreakpointsWidgetInterfacePrivate &dd, - QWidget *parent, Qt::WindowFlags flags) - : QWidget(dd, parent, flags) -{ -} - -QT_END_NAMESPACE -#include "moc_qscriptbreakpointswidgetinterface_p.h" diff --git a/src/scripttools/debugging/qscriptbreakpointswidgetinterface_p.h b/src/scripttools/debugging/qscriptbreakpointswidgetinterface_p.h deleted file mode 100644 index d06519a94..000000000 --- a/src/scripttools/debugging/qscriptbreakpointswidgetinterface_p.h +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTBREAKPOINTSWIDGETINTERFACE_P_H -#define QSCRIPTBREAKPOINTSWIDGETINTERFACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -QT_BEGIN_NAMESPACE - -class QScriptBreakpointsModel; -class QScriptDebuggerScriptsModel; - -class QScriptBreakpointsWidgetInterfacePrivate; -class Q_AUTOTEST_EXPORT QScriptBreakpointsWidgetInterface: - public QWidget -{ - Q_OBJECT -public: - ~QScriptBreakpointsWidgetInterface(); - - virtual QScriptBreakpointsModel *breakpointsModel() const = 0; - virtual void setBreakpointsModel(QScriptBreakpointsModel *model) = 0; - - virtual QScriptDebuggerScriptsModel *scriptsModel() const = 0; - virtual void setScriptsModel(QScriptDebuggerScriptsModel *model) = 0; - -Q_SIGNALS: - void currentScriptChanged(qint64 scriptId); - -protected: - QScriptBreakpointsWidgetInterface( - QScriptBreakpointsWidgetInterfacePrivate &dd, - QWidget *parent, Qt::WindowFlags flags); - -private: - Q_DECLARE_PRIVATE(QScriptBreakpointsWidgetInterface) - Q_DISABLE_COPY(QScriptBreakpointsWidgetInterface) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptbreakpointswidgetinterface_p_p.h b/src/scripttools/debugging/qscriptbreakpointswidgetinterface_p_p.h deleted file mode 100644 index ed0cdbd8a..000000000 --- a/src/scripttools/debugging/qscriptbreakpointswidgetinterface_p_p.h +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTBREAKPOINTSWIDGETINTERFACE_P_P_H -#define QSCRIPTBREAKPOINTSWIDGETINTERFACE_P_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qwidget_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptBreakpointsWidgetInterface; -class QScriptBreakpointsWidgetInterfacePrivate - : public QWidgetPrivate -{ - Q_DECLARE_PUBLIC(QScriptBreakpointsWidgetInterface) -public: - QScriptBreakpointsWidgetInterfacePrivate(); - ~QScriptBreakpointsWidgetInterfacePrivate(); -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptcompletionproviderinterface_p.h b/src/scripttools/debugging/qscriptcompletionproviderinterface_p.h deleted file mode 100644 index 3de688ef3..000000000 --- a/src/scripttools/debugging/qscriptcompletionproviderinterface_p.h +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTCOMPLETIONPROVIDERINTERFACE_P_H -#define QSCRIPTCOMPLETIONPROVIDERINTERFACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -QT_BEGIN_NAMESPACE - -class QScriptCompletionTaskInterface; - -class Q_AUTOTEST_EXPORT QScriptCompletionProviderInterface -{ -public: - enum Option { - ConsoleCommandCompletion = 1 - }; - - virtual ~QScriptCompletionProviderInterface() {} - - virtual QScriptCompletionTaskInterface *createCompletionTask( - const QString &contents, int cursorPosition, - int frameIndex, int options) = 0; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptcompletiontask.cpp b/src/scripttools/debugging/qscriptcompletiontask.cpp deleted file mode 100644 index e8fa31c36..000000000 --- a/src/scripttools/debugging/qscriptcompletiontask.cpp +++ /dev/null @@ -1,273 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptcompletiontask_p.h" -#include "qscriptcompletiontaskinterface_p_p.h" -#include "qscriptdebuggerconsole_p.h" -#include "qscriptdebuggerconsolecommand_p.h" -#include "qscriptdebuggerconsolecommandmanager_p.h" -#include "qscriptdebuggercommandschedulerjob_p.h" -#include "qscriptdebuggercommandschedulerfrontend_p.h" -#include "qscriptdebuggerjobschedulerinterface_p.h" -#include "qscriptdebuggerresponse_p.h" -#include "qscripttoolscommon_p.h" - -#include "qobject_p.h" - -#include -#include - -QT_BEGIN_NAMESPACE - -class QScriptCompletionTaskPrivate - : public QScriptCompletionTaskInterfacePrivate -{ - Q_DECLARE_PUBLIC(QScriptCompletionTask) -public: - QScriptCompletionTaskPrivate(); - ~QScriptCompletionTaskPrivate(); - - void completeScriptExpression(); - void emitFinished(); - - QString contents; - int cursorPosition; - int frameIndex; - QScriptDebuggerCommandSchedulerInterface *commandScheduler; - QScriptDebuggerJobSchedulerInterface *jobScheduler; - QScriptDebuggerConsole *console; -}; - -QScriptCompletionTaskPrivate::QScriptCompletionTaskPrivate() - : cursorPosition(0), frameIndex(0), commandScheduler(0), - jobScheduler(0), console(0) -{ -} - -QScriptCompletionTaskPrivate::~QScriptCompletionTaskPrivate() -{ -} - -class QScriptCompleteExpressionJob : public QScriptDebuggerCommandSchedulerJob -{ -public: - QScriptCompleteExpressionJob(int frameIndex, const QStringList &path, - QScriptCompletionTaskPrivate *task, - QScriptDebuggerCommandSchedulerInterface *scheduler) - : QScriptDebuggerCommandSchedulerJob(scheduler), - m_frameIndex(frameIndex), m_path(path), m_task(task) - {} - - void start() - { - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - frontend.scheduleGetCompletions(m_frameIndex, m_path); - } - void handleResponse(const QScriptDebuggerResponse &response, int /*commandId*/) - { - m_task->results = response.result().toStringList(); - m_task->emitFinished(); - finish(); - } - -private: - int m_frameIndex; - QStringList m_path; - QScriptCompletionTaskPrivate *m_task; -}; - -class QScriptCompleteScriptsJob : public QScriptDebuggerCommandSchedulerJob -{ -public: - QScriptCompleteScriptsJob(const QString &prefix, QScriptCompletionTaskPrivate *task, - QScriptDebuggerCommandSchedulerInterface *scheduler) - : QScriptDebuggerCommandSchedulerJob(scheduler), - m_prefix(prefix), m_task(task) - {} - - void start() - { - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - frontend.scheduleGetScripts(); - } - void handleResponse(const QScriptDebuggerResponse &response, int /*commandId*/) - { - QScriptScriptMap scripts = response.resultAsScripts(); - QScriptScriptMap::const_iterator it; - for (it = scripts.constBegin(); it != scripts.constEnd(); ++it) { - QString fileName = it.value().fileName(); - if (isPrefixOf(m_prefix, fileName)) - m_task->results.append(fileName); - } - m_task->emitFinished(); - finish(); - } -private: - QString m_prefix; - QScriptCompletionTaskPrivate *m_task; -}; - -void QScriptCompletionTaskPrivate::completeScriptExpression() -{ - int pos = cursorPosition; - if ((pos > 0) && contents.at(pos-1).isNumber()) { - // completion of numbers is pointless - emitFinished(); - return; - } - - while ((pos > 0) && isAlmostIdentChar(contents.at(pos-1))) - --pos; - int pos2 = cursorPosition - 1; - while ((pos2+1 < contents.size()) && isAlmostIdentChar(contents.at(pos2+1))) - ++pos2; - QString ident = contents.mid(pos, pos2 - pos + 1); - position = pos; - - QStringList path; - path.append(ident); - while ((pos > 0) && (contents.at(pos-1) == QLatin1Char('.'))) { - --pos; - pos2 = pos; - while ((pos > 0) && isAlmostIdentChar(contents.at(pos-1))) - --pos; - path.prepend(contents.mid(pos, pos2 - pos)); - } - - length = path.last().length(); - type = QScriptCompletionTask::ScriptIdentifierCompletion; - - QScriptDebuggerJob *job = new QScriptCompleteExpressionJob(frameIndex, path, this, commandScheduler); - jobScheduler->scheduleJob(job); -} - -void QScriptCompletionTaskPrivate::emitFinished() -{ - emit q_func()->finished(); -} - -QScriptCompletionTask::QScriptCompletionTask( - const QString &contents, int cursorPosition, int frameIndex, - QScriptDebuggerCommandSchedulerInterface *commandScheduler, - QScriptDebuggerJobSchedulerInterface *jobScheduler, - QScriptDebuggerConsole *console, - QObject *parent) - : QScriptCompletionTaskInterface( - *new QScriptCompletionTaskPrivate, parent) -{ - Q_D(QScriptCompletionTask); - d->contents = contents; - d->cursorPosition = cursorPosition; - if ((frameIndex == -1) && console) - d->frameIndex = console->currentFrameIndex(); - else - d->frameIndex = frameIndex; - d->commandScheduler = commandScheduler; - d->jobScheduler = jobScheduler; - d->console = console; -} - -QScriptCompletionTask::~QScriptCompletionTask() -{ -} - -void QScriptCompletionTask::start() -{ - Q_D(QScriptCompletionTask); - d->type = NoCompletion; - // see if we're typing a command - // ### don't hardcode the command prefix - QRegExp cmdRx(QString::fromLatin1("^\\s*\\.([a-zA-Z]*)")); - int cmdIndex = cmdRx.indexIn(d->contents); - if ((cmdIndex != -1) && d->console) { - int len = cmdRx.matchedLength(); - QString prefix = cmdRx.capturedTexts().at(1); - if ((d->cursorPosition >= cmdIndex) && (d->cursorPosition <= (cmdIndex+len))) { - // editing command --> get command completions - d->results = d->console->commandManager()->completions(prefix); - d->position = cmdRx.pos(1); - d->length = prefix.length(); - d->type = CommandNameCompletion; - d->appendix = QString::fromLatin1(" "); - emit finished(); - } else { - QScriptDebuggerConsoleCommand *cmd = d->console->commandManager()->findCommand(prefix); - if (!cmd) { - emit finished(); - return; - } - // editing an argument - int argNum = 0; - QString arg; - int pos = cmdIndex + len; - while (pos < d->contents.size()) { - while ((pos < d->contents.size()) && d->contents.at(pos).isSpace()) - ++pos; - if (pos < d->contents.size()) { - int pos2 = pos + 1; - while ((pos2 < d->contents.size()) && !d->contents.at(pos2).isSpace()) - ++pos2; - if ((d->cursorPosition >= pos) && (d->cursorPosition <= pos2)) { - arg = d->contents.mid(pos, pos2 - pos); - break; - } - pos = pos2; - ++argNum; - } - } - QString argType = cmd->argumentTypes().value(argNum); - if (!argType.isEmpty()) { - if (argType == QLatin1String("command-or-group-name")) { - d->results = d->console->commandManager()->completions(arg); - } else if (argType == QLatin1String("script-filename")) { - d->position = pos; - d->length = arg.length(); - d->type = CommandArgumentCompletion; - QScriptDebuggerJob *job = new QScriptCompleteScriptsJob(arg, d, d->commandScheduler); - d->jobScheduler->scheduleJob(job); - } else if (argType == QLatin1String("subcommand-name")) { - for (int i = 0; i < cmd->subCommands().size(); ++i) { - QString name = cmd->subCommands().at(i); - if (isPrefixOf(arg, name)) - d->results.append(name); - } - qStableSort(d->results); - } else if (argType == QLatin1String("script")) { - d->completeScriptExpression(); - } else { - emit finished(); - } - if ((d->type == NoCompletion) && !d->results.isEmpty()) { - d->position = pos; - d->length = arg.length(); - d->type = CommandArgumentCompletion; - emit finished(); - } - } - } - } else { - // assume it's an eval expression - d->completeScriptExpression(); - } -} - -QT_END_NAMESPACE -#include "moc_qscriptcompletiontask_p.h" diff --git a/src/scripttools/debugging/qscriptcompletiontask_p.h b/src/scripttools/debugging/qscriptcompletiontask_p.h deleted file mode 100644 index ab8d7d187..000000000 --- a/src/scripttools/debugging/qscriptcompletiontask_p.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTCOMPLETIONTASK_P_H -#define QSCRIPTCOMPLETIONTASK_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qscriptcompletiontaskinterface_p.h" - -#include -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerCommandSchedulerInterface; -class QScriptDebuggerJobSchedulerInterface; -class QScriptDebuggerConsole; - -class QScriptCompletionTaskPrivate; -class Q_AUTOTEST_EXPORT QScriptCompletionTask - : public QScriptCompletionTaskInterface -{ - Q_OBJECT -public: - QScriptCompletionTask( - const QString &contents, int cursorPosition, int frameIndex, - QScriptDebuggerCommandSchedulerInterface *commandScheduler, - QScriptDebuggerJobSchedulerInterface *jobScheduler, - QScriptDebuggerConsole *console, - QObject *parent = nullptr); - ~QScriptCompletionTask(); - - void start(); - -private: - Q_DECLARE_PRIVATE(QScriptCompletionTask) - Q_DISABLE_COPY(QScriptCompletionTask) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptcompletiontaskinterface.cpp b/src/scripttools/debugging/qscriptcompletiontaskinterface.cpp deleted file mode 100644 index f1f91356d..000000000 --- a/src/scripttools/debugging/qscriptcompletiontaskinterface.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptcompletiontaskinterface_p.h" -#include "qscriptcompletiontaskinterface_p_p.h" - -#include "qobject_p.h" - -QT_BEGIN_NAMESPACE - -QScriptCompletionTaskInterfacePrivate::QScriptCompletionTaskInterfacePrivate() -{ - type = QScriptCompletionTaskInterface::NoCompletion; -} - -QScriptCompletionTaskInterfacePrivate::~QScriptCompletionTaskInterfacePrivate() -{ -} - -QScriptCompletionTaskInterface::~QScriptCompletionTaskInterface() -{ -} - -QScriptCompletionTaskInterface::QScriptCompletionTaskInterface( - QScriptCompletionTaskInterfacePrivate &dd, QObject *parent) - : QObject(dd, parent) -{ -} - -QScriptCompletionTaskInterface::CompletionType QScriptCompletionTaskInterface::completionType() const -{ - Q_D(const QScriptCompletionTaskInterface); - return static_cast(d->type); -} - -int QScriptCompletionTaskInterface::resultCount() const -{ - Q_D(const QScriptCompletionTaskInterface); - return d->results.size(); -} - -QString QScriptCompletionTaskInterface::resultAt(int index) const -{ - Q_D(const QScriptCompletionTaskInterface); - return d->results.value(index); -} - -void QScriptCompletionTaskInterface::addResult(const QString &result) -{ - Q_D(QScriptCompletionTaskInterface); - d->results.append(result); -} - -int QScriptCompletionTaskInterface::position() const -{ - Q_D(const QScriptCompletionTaskInterface); - return d->position; -} - -int QScriptCompletionTaskInterface::length() const -{ - Q_D(const QScriptCompletionTaskInterface); - return d->length; -} - -QString QScriptCompletionTaskInterface::appendix() const -{ - Q_D(const QScriptCompletionTaskInterface); - return d->appendix; -} - -QT_END_NAMESPACE -#include "moc_qscriptcompletiontaskinterface_p.h" diff --git a/src/scripttools/debugging/qscriptcompletiontaskinterface_p.h b/src/scripttools/debugging/qscriptcompletiontaskinterface_p.h deleted file mode 100644 index 48f41e518..000000000 --- a/src/scripttools/debugging/qscriptcompletiontaskinterface_p.h +++ /dev/null @@ -1,86 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTCOMPLETIONTASKINTERFACE_P_H -#define QSCRIPTCOMPLETIONTASKINTERFACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -QT_BEGIN_NAMESPACE - -class QString; - -class QScriptCompletionTaskInterfacePrivate; -class Q_AUTOTEST_EXPORT QScriptCompletionTaskInterface - : public QObject -{ - Q_OBJECT -public: - enum CompletionType { - NoCompletion, - CommandNameCompletion, - CommandArgumentCompletion, - ScriptIdentifierCompletion - }; - - ~QScriptCompletionTaskInterface(); - - virtual void start() = 0; - - CompletionType completionType() const; - - int resultCount() const; - QString resultAt(int index) const; - - int position() const; - int length() const; - - QString appendix() const; - -protected: - void addResult(const QString &result); - -Q_SIGNALS: - void finished(); - -protected: - QScriptCompletionTaskInterface( - QScriptCompletionTaskInterfacePrivate &dd, QObject *parent); - -private: - Q_DECLARE_PRIVATE(QScriptCompletionTaskInterface) - Q_DISABLE_COPY(QScriptCompletionTaskInterface) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptcompletiontaskinterface_p_p.h b/src/scripttools/debugging/qscriptcompletiontaskinterface_p_p.h deleted file mode 100644 index 51cb64fb7..000000000 --- a/src/scripttools/debugging/qscriptcompletiontaskinterface_p_p.h +++ /dev/null @@ -1,61 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTCOMPLETIONTASKINTERFACE_P_P_H -#define QSCRIPTCOMPLETIONTASKINTERFACE_P_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qobject_p.h" - -#include -#include - -QT_BEGIN_NAMESPACE - -class QScriptCompletionTaskInterface; -class QScriptCompletionTaskInterfacePrivate - : public QObjectPrivate -{ - Q_DECLARE_PUBLIC(QScriptCompletionTaskInterface) -public: - QScriptCompletionTaskInterfacePrivate(); - virtual ~QScriptCompletionTaskInterfacePrivate(); - - int type; - QStringList results; - int position; - int length; - QString appendix; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebugger.cpp b/src/scripttools/debugging/qscriptdebugger.cpp deleted file mode 100644 index fbf08c7c1..000000000 --- a/src/scripttools/debugging/qscriptdebugger.cpp +++ /dev/null @@ -1,1962 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebugger_p.h" -#include "qscriptdebuggerconsole_p.h" -#include "qscriptdebuggerconsolecommandmanager_p.h" -#include "qscriptdebuggerconsolecommandjob_p.h" -#include "qscriptstdmessagehandler_p.h" -#include "qscriptdebuggerfrontend_p.h" -#include "qscriptdebuggereventhandlerinterface_p.h" -#include "qscriptdebuggerresponsehandlerinterface_p.h" -#include "qscriptdebuggerjobschedulerinterface_p.h" -#include "qscriptdebuggerconsolewidgetinterface_p.h" -#include "qscriptcompletionproviderinterface_p.h" -#include "qscriptcompletiontask_p.h" -#include "qscripttooltipproviderinterface_p.h" -#include "qscriptdebuggerstackwidgetinterface_p.h" -#include "qscriptdebuggerstackmodel_p.h" -#include "qscriptdebuggerscriptswidgetinterface_p.h" -#include "qscriptdebuggerscriptsmodel_p.h" -#include "qscriptdebuggerlocalswidgetinterface_p.h" -#include "qscriptdebuggerlocalsmodel_p.h" -#include "qscriptdebuggercodewidgetinterface_p.h" -#include "qscriptdebuggercodeviewinterface_p.h" -#include "qscriptdebuggercodefinderwidgetinterface_p.h" -#include "qscriptbreakpointswidgetinterface_p.h" -#include "qscriptbreakpointsmodel_p.h" -#include "qscriptdebugoutputwidgetinterface_p.h" -#include "qscripterrorlogwidgetinterface_p.h" -#include "qscriptdebuggerwidgetfactoryinterface_p.h" -#include "qscriptdebuggerevent_p.h" -#include "qscriptdebuggervalue_p.h" -#include "qscriptdebuggerresponse_p.h" -#include "qscriptdebuggercommand_p.h" -#include "qscriptdebuggercommandschedulerfrontend_p.h" -#include "qscriptdebuggercommandschedulerjob_p.h" -#include "qscriptdebuggerjob_p_p.h" -#include "qscriptxmlparser_p.h" -#include "qscripttoolscommon_p.h" -#include "qscripttoolsresources_p.h" -#include "qobject_p.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -QT_BEGIN_NAMESPACE - -// Q_SCRIPT_EXPORT QString qt_scriptToXml(const QString &program, int lineNumber = 1); - -namespace { - -static int scriptDebuggerCount = 0; -static bool eventCallbackRegistered = false; -static bool widgetInPaintEvent = false; - -static bool scriptDebuggerEventCallback(void **data) -{ - QEvent *event = reinterpret_cast(data[1]); - if (event->type() == QEvent::Paint) { - QObject *receiver = reinterpret_cast(data[0]); - bool was = widgetInPaintEvent; - widgetInPaintEvent = true; - QCoreApplication::instance()->notify(receiver, event); - widgetInPaintEvent = was; - bool *result = reinterpret_cast(data[2]); - *result = true; - return true; - } - return false; -} - -} - -/*! - \since 4.5 - \class QScriptDebugger - \internal - - \brief The QScriptDebugger class provides a Qt Script debugger. - - \ingroup script - -*/ - -class QScriptDebuggerPrivate - : public QObjectPrivate, - public QScriptDebuggerCommandSchedulerInterface, - public QScriptDebuggerJobSchedulerInterface, - public QScriptDebuggerEventHandlerInterface, - public QScriptDebuggerResponseHandlerInterface, - public QScriptCompletionProviderInterface, - public QScriptToolTipProviderInterface -{ - Q_DECLARE_PUBLIC(QScriptDebugger) -public: - QScriptDebuggerPrivate(); - ~QScriptDebuggerPrivate(); - - int scheduleJob(QScriptDebuggerJob *job); - void finishJob(QScriptDebuggerJob *job); - void hibernateUntilEvaluateFinished(QScriptDebuggerJob *job); - - void maybeStartNewJob(); - - int scheduleCommand(const QScriptDebuggerCommand &command, - QScriptDebuggerResponseHandlerInterface *responseHandler); - - void handleResponse( - const QScriptDebuggerResponse &response, int commandId); - bool debuggerEvent(const QScriptDebuggerEvent &event); - - QScriptCompletionTaskInterface *createCompletionTask( - const QString &contents, int cursorPosition, int frameIndex, int options); - - void showToolTip(const QPoint &pos, int frameIndex, - int lineNumber, const QStringList &path); - - void startInteraction(QScriptDebuggerEvent::Type type, - qint64 scriptId, int lineNumber); - void sync(); - void loadLocals(int frameIndex); - QScriptDebuggerLocalsModel *createLocalsModel(); - void selectScriptForFrame(int frameIndex); - void emitStoppedSignal(); - - void maybeDelete(QWidget *widget); - - // private slots - void _q_onLineEntered(const QString &contents); - void _q_onCurrentFrameChanged(int frameIndex); - void _q_onCurrentScriptChanged(qint64 scriptId); - void _q_onScriptLocationSelected(int lineNumber); - void _q_interrupt(); - void _q_continue(); - void _q_stepInto(); - void _q_stepOver(); - void _q_stepOut(); - void _q_runToCursor(); - void _q_runToNewScript(); - void _q_toggleBreakpoint(); - void _q_clearDebugOutput(); - void _q_clearErrorLog(); - void _q_clearConsole(); - void _q_findInScript(); - void _q_findNextInScript(); - void _q_findPreviousInScript(); - void _q_onFindCodeRequest(const QString &, int); - void _q_goToLine(); - - void executeConsoleCommand(const QString &command); - void findCode(const QString &exp, int options); - - QScriptDebuggerFrontend *frontend; - - bool interactive; - QScriptDebuggerConsole *console; - - int nextJobId; - QList pendingJobs; - QList pendingJobIds; - QScriptDebuggerJob *activeJob; - bool activeJobHibernating; - QHash watchedCommands; - QHash responseHandlers; - - QScriptDebuggerConsoleWidgetInterface *consoleWidget; - QScriptDebuggerStackWidgetInterface *stackWidget; - QScriptDebuggerStackModel *stackModel; - QScriptDebuggerScriptsWidgetInterface *scriptsWidget; - QScriptDebuggerScriptsModel *scriptsModel; - QScriptDebuggerLocalsWidgetInterface *localsWidget; - QHash localsModels; - QScriptDebuggerCodeWidgetInterface *codeWidget; - QScriptDebuggerCodeFinderWidgetInterface *codeFinderWidget; - QScriptBreakpointsWidgetInterface *breakpointsWidget; - QScriptBreakpointsModel *breakpointsModel; - QScriptDebugOutputWidgetInterface *debugOutputWidget; - QScriptErrorLogWidgetInterface *errorLogWidget; - QScriptDebuggerWidgetFactoryInterface *widgetFactory; - - QAction *interruptAction; - QAction *continueAction; - QAction *stepIntoAction; - QAction *stepOverAction; - QAction *stepOutAction; - QAction *runToCursorAction; - QAction *runToNewScriptAction; - - QAction *toggleBreakpointAction; - - QAction *clearDebugOutputAction; - QAction *clearErrorLogAction; - QAction *clearConsoleAction; - - QAction *findInScriptAction; - QAction *findNextInScriptAction; - QAction *findPreviousInScriptAction; - QAction *goToLineAction; - - int updatesEnabledTimerId; -}; - -QScriptDebuggerPrivate::QScriptDebuggerPrivate() -{ - frontend = 0; - activeJob = 0; - activeJobHibernating = false; - nextJobId = 0; - interactive = false; - - console = new QScriptDebuggerConsole(); - QScriptStdMessageHandler tmp; - console->loadScriptedCommands(&tmp); - - consoleWidget = 0; - stackWidget = 0; - stackModel = 0; - scriptsWidget = 0; - scriptsModel = 0; - localsWidget = 0; - codeWidget = 0; - codeFinderWidget = 0; - breakpointsWidget = 0; - breakpointsModel = 0; - debugOutputWidget = 0; - errorLogWidget = 0; - widgetFactory = 0; - - interruptAction = 0; - continueAction = 0; - stepIntoAction = 0; - stepOverAction = 0; - stepOutAction = 0; - runToCursorAction = 0; - runToNewScriptAction = 0; - - toggleBreakpointAction = 0; - - clearErrorLogAction = 0; - clearDebugOutputAction = 0; - clearConsoleAction = 0; - - findInScriptAction = 0; - findNextInScriptAction = 0; - findPreviousInScriptAction = 0; - goToLineAction = 0; - - updatesEnabledTimerId = -1; -} - -QScriptDebuggerPrivate::~QScriptDebuggerPrivate() -{ - delete console; - qDeleteAll(pendingJobs); - delete activeJob; - maybeDelete(consoleWidget); - maybeDelete(stackWidget); - maybeDelete(scriptsWidget); - maybeDelete(localsWidget); - maybeDelete(codeWidget); - maybeDelete(codeFinderWidget); - maybeDelete(breakpointsWidget); - maybeDelete(debugOutputWidget); - maybeDelete(errorLogWidget); -} - -void QScriptDebuggerPrivate::maybeDelete(QWidget *widget) -{ - if (widget && !widget->parent()) - delete widget; -} - -/*! - \reimp -*/ -int QScriptDebuggerPrivate::scheduleJob(QScriptDebuggerJob *job) -{ - QScriptDebuggerJobPrivate *priv = QScriptDebuggerJobPrivate::get(job); - Q_ASSERT(priv->jobScheduler == 0); - priv->jobScheduler = this; - int id = nextJobId; - pendingJobs.append(job); - pendingJobIds.append(id); - maybeStartNewJob(); - return id; -} - -/*! - \reimp -*/ -void QScriptDebuggerPrivate::finishJob(QScriptDebuggerJob *job) -{ - Q_UNUSED(job); - Q_ASSERT(activeJob == job); - delete activeJob; - activeJob = 0; - activeJobHibernating = false; - maybeStartNewJob(); -} - -/*! - \reimp -*/ -void QScriptDebuggerPrivate::hibernateUntilEvaluateFinished(QScriptDebuggerJob *job) -{ - Q_UNUSED(job); - Q_ASSERT(activeJob == job); - activeJobHibernating = true; -} - -/*! - Starts a new job if appropriate. -*/ -void QScriptDebuggerPrivate::maybeStartNewJob() -{ - if (activeJob || pendingJobs.isEmpty()) - return; - activeJob = pendingJobs.takeFirst(); - activeJob->start(); -} - -/*! - \reimp -*/ -int QScriptDebuggerPrivate::scheduleCommand( - const QScriptDebuggerCommand &command, - QScriptDebuggerResponseHandlerInterface *responseHandler) -{ - if (!frontend) - return -1; - int id = frontend->scheduleCommand(command, this); - if (responseHandler && (responseHandler != this)) - responseHandlers.insert(id, responseHandler); - if ((command.type() == QScriptDebuggerCommand::SetBreakpoint) - || (command.type() == QScriptDebuggerCommand::SetBreakpointData) - || (command.type() == QScriptDebuggerCommand::DeleteBreakpoint)) { - // need to watch this command and update the breakpoints model afterwards - watchedCommands.insert(id, command); - } - return id; -} - -/*! - \reimp -*/ -void QScriptDebuggerPrivate::handleResponse( - const QScriptDebuggerResponse &response, int commandId) -{ - Q_Q(QScriptDebugger); - if (watchedCommands.contains(commandId)) { - QScriptDebuggerCommand command = watchedCommands.take(commandId); - if (response.error() == QScriptDebuggerResponse::NoError) { - if (!breakpointsModel) - breakpointsModel = new QScriptBreakpointsModel(this, this, q); - switch (command.type()) { - case QScriptDebuggerCommand::SetBreakpoint: { - int breakpointId = response.resultAsInt(); - QScriptBreakpointData data = command.breakpointData(); - breakpointsModel->addBreakpoint(breakpointId, data); - } break; - case QScriptDebuggerCommand::SetBreakpointData: { - int breakpointId = command.breakpointId(); - QScriptBreakpointData data = command.breakpointData(); - breakpointsModel->modifyBreakpoint(breakpointId, data); - } break; - case QScriptDebuggerCommand::DeleteBreakpoint: { - int breakpointId = command.breakpointId(); - breakpointsModel->removeBreakpoint(breakpointId); - } break; - default: - Q_ASSERT(false); - } - } - } else if (response.async()) { - interactive = false; - // disable/invalidate/enable stuff - if (continueAction) - continueAction->setEnabled(false); - if (stepIntoAction) - stepIntoAction->setEnabled(false); - if (stepOverAction) - stepOverAction->setEnabled(false); - if (stepOutAction) - stepOutAction->setEnabled(false); - if (runToCursorAction) - runToCursorAction->setEnabled(false); - if (runToNewScriptAction) - runToNewScriptAction->setEnabled(false); - if (interruptAction) - interruptAction->setEnabled(true); - - // the timer is to avoid flicker when stepping - if (stackWidget) { - stackWidget->setUpdatesEnabled(false); - stackWidget->setEnabled(false); - if (updatesEnabledTimerId == -1) - updatesEnabledTimerId = q->startTimer(75); - } - if (localsWidget) { - localsWidget->setUpdatesEnabled(false); - localsWidget->setEnabled(false); - if (updatesEnabledTimerId == -1) - updatesEnabledTimerId = q->startTimer(75); - } - if (codeWidget) - codeWidget->invalidateExecutionLineNumbers(); - - emit q->started(); - } - - QScriptDebuggerResponseHandlerInterface *realHandler = responseHandlers.take(commandId); - if (realHandler) - realHandler->handleResponse(response, commandId); -} - -/*! - \reimp - - Handles a debugger event from the frontend. -*/ -bool QScriptDebuggerPrivate::debuggerEvent(const QScriptDebuggerEvent &event) -{ - Q_Q(QScriptDebugger); - switch (event.type()) { - case QScriptDebuggerEvent::None: - case QScriptDebuggerEvent::UserEvent: - case QScriptDebuggerEvent::MaxUserEvent: - Q_ASSERT(false); - break; - - case QScriptDebuggerEvent::Trace: - if (!debugOutputWidget && widgetFactory) - q->setDebugOutputWidget(widgetFactory->createDebugOutputWidget()); - if (debugOutputWidget) - debugOutputWidget->message(QtDebugMsg, event.message()); - return true; // trace doesn't stall execution - - case QScriptDebuggerEvent::SteppingFinished: { - if (!consoleWidget && widgetFactory) - q->setConsoleWidget(widgetFactory->createConsoleWidget()); - if (consoleWidget) { - QString msg = event.message(); - if (!msg.isEmpty()) - consoleWidget->message(QtDebugMsg, msg); - } - } break; - - case QScriptDebuggerEvent::Interrupted: - case QScriptDebuggerEvent::LocationReached: - break; - - case QScriptDebuggerEvent::Breakpoint: { - int bpId = event.breakpointId(); - if (!consoleWidget && widgetFactory) - q->setConsoleWidget(widgetFactory->createConsoleWidget()); - if (consoleWidget) { - consoleWidget->message(QtDebugMsg, - QString::fromLatin1("Breakpoint %0 at %1, line %2.") - .arg(bpId).arg(event.fileName()) - .arg(event.lineNumber())); - } - if (breakpointsModel->breakpointData(bpId).isSingleShot()) - breakpointsModel->removeBreakpoint(bpId); - } break; - - case QScriptDebuggerEvent::Exception: { - if (event.hasExceptionHandler()) { - // Let the exception be handled like normal. - // We may want to add a "Break on all exceptions" option - // to be able to customize this behavior. - return true; - } - if (!consoleWidget && widgetFactory) - q->setConsoleWidget(widgetFactory->createConsoleWidget()); - if (!errorLogWidget && widgetFactory) - q->setErrorLogWidget(widgetFactory->createErrorLogWidget()); - if (consoleWidget || errorLogWidget) { - QString fn = event.fileName(); - if (fn.isEmpty()) { - if (event.scriptId() != -1) - fn = QString::fromLatin1("").arg(event.scriptId()); - else - fn = QString::fromLatin1(""); - } - QString msg = QString::fromLatin1("Uncaught exception at %0:%1: %2").arg(fn) - .arg(event.lineNumber()).arg(event.message()); - if (consoleWidget) - consoleWidget->message(QtCriticalMsg, msg); - if (errorLogWidget) - errorLogWidget->message(QtCriticalMsg, msg); - } - } break; - - case QScriptDebuggerEvent::InlineEvalFinished: { - QScriptDebuggerValue result = event.scriptValue(); - Q_ASSERT(console != 0); - int action = console->evaluateAction(); - console->setEvaluateAction(0); - switch (action) { - case 0: { // eval command - if (activeJob) { - if (activeJobHibernating) { - activeJobHibernating = false; - activeJob->evaluateFinished(result); - } - } else if (consoleWidget) { - // ### if the result is an object, need to do a tostring job on it -// messageHandler->message(QtDebugMsg, result.toString()); - if (result.type() != QScriptDebuggerValue::UndefinedValue) - consoleWidget->message(QtDebugMsg, event.message()); - } - } break; - case 1: { // return command - QScriptDebuggerCommandSchedulerFrontend frontend(this, this); - frontend.scheduleForceReturn(console->currentFrameIndex(), result); - } return false; - } - if (!event.isNestedEvaluate()) { - // in the case when evaluate() was called while the - // engine was not running, we don't want to enter interactive mode - return true; - } - } break; - - case QScriptDebuggerEvent::DebuggerInvocationRequest: { - if (!consoleWidget && widgetFactory) - q->setConsoleWidget(widgetFactory->createConsoleWidget()); - if (consoleWidget) { - QString fn = event.fileName(); - if (fn.isEmpty()) - fn = QString::fromLatin1("").arg(event.scriptId()); - consoleWidget->message(QtDebugMsg, - QString::fromLatin1("Debugger invoked from %1, line %2.") - .arg(fn).arg(event.lineNumber())); - } - } break; - - case QScriptDebuggerEvent::ForcedReturn: { - } break; - - } - - if (widgetInPaintEvent) { - QString msg = QString::fromLatin1("Suspending evaluation in paintEvent() is not supported; resuming."); - if (!consoleWidget && widgetFactory) - q->setConsoleWidget(widgetFactory->createConsoleWidget()); - if (!errorLogWidget && widgetFactory) - q->setErrorLogWidget(widgetFactory->createErrorLogWidget()); - if (consoleWidget) - consoleWidget->message(QtWarningMsg, msg); - if (errorLogWidget) - errorLogWidget->message(QtCriticalMsg, msg); - return true; - } - - if (activeJobHibernating) { - // evaluate() did not finish normally (e.g. due to a breakpoint), - // so cancel the job that's waiting for it - delete activeJob; - activeJob = 0; - activeJobHibernating = false; - } - - startInteraction(event.type(), event.scriptId(), event.lineNumber()); - return !interactive; -} - -class QScriptToolTipJob : public QScriptDebuggerCommandSchedulerJob -{ -public: - QScriptToolTipJob(const QPoint &pos, int frameIndex, - int lineNumber, const QStringList &path, - QScriptDebuggerCommandSchedulerInterface *scheduler) - : QScriptDebuggerCommandSchedulerJob(scheduler), m_pos(pos), - m_frameIndex(frameIndex), m_lineNumber(lineNumber), m_path(path) - {} - - void start() - { - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - frontend.scheduleGetPropertyExpressionValue(m_frameIndex, m_lineNumber, m_path); - } - void handleResponse(const QScriptDebuggerResponse &response, int /*commandId*/) - { - QString tip = response.result().toString(); - if (tip.indexOf(QLatin1Char('\n')) != -1) { - QStringList lines = tip.split(QLatin1Char('\n')); - int lineCount = lines.size(); - if (lineCount > 5) { - lines = lines.mid(0, 5); - lines.append(QString::fromLatin1("(... %0 more lines ...)").arg(lineCount - 5)); - } - tip = lines.join(QLatin1String("\n")); - } - QToolTip::showText(m_pos, tip); - finish(); - } - -private: - QPoint m_pos; - int m_frameIndex; - int m_lineNumber; - QStringList m_path; -}; - -/*! - \reimp -*/ -void QScriptDebuggerPrivate::showToolTip(const QPoint &pos, int frameIndex, - int lineNumber, const QStringList &path) -{ - if (frameIndex == -1) { - if (stackWidget) - frameIndex = stackWidget->currentFrameIndex(); - else - frameIndex = console->currentFrameIndex(); - } - QScriptDebuggerJob *job = new QScriptToolTipJob(pos, frameIndex, lineNumber, path, this); - scheduleJob(job); -} - -/*! - \reimp -*/ -QScriptCompletionTaskInterface *QScriptDebuggerPrivate::createCompletionTask( - const QString &contents, int cursorPosition, int frameIndex, int options) -{ - return new QScriptCompletionTask( - contents, cursorPosition, frameIndex, this, this, - (options & QScriptCompletionProviderInterface::ConsoleCommandCompletion) ? console : 0); -} - -/*! - Slot called when a line has been entered in the console widget. -*/ -void QScriptDebuggerPrivate::_q_onLineEntered(const QString &contents) -{ - QScriptDebuggerConsoleCommandJob *commandJob; - commandJob = console->consumeInput(contents, consoleWidget, this); - if (commandJob != 0) { - scheduleJob(commandJob); - consoleWidget->setLineContinuationMode(false); - } else if (console->hasIncompleteInput()) { - consoleWidget->setLineContinuationMode(true); - } -} - -/*! - Slot called when the current index has changed in the stack widget. -*/ -void QScriptDebuggerPrivate::_q_onCurrentFrameChanged(int frameIndex) -{ - loadLocals(frameIndex); - selectScriptForFrame(frameIndex); -} - -/*! - Slot called when the current script has changed in the scripts widget. -*/ -void QScriptDebuggerPrivate::_q_onCurrentScriptChanged(qint64 scriptId) -{ - if (codeWidget && (codeWidget->currentScriptId() != scriptId)) { - codeWidget->setCurrentScript(scriptId); - QScriptDebuggerCodeViewInterface *view = codeWidget->currentView(); - if (view) - view->setExecutionLineNumber(-1, /*error=*/false); - } -} - -void QScriptDebuggerPrivate::_q_onScriptLocationSelected(int lineNumber) -{ - QScriptDebuggerCodeViewInterface *view = codeWidget->currentView(); - if (!view) - return; - view->gotoLine(lineNumber); -} - -void QScriptDebuggerPrivate::_q_interrupt() -{ - executeConsoleCommand(QString::fromLatin1("interrupt")); -} - -void QScriptDebuggerPrivate::_q_continue() -{ - executeConsoleCommand(QString::fromLatin1("continue")); -} - -void QScriptDebuggerPrivate::_q_stepInto() -{ - executeConsoleCommand(QString::fromLatin1("step")); -} - -void QScriptDebuggerPrivate::_q_stepOver() -{ - executeConsoleCommand(QString::fromLatin1("next")); -} - -void QScriptDebuggerPrivate::_q_stepOut() -{ - executeConsoleCommand(QString::fromLatin1("finish")); -} - -void QScriptDebuggerPrivate::_q_runToCursor() -{ - qint64 scriptId = codeWidget->currentScriptId(); - int lineNumber = codeWidget->currentView()->cursorLineNumber(); - QScriptDebuggerCommandSchedulerFrontend frontend(this, this); - frontend.scheduleRunToLocation(scriptId, lineNumber); -} - -void QScriptDebuggerPrivate::_q_runToNewScript() -{ - QScriptDebuggerCommandSchedulerFrontend frontend(this, this); - frontend.scheduleRunToLocation(QString(), -1); -} - -void QScriptDebuggerPrivate::_q_toggleBreakpoint() -{ - Q_ASSERT(codeWidget != 0); - QScriptDebuggerCodeViewInterface *view = codeWidget->currentView(); - if (!view) - return; - qint64 scriptId = codeWidget->currentScriptId(); - int lineNumber = view->cursorLineNumber(); - Q_ASSERT(breakpointsModel != 0); - int bpId = breakpointsModel->resolveBreakpoint(scriptId, lineNumber); - if (bpId != -1) { - breakpointsModel->deleteBreakpoint(bpId); - } else { - QScriptBreakpointData data(scriptId, lineNumber); - if (scriptsModel) - data.setFileName(scriptsModel->scriptData(scriptId).fileName()); - breakpointsModel->setBreakpoint(data); - } -} - -void QScriptDebuggerPrivate::_q_clearDebugOutput() -{ - if (debugOutputWidget) - debugOutputWidget->clear(); -} - -void QScriptDebuggerPrivate::_q_clearErrorLog() -{ - if (errorLogWidget) - errorLogWidget->clear(); -} - -void QScriptDebuggerPrivate::_q_clearConsole() -{ - if (consoleWidget) - consoleWidget->clear(); -} - -void QScriptDebuggerPrivate::executeConsoleCommand(const QString &command) -{ - QString tmp = console->incompleteInput(); - console->setIncompleteInput(QString()); - QScriptDebuggerJob *job = console->consumeInput(console->commandPrefix() + command, debugOutputWidget, this); - console->setIncompleteInput(tmp); - if (job != 0) { - scheduleJob(job); - // once to send the command... - QCoreApplication::processEvents(); - // ... and once to receive the response - QCoreApplication::processEvents(); - } -} - -void QScriptDebuggerPrivate::_q_findInScript() -{ - if (!codeFinderWidget && widgetFactory) - q_func()->setCodeFinderWidget(widgetFactory->createCodeFinderWidget()); - if (codeFinderWidget) { - codeFinderWidget->show(); - codeFinderWidget->setFocus(Qt::OtherFocusReason); - } -} - -void QScriptDebuggerPrivate::_q_findNextInScript() -{ - findCode(codeFinderWidget->text(), codeFinderWidget->findOptions()); -} - -void QScriptDebuggerPrivate::_q_findPreviousInScript() -{ - int options = codeFinderWidget->findOptions(); - options |= QTextDocument::FindBackward; - findCode(codeFinderWidget->text(), options); -} - -void QScriptDebuggerPrivate::_q_onFindCodeRequest( - const QString &exp, int options) -{ - findCode(exp, options); - if (findNextInScriptAction) - findNextInScriptAction->setEnabled(!exp.isEmpty()); - if (findPreviousInScriptAction) - findPreviousInScriptAction->setEnabled(!exp.isEmpty()); -} - -void QScriptDebuggerPrivate::findCode(const QString &exp, int options) -{ - QScriptDebuggerCodeViewInterface *view = codeWidget->currentView(); - if (!view) - return; - int result = view->find(exp, options); - codeFinderWidget->setOK(((result & 0x1) != 0) || exp.isEmpty()); - codeFinderWidget->setWrapped((result & 0x2) != 0); -} - -void QScriptDebuggerPrivate::_q_goToLine() -{ - QScriptDebuggerCodeViewInterface *view = codeWidget->currentView(); - if (!view) - return; -#ifndef QT_NO_INPUTDIALOG - bool ok = false; - int lineNumber = QInputDialog::getInteger(0, QScriptDebugger::tr("Go to Line"), - QScriptDebugger::tr("Line:"), - view->cursorLineNumber(), - 1, INT_MAX, 1, &ok); - if (ok) - view->gotoLine(lineNumber); -#endif -} - -class QScriptDebuggerShowLineJob : public QScriptDebuggerCommandSchedulerJob -{ -public: - QScriptDebuggerShowLineJob(qint64 scriptId, int lineNumber, - QScriptMessageHandlerInterface *messageHandler, - QScriptDebuggerCommandSchedulerInterface *scheduler) - : QScriptDebuggerCommandSchedulerJob(scheduler), - m_scriptId(scriptId), m_lineNumber(lineNumber), - m_messageHandler(messageHandler) {} - - void start() - { - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - frontend.scheduleGetScriptData(m_scriptId); - } - void handleResponse(const QScriptDebuggerResponse &response, int /*commandId*/) - { - QScriptScriptData data = response.resultAsScriptData(); - QString line = data.lines(m_lineNumber, 1).value(0); - m_messageHandler->message(QtDebugMsg, QString::fromLatin1("%0\t%1") - .arg(m_lineNumber).arg(line)); - finish(); - } - -private: - qint64 m_scriptId; - int m_lineNumber; - QScriptMessageHandlerInterface *m_messageHandler; -}; - -namespace { - -class SyncStackJob : public QScriptDebuggerCommandSchedulerJob -{ -public: - SyncStackJob(QScriptDebuggerPrivate *debugger) - : QScriptDebuggerCommandSchedulerJob(debugger), - m_debugger(debugger), m_index(0) {} - void start() - { - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - frontend.scheduleGetContextInfo(m_index); // ### getContextInfos() - } - void handleResponse(const QScriptDebuggerResponse &response, - int) - { - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - if (response.error() != QScriptDebuggerResponse::InvalidContextIndex) { - m_infos.append(response.resultAsContextInfo()); - frontend.scheduleGetContextInfo(++m_index); - } else { - m_debugger->stackModel->setContextInfos(m_infos); - if (m_debugger->stackWidget->currentFrameIndex() == -1) - m_debugger->stackWidget->setCurrentFrameIndex(0); - m_debugger->stackWidget->setUpdatesEnabled(true); - m_debugger->stackWidget->setEnabled(true); - finish(); - } - } - -private: - QScriptDebuggerPrivate *m_debugger; - int m_index; - QList m_infos; -}; - -class SyncScriptsJob : public QScriptDebuggerCommandSchedulerJob -{ -public: - SyncScriptsJob(QScriptDebuggerPrivate *debugger) - : QScriptDebuggerCommandSchedulerJob(debugger), - m_debugger(debugger), m_index(-1) {} - - void start() - { - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - frontend.scheduleScriptsCheckpoint(); - } - void handleResponse(const QScriptDebuggerResponse &response, - int) - { - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - if (m_index == -1) { - QScriptScriptsDelta delta; - delta = qvariant_cast(response.result()); - - const QList &removed = delta.second; - for (int i = 0; i < removed.size(); ++i) - m_debugger->scriptsModel->removeScript(removed.at(i)); - - m_added = delta.first; - if (!m_added.isEmpty()) { - frontend.scheduleGetScriptData(m_added.at(++m_index)); - } else { - m_debugger->scriptsModel->commit(); - finish(); - } - } else { - QScriptScriptData data = response.resultAsScriptData(); - qint64 scriptId = m_added.at(m_index); - m_debugger->scriptsModel->addScript(scriptId, data); - - // ### could be slow, might want to do this in a separate thread -// Q_ASSERT_X(false, Q_FUNC_INFO, "implement me"); - QString xml; // = qt_scriptToXml(data.contents(), data.baseLineNumber()); - QScriptXmlParser::Result extraInfo = QScriptXmlParser::parse(xml); - m_debugger->scriptsModel->addExtraScriptInfo( - scriptId, extraInfo.functionsInfo, extraInfo.executableLineNumbers); - - if (++m_index < m_added.size()) - frontend.scheduleGetScriptData(m_added.at(m_index)); - else { - m_debugger->scriptsModel->commit(); - finish(); - } - } - } - -private: - QScriptDebuggerPrivate *m_debugger; - int m_index; - QList m_added; -}; - -class SyncBreakpointsJob : public QScriptDebuggerCommandSchedulerJob -{ -public: - SyncBreakpointsJob(QScriptDebuggerPrivate *debugger) - : QScriptDebuggerCommandSchedulerJob(debugger), - m_debugger(debugger) {} - void start() - { - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - frontend.scheduleGetBreakpoints(); - } - void handleResponse(const QScriptDebuggerResponse &response, - int) - { - QScriptBreakpointMap breakpoints = response.resultAsBreakpoints(); - QScriptBreakpointMap::const_iterator it; - for (it = breakpoints.constBegin(); it != breakpoints.constEnd(); ++it) { - int id = it.key(); - QScriptBreakpointData newData = it.value(); - QScriptBreakpointData existingData = m_debugger->breakpointsModel->breakpointData(id); - if (existingData.isValid() && (existingData != newData)) - m_debugger->breakpointsModel->modifyBreakpoint(id, newData); - } - finish(); - } - -private: - QScriptDebuggerPrivate *m_debugger; - QList m_infos; -}; - -class SyncLocalsJob : public QScriptDebuggerCommandSchedulerJob -{ -public: - SyncLocalsJob(QScriptDebuggerPrivate *debugger) - : QScriptDebuggerCommandSchedulerJob(debugger), - m_debugger(debugger) {} - - void start() - { - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - frontend.scheduleContextsCheckpoint(); - } - void handleResponse(const QScriptDebuggerResponse &response, - int) - { - QScriptContextsDelta delta = qvariant_cast(response.result()); - for (int i = 0; i < delta.first.size(); ++i) { - QScriptDebuggerLocalsModel *model = m_debugger->localsModels.take(delta.first.at(i)); - delete model; - } - finish(); - } - -private: - QScriptDebuggerPrivate *m_debugger; -}; - -class LoadLocalsJob : public QScriptDebuggerCommandSchedulerJob -{ -public: - LoadLocalsJob(QScriptDebuggerPrivate *debugger, int frameIndex) - : QScriptDebuggerCommandSchedulerJob(debugger), - m_debugger(debugger), m_frameIndex(frameIndex) {} - - void start() - { - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - frontend.scheduleGetContextId(m_frameIndex); - } - void handleResponse(const QScriptDebuggerResponse &response, - int) - { - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - qint64 contextId = response.resultAsLongLong(); - QScriptDebuggerLocalsModel *model = m_debugger->localsModels.value(contextId); - if (model) { - model->sync(m_frameIndex); - } else { - model = m_debugger->createLocalsModel(); - m_debugger->localsModels.insert(contextId, model); - model->init(m_frameIndex); - } - if (m_debugger->localsWidget) { - if (m_debugger->localsWidget->localsModel() != model) // ### bug in qtreeview - m_debugger->localsWidget->setLocalsModel(model); - m_debugger->localsWidget->setUpdatesEnabled(true); - m_debugger->localsWidget->setEnabled(true); - } - finish(); - } - -private: - QScriptDebuggerPrivate *m_debugger; - int m_frameIndex; -}; - -class EmitStoppedSignalJob : public QScriptDebuggerJob -{ -public: - EmitStoppedSignalJob(QScriptDebuggerPrivate *debugger) - : m_debugger(debugger) {} - - void start() - { - m_debugger->emitStoppedSignal(); - finish(); - } - -private: - QScriptDebuggerPrivate *m_debugger; -}; - -} // namespace - -void QScriptDebuggerPrivate::startInteraction(QScriptDebuggerEvent::Type type, - qint64 scriptId, int lineNumber) -{ - Q_Q(QScriptDebugger); - if (type != QScriptDebuggerEvent::InlineEvalFinished) { - if (stackWidget) - stackWidget->setCurrentFrameIndex(0); - console->setCurrentFrameIndex(0); - console->setCurrentScriptId(scriptId); - console->setCurrentLineNumber(lineNumber); - } - - if ((scriptId != -1) && consoleWidget) { - QScriptDebuggerJob *job = new QScriptDebuggerShowLineJob(scriptId, lineNumber, consoleWidget, this); - scheduleJob(job); - } - - sync(); - - if (!interactive) { - interactive = true; - if (updatesEnabledTimerId != -1) { - q->killTimer(updatesEnabledTimerId); - updatesEnabledTimerId = -1; - } - console->bumpSessionId(); - scheduleJob(new EmitStoppedSignalJob(this)); - } - - if (consoleWidget) - consoleWidget->activateWindow(); - else if (codeWidget) - codeWidget->activateWindow(); - - if (continueAction) - continueAction->setEnabled(true); - if (stepIntoAction) - stepIntoAction->setEnabled(true); - if (stepOverAction) - stepOverAction->setEnabled(true); - if (stepOutAction) - stepOutAction->setEnabled(true); - if (runToCursorAction) - runToCursorAction->setEnabled(true); - if (runToNewScriptAction) - runToNewScriptAction->setEnabled(true); - if (interruptAction) - interruptAction->setEnabled(false); - - bool hasScript = (codeWidget != 0); - if (findInScriptAction) - findInScriptAction->setEnabled(hasScript); - if (toggleBreakpointAction) - toggleBreakpointAction->setEnabled(hasScript); - if (goToLineAction) - goToLineAction->setEnabled(hasScript); -} - -void QScriptDebuggerPrivate::sync() -{ - if (localsWidget) { - QScriptDebuggerJob *job = new SyncLocalsJob(this); - scheduleJob(job); - } - if (scriptsModel) { - QScriptDebuggerJob *job = new SyncScriptsJob(this); - scheduleJob(job); - } - if (stackModel) { - QScriptDebuggerJob *job = new SyncStackJob(this); - scheduleJob(job); - } - if (breakpointsModel) { - // need to sync because the ignore-count could have changed - QScriptDebuggerJob *job = new SyncBreakpointsJob(this); - scheduleJob(job); - } - - if (stackWidget && (stackWidget->currentFrameIndex() != -1)) { - int index = stackWidget->currentFrameIndex(); - loadLocals(index); - selectScriptForFrame(index); - } else if (codeWidget && (console->currentFrameIndex() != -1)) { - selectScriptForFrame(console->currentFrameIndex()); - } -} - -void QScriptDebuggerPrivate::loadLocals(int frameIndex) -{ - LoadLocalsJob *job = new LoadLocalsJob(this, frameIndex); - scheduleJob(job); -} - -QScriptDebuggerLocalsModel *QScriptDebuggerPrivate::createLocalsModel() -{ - return new QScriptDebuggerLocalsModel(this, this, q_func()); -} - -namespace { - -class ShowFrameCodeJob : public QScriptDebuggerCommandSchedulerJob -{ -public: - ShowFrameCodeJob(QScriptDebuggerPrivate *debugger, int frameIndex) - : QScriptDebuggerCommandSchedulerJob(debugger), - m_debugger(debugger), m_frameIndex(frameIndex) {} - - void start() - { - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - frontend.scheduleGetContextInfo(m_frameIndex); - } - void handleResponse(const QScriptDebuggerResponse &response, - int) - { - if (m_info.isNull()) { - m_info = response.resultAsContextInfo(); - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - frontend.scheduleGetContextState(m_frameIndex); - } else { - int contextState = response.resultAsInt(); - bool error = (contextState == QScriptContext::ExceptionState); - if (m_debugger->scriptsWidget) { - m_debugger->scriptsWidget->setCurrentScript(m_info.scriptId()); - } - if (m_debugger->codeWidget) { - m_debugger->codeWidget->setCurrentScript(m_info.scriptId()); - QScriptDebuggerCodeViewInterface *view = m_debugger->codeWidget->currentView(); - if (view) - view->setExecutionLineNumber(m_info.lineNumber(), error); - } - finish(); - } - } - -private: - QScriptDebuggerPrivate *m_debugger; - int m_frameIndex; - QScriptContextInfo m_info; -}; - -} // namespace - -void QScriptDebuggerPrivate::selectScriptForFrame(int frameIndex) -{ - QScriptDebuggerJob *job = new ShowFrameCodeJob(this, frameIndex); - scheduleJob(job); -} - -void QScriptDebuggerPrivate::emitStoppedSignal() -{ - emit q_func()->stopped(); -} - -/*! - Constructs a new QScriptDebugger object. -*/ -QScriptDebugger::QScriptDebugger(QObject *parent) - : QObject(*new QScriptDebuggerPrivate, parent) -{ - ++scriptDebuggerCount; -} - -/*! - Destroys this QScriptDebugger. -*/ -QScriptDebugger::~QScriptDebugger() -{ - --scriptDebuggerCount; - if ((scriptDebuggerCount == 0) && eventCallbackRegistered) { - eventCallbackRegistered = false; - QInternal::unregisterCallback(scriptDebuggerEventCallback); - } -} - -/*! - \internal -*/ -QScriptDebugger::QScriptDebugger(QScriptDebuggerPrivate &dd, QObject *parent) - : QObject(dd, parent) -{ -} - -QScriptDebuggerFrontend *QScriptDebugger::frontend() const -{ - Q_D(const QScriptDebugger); - return d->frontend; -} - -void QScriptDebugger::setFrontend(QScriptDebuggerFrontend *frontend) -{ - Q_D(QScriptDebugger); - if (d->frontend) - d->frontend->setEventHandler(0); - d->frontend = frontend; - if (frontend) { - frontend->setEventHandler(d); - if (!eventCallbackRegistered) { - eventCallbackRegistered = true; - QInternal::registerCallback(scriptDebuggerEventCallback); - } - } -} - -QAction *QScriptDebugger::action(DebuggerAction action, QObject *parent) -{ - switch (action) { - case InterruptAction: - return interruptAction(parent); - case ContinueAction: - return continueAction(parent); - case StepIntoAction: - return stepIntoAction(parent); - case StepOverAction: - return stepOverAction(parent); - case StepOutAction: - return stepOutAction(parent); - case RunToCursorAction: - return runToCursorAction(parent); - case RunToNewScriptAction: - return runToNewScriptAction(parent); - case ToggleBreakpointAction: - return toggleBreakpointAction(parent); - case ClearDebugOutputAction: - return clearDebugOutputAction(parent); - case ClearErrorLogAction: - return clearErrorLogAction(parent); - case ClearConsoleAction: - return clearConsoleAction(parent); - case FindInScriptAction: - return findInScriptAction(parent); - case FindNextInScriptAction: - return findNextInScriptAction(parent); - case FindPreviousInScriptAction: - return findPreviousInScriptAction(parent); - case GoToLineAction: - return goToLineAction(parent); - } - return 0; -} - -QWidget *QScriptDebugger::widget(DebuggerWidget widget) -{ - switch (widget) { - case ConsoleWidget: { - QScriptDebuggerConsoleWidgetInterface *w = consoleWidget(); - if (!w && widgetFactory()) { - w = widgetFactory()->createConsoleWidget(); - setConsoleWidget(w); - } - return w; - } - case StackWidget: { - QScriptDebuggerStackWidgetInterface *w = stackWidget(); - if (!w && widgetFactory()) { - w = widgetFactory()->createStackWidget(); - setStackWidget(w); - } - return w; - } - case ScriptsWidget: { - QScriptDebuggerScriptsWidgetInterface *w = scriptsWidget(); - if (!w && widgetFactory()) { - w = widgetFactory()->createScriptsWidget(); - setScriptsWidget(w); - } - return w; - } - case LocalsWidget: { - QScriptDebuggerLocalsWidgetInterface *w = localsWidget(); - if (!w && widgetFactory()) { - w = widgetFactory()->createLocalsWidget(); - setLocalsWidget(w); - } - return w; - } - case CodeWidget: { - QScriptDebuggerCodeWidgetInterface *w = codeWidget(); - if (!w && widgetFactory()) { - w = widgetFactory()->createCodeWidget(); - setCodeWidget(w); - } - return w; - } - case CodeFinderWidget: { - QScriptDebuggerCodeFinderWidgetInterface *w = codeFinderWidget(); - if (!w && widgetFactory()) { - w = widgetFactory()->createCodeFinderWidget(); - setCodeFinderWidget(w); - } - return w; - } - case BreakpointsWidget: { - QScriptBreakpointsWidgetInterface *w = breakpointsWidget(); - if (!w && widgetFactory()) { - w = widgetFactory()->createBreakpointsWidget(); - setBreakpointsWidget(w); - } - return w; - } - case DebugOutputWidget: { - QScriptDebugOutputWidgetInterface *w = debugOutputWidget(); - if (!w && widgetFactory()) { - w = widgetFactory()->createDebugOutputWidget(); - setDebugOutputWidget(w); - } - return w; - } - case ErrorLogWidget: { - QScriptErrorLogWidgetInterface *w = errorLogWidget(); - if (!w && widgetFactory()) { - w = widgetFactory()->createErrorLogWidget(); - setErrorLogWidget(w); - } - return w; - } - } - return 0; -} - -QScriptDebuggerConsoleWidgetInterface *QScriptDebugger::consoleWidget() const -{ - Q_D(const QScriptDebugger); - return d->consoleWidget; -} - -void QScriptDebugger::setConsoleWidget(QScriptDebuggerConsoleWidgetInterface *consoleWidget) -{ - Q_D(QScriptDebugger); - if (d->consoleWidget) { - QObject::disconnect(d->consoleWidget, 0, this, 0); - } - d->consoleWidget = consoleWidget; - if (consoleWidget) { - consoleWidget->setCommandHistorian(d->console); - consoleWidget->setCompletionProvider(d); - QObject::connect(consoleWidget, SIGNAL(lineEntered(QString)), - this, SLOT(_q_onLineEntered(QString))); - - d->console->showDebuggerInfoMessage(consoleWidget); - } -} - -QScriptDebuggerStackWidgetInterface *QScriptDebugger::stackWidget() const -{ - Q_D(const QScriptDebugger); - return d->stackWidget; -} - -void QScriptDebugger::setStackWidget(QScriptDebuggerStackWidgetInterface *stackWidget) -{ - Q_D(QScriptDebugger); - if (d->stackWidget) { - QObject::disconnect(d->stackWidget, 0, this, 0); - } - d->stackWidget = stackWidget; - if (stackWidget) { - if (!d->stackModel) { - d->stackModel = new QScriptDebuggerStackModel(this); - if (d->interactive) - d->scheduleJob(new SyncStackJob(d)); - } - stackWidget->setStackModel(d->stackModel); - QObject::connect(stackWidget, SIGNAL(currentFrameChanged(int)), - this, SLOT(_q_onCurrentFrameChanged(int))); - } -} - -QScriptDebuggerScriptsWidgetInterface *QScriptDebugger::scriptsWidget() const -{ - Q_D(const QScriptDebugger); - return d->scriptsWidget; -} - -void QScriptDebugger::setScriptsWidget(QScriptDebuggerScriptsWidgetInterface *scriptsWidget) -{ - Q_D(QScriptDebugger); - if (d->scriptsWidget) { - QObject::disconnect(d->scriptsWidget, 0, this, 0); - } - d->scriptsWidget = scriptsWidget; - if (scriptsWidget) { - if (!d->scriptsModel) { - d->scriptsModel = new QScriptDebuggerScriptsModel(this); - if (d->interactive) - d->scheduleJob(new SyncScriptsJob(d)); - } - scriptsWidget->setScriptsModel(d->scriptsModel); - QObject::connect(scriptsWidget, SIGNAL(currentScriptChanged(qint64)), - this, SLOT(_q_onCurrentScriptChanged(qint64))); - QObject::connect(d->scriptsWidget, SIGNAL(scriptLocationSelected(int)), - this, SLOT(_q_onScriptLocationSelected(int))); - } -} - -QScriptDebuggerLocalsWidgetInterface *QScriptDebugger::localsWidget() const -{ - Q_D(const QScriptDebugger); - return d->localsWidget; -} - -void QScriptDebugger::setLocalsWidget(QScriptDebuggerLocalsWidgetInterface *localsWidget) -{ - Q_D(QScriptDebugger); - if (d->localsWidget) { - // ### d->localsWidget->setLocalsModel(0); - } - localsWidget->setCompletionProvider(d); - d->localsWidget = localsWidget; -} - -QScriptDebuggerCodeWidgetInterface *QScriptDebugger::codeWidget() const -{ - Q_D(const QScriptDebugger); - return d->codeWidget; -} - -void QScriptDebugger::setCodeWidget(QScriptDebuggerCodeWidgetInterface *codeWidget) -{ - Q_D(QScriptDebugger); - if (d->codeWidget) { - d->codeWidget->removeEventFilter(this); - } - d->codeWidget = codeWidget; - if (codeWidget) { - if (!d->scriptsModel) { - d->scriptsModel = new QScriptDebuggerScriptsModel(this); - if (d->interactive) - d->scheduleJob(new SyncScriptsJob(d)); - } - codeWidget->setScriptsModel(d->scriptsModel); - if (!d->breakpointsModel) { - d->breakpointsModel = new QScriptBreakpointsModel(d, d, this); - if (d->interactive) - d->scheduleJob(new SyncBreakpointsJob(d)); - } - codeWidget->setBreakpointsModel(d->breakpointsModel); - codeWidget->setToolTipProvider(d); - codeWidget->installEventFilter(this); - } - bool hasScript = (codeWidget != 0) && (codeWidget->currentView() != 0); - if (d->findInScriptAction) - d->findInScriptAction->setEnabled(hasScript && (d->codeFinderWidget != 0)); - if (d->goToLineAction) - d->goToLineAction->setEnabled(hasScript); - if (d->toggleBreakpointAction) - d->toggleBreakpointAction->setEnabled(hasScript); -} - -QScriptDebuggerCodeFinderWidgetInterface *QScriptDebugger::codeFinderWidget() const -{ - Q_D(const QScriptDebugger); - return d->codeFinderWidget; -} - -void QScriptDebugger::setCodeFinderWidget(QScriptDebuggerCodeFinderWidgetInterface *codeFinderWidget) -{ - Q_D(QScriptDebugger); - if (d->codeFinderWidget) { - QObject::disconnect(d->codeFinderWidget, 0, this, 0); - } - d->codeFinderWidget = codeFinderWidget; - if (codeFinderWidget) { - QObject::connect(codeFinderWidget, SIGNAL(findRequest(QString,int)), - this, SLOT(_q_onFindCodeRequest(QString,int))); - } - if (d->findInScriptAction) { - d->findInScriptAction->setEnabled( - (codeFinderWidget != 0) - && (d->codeWidget != 0) - && (d->codeWidget->currentView() != 0)); - } -} - -QScriptDebugOutputWidgetInterface *QScriptDebugger::debugOutputWidget() const -{ - Q_D(const QScriptDebugger); - return d->debugOutputWidget; -} - -void QScriptDebugger::setDebugOutputWidget(QScriptDebugOutputWidgetInterface *debugOutputWidget) -{ - Q_D(QScriptDebugger); - d->debugOutputWidget = debugOutputWidget; -} - -QScriptBreakpointsWidgetInterface *QScriptDebugger::breakpointsWidget() const -{ - Q_D(const QScriptDebugger); - return d->breakpointsWidget; -} - -void QScriptDebugger::setBreakpointsWidget(QScriptBreakpointsWidgetInterface *breakpointsWidget) -{ - Q_D(QScriptDebugger); - if (d->breakpointsWidget) { - // ### invalidate - } - d->breakpointsWidget = breakpointsWidget; - if (breakpointsWidget) { - if (!d->breakpointsModel) { - d->breakpointsModel = new QScriptBreakpointsModel(d, d, this); - if (d->interactive) - d->scheduleJob(new SyncBreakpointsJob(d)); - } - d->breakpointsWidget->setBreakpointsModel(d->breakpointsModel); - d->breakpointsWidget->setScriptsModel(d->scriptsModel); - } -} - -QScriptErrorLogWidgetInterface *QScriptDebugger::errorLogWidget() const -{ - Q_D(const QScriptDebugger); - return d->errorLogWidget; -} - -void QScriptDebugger::setErrorLogWidget(QScriptErrorLogWidgetInterface *errorLogWidget) -{ - Q_D(QScriptDebugger); - d->errorLogWidget = errorLogWidget; -} - -QScriptDebuggerWidgetFactoryInterface *QScriptDebugger::widgetFactory() const -{ - Q_D(const QScriptDebugger); - return d->widgetFactory; -} - -void QScriptDebugger::setWidgetFactory(QScriptDebuggerWidgetFactoryInterface *factory) -{ - Q_D(QScriptDebugger); - d->widgetFactory = factory; -} - -QAction *QScriptDebugger::interruptAction(QObject *parent) const -{ - Q_D(const QScriptDebugger); - if (!d->interruptAction) { - QScriptDebugger *that = const_cast(this); - that->d_func()->interruptAction = new QAction(QIcon::fromTheme("process-stop"), QScriptDebugger::tr("Interrupt"), parent); - d->interruptAction->setEnabled(!d->interactive); - d->interruptAction->setShortcut(QScriptDebugger::tr("Shift+F5")); - QObject::connect(d->interruptAction, SIGNAL(triggered()), - that, SLOT(_q_interrupt())); - } - return d->interruptAction; -} - -QAction *QScriptDebugger::continueAction(QObject *parent) const -{ - Q_D(const QScriptDebugger); - if (!d->continueAction) { - QScriptDebugger *that = const_cast(this); - that->d_func()->continueAction = new QAction(QIcon::fromTheme("system-run"), QScriptDebugger::tr("Continue"), parent); - d->continueAction->setEnabled(d->interactive); - d->continueAction->setShortcut(QScriptDebugger::tr("F5")); - QObject::connect(d->continueAction, SIGNAL(triggered()), - that, SLOT(_q_continue())); - } - return d->continueAction; -} - -QAction *QScriptDebugger::stepIntoAction(QObject *parent) const -{ - Q_D(const QScriptDebugger); - if (!d->stepIntoAction) { - QPixmap pix; - pix.loadFromData( - scripttools_stepinto_png, scripttools_stepinto_png_len, - qt_images_format - ); - QIcon stepIntoIcon; - stepIntoIcon.addPixmap(pix, QIcon::Normal); - QScriptDebugger *that = const_cast(this); - that->d_func()->stepIntoAction = new QAction(stepIntoIcon, QScriptDebugger::tr("Step Into"), parent); - d->stepIntoAction->setEnabled(d->interactive); - d->stepIntoAction->setShortcut(QScriptDebugger::tr("F11")); - QObject::connect(d->stepIntoAction, SIGNAL(triggered()), - that, SLOT(_q_stepInto())); - } - return d->stepIntoAction; -} - -QAction *QScriptDebugger::stepOverAction(QObject *parent) const -{ - Q_D(const QScriptDebugger); - if (!d->stepOverAction) { - QPixmap pix; - pix.loadFromData( - scripttools_stepover_png, scripttools_stepover_png_len, - qt_images_format - ); - QIcon stepOverIcon; - stepOverIcon.addPixmap(pix, QIcon::Normal); - QScriptDebugger *that = const_cast(this); - that->d_func()->stepOverAction = new QAction(stepOverIcon, QScriptDebugger::tr("Step Over"), parent); - d->stepOverAction->setEnabled(d->interactive); - d->stepOverAction->setShortcut(QScriptDebugger::tr("F10")); - QObject::connect(d->stepOverAction, SIGNAL(triggered()), - that, SLOT(_q_stepOver())); - } - return d->stepOverAction; -} - -QAction *QScriptDebugger::stepOutAction(QObject *parent) const -{ - Q_D(const QScriptDebugger); - if (!d->stepOutAction) { - QPixmap pix; - pix.loadFromData( - scripttools_stepout_png, scripttools_stepout_png_len, - qt_images_format - ); - QIcon stepOutIcon; - stepOutIcon.addPixmap(pix, QIcon::Normal); - QScriptDebugger *that = const_cast(this); - that->d_func()->stepOutAction = new QAction(stepOutIcon, QScriptDebugger::tr("Step Out"), parent); - d->stepOutAction->setEnabled(d->interactive); - d->stepOutAction->setShortcut(QScriptDebugger::tr("Shift+F11")); - QObject::connect(d->stepOutAction, SIGNAL(triggered()), - that, SLOT(_q_stepOut())); - } - return d->stepOutAction; -} - -QAction *QScriptDebugger::runToCursorAction(QObject *parent) const -{ - Q_D(const QScriptDebugger); - if (!d->runToCursorAction) { - QPixmap pix; - pix.loadFromData( - scripttools_runtocursor_png, scripttools_runtocursor_png_len, - qt_images_format - ); - QIcon runToCursorIcon; - runToCursorIcon.addPixmap(pix, QIcon::Normal); - QScriptDebugger *that = const_cast(this); - that->d_func()->runToCursorAction = new QAction(runToCursorIcon, QScriptDebugger::tr("Run to Cursor"), parent); - d->runToCursorAction->setEnabled(d->interactive); - d->runToCursorAction->setShortcut(QScriptDebugger::tr("Ctrl+F10")); - QObject::connect(d->runToCursorAction, SIGNAL(triggered()), - that, SLOT(_q_runToCursor())); - } - return d->runToCursorAction; -} - -QAction *QScriptDebugger::runToNewScriptAction(QObject *parent) const -{ - Q_D(const QScriptDebugger); - if (!d->runToNewScriptAction) { - QPixmap pix; - pix.loadFromData( - scripttools_runtonewscript_png, scripttools_runtonewscript_png_len, - qt_images_format - ); - QIcon runToNewScriptIcon; - runToNewScriptIcon.addPixmap(pix, QIcon::Normal); - QScriptDebugger *that = const_cast(this); - that->d_func()->runToNewScriptAction = new QAction(runToNewScriptIcon, - QScriptDebugger::tr("Run to New Script"), parent); - d->runToNewScriptAction->setEnabled(d->interactive); - QObject::connect(d->runToNewScriptAction, SIGNAL(triggered()), - that, SLOT(_q_runToNewScript())); - } - return d->runToNewScriptAction; -} - -QAction *QScriptDebugger::toggleBreakpointAction(QObject *parent) const -{ - Q_D(const QScriptDebugger); - if (!d->toggleBreakpointAction) { - QIcon toggleBreakpointIcon; - QScriptDebugger *that = const_cast(this); - that->d_func()->toggleBreakpointAction = new QAction(toggleBreakpointIcon, - QScriptDebugger::tr("Toggle Breakpoint"), parent); - d->toggleBreakpointAction->setShortcut(QScriptDebugger::tr("F9")); - d->toggleBreakpointAction->setEnabled((d->codeWidget != 0) && (d->codeWidget->currentView() != 0)); - QObject::connect(d->toggleBreakpointAction, SIGNAL(triggered()), - that, SLOT(_q_toggleBreakpoint())); - } - return d->toggleBreakpointAction; -} - -QAction *QScriptDebugger::clearDebugOutputAction(QObject *parent) const -{ - Q_D(const QScriptDebugger); - if (!d->clearDebugOutputAction) { - QIcon clearDebugOutputIcon; - QScriptDebugger *that = const_cast(this); - that->d_func()->clearDebugOutputAction = new QAction(clearDebugOutputIcon, QScriptDebugger::tr("Clear Debug Output"), parent); - QObject::connect(d->clearDebugOutputAction, SIGNAL(triggered()), - that, SLOT(_q_clearDebugOutput())); - } - return d->clearDebugOutputAction; -} - -QAction *QScriptDebugger::clearErrorLogAction(QObject *parent) const -{ - Q_D(const QScriptDebugger); - if (!d->clearErrorLogAction) { - QIcon clearErrorLogIcon; - QScriptDebugger *that = const_cast(this); - that->d_func()->clearErrorLogAction = new QAction(clearErrorLogIcon, QScriptDebugger::tr("Clear Error Log"), parent); - QObject::connect(d->clearErrorLogAction, SIGNAL(triggered()), - that, SLOT(_q_clearErrorLog())); - } - return d->clearErrorLogAction; -} - -QAction *QScriptDebugger::clearConsoleAction(QObject *parent) const -{ - Q_D(const QScriptDebugger); - if (!d->clearConsoleAction) { - QIcon clearConsoleIcon; - QScriptDebugger *that = const_cast(this); - that->d_func()->clearConsoleAction = new QAction(clearConsoleIcon, QScriptDebugger::tr("Clear Console"), parent); - QObject::connect(d->clearConsoleAction, SIGNAL(triggered()), - that, SLOT(_q_clearConsole())); - } - return d->clearConsoleAction; -} - -QAction *QScriptDebugger::findInScriptAction(QObject *parent) const -{ - Q_D(const QScriptDebugger); - if (!d->findInScriptAction) { - QScriptDebugger *that = const_cast(this); - that->d_func()->findInScriptAction = new QAction(QIcon::fromTheme("edit-find"), QScriptDebugger::tr("&Find in Script..."), parent); - d->findInScriptAction->setShortcut(QScriptDebugger::tr("Ctrl+F")); - d->findInScriptAction->setEnabled( - (d->codeFinderWidget != 0) - && (d->codeWidget != 0) - && (d->codeWidget->currentView() != 0)); - QObject::connect(d->findInScriptAction, SIGNAL(triggered()), - that, SLOT(_q_findInScript())); - } - return d->findInScriptAction; -} - -QAction *QScriptDebugger::findNextInScriptAction(QObject *parent) const -{ - Q_D(const QScriptDebugger); - if (!d->findNextInScriptAction) { - QScriptDebugger *that = const_cast(this); - that->d_func()->findNextInScriptAction = new QAction(QIcon::fromTheme("go-next"), QScriptDebugger::tr("Find &Next"), parent); - d->findNextInScriptAction->setEnabled(d->codeFinderWidget && !d->codeFinderWidget->text().isEmpty()); - d->findNextInScriptAction->setShortcut(QScriptDebugger::tr("F3")); - QObject::connect(d->findNextInScriptAction, SIGNAL(triggered()), - that, SLOT(_q_findNextInScript())); - } - return d->findNextInScriptAction; -} - -QAction *QScriptDebugger::findPreviousInScriptAction(QObject *parent) const -{ - Q_D(const QScriptDebugger); - if (!d->findPreviousInScriptAction) { - QScriptDebugger *that = const_cast(this); - that->d_func()->findPreviousInScriptAction = new QAction(QIcon::fromTheme("go-previous"), QScriptDebugger::tr("Find &Previous"), parent); - d->findPreviousInScriptAction->setEnabled(d->codeFinderWidget && !d->codeFinderWidget->text().isEmpty()); - d->findPreviousInScriptAction->setShortcut(QScriptDebugger::tr("Shift+F3")); - QObject::connect(d->findPreviousInScriptAction, SIGNAL(triggered()), - that, SLOT(_q_findPreviousInScript())); - } - return d->findPreviousInScriptAction; -} - -QAction *QScriptDebugger::goToLineAction(QObject *parent) const -{ - Q_D(const QScriptDebugger); - if (!d->goToLineAction) { - QIcon goToLineIcon; - QScriptDebugger *that = const_cast(this); - that->d_func()->goToLineAction = new QAction(goToLineIcon, QScriptDebugger::tr("Go to Line"), parent); - d->goToLineAction->setShortcut(QScriptDebugger::tr("Ctrl+G")); - d->goToLineAction->setEnabled((d->codeWidget != 0) && (d->codeWidget->currentView() != 0)); - QObject::connect(d->goToLineAction, SIGNAL(triggered()), - that, SLOT(_q_goToLine())); - } - return d->goToLineAction; -} - -QMenu *QScriptDebugger::createStandardMenu(QWidget *widgetParent, QObject *actionParent) -{ - QMenu *menu = new QMenu(widgetParent); - menu->setTitle(QScriptDebugger::tr("Debug")); - menu->addAction(action(ContinueAction, actionParent)); - menu->addAction(action(InterruptAction, actionParent)); - menu->addAction(action(StepIntoAction, actionParent)); - menu->addAction(action(StepOverAction, actionParent)); - menu->addAction(action(StepOutAction, actionParent)); - menu->addAction(action(RunToCursorAction, actionParent)); - menu->addAction(action(RunToNewScriptAction, actionParent)); - - menu->addSeparator(); - menu->addAction(action(ToggleBreakpointAction, actionParent)); - - menu->addSeparator(); - menu->addAction(action(ClearDebugOutputAction, actionParent)); - menu->addAction(action(ClearErrorLogAction, actionParent)); - menu->addAction(action(ClearConsoleAction, actionParent)); - - return menu; -} - -#ifndef QT_NO_TOOLBAR -QToolBar *QScriptDebugger::createStandardToolBar(QWidget *widgetParent, QObject *actionParent) -{ - QToolBar *tb = new QToolBar(widgetParent); - tb->setObjectName(QLatin1String("qtscriptdebugger_standardToolBar")); - tb->addAction(action(ContinueAction, actionParent)); - tb->addAction(action(InterruptAction, actionParent)); - tb->addAction(action(StepIntoAction, actionParent)); - tb->addAction(action(StepOverAction, actionParent)); - tb->addAction(action(StepOutAction, actionParent)); - tb->addAction(action(RunToCursorAction, actionParent)); - tb->addAction(action(RunToNewScriptAction, actionParent)); - tb->addSeparator(); - tb->addAction(action(FindInScriptAction, actionParent)); - return tb; -} -#endif - -bool QScriptDebugger::isInteractive() const -{ - Q_D(const QScriptDebugger); - return d->interactive; -} - -/*! - \reimp -*/ -bool QScriptDebugger::eventFilter(QObject *watched, QEvent *e) -{ - Q_D(QScriptDebugger); - if (watched == d->codeWidget) { - if (e->type() == QEvent::KeyPress) { - d->_q_findInScript(); - d->codeFinderWidget->setText(static_cast(e)->text()); - return true; - } - } - return false; -} - -/*! - \reimp -*/ -void QScriptDebugger::timerEvent(QTimerEvent *e) -{ - Q_D(QScriptDebugger); - if (e->timerId() == d->updatesEnabledTimerId) { - killTimer(d->updatesEnabledTimerId); - d->updatesEnabledTimerId = -1; - if (d->stackWidget) - d->stackWidget->setUpdatesEnabled(true); - if (d->localsWidget) - d->localsWidget->setUpdatesEnabled(true); - } else { - QObject::timerEvent(e); - } -} - -QT_END_NAMESPACE - -#include "moc_qscriptdebugger_p.h" diff --git a/src/scripttools/debugging/qscriptdebugger_p.h b/src/scripttools/debugging/qscriptdebugger_p.h deleted file mode 100644 index c777e9b0c..000000000 --- a/src/scripttools/debugging/qscriptdebugger_p.h +++ /dev/null @@ -1,202 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGER_P_H -#define QSCRIPTDEBUGGER_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerFrontend; -class QScriptDebuggerConsoleWidgetInterface; -class QScriptDebuggerScriptsWidgetInterface; -class QScriptDebuggerCodeWidgetInterface; -class QScriptDebuggerCodeFinderWidgetInterface; -class QScriptBreakpointsWidgetInterface; -class QScriptDebuggerStackWidgetInterface; -class QScriptDebuggerLocalsWidgetInterface; -class QScriptDebugOutputWidgetInterface; -class QScriptErrorLogWidgetInterface; -class QScriptDebuggerWidgetFactoryInterface; -class QAction; -class QEvent; -class QMenu; -#ifndef QT_NO_TOOLBAR -class QToolBar; -#endif - -class QScriptDebuggerPrivate; -class Q_AUTOTEST_EXPORT QScriptDebugger : public QObject -{ - Q_OBJECT -public: - // mirrors QScriptEngineDebugger::DebuggerWidget - enum DebuggerWidget { - ConsoleWidget, - StackWidget, - ScriptsWidget, - LocalsWidget, - CodeWidget, - CodeFinderWidget, - BreakpointsWidget, - DebugOutputWidget, - ErrorLogWidget - }; - // mirrors QScriptEngineDebugger::DebuggerAction - enum DebuggerAction { - InterruptAction, - ContinueAction, - StepIntoAction, - StepOverAction, - StepOutAction, - RunToCursorAction, - RunToNewScriptAction, - ToggleBreakpointAction, - ClearDebugOutputAction, - ClearErrorLogAction, - ClearConsoleAction, - FindInScriptAction, - FindNextInScriptAction, - FindPreviousInScriptAction, - GoToLineAction - }; - - QScriptDebugger(QObject *parent = nullptr); - ~QScriptDebugger(); - - QScriptDebuggerFrontend *frontend() const; - void setFrontend(QScriptDebuggerFrontend *frontend); - - QWidget *widget(DebuggerWidget widget); - QAction *action(DebuggerAction action, QObject *parent); - - QScriptDebuggerConsoleWidgetInterface *consoleWidget() const; - void setConsoleWidget(QScriptDebuggerConsoleWidgetInterface *consoleWidget); - - QScriptDebuggerScriptsWidgetInterface *scriptsWidget() const; - void setScriptsWidget(QScriptDebuggerScriptsWidgetInterface *scriptsWidget); - - QScriptDebuggerCodeWidgetInterface *codeWidget() const; - void setCodeWidget(QScriptDebuggerCodeWidgetInterface *codeWidget); - - QScriptDebuggerCodeFinderWidgetInterface *codeFinderWidget() const; - void setCodeFinderWidget(QScriptDebuggerCodeFinderWidgetInterface *codeFinderWidget); - - QScriptDebuggerStackWidgetInterface *stackWidget() const; - void setStackWidget(QScriptDebuggerStackWidgetInterface *stackWidget); - - QScriptDebuggerLocalsWidgetInterface *localsWidget() const; - void setLocalsWidget(QScriptDebuggerLocalsWidgetInterface *localsWidget); - - QScriptBreakpointsWidgetInterface *breakpointsWidget() const; - void setBreakpointsWidget(QScriptBreakpointsWidgetInterface *breakpointsWidget); - - QScriptDebugOutputWidgetInterface *debugOutputWidget() const; - void setDebugOutputWidget(QScriptDebugOutputWidgetInterface *debugOutputWidget); - - QScriptErrorLogWidgetInterface *errorLogWidget() const; - void setErrorLogWidget(QScriptErrorLogWidgetInterface *errorLogWidget); - - QScriptDebuggerWidgetFactoryInterface *widgetFactory() const; - void setWidgetFactory(QScriptDebuggerWidgetFactoryInterface *factory); - - QAction *interruptAction(QObject *parent) const; - QAction *continueAction(QObject *parent) const; - QAction *stepIntoAction(QObject *parent) const; - QAction *stepOverAction(QObject *parent) const; - QAction *stepOutAction(QObject *parent) const; - QAction *runToCursorAction(QObject *parent) const; - QAction *runToNewScriptAction(QObject *parent) const; - - QAction *toggleBreakpointAction(QObject *parent) const; - - QAction *findInScriptAction(QObject *parent) const; - QAction *findNextInScriptAction(QObject *parent) const; - QAction *findPreviousInScriptAction(QObject *parent) const; - QAction *goToLineAction(QObject *parent) const; - - QAction *clearDebugOutputAction(QObject *parent) const; - QAction *clearConsoleAction(QObject *parent) const; - QAction *clearErrorLogAction(QObject *parent) const; - - QMenu *createStandardMenu(QWidget *widgetParent, QObject *actionParent); -#ifndef QT_NO_TOOLBAR - QToolBar *createStandardToolBar(QWidget *widgetParent, QObject *actionParent); -#endif - bool eventFilter(QObject *, QEvent *e); - - bool isInteractive() const; - -Q_SIGNALS: - void stopped() const; - void started() const; - -protected: - void timerEvent(QTimerEvent *e); - -protected: - QScriptDebugger(QScriptDebuggerPrivate &dd, QObject *parent); - -private: - Q_DECLARE_PRIVATE(QScriptDebugger) - Q_DISABLE_COPY(QScriptDebugger) - - Q_PRIVATE_SLOT(d_func(), void _q_onLineEntered(const QString &)) - Q_PRIVATE_SLOT(d_func(), void _q_onCurrentFrameChanged(int)) - Q_PRIVATE_SLOT(d_func(), void _q_onCurrentScriptChanged(qint64)) - Q_PRIVATE_SLOT(d_func(), void _q_onScriptLocationSelected(int)) - - Q_PRIVATE_SLOT(d_func(), void _q_interrupt()) - Q_PRIVATE_SLOT(d_func(), void _q_continue()) - Q_PRIVATE_SLOT(d_func(), void _q_stepInto()) - Q_PRIVATE_SLOT(d_func(), void _q_stepOver()) - Q_PRIVATE_SLOT(d_func(), void _q_stepOut()) - Q_PRIVATE_SLOT(d_func(), void _q_runToCursor()) - Q_PRIVATE_SLOT(d_func(), void _q_runToNewScript()) - - Q_PRIVATE_SLOT(d_func(), void _q_toggleBreakpoint()) - - Q_PRIVATE_SLOT(d_func(), void _q_clearDebugOutput()) - Q_PRIVATE_SLOT(d_func(), void _q_clearErrorLog()) - Q_PRIVATE_SLOT(d_func(), void _q_clearConsole()) - - Q_PRIVATE_SLOT(d_func(), void _q_findInScript()) - Q_PRIVATE_SLOT(d_func(), void _q_findNextInScript()) - Q_PRIVATE_SLOT(d_func(), void _q_findPreviousInScript()) - Q_PRIVATE_SLOT(d_func(), void _q_onFindCodeRequest(const QString &, int)) - Q_PRIVATE_SLOT(d_func(), void _q_goToLine()) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggeragent.cpp b/src/scripttools/debugging/qscriptdebuggeragent.cpp deleted file mode 100644 index 45b67fcb6..000000000 --- a/src/scripttools/debugging/qscriptdebuggeragent.cpp +++ /dev/null @@ -1,710 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggeragent_p.h" -#include "qscriptdebuggeragent_p_p.h" -#include "qscriptdebuggerbackend_p_p.h" - -#include -#include -#include - -QT_BEGIN_NAMESPACE - -/*! - \since 4.5 - \class QScriptDebuggerAgent - \internal - - This class implements a state machine that uses the low-level events - reported by the QScriptEngineAgent interface to implement debugging- - specific functionality such as stepping and breakpoints. It is used - internally by the QScriptDebuggerBackend class. -*/ - -QScriptDebuggerAgentPrivate::QScriptDebuggerAgentPrivate() - : state(NoState), stepDepth(0), stepCount(0), - targetScriptId(-1), targetLineNumber(-1), returnCounter(0), - nextBreakpointId(1), hitBreakpointId(0), - nextContextId(0), statementCounter(0) -{ -} - -QScriptDebuggerAgentPrivate::~QScriptDebuggerAgentPrivate() -{ -} - -QScriptDebuggerAgentPrivate *QScriptDebuggerAgentPrivate::get( - QScriptDebuggerAgent *q) -{ - if (!q) - return 0; - return q->d_func(); -} - - -/*! - Constructs a new agent for the given \a engine. The agent will - report debugging-related events (e.g. step completion) to the given - \a backend. -*/ -QScriptDebuggerAgent::QScriptDebuggerAgent( - QScriptDebuggerBackendPrivate *backend, QScriptEngine *engine) - : QScriptEngineAgent(engine), d_ptr(new QScriptDebuggerAgentPrivate()) -{ - Q_D(QScriptDebuggerAgent); - d->backend = backend; - - QScriptContext *ctx = engine->currentContext(); - while (ctx) { - d->scriptIdStack.append(QList()); - d->contextIdStack.append(d->nextContextId); - ++d->nextContextId; - ctx = ctx->parentContext(); - } -} - -/*! - Destroys this QScriptDebuggerAgent. -*/ -QScriptDebuggerAgent::~QScriptDebuggerAgent() -{ - Q_D(QScriptDebuggerAgent); - if (d->backend) - d->backend->agentDestroyed(this); - delete d; -} - -/*! - Instructs the agent to perform a "step into" operation. This - function returns immediately. The agent will report step completion - at a later time, i.e. when script statements are evaluated. -*/ -void QScriptDebuggerAgent::enterStepIntoMode(int count) -{ - Q_D(QScriptDebuggerAgent); - d->state = QScriptDebuggerAgentPrivate::SteppingIntoState; - d->stepCount = count; - d->stepResult = QScriptValue(); -} - -/*! - Instructs the agent to perform a "step over" operation. This - function returns immediately. The agent will report step completion - at a later time, i.e. when script statements are evaluated. -*/ -void QScriptDebuggerAgent::enterStepOverMode(int count) -{ - Q_D(QScriptDebuggerAgent); - d->state = QScriptDebuggerAgentPrivate::SteppingOverState; - if (engine()->isEvaluating()) - d->stepDepth = 0; - else - d->stepDepth = -1; - d->stepCount = count; - d->stepResult = QScriptValue(); -} - -/*! - Instructs the agent to perform a "step out" operation. This - function returns immediately. The agent will report step completion - at a later time, i.e. when script statements are evaluated. -*/ -void QScriptDebuggerAgent::enterStepOutMode() -{ - Q_D(QScriptDebuggerAgent); - d->state = QScriptDebuggerAgentPrivate::SteppingOutState; - if (engine()->isEvaluating()) - d->stepDepth = 0; - else - d->stepDepth = -1; -} - -/*! - Instructs the agent to continue evaluation. - This function returns immediately. -*/ -void QScriptDebuggerAgent::enterContinueMode() -{ - Q_D(QScriptDebuggerAgent); - d->state = QScriptDebuggerAgentPrivate::NoState; -} - -/*! - Instructs the agent to interrupt evaluation. - This function returns immediately. -*/ -void QScriptDebuggerAgent::enterInterruptMode() -{ - Q_D(QScriptDebuggerAgent); - d->state = QScriptDebuggerAgentPrivate::InterruptingState; -} - -/*! - Instructs the agent to continue evaluation until the location - described by \a fileName and \a lineNumber is reached. This - function returns immediately. -*/ -void QScriptDebuggerAgent::enterRunToLocationMode(const QString &fileName, int lineNumber) -{ - Q_D(QScriptDebuggerAgent); - d->targetFileName = fileName; - d->targetLineNumber = lineNumber; - d->targetScriptId = resolveScript(fileName); - d->state = QScriptDebuggerAgentPrivate::RunningToLocationState; -} - -/*! - Instructs the agent to continue evaluation until the location - described by \a scriptId and \a lineNumber is reached. This - function returns immediately. -*/ -void QScriptDebuggerAgent::enterRunToLocationMode(qint64 scriptId, int lineNumber) -{ - Q_D(QScriptDebuggerAgent); - d->targetScriptId = scriptId; - d->targetFileName = QString(); - d->targetLineNumber = lineNumber; - d->state = QScriptDebuggerAgentPrivate::RunningToLocationState; -} - -void QScriptDebuggerAgent::enterReturnByForceMode(int contextIndex, const QScriptValue &value) -{ - Q_D(QScriptDebuggerAgent); - d->returnCounter = contextIndex + 1; - d->returnValue = QScriptValue(); - d->state = QScriptDebuggerAgentPrivate::ReturningByForceState; - // throw an exception; we will catch it when the proper frame is popped - engine()->currentContext()->throwValue(value); -} - -/*! - Sets a breakpoint defined by the given \a data. - Returns an integer that uniquely identifies the new breakpoint, - or -1 if setting the breakpoint failed. -*/ -int QScriptDebuggerAgent::setBreakpoint(const QScriptBreakpointData &data) -{ - Q_D(QScriptDebuggerAgent); - qint64 scriptId = data.scriptId(); - if (scriptId != -1) { - if (!d->scripts.contains(scriptId)) { - // that script has been unloaded, so invalidate the ID - scriptId = -1; - const_cast(data).setScriptId(-1); - } else if (data.fileName().isEmpty()) { - QString fileName = d->scripts[scriptId].fileName(); - const_cast(data).setFileName(fileName); - } - } - - int id = d->nextBreakpointId; - ++d->nextBreakpointId; - - if (scriptId != -1) { - d->resolvedBreakpoints[scriptId].append(id); - } else { - QString fileName = data.fileName(); - bool resolved = false; - QScriptScriptMap::const_iterator it; - for (it = d->scripts.constBegin(); it != d->scripts.constEnd(); ++it) { - if (it.value().fileName() == fileName) { - d->resolvedBreakpoints[it.key()].append(id); - resolved = true; - break; - } - } - if (!resolved) - d->unresolvedBreakpoints[fileName].append(id); - } - - d->breakpoints.insert(id, data); - - return id; -} - -/*! - Deletes the breakpoint with the given \a id. - Returns true if the breakpoint was deleted, false if - no such breakpoint exists. -*/ -bool QScriptDebuggerAgent::deleteBreakpoint(int id) -{ - Q_D(QScriptDebuggerAgent); - if (!d->breakpoints.contains(id)) - return false; - d->breakpoints.remove(id); - bool found = false; - { - QHash >::iterator it; - it = d->resolvedBreakpoints.begin(); - for ( ; !found && (it != d->resolvedBreakpoints.end()); ) { - QList &lst = it.value(); - Q_ASSERT(!lst.isEmpty()); - for (int i = 0; i < lst.size(); ++i) { - if (lst.at(i) == id) { - lst.removeAt(i); - found = true; - break; - } - } - if (lst.isEmpty()) - it = d->resolvedBreakpoints.erase(it); - else - ++it; - } - } - if (!found) { - QHash >::iterator it; - it = d->unresolvedBreakpoints.begin(); - for ( ; !found && (it != d->unresolvedBreakpoints.end()); ) { - QList &lst = it.value(); - Q_ASSERT(!lst.isEmpty()); - for (int i = 0; i < lst.size(); ++i) { - if (lst.at(i) == id) { - lst.removeAt(i); - found = true; - break; - } - } - if (lst.isEmpty()) - it = d->unresolvedBreakpoints.erase(it); - else - ++it; - } - } - return found; -} - -/*! - Deletes all breakpoints. -*/ -void QScriptDebuggerAgent::deleteAllBreakpoints() -{ - Q_D(QScriptDebuggerAgent); - d->breakpoints.clear(); - d->resolvedBreakpoints.clear(); - d->unresolvedBreakpoints.clear(); -} - -/*! - Returns the data associated with the breakpoint with the given \a - id. -*/ -QScriptBreakpointData QScriptDebuggerAgent::breakpointData(int id) const -{ - Q_D(const QScriptDebuggerAgent); - return d->breakpoints.value(id); -} - -/*! - Sets the data associated with the breakpoint with the given \a - id. -*/ -bool QScriptDebuggerAgent::setBreakpointData(int id, - const QScriptBreakpointData &data) -{ - Q_D(QScriptDebuggerAgent); - if (!d->breakpoints.contains(id)) - return false; - d->breakpoints[id] = data; - return true; -} - -/*! - Returns all breakpoints. -*/ -QScriptBreakpointMap QScriptDebuggerAgent::breakpoints() const -{ - Q_D(const QScriptDebuggerAgent); - return d->breakpoints; -} - -/*! - Returns all scripts. -*/ -QScriptScriptMap QScriptDebuggerAgent::scripts() const -{ - Q_D(const QScriptDebuggerAgent); - return d->scripts; -} - -/*! - Returns the data associated with the script with the given \a id. -*/ -QScriptScriptData QScriptDebuggerAgent::scriptData(qint64 id) const -{ - Q_D(const QScriptDebuggerAgent); - return d->scripts.value(id); -} - -/*! - Checkpoints the current scripts. -*/ -void QScriptDebuggerAgent::scriptsCheckpoint() -{ - Q_D(QScriptDebuggerAgent); - d->previousCheckpointScripts = d->checkpointScripts; - d->checkpointScripts = d->scripts; -} - -/*! - Returns the difference between the current checkpoint and the - previous checkpoint. The first item in the pair is a list containing - the identifiers of the scripts that were added. The second item in - the pair is a list containing the identifiers of the scripts that - were removed. -*/ -QPair, QList > QScriptDebuggerAgent::scriptsDelta() const -{ - Q_D(const QScriptDebuggerAgent); - QSet prevSet = d->previousCheckpointScripts.keys().toSet(); - QSet currSet = d->checkpointScripts.keys().toSet(); - QSet addedScriptIds = currSet - prevSet; - QSet removedScriptIds = prevSet - currSet; - return qMakePair(addedScriptIds.toList(), removedScriptIds.toList()); -} - -/*! - Returns the identifier of the script that has the given \a fileName, - or -1 if there is no such script. -*/ -qint64 QScriptDebuggerAgent::resolveScript(const QString &fileName) const -{ - Q_D(const QScriptDebuggerAgent); - QScriptScriptMap::const_iterator it; - for (it = d->scripts.constBegin(); it != d->scripts.constEnd(); ++it) { - if (it.value().fileName() == fileName) - return it.key(); - } - return -1; -} - -QList QScriptDebuggerAgent::contextIds() const -{ - Q_D(const QScriptDebuggerAgent); - return d->contextIdStack; -} - -QPair, QList > QScriptDebuggerAgent::contextsCheckpoint() -{ - Q_D(QScriptDebuggerAgent); - int i = d->checkpointContextIdStack.size() - 1; - int j = d->contextIdStack.size() - 1; - for ( ; (i >= 0) && (j >= 0); --i, --j) { - if (d->checkpointContextIdStack.at(i) != d->contextIdStack.at(j)) - break; - } - QList removed = d->checkpointContextIdStack.mid(0, i+1); - QList added = d->contextIdStack.mid(0, j+1); - d->checkpointContextIdStack = d->contextIdStack; - return qMakePair(removed, added); -} - -void QScriptDebuggerAgent::nullifyBackendPointer() -{ - Q_D(QScriptDebuggerAgent); - d->backend = 0; -} - -/*! - \reimp -*/ -void QScriptDebuggerAgent::scriptLoad(qint64 id, const QString &program, - const QString &fileName, int baseLineNumber) -{ - Q_D(QScriptDebuggerAgent); - QScriptScriptData data = QScriptScriptData(program, fileName, baseLineNumber); - d->scripts.insert(id, data); - - if ((d->state == QScriptDebuggerAgentPrivate::RunningToLocationState) - && (d->targetScriptId == -1) - && ((d->targetFileName == fileName) || d->targetFileName.isEmpty())) { - d->targetScriptId = id; - } - - if (!fileName.isEmpty()) { - QList lst = d->unresolvedBreakpoints.take(fileName); - if (!lst.isEmpty()) - d->resolvedBreakpoints.insert(id, lst); - } -} - -/*! - \reimp -*/ -void QScriptDebuggerAgent::scriptUnload(qint64 id) -{ - Q_D(QScriptDebuggerAgent); - QScriptScriptData data = d->scripts.take(id); - QString fileName = data.fileName(); - - if ((d->state == QScriptDebuggerAgentPrivate::RunningToLocationState) - && (d->targetScriptId == id)) { - d->targetScriptId = -1; - d->targetFileName = fileName; - } - - if (!fileName.isEmpty()) { - QList lst = d->resolvedBreakpoints.take(id); - if (!lst.isEmpty()) - d->unresolvedBreakpoints.insert(fileName, lst); - } -} - -/*! - \reimp -*/ -void QScriptDebuggerAgent::contextPush() -{ - Q_D(QScriptDebuggerAgent); - d->scriptIdStack.append(QList()); - d->contextIdStack.prepend(d->nextContextId); - ++d->nextContextId; -} - -/*! - \reimp -*/ -void QScriptDebuggerAgent::contextPop() -{ - Q_D(QScriptDebuggerAgent); - d->scriptIdStack.removeLast(); - d->contextIdStack.removeFirst(); -} - -/*! - \reimp -*/ -void QScriptDebuggerAgent::functionEntry(qint64 scriptId) -{ - Q_D(QScriptDebuggerAgent); - QList &ids = d->scriptIdStack.last(); - ids.append(scriptId); - if ((d->state == QScriptDebuggerAgentPrivate::SteppingOverState) - || (d->state == QScriptDebuggerAgentPrivate::SteppingOutState)) { - ++d->stepDepth; - } -} - -/*! - \reimp -*/ -void QScriptDebuggerAgent::functionExit(qint64 scriptId, - const QScriptValue &returnValue) -{ - Q_UNUSED(scriptId); - Q_D(QScriptDebuggerAgent); - QList &ids = d->scriptIdStack.last(); - ids.removeLast(); - if (d->state == QScriptDebuggerAgentPrivate::SteppingOverState) { - --d->stepDepth; - } else if (d->state == QScriptDebuggerAgentPrivate::SteppingOutState) { - if (--d->stepDepth < 0) { - d->stepResult = returnValue; - d->state = QScriptDebuggerAgentPrivate::SteppedOutState; - } - } else if (d->state == QScriptDebuggerAgentPrivate::ReturningByForceState) { - if (--d->returnCounter == 0) { - d->returnValue = returnValue; - d->state = QScriptDebuggerAgentPrivate::ReturnedByForceState; - engine()->clearExceptions(); - } - } -} - -/*! - \reimp -*/ -void QScriptDebuggerAgent::positionChange(qint64 scriptId, - int lineNumber, int columnNumber) -{ - Q_D(QScriptDebuggerAgent); - if (engine()->processEventsInterval() == -1) { - // see if it's time to call processEvents() - if ((++d->statementCounter % 25000) == 0) { - if (!d->processEventsTimer.isNull()) { - if (d->processEventsTimer.elapsed() > 30) { - QCoreApplication::processEvents(); - d->processEventsTimer.restart(); - } - } else { - d->processEventsTimer.start(); - } - } - } - - // check breakpoints - { - QList lst = d->resolvedBreakpoints.value(scriptId); - for (int i = 0; i < lst.size(); ++i) { - int id = lst.at(i); - QScriptBreakpointData &data = d->breakpoints[id]; - if (!data.isEnabled()) - continue; - if (data.lineNumber() != lineNumber) - continue; - if (!data.condition().isEmpty()) { - // ### careful, evaluate() can cause an exception - // ### disable callbacks in nested evaluate? - QScriptDebuggerAgentPrivate::State was = d->state; - d->state = QScriptDebuggerAgentPrivate::NoState; - QScriptValue ret = engine()->evaluate( - data.condition(), - QString::fromLatin1("Breakpoint %0 condition checker").arg(id)); - if (!ret.isError()) - d->state = was; - if (!ret.toBoolean()) - continue; - } - if (!data.hit()) - continue; - d->hitBreakpointId = id; - d->state = QScriptDebuggerAgentPrivate::BreakpointState; - } - } - - switch (d->state) { - case QScriptDebuggerAgentPrivate::NoState: - case QScriptDebuggerAgentPrivate::SteppingOutState: - case QScriptDebuggerAgentPrivate::ReturningByForceState: - // Do nothing - break; - - case QScriptDebuggerAgentPrivate::SteppingIntoState: - if (--d->stepCount == 0) { - d->state = QScriptDebuggerAgentPrivate::NoState; - if (d->backend) - d->backend->stepped(scriptId, lineNumber, columnNumber, QScriptValue()); - } - break; - - case QScriptDebuggerAgentPrivate::SteppingOverState: - if ((d->stepDepth > 0) || (--d->stepCount != 0)) - break; - // fallthrough - case QScriptDebuggerAgentPrivate::SteppedOverState: - d->state = QScriptDebuggerAgentPrivate::NoState; - if (d->backend) - d->backend->stepped(scriptId, lineNumber, columnNumber, d->stepResult); - break; - - case QScriptDebuggerAgentPrivate::SteppedOutState: - d->state = QScriptDebuggerAgentPrivate::NoState; - if (d->backend) - d->backend->stepped(scriptId, lineNumber, columnNumber, d->stepResult); - break; - - case QScriptDebuggerAgentPrivate::RunningToLocationState: - if (((lineNumber == d->targetLineNumber) || (d->targetLineNumber == -1)) - && (scriptId == d->targetScriptId)) { - d->state = QScriptDebuggerAgentPrivate::NoState; - if (d->backend) - d->backend->locationReached(scriptId, lineNumber, columnNumber); - } - break; - - case QScriptDebuggerAgentPrivate::InterruptingState: - d->state = QScriptDebuggerAgentPrivate::NoState; - if (d->backend) - d->backend->interrupted(scriptId, lineNumber, columnNumber); - break; - - case QScriptDebuggerAgentPrivate::BreakpointState: - d->state = QScriptDebuggerAgentPrivate::NoState; - if (d->backend) - d->backend->breakpoint(scriptId, lineNumber, columnNumber, d->hitBreakpointId); - if (d->breakpoints.value(d->hitBreakpointId).isSingleShot()) - deleteBreakpoint(d->hitBreakpointId); - break; - - case QScriptDebuggerAgentPrivate::ReturnedByForceState: - d->state = QScriptDebuggerAgentPrivate::NoState; - if (d->backend) - d->backend->forcedReturn(scriptId, lineNumber, columnNumber, d->returnValue); - break; - - case QScriptDebuggerAgentPrivate::SteppedIntoState: - case QScriptDebuggerAgentPrivate::ReachedLocationState: - case QScriptDebuggerAgentPrivate::InterruptedState: -// ### deal with the case when code is evaluated while we're already paused -// Q_ASSERT(false); - break; - } -} - -/*! - \reimp -*/ -void QScriptDebuggerAgent::exceptionThrow(qint64 scriptId, - const QScriptValue &exception, - bool hasHandler) -{ - Q_D(QScriptDebuggerAgent); - if (d->state == QScriptDebuggerAgentPrivate::ReturningByForceState) { - // we threw this exception ourselves, so ignore it for now - // (see functionExit()). - return; - } - if (d->backend) - d->backend->exception(scriptId, exception, hasHandler); -} - -/*! - \reimp -*/ -void QScriptDebuggerAgent::exceptionCatch(qint64 scriptId, - const QScriptValue &exception) -{ - Q_UNUSED(scriptId); - Q_UNUSED(exception); -} - -/*! - \reimp -*/ -bool QScriptDebuggerAgent::supportsExtension(Extension extension) const -{ - return (extension == DebuggerInvocationRequest); -} - -/*! - \reimp -*/ -QVariant QScriptDebuggerAgent::extension(Extension extension, - const QVariant &argument) -{ - Q_UNUSED(extension); - Q_D(QScriptDebuggerAgent); - Q_ASSERT(extension == DebuggerInvocationRequest); - QVariantList lst = argument.toList(); - qint64 scriptId = lst.at(0).toLongLong(); - int lineNumber = lst.at(1).toInt(); - int columnNumber = lst.at(2).toInt(); - d->state = QScriptDebuggerAgentPrivate::NoState; - if (d->backend) { - d->backend->debuggerInvocationRequest( - scriptId, lineNumber, columnNumber); - } - return QVariant(); -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptdebuggeragent_p.h b/src/scripttools/debugging/qscriptdebuggeragent_p.h deleted file mode 100644 index 109e19eaf..000000000 --- a/src/scripttools/debugging/qscriptdebuggeragent_p.h +++ /dev/null @@ -1,115 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERAGENT_P_H -#define QSCRIPTDEBUGGERAGENT_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include - -#include "qscriptbreakpointdata_p.h" -#include "qscriptscriptdata_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerBackendPrivate; - -class QScriptDebuggerAgentPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerAgent : public QScriptEngineAgent -{ -public: - QScriptDebuggerAgent(QScriptDebuggerBackendPrivate *backend, - QScriptEngine *engine); - ~QScriptDebuggerAgent(); - - void enterStepIntoMode(int count = 1); - void enterStepOverMode(int count = 1); - void enterStepOutMode(); - void enterContinueMode(); - void enterInterruptMode(); - void enterRunToLocationMode(const QString &fileName, int lineNumber); - void enterRunToLocationMode(qint64 scriptId, int lineNumber); - void enterReturnByForceMode(int contextIndex, const QScriptValue &value); - - int setBreakpoint(const QScriptBreakpointData &data); - bool deleteBreakpoint(int id); - void deleteAllBreakpoints(); - QScriptBreakpointData breakpointData(int id) const; - bool setBreakpointData(int id, const QScriptBreakpointData &data); - QScriptBreakpointMap breakpoints() const; - - QScriptScriptMap scripts() const; - QScriptScriptData scriptData(qint64 id) const; - void scriptsCheckpoint(); - QPair, QList > scriptsDelta() const; - qint64 resolveScript(const QString &fileName) const; - - QList contextIds() const; - QPair, QList > contextsCheckpoint(); - - void nullifyBackendPointer(); - - // reimplemented - void scriptLoad(qint64 id, const QString &program, - const QString &fileName, int baseLineNumber); - void scriptUnload(qint64 id); - - void contextPush(); - void contextPop(); - - void functionEntry(qint64 scriptId); - void functionExit(qint64 scriptId, - const QScriptValue &returnValue); - - void positionChange(qint64 scriptId, - int lineNumber, int columnNumber); - - void exceptionThrow(qint64 scriptId, - const QScriptValue &exception, - bool hasHandler); - void exceptionCatch(qint64 scriptId, - const QScriptValue &exception); - - bool supportsExtension(Extension extension) const; - QVariant extension(Extension extension, - const QVariant &argument = QVariant()); - -private: - QScriptDebuggerAgentPrivate *d_ptr; - Q_DECLARE_PRIVATE(QScriptDebuggerAgent) - Q_DISABLE_COPY(QScriptDebuggerAgent) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggeragent_p_p.h b/src/scripttools/debugging/qscriptdebuggeragent_p_p.h deleted file mode 100644 index 22080ff80..000000000 --- a/src/scripttools/debugging/qscriptdebuggeragent_p_p.h +++ /dev/null @@ -1,106 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERAGENT_P_P_H -#define QSCRIPTDEBUGGERAGENT_P_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include -#include -#include -#include - -#include "qscriptscriptdata_p.h" -#include "qscriptbreakpointdata_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerAgent; -class QScriptDebuggerAgentPrivate -{ -public: - enum State { - NoState, - SteppingIntoState, - SteppedIntoState, - SteppingOverState, - SteppedOverState, - SteppingOutState, - SteppedOutState, - RunningToLocationState, - ReachedLocationState, - InterruptingState, - InterruptedState, - BreakpointState, - ReturningByForceState, - ReturnedByForceState - }; - - QScriptDebuggerAgentPrivate(); - ~QScriptDebuggerAgentPrivate(); - - static QScriptDebuggerAgentPrivate *get(QScriptDebuggerAgent *); - - State state; - int stepDepth; - int stepCount; - int targetScriptId; - QString targetFileName; - int targetLineNumber; - QScriptValue stepResult; - int returnCounter; - QScriptValue returnValue; - - int nextBreakpointId; - QHash > resolvedBreakpoints; - QHash > unresolvedBreakpoints; - QScriptBreakpointMap breakpoints; - int hitBreakpointId; - - QScriptScriptMap scripts; - QScriptScriptMap checkpointScripts; - QScriptScriptMap previousCheckpointScripts; - QList > scriptIdStack; - - QList contextIdStack; - QList checkpointContextIdStack; - qint64 nextContextId; - - QTime processEventsTimer; - int statementCounter; - - QScriptDebuggerBackendPrivate *backend; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerbackend.cpp b/src/scripttools/debugging/qscriptdebuggerbackend.cpp deleted file mode 100644 index dc2ca21ce..000000000 --- a/src/scripttools/debugging/qscriptdebuggerbackend.cpp +++ /dev/null @@ -1,972 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerbackend_p.h" -#include "qscriptdebuggerbackend_p_p.h" -#include "qscriptdebuggeragent_p.h" -#include "qscriptdebuggercommandexecutor_p.h" -#include "qscriptdebuggerevent_p.h" -#include "qscriptdebuggervalue_p.h" -#include "qscriptscriptdata_p.h" -#include "qscriptbreakpointdata_p.h" -#include "qscriptobjectsnapshot_p.h" -#include "qscripttoolscommon_p.h" - -#include -#include -#include - -#include -#include - -QT_BEGIN_NAMESPACE - -/*! - \since 4.5 - \class QScriptDebuggerBackend - \internal - - \brief The QScriptDebuggerBackend class is the base class of debugger back-ends. - - QScriptDebuggerBackend builds on the QScriptDebuggerAgent class. - - This class is usually used together with the QScriptDebuggerFrontend - class, in order to form a (front-end, back-end) pair. - - Call attachTo() to attach to a QScriptEngine object. Call detach() - to detach from the current engine. - - Call stepInto() to step into the next script statement; call stepOver() - to step over the next script statement; and call stepOut() to step out - of the currently executing script function. An event() will be generated - when the stepping is completed. - - Call runToLocation() to execute script statements until a certain - location has been reached. An event() will be generated when the location - has been reached. - - Call interruptEvaluation() to request that evaluation should be - interrupted. An event() will be generated upon the next script - statement that is reached. - - Call continueEvalution() to allow script evaluation to continue. - - Call setBreakpoint() to set a breakpoint. A breakpoint event() will - be generated when a breakpoint is hit. Call deleteBreakpoint() to - delete a breakpoint. Call modifyBreakpoint() to change the state of - an existing breakpoint. - - Call contextCount() to obtain the number of active contexts - (frames). Call context() to obtain a pointer to a QScriptContext. - - \section1 Subclassing - - When subclassing QScriptDebuggerBackend, you must implement the pure - virtual event() function. This function typically forwards the event - to a QScriptDebuggerFrontend object. For most type of events, - event() should block until the back-end is instructed to resume - execution (e.g. until continueEvalution() is called). You must - implement resume(), which is responsible for making event() return. - - \sa QScriptDebuggerFrontend, QScriptDebuggerEvent -*/ - -// helper class that's used to handle our custom Qt events -class QScriptDebuggerBackendEventReceiver : public QObject -{ -public: - QScriptDebuggerBackendEventReceiver(QScriptDebuggerBackendPrivate *backend, - QObject *parent = nullptr) - : QObject(parent), m_backend(backend) {} - ~QScriptDebuggerBackendEventReceiver() {} - - bool event(QEvent *e) - { - return m_backend->event(e); - } - -private: - QScriptDebuggerBackendPrivate *m_backend; -}; - - -QScriptDebuggerBackendPrivate::QScriptDebuggerBackendPrivate() - : agent(0), commandExecutor(0), - pendingEvaluateContextIndex(-1), pendingEvaluateLineNumber(-1), - ignoreExceptions(false), - nextScriptValueIteratorId(0), nextScriptObjectSnapshotId(0), - eventReceiver(0), - q_ptr(0) // q_ptr will be set later by QScriptDebuggerBackend constructor -{ -} - -QScriptDebuggerBackendPrivate::~QScriptDebuggerBackendPrivate() -{ - if (agent) - agent->nullifyBackendPointer(); - delete commandExecutor; - delete eventReceiver; - qDeleteAll(scriptValueIterators); - qDeleteAll(scriptObjectSnapshots); -} - -void QScriptDebuggerBackendPrivate::postEvent(QEvent *e) -{ - if (!eventReceiver) { - eventReceiver = new QScriptDebuggerBackendEventReceiver(this); - Q_ASSERT(agent != 0); - eventReceiver->moveToThread(agent->engine()->thread()); - } - QCoreApplication::postEvent(eventReceiver, e); -} - -bool QScriptDebuggerBackendPrivate::event(QEvent *e) -{ - if (e->type() == QEvent::User+1) { - QScriptDebuggerEventEvent *de = static_cast(e); - q_func()->event(de->event()); - return true; - } - return false; -} - -void QScriptDebuggerBackendPrivate::agentDestroyed(QScriptDebuggerAgent *ag) -{ - // Since agents are owned by the script engine, this in practice means - // that the engine has been destroyed. Invalidate our pointer so we - // don't crash later. - if (agent == ag) - agent = 0; -} - -/*! - The agent calls this function when it has completed a step - operation. -*/ -void QScriptDebuggerBackendPrivate::stepped(qint64 scriptId, - int lineNumber, - int columnNumber, - const QScriptValue &result) -{ - Q_Q(QScriptDebuggerBackend); - QScriptDebuggerEvent e(QScriptDebuggerEvent::SteppingFinished, - scriptId, lineNumber, columnNumber); - e.setFileName(agent->scriptData(scriptId).fileName()); - QScriptDebuggerValue value(result); - e.setScriptValue(value); - if (!result.isUndefined()) - e.setMessage(result.toString()); // for convenience -- we always need it - q->event(e); -} - -/*! - The agent calls this function when it has run to a particular - location. -*/ -void QScriptDebuggerBackendPrivate::locationReached(qint64 scriptId, - int lineNumber, - int columnNumber) -{ - Q_Q(QScriptDebuggerBackend); - QScriptDebuggerEvent e(QScriptDebuggerEvent::LocationReached, - scriptId, lineNumber, columnNumber); - e.setFileName(agent->scriptData(scriptId).fileName()); - q->event(e); -} - -/*! - The agent calls this function when evaluation has been interrupted. -*/ -void QScriptDebuggerBackendPrivate::interrupted(qint64 scriptId, - int lineNumber, - int columnNumber) -{ - Q_Q(QScriptDebuggerBackend); - QScriptDebuggerEvent e(QScriptDebuggerEvent::Interrupted, - scriptId, lineNumber, columnNumber); - e.setFileName(agent->scriptData(scriptId).fileName()); - q->event(e); -} - -/*! - The agent calls this function when a breakpoint has been triggered. -*/ -void QScriptDebuggerBackendPrivate::breakpoint(qint64 scriptId, - int lineNumber, - int columnNumber, - int breakpointId) -{ - Q_Q(QScriptDebuggerBackend); - QScriptDebuggerEvent e(QScriptDebuggerEvent::Breakpoint, - scriptId, lineNumber, columnNumber); - e.setFileName(agent->scriptData(scriptId).fileName()); - e.setBreakpointId(breakpointId); - q->event(e); -} - -/*! - The agent calls this function when an uncaught exception has - occurred. -*/ -void QScriptDebuggerBackendPrivate::exception(qint64 scriptId, - const QScriptValue &exception, - bool hasHandler) -{ - Q_Q(QScriptDebuggerBackend); - if (ignoreExceptions) { - // don't care (it's caught by us) - return; - } - QScriptDebuggerEvent e(QScriptDebuggerEvent::Exception); - e.setScriptId(scriptId); - e.setFileName(agent->scriptData(scriptId).fileName()); - e.setMessage(exception.toString()); - e.setHasExceptionHandler(hasHandler); - int lineNumber = -1; - QString fileName; - if (exception.property(QLatin1String("lineNumber")).isNumber()) - lineNumber = exception.property(QLatin1String("lineNumber")).toInt32(); - if (exception.property(QLatin1String("fileName")).isString()) - fileName = exception.property(QLatin1String("fileName")).toString(); - if (lineNumber == -1) { - QScriptContextInfo info(q->engine()->currentContext()); - lineNumber = info.lineNumber(); - fileName = info.fileName(); - } - if (lineNumber != -1) - e.setLineNumber(lineNumber); - if (!fileName.isEmpty()) - e.setFileName(fileName); - QScriptDebuggerValue value(exception); - e.setScriptValue(value); - q->event(e); -} - -QScriptValue QScriptDebuggerBackendPrivate::trace(QScriptContext *context, - QScriptEngine *engine) -{ - QScriptValue data = context->callee().data(); - QScriptDebuggerBackendPrivate *self = qscriptvalue_cast(data); - if (!self) - return engine->undefinedValue(); - QString str; - for (int i = 0; i < context->argumentCount(); ++i) { - if (i > 0) - str.append(QLatin1Char(' ')); - str.append(context->argument(i).toString()); - } - QScriptDebuggerEvent e(QScriptDebuggerEvent::Trace); - e.setMessage(str); - self->q_func()->event(e); - return engine->undefinedValue(); -} - -QScriptValue QScriptDebuggerBackendPrivate::qsassert(QScriptContext *context, - QScriptEngine *engine) -{ - QScriptValue arg = context->argument(0); - if (arg.toBoolean()) - return arg; - QScriptContextInfo info(context->parentContext()); - QString msg; - QString fileName = info.fileName(); - if (fileName.isEmpty()) - fileName = QString::fromLatin1("").arg(info.scriptId()); - msg.append(fileName); - msg.append(QLatin1Char(':')); - msg.append(QString::number(info.lineNumber())); - msg.append(QString::fromLatin1(": Assertion failed")); - for (int i = 1; i < context->argumentCount(); ++i) { - if (i == 1) - msg.append(QLatin1Char(':')); - msg.append(QLatin1Char(' ')); - msg.append(context->argument(i).toString()); - } - QScriptValue err = context->throwError(msg); - err.setProperty(QString::fromLatin1("name"), QScriptValue(engine, QString::fromLatin1("AssertionError"))); - return err; -} - -QScriptValue QScriptDebuggerBackendPrivate::fileName(QScriptContext *context, - QScriptEngine *engine) -{ - QScriptContextInfo info(context->parentContext()); - QString fn = info.fileName(); - if (fn.isEmpty()) - return engine->undefinedValue(); - return QScriptValue(engine, fn); -} - -QScriptValue QScriptDebuggerBackendPrivate::lineNumber(QScriptContext *context, - QScriptEngine *engine) -{ - QScriptContextInfo info(context->parentContext()); - return QScriptValue(engine, info.lineNumber()); -} - -/*! - The agent calls this function when the engine has reached a - "debugger" statement. -*/ -void QScriptDebuggerBackendPrivate::debuggerInvocationRequest( - qint64 scriptId, int lineNumber, int columnNumber) -{ - Q_Q(QScriptDebuggerBackend); - QScriptDebuggerEvent e(QScriptDebuggerEvent::DebuggerInvocationRequest, - scriptId, lineNumber, columnNumber); - e.setFileName(agent->scriptData(scriptId).fileName()); - q->event(e); -} - -void QScriptDebuggerBackendPrivate::forcedReturn( - qint64 scriptId, int lineNumber, int columnNumber, - const QScriptValue &value) -{ - Q_Q(QScriptDebuggerBackend); - QScriptDebuggerEvent e(QScriptDebuggerEvent::ForcedReturn, - scriptId, lineNumber, columnNumber); - e.setFileName(agent->scriptData(scriptId).fileName()); - e.setScriptValue(QScriptDebuggerValue(value)); - q->event(e); -} - -/*! - Creates a QScriptDebuggerBackend object. -*/ -QScriptDebuggerBackend::QScriptDebuggerBackend() - : d_ptr(new QScriptDebuggerBackendPrivate) -{ - d_ptr->q_ptr = this; -} - -/*! - Destroys this QScriptDebuggerBackend. -*/ -QScriptDebuggerBackend::~QScriptDebuggerBackend() -{ - detach(); -} - -/*! - \internal -*/ -QScriptDebuggerBackend::QScriptDebuggerBackend(QScriptDebuggerBackendPrivate &dd) - : d_ptr(&dd) -{ - d_ptr->q_ptr = this; -} - -/*! - Attaches this backend to the given \a engine. - The backend automatically detaches from the old engine, if any. - - This function installs its own agent on the \a engine using - QScriptEngine::setAgent(); any existing agent will be replaced. - - \sa detach(). engine() -*/ -void QScriptDebuggerBackend::attachTo(QScriptEngine *engine) -{ - Q_D(QScriptDebuggerBackend); - detach(); - d->agent = new QScriptDebuggerAgent(d, engine); - QScriptValue global = engine->globalObject(); - d->origTraceFunction = global.property(QString::fromLatin1("print")); - global.setProperty(QString::fromLatin1("print"), traceFunction()); -// global.setProperty(QString::fromLatin1("qAssert"), assertFunction()); - d->origFileNameFunction = global.property(QString::fromLatin1("__FILE__")); - global.setProperty(QString::fromLatin1("__FILE__"), fileNameFunction(), - QScriptValue::PropertyGetter | QScriptValue::ReadOnly); - d->origLineNumberFunction = global.property(QString::fromLatin1("__LINE__")); - global.setProperty(QString::fromLatin1("__LINE__"), lineNumberFunction(), - QScriptValue::PropertyGetter | QScriptValue::ReadOnly); - engine->setAgent(d->agent); -} - -/*! - Detaches this backend from the current script engine. - The backend's state (including breakpoints and information on loaded - scripts) will be invalidated. - - \sa attach() -*/ -void QScriptDebuggerBackend::detach() -{ - Q_D(QScriptDebuggerBackend); - if (d->agent) { - QScriptEngine *eng = d->agent->engine(); - if (eng && eng->agent() == d->agent) { - eng->setAgent(0); - QScriptValue global = eng->globalObject(); - global.setProperty(QString::fromLatin1("print"), d->origTraceFunction); - d->origTraceFunction = QScriptValue(); -// global.setProperty(QString::fromLatin1("qAssert"), QScriptValue()); - global.setProperty(QString::fromLatin1("__FILE__"), QScriptValue(), - QScriptValue::PropertyGetter); - global.setProperty(QString::fromLatin1("__FILE__"), d->origFileNameFunction); - d->origFileNameFunction = QScriptValue(); - global.setProperty(QString::fromLatin1("__LINE__"), QScriptValue(), - QScriptValue::PropertyGetter); - global.setProperty(QString::fromLatin1("__LINE__"), d->origLineNumberFunction); - d->origLineNumberFunction = QScriptValue(); - d->agent->nullifyBackendPointer(); - d->agent = 0; // agent is owned by engine - } - } - - d->pendingEvaluateLineNumber = -1; - d->ignoreExceptions = false; - d->nextScriptValueIteratorId = 0; - qDeleteAll(d->scriptValueIterators); - d->scriptValueIterators.clear(); - qDeleteAll(d->scriptObjectSnapshots); - d->scriptObjectSnapshots.clear(); -} - -/*! - Returns the script engine that this backend is attached to, or 0 if - the backend is not attached to an engine. - - \sa attachTo() -*/ -QScriptEngine *QScriptDebuggerBackend::engine() const -{ - Q_D(const QScriptDebuggerBackend); - if (!d->agent) - return 0; - return d->agent->engine(); -} - -/*! - Steps into the next script statement. - When stepping is complete, an event() will be generated. -*/ -void QScriptDebuggerBackend::stepInto(int count) -{ - Q_D(QScriptDebuggerBackend); - if (d->agent) { - d->agent->enterStepIntoMode(count); - resume(); - } -} - -/*! - Steps over the next script statement. - When stepping is complete, an event() will be generated. -*/ -void QScriptDebuggerBackend::stepOver(int count) -{ - Q_D(QScriptDebuggerBackend); - if (d->agent) { - d->agent->enterStepOverMode(count); - resume(); - } -} - -/*! - Steps out of the current script function. - When stepping is complete, an event() will be generated. -*/ -void QScriptDebuggerBackend::stepOut() -{ - Q_D(QScriptDebuggerBackend); - if (d->agent) { - d->agent->enterStepOutMode(); - resume(); - } -} - -/*! - Continues script evaluation. Evaluation will proceed without - interruption until either 1) an uncaught exception occurs, 2) a - breakpoint is triggered, or 3) interruptEvaluation() is called. - In each case, a proper event() will be generated. -*/ -void QScriptDebuggerBackend::continueEvalution() -{ - Q_D(QScriptDebuggerBackend); - if (d->agent) { - d->agent->enterContinueMode(); - resume(); - } -} - -/*! - Interrupts script evaluation. When the next script statement is - reached, an event() will be generated. -*/ -void QScriptDebuggerBackend::interruptEvaluation() -{ - Q_D(QScriptDebuggerBackend); - if (d->agent) - d->agent->enterInterruptMode(); -} - -/*! - Continues evaluation until the location defined by the given \a - fileName and \a lineNumber is reached. When the location is reached, - an event() will be generated. -*/ -void QScriptDebuggerBackend::runToLocation(const QString &fileName, int lineNumber) -{ - Q_D(QScriptDebuggerBackend); - if (d->agent) { - d->agent->enterRunToLocationMode(fileName, lineNumber); - resume(); - } -} - -/*! - Continues evaluation until the location defined by the given \a - scriptId and \a lineNumber is reached. When the location is reached, - an event() will be generated. -*/ -void QScriptDebuggerBackend::runToLocation(qint64 scriptId, int lineNumber) -{ - Q_D(QScriptDebuggerBackend); - if (d->agent) { - d->agent->enterRunToLocationMode(scriptId, lineNumber); - resume(); - } -} - -void QScriptDebuggerBackend::returnToCaller(int contextIndex, const QScriptValue &value) -{ - Q_D(QScriptDebuggerBackend); - if (d->agent) { - d->agent->enterReturnByForceMode(contextIndex, value); - resume(); - } -} - -/*! - Evaluates the given \a program. When evaluation is complete, an - event() is generated. -*/ -void QScriptDebuggerBackend::evaluate(int contextIndex, const QString &program, - const QString &fileName, int lineNumber) -{ - Q_D(QScriptDebuggerBackend); - d->pendingEvaluateContextIndex = contextIndex; - d->pendingEvaluateProgram = program; - d->pendingEvaluateFileName = fileName; - d->pendingEvaluateLineNumber = lineNumber; - if (!engine()->isEvaluating()) - doPendingEvaluate(/*postEvent=*/true); - else - resume(); -} - -/*! - Executes the pending evaluate, if any. -*/ -void QScriptDebuggerBackend::doPendingEvaluate(bool postEvent) -{ - Q_D(QScriptDebuggerBackend); - QString program = d->pendingEvaluateProgram; - if (program.isEmpty()) - return; - int contextIndex = d->pendingEvaluateContextIndex; - QScriptContext *ctx = context(contextIndex); - Q_ASSERT(ctx != 0); - QString fileName = d->pendingEvaluateFileName; - int lineNumber = d->pendingEvaluateLineNumber; - d->pendingEvaluateProgram = QString(); - d->pendingEvaluateFileName = QString(); - d->pendingEvaluateLineNumber = -1; - d->pendingEvaluateContextIndex = -1; - - // push a new context and initialize its scope chain etc. - { - QScriptContext *evalContext = engine()->pushContext(); - QScriptValueList scopeChain = ctx->scopeChain(); - if (scopeChain.isEmpty()) - scopeChain.append(engine()->globalObject()); - while (!scopeChain.isEmpty()) - evalContext->pushScope(scopeChain.takeLast()); - evalContext->setActivationObject(ctx->activationObject()); - evalContext->setThisObject(ctx->thisObject()); - } - - d->agent->enterContinueMode(); - // set a flag so that any exception that happens in - // the evaluate() is not sent to the debugger - d->ignoreExceptions = true; - bool hadException = engine()->hasUncaughtException(); - QScriptValue ret = engine()->evaluate(program, fileName, lineNumber); - d->ignoreExceptions = false; - if (!hadException && engine()->hasUncaughtException()) - engine()->clearExceptions(); - engine()->popContext(); - - QScriptDebuggerValue retret(ret); - QScriptDebuggerEvent e(QScriptDebuggerEvent::InlineEvalFinished); - e.setScriptValue(retret); - if (!ret.isUndefined()) - e.setMessage(ret.toString()); // for convenience -- we always need it - - e.setNestedEvaluate(engine()->isEvaluating()); - - if (postEvent) { - QScriptDebuggerEventEvent *de = new QScriptDebuggerEventEvent(e); - d->postEvent(de); - } else { - event(e); - } -} - -/*! - Sets a breakpoint defined by the given \a data, and returns a unique - identifier for the new breakpoint. - - If the conditions of the breakpoint is satisfied at some point - during script evaluation, a breakpoint event() will be generated. - - \sa deleteBreakpoint(), breakpoints() -*/ -int QScriptDebuggerBackend::setBreakpoint(const QScriptBreakpointData &data) -{ - Q_D(QScriptDebuggerBackend); - if (!d->agent) - return -1; - if (!data.isValid()) - return -1; - return d->agent->setBreakpoint(data); -} - -/*! - Deletes the breakpoint identified by the given \a id. Returns true - if the breakpoint was deleted (i.e. the \a id was valid), otherwise - returns false. - - \sa setBreakpoint() -*/ -bool QScriptDebuggerBackend::deleteBreakpoint(int id) -{ - Q_D(QScriptDebuggerBackend); - if (!d->agent) - return false; - return d->agent->deleteBreakpoint(id); -} - -/*! - Deletes all breakpoints. -*/ -void QScriptDebuggerBackend::deleteAllBreakpoints() -{ - Q_D(QScriptDebuggerBackend); - if (d->agent) - d->agent->deleteAllBreakpoints(); -} - -/*! - Returns the data associated with the breakpoint identified by the - given \a id. -*/ -QScriptBreakpointData QScriptDebuggerBackend::breakpointData(int id) const -{ - Q_D(const QScriptDebuggerBackend); - if (!d->agent) - return QScriptBreakpointData(); - return d->agent->breakpointData(id); -} - -/*! - Sets the \a data associated with the breakpoint identified by the - given \a id. -*/ -bool QScriptDebuggerBackend::setBreakpointData(int id, const QScriptBreakpointData &data) -{ - Q_D(QScriptDebuggerBackend); - if (d->agent) - return d->agent->setBreakpointData(id, data); - return false; -} - -/*! - Returns this backend's breakpoints. - - \sa setBreakpoint() -*/ -QScriptBreakpointMap QScriptDebuggerBackend::breakpoints() const -{ - Q_D(const QScriptDebuggerBackend); - if (!d->agent) - return QScriptBreakpointMap(); - return d->agent->breakpoints(); -} - -/*! - Returns the scripts that this backend knows about. - - \sa scriptData() -*/ -QScriptScriptMap QScriptDebuggerBackend::scripts() const -{ - Q_D(const QScriptDebuggerBackend); - if (!d->agent) - return QScriptScriptMap(); - return d->agent->scripts(); -} - -/*! - Returns the data for the script identified by the given \a id. - - \sa scripts() -*/ -QScriptScriptData QScriptDebuggerBackend::scriptData(qint64 id) const -{ - Q_D(const QScriptDebuggerBackend); - if (!d->agent) - return QScriptScriptData(); - return d->agent->scriptData(id); -} - -/*! - Makes a checkpoint of the currently loaded scripts. - - \sa scriptsDelta() -*/ -void QScriptDebuggerBackend::scriptsCheckpoint() -{ - Q_D(QScriptDebuggerBackend); - if (d->agent) - d->agent->scriptsCheckpoint(); -} - -/*! - Returns the difference between the latest scripts checkpoint and the - previous checkpoint. The first item in the pair is a list - containing the identifiers of the scripts that were added. The - second item in the pair is a list containing the identifiers of the - scripts that were removed. - - \sa scriptsCheckpoint() -*/ -QScriptScriptsDelta QScriptDebuggerBackend::scriptsDelta() const -{ - Q_D(const QScriptDebuggerBackend); - if (!d->agent) - return QPair, QList >(); - return d->agent->scriptsDelta(); -} - -qint64 QScriptDebuggerBackend::resolveScript(const QString &fileName) const -{ - Q_D(const QScriptDebuggerBackend); - if (!d->agent) - return -1; - return d->agent->resolveScript(fileName); -} - -/*! - Returns the number of contexts (frames). -*/ -int QScriptDebuggerBackend::contextCount() const -{ - if (!engine()) - return 0; - return contextIds().count(); -} - -/*! - Returns the context for the frame with the given \a index. -*/ -QScriptContext *QScriptDebuggerBackend::context(int index) const -{ - if (index < 0) - return 0; - QScriptContext *ctx = engine()->currentContext(); - while (ctx) { - if (index == 0) - return ctx; - ctx = ctx->parentContext(); - --index; - } - return 0; -} - -/*! - Returns a backtrace of the current execution. -*/ -QStringList QScriptDebuggerBackend::backtrace() const -{ - if (!engine()) - return QStringList(); - return engine()->currentContext()->backtrace(); -} - -QList QScriptDebuggerBackend::contextIds() const -{ - Q_D(const QScriptDebuggerBackend); - if (!d->agent) - return QList(); - return d->agent->contextIds(); -} - -QScriptContextsDelta QScriptDebuggerBackend::contextsCheckpoint() -{ - Q_D(QScriptDebuggerBackend); - if (!d->agent) - return QScriptContextsDelta(); - return d->agent->contextsCheckpoint(); -} - -int QScriptDebuggerBackend::newScriptObjectSnapshot() -{ - Q_D(QScriptDebuggerBackend); - int id = d->nextScriptObjectSnapshotId; - ++d->nextScriptObjectSnapshotId; - d->scriptObjectSnapshots[id] = new QScriptObjectSnapshot(); - return id; -} - -QScriptObjectSnapshot *QScriptDebuggerBackend::scriptObjectSnapshot(int id) const -{ - Q_D(const QScriptDebuggerBackend); - return d->scriptObjectSnapshots.value(id); -} - -void QScriptDebuggerBackend::deleteScriptObjectSnapshot(int id) -{ - Q_D(QScriptDebuggerBackend); - QScriptObjectSnapshot *snap = d->scriptObjectSnapshots.take(id); - delete snap; -} - -int QScriptDebuggerBackend::newScriptValueIterator(const QScriptValue &object) -{ - Q_D(QScriptDebuggerBackend); - int id = d->nextScriptValueIteratorId; - ++d->nextScriptValueIteratorId; - d->scriptValueIterators[id] = new QScriptValueIterator(object); - return id; -} - -QScriptValueIterator *QScriptDebuggerBackend::scriptValueIterator(int id) const -{ - Q_D(const QScriptDebuggerBackend); - return d->scriptValueIterators.value(id); -} - -void QScriptDebuggerBackend::deleteScriptValueIterator(int id) -{ - Q_D(QScriptDebuggerBackend); - QScriptValueIterator *it = d->scriptValueIterators.take(id); - delete it; -} - -bool QScriptDebuggerBackend::ignoreExceptions() const -{ - Q_D(const QScriptDebuggerBackend); - return d->ignoreExceptions; -} - -void QScriptDebuggerBackend::setIgnoreExceptions(bool ignore) -{ - Q_D(QScriptDebuggerBackend); - d->ignoreExceptions = ignore; -} - -/*! - Returns a trace function. The trace function has similar semantics - to the built-in print() function; however, instead of writing text - to standard output, it generates a trace event containing the text. -*/ -QScriptValue QScriptDebuggerBackend::traceFunction() const -{ - Q_D(const QScriptDebuggerBackend); - if (!engine()) - return QScriptValue(); - QScriptValue fun = engine()->newFunction(QScriptDebuggerBackendPrivate::trace); - fun.setData(qScriptValueFromValue(engine(), const_cast(d))); - return fun; -} - -QScriptValue QScriptDebuggerBackend::assertFunction() const -{ - if (!engine()) - return QScriptValue(); - QScriptValue fun = engine()->newFunction(QScriptDebuggerBackendPrivate::qsassert); - return fun; -} - -QScriptValue QScriptDebuggerBackend::fileNameFunction() const -{ - if (!engine()) - return QScriptValue(); - QScriptValue fun = engine()->newFunction(QScriptDebuggerBackendPrivate::fileName); - return fun; -} - -QScriptValue QScriptDebuggerBackend::lineNumberFunction() const -{ - if (!engine()) - return QScriptValue(); - QScriptValue fun = engine()->newFunction(QScriptDebuggerBackendPrivate::lineNumber); - return fun; -} - -QScriptDebuggerCommandExecutor *QScriptDebuggerBackend::commandExecutor() const -{ - Q_D(const QScriptDebuggerBackend); - if (d->commandExecutor) - return d->commandExecutor; - QScriptDebuggerBackendPrivate *dd = const_cast(d); - dd->commandExecutor = new QScriptDebuggerCommandExecutor(); - return dd->commandExecutor; -} - -void QScriptDebuggerBackend::setCommandExecutor(QScriptDebuggerCommandExecutor *executor) -{ - Q_D(QScriptDebuggerBackend); - d->commandExecutor = executor; -} - -/*! - \fn void QScriptDebuggerBackend::resume() - - This function is called when control should be returned back to the - back-end, i.e. when script evaluation should be resumed after an - event has been delivered. - - Subclasses must reimplement this function to make event() return. - - \sa event() -*/ - -/*! - \fn void QScriptDebuggerBackend::event(const QScriptDebuggerEvent &event) - - This function is called when the back-end has generated the given \a event. - - Subclasses must reimplement this function to handle the - event. Typically the event is forwarded to a - QScriptDebuggerFrontend, which will in turn forward it to its - QScriptDebuggerClient. The client may then query the front-end for - information about the execution state, and call e.g. - continueEvalution() to resume execution. This function should block - until resume() is called. - - \sa resume() -*/ - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptdebuggerbackend_p.h b/src/scripttools/debugging/qscriptdebuggerbackend_p.h deleted file mode 100644 index 8beed95b4..000000000 --- a/src/scripttools/debugging/qscriptdebuggerbackend_p.h +++ /dev/null @@ -1,136 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERBACKEND_P_H -#define QSCRIPTDEBUGGERBACKEND_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include - -#include "qscriptbreakpointdata_p.h" -#include "qscriptscriptdata_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptContext; -class QScriptEngine; -class QScriptDebuggerCommandExecutor; -class QScriptDebuggerEvent; -class QScriptValue; -class QScriptValueIterator; -class QScriptObjectSnapshot; -class QStringList; - -typedef QPair, QList > QScriptScriptsDelta; -typedef QPair, QList > QScriptContextsDelta; - -class QScriptDebuggerBackendPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerBackend -{ -public: - QScriptDebuggerBackend(); - virtual ~QScriptDebuggerBackend(); - - void attachTo(QScriptEngine *engine); - void detach(); - - QScriptEngine *engine() const; - - void stepInto(int count = 1); - void stepOver(int count = 1); - void stepOut(); - void continueEvalution(); - void interruptEvaluation(); - void runToLocation(const QString &fileName, int lineNumber); - void runToLocation(qint64 scriptId, int lineNumber); - void returnToCaller(int contextIndex, const QScriptValue &value); - void evaluate(int contextIndex, const QString &program, - const QString &fileName, int lineNumber); - - int setBreakpoint(const QScriptBreakpointData &data); - bool deleteBreakpoint(int id); - void deleteAllBreakpoints(); - QScriptBreakpointData breakpointData(int id) const; - bool setBreakpointData(int id, const QScriptBreakpointData &data); - QScriptBreakpointMap breakpoints() const; - - QScriptScriptMap scripts() const; - QScriptScriptData scriptData(qint64 id) const; - void scriptsCheckpoint(); - QScriptScriptsDelta scriptsDelta() const; - qint64 resolveScript(const QString &fileName) const; - - int contextCount() const; - QScriptContext *context(int index) const; - QStringList backtrace() const; - QList contextIds() const; - QScriptContextsDelta contextsCheckpoint(); - - int newScriptObjectSnapshot(); - QScriptObjectSnapshot *scriptObjectSnapshot(int id) const; - void deleteScriptObjectSnapshot(int id); - - int newScriptValueIterator(const QScriptValue &object); - QScriptValueIterator *scriptValueIterator(int id) const; - void deleteScriptValueIterator(int id); - - QScriptValue traceFunction() const; - QScriptValue assertFunction() const; - QScriptValue fileNameFunction() const; - QScriptValue lineNumberFunction() const; - - void doPendingEvaluate(bool postEvent); - - bool ignoreExceptions() const; - void setIgnoreExceptions(bool ignore); - - QScriptDebuggerCommandExecutor *commandExecutor() const; - void setCommandExecutor(QScriptDebuggerCommandExecutor *executor); - - virtual void resume() = 0; - -protected: - virtual void event(const QScriptDebuggerEvent &event) = 0; - -protected: - QScriptDebuggerBackend(QScriptDebuggerBackendPrivate &dd); - QScopedPointer d_ptr; - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerBackend) - Q_DISABLE_COPY(QScriptDebuggerBackend) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerbackend_p_p.h b/src/scripttools/debugging/qscriptdebuggerbackend_p_p.h deleted file mode 100644 index 33ee801d5..000000000 --- a/src/scripttools/debugging/qscriptdebuggerbackend_p_p.h +++ /dev/null @@ -1,117 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERBACKEND_P_P_H -#define QSCRIPTDEBUGGERBACKEND_P_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include -#include -#include - -#include "qscriptdebuggerbackend_p.h" - -QT_BEGIN_NAMESPACE - -class QEvent; -class QString; -class QScriptContext; -class QScriptEngine; -class QScriptValueIterator; -class QScriptObjectSnapshot; -class QScriptDebuggerAgent; -class QScriptDebuggerCommandExecutor; - -class QScriptDebuggerBackend; -class Q_AUTOTEST_EXPORT QScriptDebuggerBackendPrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerBackend) -public: - QScriptDebuggerBackendPrivate(); - virtual ~QScriptDebuggerBackendPrivate(); - - void postEvent(QEvent *e); - virtual bool event(QEvent *e); - - // events reported by agent - virtual void stepped(qint64 scriptId, int lineNumber, int columnNumber, - const QScriptValue &result); - virtual void locationReached(qint64 scriptId, int lineNumber, int columnNumber); - virtual void interrupted(qint64 scriptId, int lineNumber, int columnNumber); - virtual void breakpoint(qint64 scriptId, int lineNumber, int columnNumber, - int breakpointId); - virtual void exception(qint64 scriptId, const QScriptValue &exception, - bool hasHandler); - virtual void debuggerInvocationRequest(qint64 scriptId, int lineNumber, - int columnNumber); - virtual void forcedReturn(qint64 scriptId, int lineNumber, int columnNumber, - const QScriptValue &value); - - static QScriptValue trace(QScriptContext *context, - QScriptEngine *engine); - static QScriptValue qsassert(QScriptContext *context, - QScriptEngine *engine); - static QScriptValue fileName(QScriptContext *context, - QScriptEngine *engine); - static QScriptValue lineNumber(QScriptContext *context, - QScriptEngine *engine); - - void agentDestroyed(QScriptDebuggerAgent *); - - QScriptDebuggerAgent *agent; - QScriptDebuggerCommandExecutor *commandExecutor; - - int pendingEvaluateContextIndex; - QString pendingEvaluateProgram; - QString pendingEvaluateFileName; - int pendingEvaluateLineNumber; - bool ignoreExceptions; - - int nextScriptValueIteratorId; - QMap scriptValueIterators; - - int nextScriptObjectSnapshotId; - QMap scriptObjectSnapshots; - - QObject *eventReceiver; - - QScriptDebuggerBackend *q_ptr; - - QScriptValue origTraceFunction; - QScriptValue origFileNameFunction; - QScriptValue origLineNumberFunction; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp b/src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp deleted file mode 100644 index 6f68d1fa1..000000000 --- a/src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp +++ /dev/null @@ -1,230 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggercodefinderwidget_p.h" -#include "qscriptdebuggercodefinderwidgetinterface_p_p.h" -#include "qscripttoolsresources_p.h" - -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerCodeFinderWidgetPrivate - : public QScriptDebuggerCodeFinderWidgetInterfacePrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerCodeFinderWidget) -public: - QScriptDebuggerCodeFinderWidgetPrivate(); - ~QScriptDebuggerCodeFinderWidgetPrivate(); - - // private slots - void _q_updateButtons(); - void _q_onTextChanged(const QString &); - void _q_next(); - void _q_previous(); - - int findOptions() const; - - QLineEdit *editFind; - QCheckBox *checkCase; - QLabel *labelWrapped; - QToolButton *toolNext; - QToolButton *toolClose; - QToolButton *toolPrevious; - QCheckBox *checkWholeWords; -}; - -QScriptDebuggerCodeFinderWidgetPrivate::QScriptDebuggerCodeFinderWidgetPrivate() -{ -} - -QScriptDebuggerCodeFinderWidgetPrivate::~QScriptDebuggerCodeFinderWidgetPrivate() -{ -} - -void QScriptDebuggerCodeFinderWidgetPrivate::_q_updateButtons() -{ - if (editFind->text().isEmpty()) { - toolPrevious->setEnabled(false); - toolNext->setEnabled(false); - } else { - toolPrevious->setEnabled(true); - toolNext->setEnabled(true); - } -} - -int QScriptDebuggerCodeFinderWidgetPrivate::findOptions() const -{ - int flags = 0; - if (checkCase->isChecked()) - flags |= QTextDocument::FindCaseSensitively; - if (checkWholeWords->isChecked()) - flags |= QTextDocument::FindWholeWords; - return flags; -} - -void QScriptDebuggerCodeFinderWidgetPrivate::_q_onTextChanged(const QString &text) -{ - emit q_func()->findRequest(text, findOptions() | 0x100); -} - -void QScriptDebuggerCodeFinderWidgetPrivate::_q_next() -{ - emit q_func()->findRequest(editFind->text(), findOptions()); -} - -void QScriptDebuggerCodeFinderWidgetPrivate::_q_previous() -{ - emit q_func()->findRequest(editFind->text(), findOptions() | QTextDocument::FindBackward); -} - -QScriptDebuggerCodeFinderWidget::QScriptDebuggerCodeFinderWidget(QWidget *parent) - : QScriptDebuggerCodeFinderWidgetInterface( - *new QScriptDebuggerCodeFinderWidgetPrivate, parent, 0) -{ - Q_D(QScriptDebuggerCodeFinderWidget); - QHBoxLayout *hboxLayout = new QHBoxLayout(this); - hboxLayout->setSpacing(6); - hboxLayout->setMargin(0); - - d->toolClose = new QToolButton(this); - QPixmap pix; - pix.loadFromData( - scripttools_closetab_png, scripttools_closetab_png_len, - qt_images_format - ); - d->toolClose->setIcon(QIcon(pix)); - d->toolClose->setAutoRaise(true); - d->toolClose->setText(tr("Close")); - hboxLayout->addWidget(d->toolClose); - - d->editFind = new QLineEdit(this); - d->editFind->setMinimumSize(QSize(150, 0)); - connect(d->editFind, SIGNAL(textChanged(QString)), - this, SLOT(_q_updateButtons())); - connect(d->editFind, SIGNAL(returnPressed()), - this, SLOT(_q_next())); - hboxLayout->addWidget(d->editFind); - - d->toolPrevious = new QToolButton(this); - d->toolPrevious->setAutoRaise(true); - d->toolPrevious->setText(tr("Previous")); - d->toolPrevious->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - d->toolPrevious->setIcon(QIcon::fromTheme("go-previous")); - hboxLayout->addWidget(d->toolPrevious); - - d->toolNext = new QToolButton(this); - d->toolNext->setAutoRaise(true); - d->toolNext->setText(tr("Next")); - d->toolNext->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - d->toolNext->setIcon(QIcon::fromTheme("go-next")); - hboxLayout->addWidget(d->toolNext); - - d->checkCase = new QCheckBox(tr("Case Sensitive"), this); - hboxLayout->addWidget(d->checkCase); - - d->checkWholeWords = new QCheckBox(tr("Whole words"), this); - hboxLayout->addWidget(d->checkWholeWords); - - d->labelWrapped = new QLabel(this); - d->labelWrapped->setMinimumSize(QSize(0, 20)); - d->labelWrapped->setMaximumSize(QSize(115, 20)); - d->labelWrapped->setTextFormat(Qt::RichText); - d->labelWrapped->setScaledContents(true); - d->labelWrapped->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); - d->labelWrapped->setText(tr("Search wrapped")); - hboxLayout->addWidget(d->labelWrapped); - - QSpacerItem *spacerItem = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - hboxLayout->addItem(spacerItem); - setMinimumWidth(minimumSizeHint().width()); - d->labelWrapped->hide(); - - d->_q_updateButtons(); - - setFocusProxy(d->editFind); - QObject::connect(d->toolClose, SIGNAL(clicked()), this, SLOT(hide())); - QObject::connect(d->editFind, SIGNAL(textChanged(QString)), - this, SLOT(_q_onTextChanged(QString))); - QObject::connect(d->toolNext, SIGNAL(clicked()), this, SLOT(_q_next())); - QObject::connect(d->toolPrevious, SIGNAL(clicked()), this, SLOT(_q_previous())); -} - -QScriptDebuggerCodeFinderWidget::~QScriptDebuggerCodeFinderWidget() -{ -} - -int QScriptDebuggerCodeFinderWidget::findOptions() const -{ - Q_D(const QScriptDebuggerCodeFinderWidget); - return d->findOptions(); -} - -QString QScriptDebuggerCodeFinderWidget::text() const -{ - Q_D(const QScriptDebuggerCodeFinderWidget); - return d->editFind->text(); -} - -void QScriptDebuggerCodeFinderWidget::setText(const QString &text) -{ - Q_D(const QScriptDebuggerCodeFinderWidget); - d->editFind->setText(text); -} - -void QScriptDebuggerCodeFinderWidget::setOK(bool ok) -{ - Q_D(QScriptDebuggerCodeFinderWidget); - QPalette p = d->editFind->palette(); - QColor c; - if (ok) - c = Qt::white; - else - c = QColor(255, 102, 102); - p.setColor(QPalette::Active, QPalette::Base, c); - d->editFind->setPalette(p); - if (!ok) - d->labelWrapped->hide(); -} - -void QScriptDebuggerCodeFinderWidget::setWrapped(bool wrapped) -{ - Q_D(QScriptDebuggerCodeFinderWidget); - d->labelWrapped->setVisible(wrapped); -} - -void QScriptDebuggerCodeFinderWidget::keyPressEvent(QKeyEvent *e) -{ - if (e->key() == Qt::Key_Escape) - hide(); - else - QScriptDebuggerCodeFinderWidgetInterface::keyPressEvent(e); -} - -QT_END_NAMESPACE - -#include "moc_qscriptdebuggercodefinderwidget_p.h" diff --git a/src/scripttools/debugging/qscriptdebuggercodefinderwidget_p.h b/src/scripttools/debugging/qscriptdebuggercodefinderwidget_p.h deleted file mode 100644 index 8264ae5a3..000000000 --- a/src/scripttools/debugging/qscriptdebuggercodefinderwidget_p.h +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCODEFINDERWIDGET_P_H -#define QSCRIPTDEBUGGERCODEFINDERWIDGET_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qscriptdebuggercodefinderwidgetinterface_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerCodeFinderWidgetPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerCodeFinderWidget: - public QScriptDebuggerCodeFinderWidgetInterface -{ - Q_OBJECT -public: - QScriptDebuggerCodeFinderWidget(QWidget *parent = nullptr); - ~QScriptDebuggerCodeFinderWidget(); - - int findOptions() const; - - QString text() const; - void setText(const QString &text); - - void setOK(bool ok); - void setWrapped(bool wrapped); - -protected: - void keyPressEvent(QKeyEvent *e); - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerCodeFinderWidget) - Q_DISABLE_COPY(QScriptDebuggerCodeFinderWidget) - - Q_PRIVATE_SLOT(d_func(), void _q_updateButtons()) - Q_PRIVATE_SLOT(d_func(), void _q_onTextChanged(const QString &)) - Q_PRIVATE_SLOT(d_func(), void _q_next()) - Q_PRIVATE_SLOT(d_func(), void _q_previous()) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggercodefinderwidgetinterface.cpp b/src/scripttools/debugging/qscriptdebuggercodefinderwidgetinterface.cpp deleted file mode 100644 index 45d7278b1..000000000 --- a/src/scripttools/debugging/qscriptdebuggercodefinderwidgetinterface.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggercodefinderwidgetinterface_p.h" -#include "qscriptdebuggercodefinderwidgetinterface_p_p.h" - -QT_BEGIN_NAMESPACE - -QScriptDebuggerCodeFinderWidgetInterfacePrivate::QScriptDebuggerCodeFinderWidgetInterfacePrivate() -{ -} - -QScriptDebuggerCodeFinderWidgetInterfacePrivate::~QScriptDebuggerCodeFinderWidgetInterfacePrivate() -{ -} - -QScriptDebuggerCodeFinderWidgetInterface::~QScriptDebuggerCodeFinderWidgetInterface() -{ -} - -QScriptDebuggerCodeFinderWidgetInterface::QScriptDebuggerCodeFinderWidgetInterface( - QScriptDebuggerCodeFinderWidgetInterfacePrivate &dd, - QWidget *parent, Qt::WindowFlags flags) - : QWidget(dd, parent, flags) -{ -} - -QT_END_NAMESPACE -#include "moc_qscriptdebuggercodefinderwidgetinterface_p.h" diff --git a/src/scripttools/debugging/qscriptdebuggercodefinderwidgetinterface_p.h b/src/scripttools/debugging/qscriptdebuggercodefinderwidgetinterface_p.h deleted file mode 100644 index d155da51c..000000000 --- a/src/scripttools/debugging/qscriptdebuggercodefinderwidgetinterface_p.h +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCODEFINDERWIDGETINTERFACE_P_H -#define QSCRIPTDEBUGGERCODEFINDERWIDGETINTERFACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerCodeFinderWidgetInterfacePrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerCodeFinderWidgetInterface: - public QWidget -{ - Q_OBJECT -public: - ~QScriptDebuggerCodeFinderWidgetInterface(); - - virtual int findOptions() const = 0; - - virtual QString text() const = 0; - virtual void setText(const QString &text) = 0; - - virtual void setOK(bool ok) = 0; - virtual void setWrapped(bool wrapped) = 0; - -Q_SIGNALS: - void findRequest(const QString &exp, int options); - -protected: - QScriptDebuggerCodeFinderWidgetInterface( - QScriptDebuggerCodeFinderWidgetInterfacePrivate &dd, - QWidget *parent, Qt::WindowFlags flags); - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerCodeFinderWidgetInterface) - Q_DISABLE_COPY(QScriptDebuggerCodeFinderWidgetInterface) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggercodefinderwidgetinterface_p_p.h b/src/scripttools/debugging/qscriptdebuggercodefinderwidgetinterface_p_p.h deleted file mode 100644 index 8ac13e50f..000000000 --- a/src/scripttools/debugging/qscriptdebuggercodefinderwidgetinterface_p_p.h +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCODEFINDERWIDGETINTERFACE_P_P_H -#define QSCRIPTDEBUGGERCODEFINDERWIDGETINTERFACE_P_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qwidget_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerCodeFinderWidgetInterface; -class QScriptDebuggerCodeFinderWidgetInterfacePrivate - : public QWidgetPrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerCodeFinderWidgetInterface) -public: - QScriptDebuggerCodeFinderWidgetInterfacePrivate(); - ~QScriptDebuggerCodeFinderWidgetInterfacePrivate(); -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggercodeview.cpp b/src/scripttools/debugging/qscriptdebuggercodeview.cpp deleted file mode 100644 index 467abb776..000000000 --- a/src/scripttools/debugging/qscriptdebuggercodeview.cpp +++ /dev/null @@ -1,231 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggercodeview_p.h" -#include "qscriptdebuggercodeviewinterface_p_p.h" -#include "qscripttoolscommon_p.h" - -#include "qscriptedit_p.h" - -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerCodeViewPrivate - : public QScriptDebuggerCodeViewInterfacePrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerCodeView) -public: - QScriptDebuggerCodeViewPrivate(); - ~QScriptDebuggerCodeViewPrivate(); - - QScriptEdit *editor; -}; - -QScriptDebuggerCodeViewPrivate::QScriptDebuggerCodeViewPrivate() -{ -} - -QScriptDebuggerCodeViewPrivate::~QScriptDebuggerCodeViewPrivate() -{ -} - -QScriptDebuggerCodeView::QScriptDebuggerCodeView(QWidget *parent) - : QScriptDebuggerCodeViewInterface(*new QScriptDebuggerCodeViewPrivate, parent, 0) -{ - Q_D(QScriptDebuggerCodeView); - d->editor = new QScriptEdit(); - d->editor->setReadOnly(true); - d->editor->setBackgroundVisible(false); - QObject::connect(d->editor, SIGNAL(breakpointToggleRequest(int,bool)), - this, SIGNAL(breakpointToggleRequest(int,bool))); - QObject::connect(d->editor, SIGNAL(breakpointEnableRequest(int,bool)), - this, SIGNAL(breakpointEnableRequest(int,bool))); - QVBoxLayout *vbox = new QVBoxLayout(this); - vbox->setMargin(0); - vbox->addWidget(d->editor); -} - -QScriptDebuggerCodeView::~QScriptDebuggerCodeView() -{ -} - -QString QScriptDebuggerCodeView::text() const -{ - Q_D(const QScriptDebuggerCodeView); - return d->editor->toPlainText(); -} - -void QScriptDebuggerCodeView::setText(const QString &text) -{ - Q_D(QScriptDebuggerCodeView); - d->editor->setPlainText(text); -} - -int QScriptDebuggerCodeView::cursorLineNumber() const -{ - Q_D(const QScriptDebuggerCodeView); - return d->editor->currentLineNumber(); -} - -void QScriptDebuggerCodeView::gotoLine(int lineNumber) -{ - Q_D(QScriptDebuggerCodeView); - d->editor->gotoLine(lineNumber); -} - -int QScriptDebuggerCodeView::find(const QString &exp, int options) -{ - Q_D(QScriptDebuggerCodeView); - QPlainTextEdit *ed = (QPlainTextEdit*)d->editor; - QTextCursor cursor = ed->textCursor(); - if (options & 0x100) { - // start searching from the beginning of selection - if (cursor.hasSelection()) { - int len = cursor.selectedText().length(); - cursor.clearSelection(); - cursor.setPosition(cursor.position() - len); - ed->setTextCursor(cursor); - } - options &= ~0x100; - } - int ret = 0; - if (ed->find(exp, QTextDocument::FindFlags(options))) { - ret |= 0x1; - } else { - QTextCursor curse = cursor; - curse.movePosition(QTextCursor::Start); - ed->setTextCursor(curse); - if (ed->find(exp, QTextDocument::FindFlags(options))) - ret |= 0x1 | 0x2; - else - ed->setTextCursor(cursor); - } - return ret; -} - -void QScriptDebuggerCodeView::setExecutionLineNumber(int lineNumber, bool error) -{ - Q_D(QScriptDebuggerCodeView); - d->editor->setExecutionLineNumber(lineNumber, error); -} - -void QScriptDebuggerCodeView::setExecutableLineNumbers(const QSet &lineNumbers) -{ - Q_D(QScriptDebuggerCodeView); - d->editor->setExecutableLineNumbers(lineNumbers); -} - -int QScriptDebuggerCodeView::baseLineNumber() const -{ - Q_D(const QScriptDebuggerCodeView); - return d->editor->baseLineNumber(); -} - -void QScriptDebuggerCodeView::setBaseLineNumber(int lineNumber) -{ - Q_D(QScriptDebuggerCodeView); - d->editor->setBaseLineNumber(lineNumber); -} - -void QScriptDebuggerCodeView::setBreakpoint(int lineNumber) -{ - Q_D(QScriptDebuggerCodeView); - d->editor->setBreakpoint(lineNumber); -} - -void QScriptDebuggerCodeView::deleteBreakpoint(int lineNumber) -{ - Q_D(QScriptDebuggerCodeView); - d->editor->deleteBreakpoint(lineNumber); -} - -void QScriptDebuggerCodeView::setBreakpointEnabled(int lineNumber, bool enable) -{ - Q_D(QScriptDebuggerCodeView); - d->editor->setBreakpointEnabled(lineNumber, enable); -} - -/*! - \reimp -*/ -bool QScriptDebuggerCodeView::event(QEvent *e) -{ - Q_D(QScriptDebuggerCodeView); - if (e->type() == QEvent::ToolTip) { - if (d->editor->executionLineNumber() == -1) - return false; - QHelpEvent *he = static_cast(e); - QPoint pt = he->pos(); - pt.rx() -= d->editor->extraAreaWidth(); - pt.ry() -= 8; - QTextCursor cursor = d->editor->cursorForPosition(pt); - QTextBlock block = cursor.block(); - QString contents = block.text(); - if (contents.isEmpty()) - return false; - int linePosition = cursor.position() - block.position(); - if (linePosition < 0) - linePosition = 0; - - // ### generalize -- same as in completiontask - - int pos = linePosition; - if ((pos > 0) && contents.at(pos-1).isNumber()) { - // tooltips for numbers is pointless - return false; - } - - while ((pos > 0) && isIdentChar(contents.at(pos-1))) - --pos; - if ((pos > 0) && ((contents.at(pos-1) == QLatin1Char('\'')) - || (contents.at(pos-1) == QLatin1Char('\"')))) { - // ignore string literals - return false; - } - int pos2 = linePosition - 1; - while ((pos2+1 < contents.size()) && isIdentChar(contents.at(pos2+1))) - ++pos2; - QString ident = contents.mid(pos, pos2 - pos + 1); - - QStringList path; - path.append(ident); - while ((pos > 0) && (contents.at(pos-1) == QLatin1Char('.'))) { - --pos; - pos2 = pos; - while ((pos > 0) && isIdentChar(contents.at(pos-1))) - --pos; - path.prepend(contents.mid(pos, pos2 - pos)); - } - - if (!path.isEmpty()) { - int lineNumber = cursor.blockNumber() + d->editor->baseLineNumber(); - emit toolTipRequest(he->globalPos(), lineNumber, path); - } - } - return false; -} - -QT_END_NAMESPACE - -#include "moc_qscriptdebuggercodeview_p.h" diff --git a/src/scripttools/debugging/qscriptdebuggercodeview_p.h b/src/scripttools/debugging/qscriptdebuggercodeview_p.h deleted file mode 100644 index af7b64164..000000000 --- a/src/scripttools/debugging/qscriptdebuggercodeview_p.h +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCODEVIEW_P_H -#define QSCRIPTDEBUGGERCODEVIEW_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qscriptdebuggercodeviewinterface_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerCodeViewPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerCodeView: - public QScriptDebuggerCodeViewInterface -{ - Q_OBJECT -public: - QScriptDebuggerCodeView(QWidget *parent = nullptr); - ~QScriptDebuggerCodeView(); - - QString text() const; - void setText(const QString &text); - - int cursorLineNumber() const; - void gotoLine(int lineNumber); - - int find(const QString &exp, int options = 0); - - void setExecutionLineNumber(int lineNumber, bool error); - void setExecutableLineNumbers(const QSet &lineNumbers); - - int baseLineNumber() const; - void setBaseLineNumber(int lineNumber); - - void setBreakpoint(int lineNumber); - void deleteBreakpoint(int lineNumber); - void setBreakpointEnabled(int lineNumber, bool enable); - - bool event(QEvent *e); - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerCodeView) - Q_DISABLE_COPY(QScriptDebuggerCodeView) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggercodeviewinterface.cpp b/src/scripttools/debugging/qscriptdebuggercodeviewinterface.cpp deleted file mode 100644 index a051ce1f2..000000000 --- a/src/scripttools/debugging/qscriptdebuggercodeviewinterface.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggercodeviewinterface_p.h" -#include "qscriptdebuggercodeviewinterface_p_p.h" - -QT_BEGIN_NAMESPACE - -QScriptDebuggerCodeViewInterfacePrivate::QScriptDebuggerCodeViewInterfacePrivate() -{ -} - -QScriptDebuggerCodeViewInterfacePrivate::~QScriptDebuggerCodeViewInterfacePrivate() -{ -} - -QScriptDebuggerCodeViewInterface::~QScriptDebuggerCodeViewInterface() -{ -} - -QScriptDebuggerCodeViewInterface::QScriptDebuggerCodeViewInterface( - QScriptDebuggerCodeViewInterfacePrivate &dd, - QWidget *parent, Qt::WindowFlags flags) - : QWidget(dd, parent, flags) -{ -} - -QT_END_NAMESPACE -#include "moc_qscriptdebuggercodeviewinterface_p.h" diff --git a/src/scripttools/debugging/qscriptdebuggercodeviewinterface_p.h b/src/scripttools/debugging/qscriptdebuggercodeviewinterface_p.h deleted file mode 100644 index 21dafb1e2..000000000 --- a/src/scripttools/debugging/qscriptdebuggercodeviewinterface_p.h +++ /dev/null @@ -1,86 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCODEVIEWINTERFACE_P_H -#define QSCRIPTDEBUGGERCODEVIEWINTERFACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -QT_BEGIN_NAMESPACE - -class QPoint; -class QStringList; - -class QScriptDebuggerCodeViewInterfacePrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerCodeViewInterface: - public QWidget -{ - Q_OBJECT -public: - ~QScriptDebuggerCodeViewInterface(); - - virtual QString text() const = 0; - virtual void setText(const QString &text) = 0; - - virtual int cursorLineNumber() const = 0; - virtual void gotoLine(int lineNumber) = 0; - - virtual int find(const QString &exp, int options = 0) = 0; - - virtual void setExecutionLineNumber(int lineNumber, bool error) = 0; - virtual void setExecutableLineNumbers(const QSet &lineNumbers) = 0; - - virtual int baseLineNumber() const = 0; - virtual void setBaseLineNumber(int lineNumber) = 0; - - virtual void setBreakpoint(int lineNumber) = 0; - virtual void deleteBreakpoint(int lineNumber) = 0; - virtual void setBreakpointEnabled(int lineNumber, bool enable) = 0; - -Q_SIGNALS: - void breakpointToggleRequest(int lineNumber, bool on); - void breakpointEnableRequest(int lineNumber, bool enable); - void toolTipRequest(const QPoint &pos, int lineNumber, const QStringList &path); - -protected: - QScriptDebuggerCodeViewInterface( - QScriptDebuggerCodeViewInterfacePrivate &dd, - QWidget *parent, Qt::WindowFlags flags); - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerCodeViewInterface) - Q_DISABLE_COPY(QScriptDebuggerCodeViewInterface) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggercodeviewinterface_p_p.h b/src/scripttools/debugging/qscriptdebuggercodeviewinterface_p_p.h deleted file mode 100644 index 6482a1b23..000000000 --- a/src/scripttools/debugging/qscriptdebuggercodeviewinterface_p_p.h +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCODEVIEWINTERFACE_P_P_H -#define QSCRIPTDEBUGGERCODEVIEWINTERFACE_P_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qwidget_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerCodeViewInterface; -class QScriptDebuggerCodeViewInterfacePrivate - : public QWidgetPrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerCodeViewInterface) -public: - QScriptDebuggerCodeViewInterfacePrivate(); - ~QScriptDebuggerCodeViewInterfacePrivate(); -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggercodewidget.cpp b/src/scripttools/debugging/qscriptdebuggercodewidget.cpp deleted file mode 100644 index 45bf038fe..000000000 --- a/src/scripttools/debugging/qscriptdebuggercodewidget.cpp +++ /dev/null @@ -1,285 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggercodewidget_p.h" -#include "qscriptdebuggercodewidgetinterface_p_p.h" -#include "qscriptdebuggercodeview_p.h" -#include "qscriptdebuggerscriptsmodel_p.h" -#include "qscriptbreakpointsmodel_p.h" -#include "qscripttooltipproviderinterface_p.h" - -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerCodeWidgetPrivate - : public QScriptDebuggerCodeWidgetInterfacePrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerCodeWidget) -public: - QScriptDebuggerCodeWidgetPrivate(); - ~QScriptDebuggerCodeWidgetPrivate(); - - qint64 scriptId(QScriptDebuggerCodeViewInterface *view) const; - - // private slots - void _q_onBreakpointToggleRequest(int lineNumber, bool on); - void _q_onBreakpointEnableRequest(int lineNumber, bool enable); - void _q_onBreakpointsAboutToBeRemoved(const QModelIndex&, int, int); - void _q_onBreakpointsInserted(const QModelIndex&, int, int); - void _q_onBreakpointsDataChanged(const QModelIndex &, const QModelIndex &); - void _q_onScriptsChanged(); - void _q_onToolTipRequest(const QPoint &pos, int lineNumber, const QStringList &path); - - QScriptDebuggerScriptsModel *scriptsModel; - QStackedWidget *viewStack; - QHash viewHash; - QScriptBreakpointsModel *breakpointsModel; - QScriptToolTipProviderInterface *toolTipProvider; -}; - -QScriptDebuggerCodeWidgetPrivate::QScriptDebuggerCodeWidgetPrivate() -{ - scriptsModel = 0; - breakpointsModel = 0; - toolTipProvider = 0; -} - -QScriptDebuggerCodeWidgetPrivate::~QScriptDebuggerCodeWidgetPrivate() -{ -} - -qint64 QScriptDebuggerCodeWidgetPrivate::scriptId(QScriptDebuggerCodeViewInterface *view) const -{ - if (!view) - return -1; - return viewHash.key(view); -} - -void QScriptDebuggerCodeWidgetPrivate::_q_onBreakpointToggleRequest(int lineNumber, bool on) -{ - QScriptDebuggerCodeViewInterface *view = qobject_cast(q_func()->sender()); - qint64 sid = scriptId(view); - Q_ASSERT(sid != -1); - if (on) { - QScriptBreakpointData data(sid, lineNumber); - data.setFileName(scriptsModel->scriptData(sid).fileName()); - breakpointsModel->setBreakpoint(data); - } else { - int bpid = breakpointsModel->resolveBreakpoint(sid, lineNumber); - if (bpid == -1) - bpid = breakpointsModel->resolveBreakpoint(scriptsModel->scriptData(sid).fileName(), lineNumber); - Q_ASSERT(bpid != -1); - breakpointsModel->deleteBreakpoint(bpid); - } -} - -void QScriptDebuggerCodeWidgetPrivate::_q_onBreakpointEnableRequest(int lineNumber, bool enable) -{ - QScriptDebuggerCodeViewInterface *view = qobject_cast(q_func()->sender()); - qint64 sid = scriptId(view); - int bpid = breakpointsModel->resolveBreakpoint(sid, lineNumber); - if (bpid == -1) - bpid = breakpointsModel->resolveBreakpoint(scriptsModel->scriptData(sid).fileName(), lineNumber); - Q_ASSERT(bpid != -1); - QScriptBreakpointData data = breakpointsModel->breakpointData(bpid); - data.setEnabled(enable); - breakpointsModel->setBreakpointData(bpid, data); -} - -void QScriptDebuggerCodeWidgetPrivate::_q_onBreakpointsAboutToBeRemoved( - const QModelIndex &, int first, int last) -{ - for (int i = first; i <= last; ++i) { - QScriptBreakpointData data = breakpointsModel->breakpointDataAt(i); - qint64 scriptId = data.scriptId(); - if (scriptId == -1) { - scriptId = scriptsModel->resolveScript(data.fileName()); - if (scriptId == -1) - continue; - } - QScriptDebuggerCodeViewInterface *view = viewHash.value(scriptId); - if (!view) - continue; - view->deleteBreakpoint(data.lineNumber()); - } -} - -void QScriptDebuggerCodeWidgetPrivate::_q_onBreakpointsInserted( - const QModelIndex &, int first, int last) -{ - for (int i = first; i <= last; ++i) { - QScriptBreakpointData data = breakpointsModel->breakpointDataAt(i); - qint64 scriptId = data.scriptId(); - if (scriptId == -1) { - scriptId = scriptsModel->resolveScript(data.fileName()); - if (scriptId == -1) - continue; - } - QScriptDebuggerCodeViewInterface *view = viewHash.value(scriptId); - if (!view) - continue; - view->setBreakpoint(data.lineNumber()); - } -} - -void QScriptDebuggerCodeWidgetPrivate::_q_onBreakpointsDataChanged( - const QModelIndex &tl, const QModelIndex &br) -{ - for (int i = tl.row(); i <= br.row(); ++i) { - QScriptBreakpointData data = breakpointsModel->breakpointDataAt(i); - qint64 scriptId = data.scriptId(); - if (scriptId == -1) { - scriptId = scriptsModel->resolveScript(data.fileName()); - if (scriptId == -1) - continue; - } - QScriptDebuggerCodeViewInterface *view = viewHash.value(scriptId); - if (!view) - continue; - view->setBreakpointEnabled(data.lineNumber(), data.isEnabled()); - } -} - -void QScriptDebuggerCodeWidgetPrivate::_q_onScriptsChanged() -{ - // kill editors for scripts that have been removed - QHash::iterator it; - for (it = viewHash.begin(); it != viewHash.end(); ) { - if (!scriptsModel->scriptData(it.key()).isValid()) { - it = viewHash.erase(it); - } else - ++it; - } -} - -void QScriptDebuggerCodeWidgetPrivate::_q_onToolTipRequest( - const QPoint &pos, int lineNumber, const QStringList &path) -{ - toolTipProvider->showToolTip(pos, /*frameIndex=*/-1, lineNumber, path); -} - -QScriptDebuggerCodeWidget::QScriptDebuggerCodeWidget(QWidget *parent) - : QScriptDebuggerCodeWidgetInterface(*new QScriptDebuggerCodeWidgetPrivate, parent, 0) -{ - Q_D(QScriptDebuggerCodeWidget); - QVBoxLayout *vbox = new QVBoxLayout(this); - vbox->setMargin(0); - d->viewStack = new QStackedWidget(); - vbox->addWidget(d->viewStack); -} - -QScriptDebuggerCodeWidget::~QScriptDebuggerCodeWidget() -{ -} - -QScriptDebuggerScriptsModel *QScriptDebuggerCodeWidget::scriptsModel() const -{ - Q_D(const QScriptDebuggerCodeWidget); - return d->scriptsModel; -} - -void QScriptDebuggerCodeWidget::setScriptsModel(QScriptDebuggerScriptsModel *model) -{ - Q_D(QScriptDebuggerCodeWidget); - d->scriptsModel = model; - QObject::connect(model, SIGNAL(layoutChanged()), - this, SLOT(_q_onScriptsChanged())); -} - -qint64 QScriptDebuggerCodeWidget::currentScriptId() const -{ - Q_D(const QScriptDebuggerCodeWidget); - return d->scriptId(currentView()); -} - -void QScriptDebuggerCodeWidget::setCurrentScript(qint64 scriptId) -{ - Q_D(QScriptDebuggerCodeWidget); - if (scriptId == -1) { - // ### show "native script" - return; - } - QScriptDebuggerCodeViewInterface *view = d->viewHash.value(scriptId); - if (!view) { - Q_ASSERT(d->scriptsModel != 0); - QScriptScriptData data = d->scriptsModel->scriptData(scriptId); - if (!data.isValid()) - return; - view = new QScriptDebuggerCodeView(); // ### use factory, so user can provide his own view - view->setBaseLineNumber(data.baseLineNumber()); - view->setText(data.contents()); - view->setExecutableLineNumbers(d->scriptsModel->executableLineNumbers(scriptId)); - QObject::connect(view, SIGNAL(breakpointToggleRequest(int,bool)), - this, SLOT(_q_onBreakpointToggleRequest(int,bool))); - QObject::connect(view, SIGNAL(breakpointEnableRequest(int,bool)), - this, SLOT(_q_onBreakpointEnableRequest(int,bool))); - QObject::connect(view, SIGNAL(toolTipRequest(QPoint,int,QStringList)), - this, SLOT(_q_onToolTipRequest(QPoint,int,QStringList))); - d->viewStack->addWidget(view); - d->viewHash.insert(scriptId, view); - } - d->viewStack->setCurrentWidget(view); -} - -void QScriptDebuggerCodeWidget::invalidateExecutionLineNumbers() -{ - Q_D(QScriptDebuggerCodeWidget); - QHash::const_iterator it; - for (it = d->viewHash.constBegin(); it != d->viewHash.constEnd(); ++it) - it.value()->setExecutionLineNumber(-1, /*error=*/false); -} - -QScriptBreakpointsModel *QScriptDebuggerCodeWidget::breakpointsModel() const -{ - Q_D(const QScriptDebuggerCodeWidget); - return d->breakpointsModel; -} - -void QScriptDebuggerCodeWidget::setBreakpointsModel(QScriptBreakpointsModel *model) -{ - Q_D(QScriptDebuggerCodeWidget); - d->breakpointsModel = model; - QObject::connect(model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), - this, SLOT(_q_onBreakpointsAboutToBeRemoved(QModelIndex,int,int))); - QObject::connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), - this, SLOT(_q_onBreakpointsInserted(QModelIndex,int,int))); - QObject::connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), - this, SLOT(_q_onBreakpointsDataChanged(QModelIndex,QModelIndex))); -} - -void QScriptDebuggerCodeWidget::setToolTipProvider(QScriptToolTipProviderInterface *toolTipProvider) -{ - Q_D(QScriptDebuggerCodeWidget); - d->toolTipProvider = toolTipProvider; -} - -QScriptDebuggerCodeViewInterface *QScriptDebuggerCodeWidget::currentView() const -{ - Q_D(const QScriptDebuggerCodeWidget); - return qobject_cast(d->viewStack->currentWidget()); -} - -QT_END_NAMESPACE - -#include "moc_qscriptdebuggercodewidget_p.h" diff --git a/src/scripttools/debugging/qscriptdebuggercodewidget_p.h b/src/scripttools/debugging/qscriptdebuggercodewidget_p.h deleted file mode 100644 index bd523534f..000000000 --- a/src/scripttools/debugging/qscriptdebuggercodewidget_p.h +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCODEWIDGET_P_H -#define QSCRIPTDEBUGGERCODEWIDGET_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qscriptdebuggercodewidgetinterface_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerCodeWidgetPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerCodeWidget: - public QScriptDebuggerCodeWidgetInterface -{ - Q_OBJECT -public: - QScriptDebuggerCodeWidget(QWidget *parent = nullptr); - ~QScriptDebuggerCodeWidget(); - - QScriptDebuggerScriptsModel *scriptsModel() const; - void setScriptsModel(QScriptDebuggerScriptsModel *model); - - void setToolTipProvider(QScriptToolTipProviderInterface *toolTipProvider); - - qint64 currentScriptId() const; - void setCurrentScript(qint64 scriptId); - - void invalidateExecutionLineNumbers(); - - QScriptBreakpointsModel *breakpointsModel() const; - void setBreakpointsModel(QScriptBreakpointsModel *model); - - QScriptDebuggerCodeViewInterface *currentView() const; - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerCodeWidget) - Q_DISABLE_COPY(QScriptDebuggerCodeWidget) - - Q_PRIVATE_SLOT(d_func(), void _q_onBreakpointToggleRequest(int,bool)) - Q_PRIVATE_SLOT(d_func(), void _q_onBreakpointEnableRequest(int,bool)) - Q_PRIVATE_SLOT(d_func(), void _q_onBreakpointsAboutToBeRemoved(const QModelIndex &,int,int)) - Q_PRIVATE_SLOT(d_func(), void _q_onBreakpointsInserted(const QModelIndex &,int,int)) - Q_PRIVATE_SLOT(d_func(), void _q_onBreakpointsDataChanged(const QModelIndex &, const QModelIndex &)) - Q_PRIVATE_SLOT(d_func(), void _q_onScriptsChanged()) - Q_PRIVATE_SLOT(d_func(), void _q_onToolTipRequest(const QPoint &, int, const QStringList &)) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggercodewidgetinterface.cpp b/src/scripttools/debugging/qscriptdebuggercodewidgetinterface.cpp deleted file mode 100644 index 45325d29e..000000000 --- a/src/scripttools/debugging/qscriptdebuggercodewidgetinterface.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggercodewidgetinterface_p.h" -#include "qscriptdebuggercodewidgetinterface_p_p.h" - -QT_BEGIN_NAMESPACE - -QScriptDebuggerCodeWidgetInterfacePrivate::QScriptDebuggerCodeWidgetInterfacePrivate() -{ -} - -QScriptDebuggerCodeWidgetInterfacePrivate::~QScriptDebuggerCodeWidgetInterfacePrivate() -{ -} - -QScriptDebuggerCodeWidgetInterface::~QScriptDebuggerCodeWidgetInterface() -{ -} - -QScriptDebuggerCodeWidgetInterface::QScriptDebuggerCodeWidgetInterface( - QScriptDebuggerCodeWidgetInterfacePrivate &dd, - QWidget *parent, Qt::WindowFlags flags) - : QWidget(dd, parent, flags) -{ -} - -QT_END_NAMESPACE -#include "moc_qscriptdebuggercodewidgetinterface_p.h" diff --git a/src/scripttools/debugging/qscriptdebuggercodewidgetinterface_p.h b/src/scripttools/debugging/qscriptdebuggercodewidgetinterface_p.h deleted file mode 100644 index 85934c32b..000000000 --- a/src/scripttools/debugging/qscriptdebuggercodewidgetinterface_p.h +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCODEWIDGETINTERFACE_P_H -#define QSCRIPTDEBUGGERCODEWIDGETINTERFACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerScriptsModel; -class QScriptBreakpointsModel; -class QScriptToolTipProviderInterface; - -class QScriptDebuggerCodeViewInterface; - -class QScriptDebuggerCodeWidgetInterfacePrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerCodeWidgetInterface: - public QWidget -{ - Q_OBJECT -public: - ~QScriptDebuggerCodeWidgetInterface(); - - virtual QScriptDebuggerScriptsModel *scriptsModel() const = 0; - virtual void setScriptsModel(QScriptDebuggerScriptsModel *model) = 0; - - virtual QScriptBreakpointsModel *breakpointsModel() const = 0; - virtual void setBreakpointsModel(QScriptBreakpointsModel *model) = 0; - - virtual void setToolTipProvider(QScriptToolTipProviderInterface *toolTipProvider) = 0; - - virtual qint64 currentScriptId() const = 0; - virtual void setCurrentScript(qint64 scriptId) = 0; - - virtual void invalidateExecutionLineNumbers() = 0; - - virtual QScriptDebuggerCodeViewInterface *currentView() const = 0; - -protected: - QScriptDebuggerCodeWidgetInterface( - QScriptDebuggerCodeWidgetInterfacePrivate &dd, - QWidget *parent, Qt::WindowFlags flags); - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerCodeWidgetInterface) - Q_DISABLE_COPY(QScriptDebuggerCodeWidgetInterface) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggercodewidgetinterface_p_p.h b/src/scripttools/debugging/qscriptdebuggercodewidgetinterface_p_p.h deleted file mode 100644 index ec5a5863d..000000000 --- a/src/scripttools/debugging/qscriptdebuggercodewidgetinterface_p_p.h +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCODEWIDGETINTERFACE_P_P_H -#define QSCRIPTDEBUGGERCODEWIDGETINTERFACE_P_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qwidget_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerCodeWidgetInterface; -class QScriptDebuggerCodeWidgetInterfacePrivate - : public QWidgetPrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerCodeWidgetInterface) -public: - QScriptDebuggerCodeWidgetInterfacePrivate(); - ~QScriptDebuggerCodeWidgetInterfacePrivate(); -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggercommand.cpp b/src/scripttools/debugging/qscriptdebuggercommand.cpp deleted file mode 100644 index 6d3a43d68..000000000 --- a/src/scripttools/debugging/qscriptdebuggercommand.cpp +++ /dev/null @@ -1,687 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggercommand_p.h" -#include "qscriptbreakpointdata_p.h" -#include "qscriptdebuggervalue_p.h" -#include "qscripttoolscommon_p.h" - -#include -#include -#include - -QT_BEGIN_NAMESPACE - -/*! - \since 4.5 - \class QScriptDebuggerCommand - \internal - - \brief The QScriptDebuggerCommand class represents a command issued to a QScriptDebuggerFrontend. - - A debugger command is described by a command type and zero or more - attributes. Such commands are generated internally by the - QScriptDebuggerFrontend class (through the scheduleXXX commands). A - command is typically passed on to a QScriptDebuggerCommandExecutor - that applies the command to a QScriptDebuggerBackend. -*/ - -class QScriptDebuggerCommandPrivate -{ -public: - QScriptDebuggerCommandPrivate(); - ~QScriptDebuggerCommandPrivate(); - - QScriptDebuggerCommand::Type type; - QHash attributes; -}; - -QScriptDebuggerCommandPrivate::QScriptDebuggerCommandPrivate() - : type(QScriptDebuggerCommand::None) -{ -} - -QScriptDebuggerCommandPrivate::~QScriptDebuggerCommandPrivate() -{ -} - -/*! - Constructs a QScriptDebuggerCommand of type None. -*/ -QScriptDebuggerCommand::QScriptDebuggerCommand() - : d_ptr(new QScriptDebuggerCommandPrivate) -{ - d_ptr->type = None; -} - -/*! - Constructs a QScriptDebuggerCommand of the given \a type, with no - attributes defined. -*/ -QScriptDebuggerCommand::QScriptDebuggerCommand(Type type) - : d_ptr(new QScriptDebuggerCommandPrivate) -{ - d_ptr->type = type; -} - -/*! - Constructs a QScriptDebuggerCommand that is a copy of the \a other - command. -*/ -QScriptDebuggerCommand::QScriptDebuggerCommand(const QScriptDebuggerCommand &other) - : d_ptr(new QScriptDebuggerCommandPrivate) -{ - *d_ptr = *other.d_ptr; -} - -/*! - Destroys this QScriptDebuggerCommand. -*/ -QScriptDebuggerCommand::~QScriptDebuggerCommand() -{ -} - -/*! - Assigns the \a other value to this QScriptDebuggerCommand. -*/ -QScriptDebuggerCommand &QScriptDebuggerCommand::operator=(const QScriptDebuggerCommand &other) -{ - *d_ptr = *other.d_ptr; - return *this; -} - -/*! - Returns the type of this command. -*/ -QScriptDebuggerCommand::Type QScriptDebuggerCommand::type() const -{ - Q_D(const QScriptDebuggerCommand); - return d->type; -} - -/*! - Returns the value of the given \a attribute, or \a defaultValue - if the attribute is not defined. -*/ -QVariant QScriptDebuggerCommand::attribute(Attribute attribute, - const QVariant &defaultValue) const -{ - Q_D(const QScriptDebuggerCommand); - return d->attributes.value(attribute, defaultValue); -} - -/*! - Sets the \a value of the given \a attribute. -*/ -void QScriptDebuggerCommand::setAttribute(Attribute attribute, - const QVariant &value) -{ - Q_D(QScriptDebuggerCommand); - if (!value.isValid()) - d->attributes.remove(attribute); - else - d->attributes[attribute] = value; -} - -QHash QScriptDebuggerCommand::attributes() const -{ - Q_D(const QScriptDebuggerCommand); - return d->attributes; -} - -/*! - Returns the FileName attribute of this command converted to a string. - This function is provided for convenience. - - \sa attribute() -*/ -QString QScriptDebuggerCommand::fileName() const -{ - Q_D(const QScriptDebuggerCommand); - return d->attributes.value(FileName).toString(); -} - -void QScriptDebuggerCommand::setFileName(const QString &fileName) -{ - Q_D(QScriptDebuggerCommand); - d->attributes[FileName] = fileName; -} - -/*! - Returns the LineNumber attribute of this command converted to an int. - This function is provided for convenience. - - \sa attribute() -*/ -int QScriptDebuggerCommand::lineNumber() const -{ - Q_D(const QScriptDebuggerCommand); - return d->attributes.value(LineNumber, -1).toInt(); -} - -void QScriptDebuggerCommand::setLineNumber(int lineNumber) -{ - Q_D(QScriptDebuggerCommand); - d->attributes[LineNumber] = lineNumber; -} - -/*! - Returns the ScriptID attribute of this command converted to a qint64. - This function is provided for convenience. - - \sa attribute() -*/ -qint64 QScriptDebuggerCommand::scriptId() const -{ - Q_D(const QScriptDebuggerCommand); - return d->attributes.value(ScriptID, -1).toLongLong(); -} - -void QScriptDebuggerCommand::setScriptId(qint64 id) -{ - Q_D(QScriptDebuggerCommand); - d->attributes[ScriptID] = id; -} - -QString QScriptDebuggerCommand::program() const -{ - Q_D(const QScriptDebuggerCommand); - return d->attributes.value(Program).toString(); -} - -void QScriptDebuggerCommand::setProgram(const QString &program) -{ - Q_D(QScriptDebuggerCommand); - d->attributes[Program] = program; -} - -int QScriptDebuggerCommand::breakpointId() const -{ - Q_D(const QScriptDebuggerCommand); - return d->attributes.value(BreakpointID, -1).toInt(); -} - -void QScriptDebuggerCommand::setBreakpointId(int id) -{ - Q_D(QScriptDebuggerCommand); - d->attributes[BreakpointID] = id; -} - -QScriptBreakpointData QScriptDebuggerCommand::breakpointData() const -{ - Q_D(const QScriptDebuggerCommand); - return qvariant_cast(d->attributes.value(BreakpointData)); -} - -void QScriptDebuggerCommand::setBreakpointData(const QScriptBreakpointData &data) -{ - Q_D(QScriptDebuggerCommand); - d->attributes[BreakpointData] = QVariant::fromValue(data); -} - -QScriptDebuggerValue QScriptDebuggerCommand::scriptValue() const -{ - Q_D(const QScriptDebuggerCommand); - return qvariant_cast(d->attributes.value(ScriptValue)); -} - -void QScriptDebuggerCommand::setScriptValue(const QScriptDebuggerValue &value) -{ - Q_D(QScriptDebuggerCommand); - d->attributes[ScriptValue] = QVariant::fromValue(value); -} - -int QScriptDebuggerCommand::contextIndex() const -{ - Q_D(const QScriptDebuggerCommand); - return d->attributes.value(ContextIndex, -1).toInt(); -} - -void QScriptDebuggerCommand::setContextIndex(int index) -{ - Q_D(QScriptDebuggerCommand); - d->attributes[ContextIndex] = index; -} - -int QScriptDebuggerCommand::iteratorId() const -{ - Q_D(const QScriptDebuggerCommand); - return d->attributes.value(IteratorID, -1).toInt(); -} - -void QScriptDebuggerCommand::setIteratorId(int id) -{ - Q_D(QScriptDebuggerCommand); - d->attributes[IteratorID] = id; -} - -QString QScriptDebuggerCommand::name() const -{ - Q_D(const QScriptDebuggerCommand); - return d->attributes.value(Name).toString(); -} - -void QScriptDebuggerCommand::setName(const QString &name) -{ - Q_D(QScriptDebuggerCommand); - d->attributes[Name] = name; -} - -QScriptDebuggerValue QScriptDebuggerCommand::subordinateScriptValue() const -{ - Q_D(const QScriptDebuggerCommand); - return qvariant_cast(d->attributes.value(SubordinateScriptValue)); -} - -void QScriptDebuggerCommand::setSubordinateScriptValue(const QScriptDebuggerValue &value) -{ - Q_D(QScriptDebuggerCommand); - d->attributes[SubordinateScriptValue] = QVariant::fromValue(value); -} - -int QScriptDebuggerCommand::snapshotId() const -{ - Q_D(const QScriptDebuggerCommand); - return d->attributes.value(SnapshotID, -1).toInt(); -} - -void QScriptDebuggerCommand::setSnapshotId(int id) -{ - Q_D(QScriptDebuggerCommand); - d->attributes[SnapshotID] = id; -} - -/*! - Returns true if this QScriptDebuggerCommand is equal to the \a other - command, otherwise returns false. -*/ -bool QScriptDebuggerCommand::operator==(const QScriptDebuggerCommand &other) const -{ - Q_D(const QScriptDebuggerCommand); - const QScriptDebuggerCommandPrivate *od = other.d_func(); - if (d == od) - return true; - if (!d || !od) - return false; - return ((d->type == od->type) - && (d->attributes == od->attributes)); -} - -/*! - Returns true if this QScriptDebuggerCommand is not equal to the \a - other command, otherwise returns false. -*/ -bool QScriptDebuggerCommand::operator!=(const QScriptDebuggerCommand &other) const -{ - return !(*this == other); -} - -QScriptDebuggerCommand QScriptDebuggerCommand::interruptCommand() -{ - QScriptDebuggerCommand cmd(Interrupt); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::continueCommand() -{ - QScriptDebuggerCommand cmd(Continue); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::stepIntoCommand(int count) -{ - QScriptDebuggerCommand cmd(StepInto); - cmd.setAttribute(StepCount, count); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::stepOverCommand(int count) -{ - QScriptDebuggerCommand cmd(StepOver); - cmd.setAttribute(StepCount, count); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::stepOutCommand() -{ - QScriptDebuggerCommand cmd(StepOut); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::runToLocationCommand(const QString &fileName, int lineNumber) -{ - QScriptDebuggerCommand cmd(RunToLocation); - cmd.setFileName(fileName); - cmd.setLineNumber(lineNumber); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::runToLocationCommand(qint64 scriptId, int lineNumber) -{ - QScriptDebuggerCommand cmd(RunToLocationByID); - cmd.setScriptId(scriptId); - cmd.setLineNumber(lineNumber); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::forceReturnCommand(int contextIndex, const QScriptDebuggerValue &value) -{ - QScriptDebuggerCommand cmd(ForceReturn); - cmd.setContextIndex(contextIndex); - cmd.setScriptValue(value); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::resumeCommand() -{ - QScriptDebuggerCommand cmd(Resume); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::setBreakpointCommand(const QString &fileName, int lineNumber) -{ - QScriptDebuggerCommand cmd(SetBreakpoint); - cmd.setBreakpointData(QScriptBreakpointData(fileName, lineNumber)); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::setBreakpointCommand(const QScriptBreakpointData &data) -{ - QScriptDebuggerCommand cmd(SetBreakpoint); - cmd.setBreakpointData(data); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::deleteBreakpointCommand(int id) -{ - QScriptDebuggerCommand cmd(DeleteBreakpoint); - cmd.setBreakpointId(id); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::deleteAllBreakpointsCommand() -{ - QScriptDebuggerCommand cmd(DeleteAllBreakpoints); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::getBreakpointsCommand() -{ - QScriptDebuggerCommand cmd(GetBreakpoints); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::getBreakpointDataCommand(int id) -{ - QScriptDebuggerCommand cmd(GetBreakpointData); - cmd.setBreakpointId(id); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::setBreakpointDataCommand(int id, const QScriptBreakpointData &data) -{ - QScriptDebuggerCommand cmd(SetBreakpointData); - cmd.setBreakpointId(id); - cmd.setBreakpointData(data); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::getScriptsCommand() -{ - QScriptDebuggerCommand cmd(GetScripts); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::getScriptDataCommand(qint64 id) -{ - QScriptDebuggerCommand cmd(GetScriptData); - cmd.setScriptId(id); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::scriptsCheckpointCommand() -{ - QScriptDebuggerCommand cmd(ScriptsCheckpoint); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::getScriptsDeltaCommand() -{ - QScriptDebuggerCommand cmd(GetScriptsDelta); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::resolveScriptCommand(const QString &fileName) -{ - QScriptDebuggerCommand cmd(ResolveScript); - cmd.setFileName(fileName); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::getBacktraceCommand() -{ - QScriptDebuggerCommand cmd(GetBacktrace); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::getContextCountCommand() -{ - QScriptDebuggerCommand cmd(GetContextCount); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::getContextStateCommand(int contextIndex) -{ - QScriptDebuggerCommand cmd(GetContextState); - cmd.setContextIndex(contextIndex); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::getContextInfoCommand(int contextIndex) -{ - QScriptDebuggerCommand cmd(GetContextInfo); - cmd.setContextIndex(contextIndex); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::getContextIdCommand(int contextIndex) -{ - QScriptDebuggerCommand cmd(GetContextID); - cmd.setContextIndex(contextIndex); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::getThisObjectCommand(int contextIndex) -{ - QScriptDebuggerCommand cmd(GetThisObject); - cmd.setContextIndex(contextIndex); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::getActivationObjectCommand(int contextIndex) -{ - QScriptDebuggerCommand cmd(GetActivationObject); - cmd.setContextIndex(contextIndex); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::getScopeChainCommand(int contextIndex) -{ - QScriptDebuggerCommand cmd(GetScopeChain); - cmd.setContextIndex(contextIndex); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::contextsCheckpoint() -{ - QScriptDebuggerCommand cmd(ContextsCheckpoint); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::getPropertyExpressionValue( - int contextIndex, int lineNumber, const QStringList &path) -{ - QScriptDebuggerCommand cmd(GetPropertyExpressionValue); - cmd.setContextIndex(contextIndex); - cmd.setLineNumber(lineNumber); - cmd.setAttribute(UserAttribute, path); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::getCompletions( - int contextIndex, const QStringList &path) -{ - QScriptDebuggerCommand cmd(GetCompletions); - cmd.setContextIndex(contextIndex); - cmd.setAttribute(UserAttribute, path); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::newScriptObjectSnapshotCommand() -{ - QScriptDebuggerCommand cmd(NewScriptObjectSnapshot); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::scriptObjectSnapshotCaptureCommand(int id, const QScriptDebuggerValue &object) -{ - Q_ASSERT(object.type() == QScriptDebuggerValue::ObjectValue); - QScriptDebuggerCommand cmd(ScriptObjectSnapshotCapture); - cmd.setSnapshotId(id); - cmd.setScriptValue(object); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::deleteScriptObjectSnapshotCommand(int id) -{ - QScriptDebuggerCommand cmd(DeleteScriptObjectSnapshot); - cmd.setSnapshotId(id); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::newScriptValueIteratorCommand(const QScriptDebuggerValue &object) -{ - QScriptDebuggerCommand cmd(NewScriptValueIterator); - Q_ASSERT(object.type() == QScriptDebuggerValue::ObjectValue); - cmd.setScriptValue(object); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::getPropertiesByIteratorCommand(int id, int count) -{ - Q_UNUSED(count); - QScriptDebuggerCommand cmd(GetPropertiesByIterator); - cmd.setIteratorId(id); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::deleteScriptValueIteratorCommand(int id) -{ - QScriptDebuggerCommand cmd(DeleteScriptValueIterator); - cmd.setIteratorId(id); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::evaluateCommand( - int contextIndex, const QString &program, const QString &fileName, int lineNumber) -{ - QScriptDebuggerCommand cmd(Evaluate); - cmd.setContextIndex(contextIndex); - cmd.setProgram(program); - cmd.setFileName(fileName); - cmd.setLineNumber(lineNumber); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::scriptValueToStringCommand(const QScriptDebuggerValue &value) -{ - QScriptDebuggerCommand cmd(ScriptValueToString); - cmd.setScriptValue(value); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::setScriptValuePropertyCommand( - const QScriptDebuggerValue &object, const QString &name, - const QScriptDebuggerValue &value) -{ - QScriptDebuggerCommand cmd(SetScriptValueProperty); - cmd.setScriptValue(object); - cmd.setName(name); - cmd.setSubordinateScriptValue(value); - return cmd; -} - -QScriptDebuggerCommand QScriptDebuggerCommand::clearExceptionsCommand() -{ - QScriptDebuggerCommand cmd(ClearExceptions); - return cmd; -} - -/*! - \fn QDataStream &operator<<(QDataStream &stream, const QScriptDebuggerCommand &command) - \relates QScriptDebuggerCommand - - Writes the given \a command to the specified \a stream. -*/ -QDataStream &operator<<(QDataStream &out, const QScriptDebuggerCommand &command) -{ - const QScriptDebuggerCommandPrivate *d = command.d_ptr.data(); - out << (quint32)d->type; - out << (qint32)d->attributes.size(); - QHash::const_iterator it; - for (it = d->attributes.constBegin(); it != d->attributes.constEnd(); ++it) { - out << (quint32)it.key(); - out << it.value(); - } - return out; -} - -/*! - \fn QDataStream &operator>>(QDataStream &stream, QScriptDebuggerCommand &command) - \relates QScriptDebuggerCommand - - Reads a QScriptDebuggerCommand from the specified \a stream into the - given \a command. -*/ -QDataStream &operator>>(QDataStream &in, QScriptDebuggerCommand &command) -{ - QScriptDebuggerCommandPrivate *d = command.d_ptr.data(); - - quint32 type; - in >> type; - d->type = QScriptDebuggerCommand::Type(type); - - qint32 attribCount; - in >> attribCount; - QHash attribs; - for (qint32 i = 0; i < attribCount; ++i) { - quint32 key; - in >> key; - QVariant value; - in >> value; - attribs[QScriptDebuggerCommand::Attribute(key)] = value; - } - d->attributes = attribs; - - return in; -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptdebuggercommand_p.h b/src/scripttools/debugging/qscriptdebuggercommand_p.h deleted file mode 100644 index 62a3f11e5..000000000 --- a/src/scripttools/debugging/qscriptdebuggercommand_p.h +++ /dev/null @@ -1,248 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCOMMAND_P_H -#define QSCRIPTDEBUGGERCOMMAND_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QDataStream; -class QScriptBreakpointData; -class QScriptDebuggerValue; - -class QScriptDebuggerCommandPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerCommand -{ -public: - friend Q_AUTOTEST_EXPORT QDataStream &operator<<(QDataStream &, const QScriptDebuggerCommand &); - friend Q_AUTOTEST_EXPORT QDataStream &operator>>(QDataStream &, QScriptDebuggerCommand &); - - enum Type { - None, - - Interrupt, - Continue, - StepInto, - StepOver, - StepOut, - RunToLocation, - RunToLocationByID, - ForceReturn, - Resume, - - SetBreakpoint, - DeleteBreakpoint, - DeleteAllBreakpoints, - GetBreakpoints, - GetBreakpointData, - SetBreakpointData, - - GetScripts, - GetScriptData, - ScriptsCheckpoint, - GetScriptsDelta, - ResolveScript, - - GetBacktrace, - GetContextCount, - GetContextInfo, - GetContextState, - GetContextID, - GetThisObject, - GetActivationObject, - GetScopeChain, - ContextsCheckpoint, - GetPropertyExpressionValue, - GetCompletions, - - NewScriptObjectSnapshot, - ScriptObjectSnapshotCapture, - DeleteScriptObjectSnapshot, - - NewScriptValueIterator, - GetPropertiesByIterator, - DeleteScriptValueIterator, - - Evaluate, - - SetScriptValueProperty, - ScriptValueToString, - - ClearExceptions, - - UserCommand = 1000, - MaxUserCommand = 32767 - }; - - enum Attribute { - ScriptID, - FileName, - LineNumber, - Program, - BreakpointID, - BreakpointData, - ContextIndex, - ScriptValue, - StepCount, - IteratorID, - Name, - SubordinateScriptValue, - SnapshotID, - UserAttribute = 1000, - MaxUserAttribute = 32767 - }; - - QScriptDebuggerCommand(); - QScriptDebuggerCommand(Type type); - QScriptDebuggerCommand(const QScriptDebuggerCommand &other); - ~QScriptDebuggerCommand(); - - Type type() const; - - QVariant attribute(Attribute attribute, const QVariant &defaultValue = QVariant()) const; - void setAttribute(Attribute attribute, const QVariant &value); - QHash attributes() const; - - QString fileName() const; - void setFileName(const QString &fileName); - - int lineNumber() const; - void setLineNumber(int lineNumber); - - qint64 scriptId() const; - void setScriptId(qint64 id); - - QString program() const; - void setProgram(const QString &program); - - int breakpointId() const; - void setBreakpointId(int id); - - QScriptBreakpointData breakpointData() const; - void setBreakpointData(const QScriptBreakpointData &data); - - QScriptDebuggerValue scriptValue() const; - void setScriptValue(const QScriptDebuggerValue &value); - - int contextIndex() const; - void setContextIndex(int index); - - int iteratorId() const; - void setIteratorId(int id); - - QString name() const; - void setName(const QString &name); - - QScriptDebuggerValue subordinateScriptValue() const; - void setSubordinateScriptValue(const QScriptDebuggerValue &value); - - int snapshotId() const; - void setSnapshotId(int id); - - QScriptDebuggerCommand &operator=(const QScriptDebuggerCommand &other); - - bool operator==(const QScriptDebuggerCommand &other) const; - bool operator!=(const QScriptDebuggerCommand &other) const; - - static QScriptDebuggerCommand interruptCommand(); - static QScriptDebuggerCommand continueCommand(); - static QScriptDebuggerCommand stepIntoCommand(int count = 1); - static QScriptDebuggerCommand stepOverCommand(int count = 1); - static QScriptDebuggerCommand stepOutCommand(); - static QScriptDebuggerCommand runToLocationCommand(const QString &fileName, int lineNumber); - static QScriptDebuggerCommand runToLocationCommand(qint64 scriptId, int lineNumber); - static QScriptDebuggerCommand forceReturnCommand(int contextIndex, const QScriptDebuggerValue &value); - static QScriptDebuggerCommand resumeCommand(); - - static QScriptDebuggerCommand setBreakpointCommand(const QString &fileName, int lineNumber); - static QScriptDebuggerCommand setBreakpointCommand(const QScriptBreakpointData &data); - static QScriptDebuggerCommand deleteBreakpointCommand(int id); - static QScriptDebuggerCommand deleteAllBreakpointsCommand(); - static QScriptDebuggerCommand getBreakpointsCommand(); - static QScriptDebuggerCommand getBreakpointDataCommand(int id); - static QScriptDebuggerCommand setBreakpointDataCommand(int id, const QScriptBreakpointData &data); - - static QScriptDebuggerCommand getScriptsCommand(); - static QScriptDebuggerCommand getScriptDataCommand(qint64 id); - static QScriptDebuggerCommand scriptsCheckpointCommand(); - static QScriptDebuggerCommand getScriptsDeltaCommand(); - static QScriptDebuggerCommand resolveScriptCommand(const QString &fileName); - - static QScriptDebuggerCommand getBacktraceCommand(); - static QScriptDebuggerCommand getContextCountCommand(); - static QScriptDebuggerCommand getContextStateCommand(int contextIndex); - static QScriptDebuggerCommand getContextInfoCommand(int contextIndex); - static QScriptDebuggerCommand getContextIdCommand(int contextIndex); - static QScriptDebuggerCommand getThisObjectCommand(int contextIndex); - static QScriptDebuggerCommand getActivationObjectCommand(int contextIndex); - static QScriptDebuggerCommand getScopeChainCommand(int contextIndex); - static QScriptDebuggerCommand contextsCheckpoint(); - static QScriptDebuggerCommand getPropertyExpressionValue(int contextIndex, int lineNumber, - const QStringList &path); - static QScriptDebuggerCommand getCompletions(int contextIndex, const QStringList &path); - - static QScriptDebuggerCommand newScriptObjectSnapshotCommand(); - static QScriptDebuggerCommand scriptObjectSnapshotCaptureCommand(int id, const QScriptDebuggerValue &object); - static QScriptDebuggerCommand deleteScriptObjectSnapshotCommand(int id); - - static QScriptDebuggerCommand newScriptValueIteratorCommand(const QScriptDebuggerValue &object); - static QScriptDebuggerCommand getPropertiesByIteratorCommand(int id, int count); - static QScriptDebuggerCommand deleteScriptValueIteratorCommand(int id); - - static QScriptDebuggerCommand evaluateCommand(int contextIndex, const QString &program, - const QString &fileName = QString(), - int lineNumber = 1); - - static QScriptDebuggerCommand setScriptValuePropertyCommand(const QScriptDebuggerValue &object, - const QString &name, - const QScriptDebuggerValue &value); - static QScriptDebuggerCommand scriptValueToStringCommand(const QScriptDebuggerValue &value); - - static QScriptDebuggerCommand clearExceptionsCommand(); - -private: - QScopedPointer d_ptr; - - Q_DECLARE_PRIVATE(QScriptDebuggerCommand) -}; - -Q_AUTOTEST_EXPORT QDataStream &operator<<(QDataStream &, const QScriptDebuggerCommand &); -Q_AUTOTEST_EXPORT QDataStream &operator>>(QDataStream &, QScriptDebuggerCommand &); - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggercommandexecutor.cpp b/src/scripttools/debugging/qscriptdebuggercommandexecutor.cpp deleted file mode 100644 index 447e61951..000000000 --- a/src/scripttools/debugging/qscriptdebuggercommandexecutor.cpp +++ /dev/null @@ -1,492 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggercommandexecutor_p.h" - -#include "qscriptdebuggerbackend_p.h" -#include "qscriptdebuggercommand_p.h" -#include "qscriptdebuggerresponse_p.h" -#include "qscriptdebuggervalue_p.h" -#include "qscriptdebuggervalueproperty_p.h" -#include "qscriptbreakpointdata_p.h" -#include "qscriptobjectsnapshot_p.h" -#include "qscriptdebuggerobjectsnapshotdelta_p.h" -#include "qscripttoolscommon_p.h" - -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -/*! - \since 4.5 - \class QScriptDebuggerCommandExecutor - \internal - - \brief The QScriptDebuggerCommandExecutor applies debugger commands to a back-end. - - The execute() function takes a command (typically produced by a - QScriptDebuggerFrontend) and applies it to a QScriptDebuggerBackend. - - \sa QScriptDebuggerCommmand -*/ - -class QScriptDebuggerCommandExecutorPrivate -{ -public: - QScriptDebuggerCommandExecutorPrivate(); - ~QScriptDebuggerCommandExecutorPrivate(); -}; - -QScriptDebuggerCommandExecutorPrivate::QScriptDebuggerCommandExecutorPrivate() -{ -} - -QScriptDebuggerCommandExecutorPrivate::~QScriptDebuggerCommandExecutorPrivate() -{ -} - -QScriptDebuggerCommandExecutor::QScriptDebuggerCommandExecutor() - : d_ptr(new QScriptDebuggerCommandExecutorPrivate()) -{ -} - -QScriptDebuggerCommandExecutor::~QScriptDebuggerCommandExecutor() -{ -} - -/*! - Applies the given \a command to the given \a backend. -*/ -QScriptDebuggerResponse QScriptDebuggerCommandExecutor::execute( - QScriptDebuggerBackend *backend, - const QScriptDebuggerCommand &command) -{ - QScriptDebuggerResponse response; - switch (command.type()) { - case QScriptDebuggerCommand::None: - break; - - case QScriptDebuggerCommand::Interrupt: - backend->interruptEvaluation(); - break; - - case QScriptDebuggerCommand::Continue: - if (backend->engine()->isEvaluating()) { - backend->continueEvalution(); - response.setAsync(true); - } - break; - - case QScriptDebuggerCommand::StepInto: { - QVariant attr = command.attribute(QScriptDebuggerCommand::StepCount); - int count = attr.isValid() ? attr.toInt() : 1; - backend->stepInto(count); - response.setAsync(true); - } break; - - case QScriptDebuggerCommand::StepOver: { - QVariant attr = command.attribute(QScriptDebuggerCommand::StepCount); - int count = attr.isValid() ? attr.toInt() : 1; - backend->stepOver(count); - response.setAsync(true); - } break; - - case QScriptDebuggerCommand::StepOut: - backend->stepOut(); - response.setAsync(true); - break; - - case QScriptDebuggerCommand::RunToLocation: - backend->runToLocation(command.fileName(), command.lineNumber()); - response.setAsync(true); - break; - - case QScriptDebuggerCommand::RunToLocationByID: - backend->runToLocation(command.scriptId(), command.lineNumber()); - response.setAsync(true); - break; - - case QScriptDebuggerCommand::ForceReturn: { - int contextIndex = command.contextIndex(); - QScriptDebuggerValue value = command.scriptValue(); - QScriptEngine *engine = backend->engine(); - QScriptValue realValue = value.toScriptValue(engine); - backend->returnToCaller(contextIndex, realValue); - response.setAsync(true); - } break; - - case QScriptDebuggerCommand::Resume: - backend->resume(); - response.setAsync(true); - break; - - case QScriptDebuggerCommand::SetBreakpoint: { - QScriptBreakpointData data = command.breakpointData(); - if (!data.isValid()) - data = QScriptBreakpointData(command.fileName(), command.lineNumber()); - int id = backend->setBreakpoint(data); - response.setResult(id); - } break; - - case QScriptDebuggerCommand::DeleteBreakpoint: { - int id = command.breakpointId(); - if (!backend->deleteBreakpoint(id)) - response.setError(QScriptDebuggerResponse::InvalidBreakpointID); - } break; - - case QScriptDebuggerCommand::DeleteAllBreakpoints: - backend->deleteAllBreakpoints(); - break; - - case QScriptDebuggerCommand::GetBreakpoints: { - QScriptBreakpointMap bps = backend->breakpoints(); - if (!bps.isEmpty()) - response.setResult(bps); - } break; - - case QScriptDebuggerCommand::GetBreakpointData: { - int id = command.breakpointId(); - QScriptBreakpointData data = backend->breakpointData(id); - if (data.isValid()) - response.setResult(data); - else - response.setError(QScriptDebuggerResponse::InvalidBreakpointID); - } break; - - case QScriptDebuggerCommand::SetBreakpointData: { - int id = command.breakpointId(); - QScriptBreakpointData data = command.breakpointData(); - if (!backend->setBreakpointData(id, data)) - response.setError(QScriptDebuggerResponse::InvalidBreakpointID); - } break; - - case QScriptDebuggerCommand::GetScripts: { - QScriptScriptMap scripts = backend->scripts(); - if (!scripts.isEmpty()) - response.setResult(scripts); - } break; - - case QScriptDebuggerCommand::GetScriptData: { - qint64 id = command.scriptId(); - QScriptScriptData data = backend->scriptData(id); - if (data.isValid()) - response.setResult(data); - else - response.setError(QScriptDebuggerResponse::InvalidScriptID); - } break; - - case QScriptDebuggerCommand::ScriptsCheckpoint: - backend->scriptsCheckpoint(); - response.setResult(QVariant::fromValue(backend->scriptsDelta())); - break; - - case QScriptDebuggerCommand::GetScriptsDelta: - response.setResult(QVariant::fromValue(backend->scriptsDelta())); - break; - - case QScriptDebuggerCommand::ResolveScript: - response.setResult(backend->resolveScript(command.fileName())); - break; - - case QScriptDebuggerCommand::GetBacktrace: - response.setResult(backend->backtrace()); - break; - - case QScriptDebuggerCommand::GetContextCount: - response.setResult(backend->contextCount()); - break; - - case QScriptDebuggerCommand::GetContextState: { - QScriptContext *ctx = backend->context(command.contextIndex()); - if (ctx) - response.setResult(static_cast(ctx->state())); - else - response.setError(QScriptDebuggerResponse::InvalidContextIndex); - } break; - - case QScriptDebuggerCommand::GetContextID: { - int idx = command.contextIndex(); - if ((idx >= 0) && (idx < backend->contextCount())) - response.setResult(backend->contextIds()[idx]); - else - response.setError(QScriptDebuggerResponse::InvalidContextIndex); - } break; - - case QScriptDebuggerCommand::GetContextInfo: { - QScriptContext *ctx = backend->context(command.contextIndex()); - if (ctx) - response.setResult(QScriptContextInfo(ctx)); - else - response.setError(QScriptDebuggerResponse::InvalidContextIndex); - } break; - - case QScriptDebuggerCommand::GetThisObject: { - QScriptContext *ctx = backend->context(command.contextIndex()); - if (ctx) - response.setResult(ctx->thisObject()); - else - response.setError(QScriptDebuggerResponse::InvalidContextIndex); - } break; - - case QScriptDebuggerCommand::GetActivationObject: { - QScriptContext *ctx = backend->context(command.contextIndex()); - if (ctx) - response.setResult(ctx->activationObject()); - else - response.setError(QScriptDebuggerResponse::InvalidContextIndex); - } break; - - case QScriptDebuggerCommand::GetScopeChain: { - QScriptContext *ctx = backend->context(command.contextIndex()); - if (ctx) { - QScriptDebuggerValueList dest; - QScriptValueList src = ctx->scopeChain(); - for (int i = 0; i < src.size(); ++i) - dest.append(src.at(i)); - response.setResult(dest); - } else { - response.setError(QScriptDebuggerResponse::InvalidContextIndex); - } - } break; - - case QScriptDebuggerCommand::ContextsCheckpoint: { - response.setResult(QVariant::fromValue(backend->contextsCheckpoint())); - } break; - - case QScriptDebuggerCommand::GetPropertyExpressionValue: { - QScriptContext *ctx = backend->context(command.contextIndex()); - int lineNumber = command.lineNumber(); - QVariant attr = command.attribute(QScriptDebuggerCommand::UserAttribute); - QStringList path = attr.toStringList(); - if (!ctx || path.isEmpty()) - break; - QScriptContextInfo ctxInfo(ctx); - if (ctx->callee().isValid() - && ((lineNumber < ctxInfo.functionStartLineNumber()) - || (lineNumber > ctxInfo.functionEndLineNumber()))) { - break; - } - QScriptValueList objects; - int pathIndex = 0; - if (path.at(0) == QLatin1String("this")) { - objects.append(ctx->thisObject()); - ++pathIndex; - } else { - objects << ctx->scopeChain(); - } - for (int i = 0; i < objects.size(); ++i) { - QScriptValue val = objects.at(i); - for (int j = pathIndex; val.isValid() && (j < path.size()); ++j) { - val = val.property(path.at(j)); - } - if (val.isValid()) { - bool hadException = (ctx->state() == QScriptContext::ExceptionState); - QString str = val.toString(); - if (!hadException && backend->engine()->hasUncaughtException()) - backend->engine()->clearExceptions(); - response.setResult(str); - break; - } - } - } break; - - case QScriptDebuggerCommand::GetCompletions: { - QScriptContext *ctx = backend->context(command.contextIndex()); - QVariant attr = command.attribute(QScriptDebuggerCommand::UserAttribute); - QStringList path = attr.toStringList(); - if (!ctx || path.isEmpty()) - break; - QScriptValueList objects; - QString prefix = path.last(); - QSet matches; - if (path.size() > 1) { - const QString &topLevelIdent = path.at(0); - QScriptValue obj; - if (topLevelIdent == QLatin1String("this")) { - obj = ctx->thisObject(); - } else { - QScriptValueList scopeChain; - scopeChain = ctx->scopeChain(); - for (int i = 0; i < scopeChain.size(); ++i) { - QScriptValue oo = scopeChain.at(i).property(topLevelIdent); - if (oo.isObject()) { - obj = oo; - break; - } - } - } - for (int i = 1; obj.isObject() && (i < path.size()-1); ++i) - obj = obj.property(path.at(i)); - if (obj.isValid()) - objects.append(obj); - } else { - objects << ctx->scopeChain(); - QStringList keywords; - keywords.append(QString::fromLatin1("this")); - keywords.append(QString::fromLatin1("true")); - keywords.append(QString::fromLatin1("false")); - keywords.append(QString::fromLatin1("null")); - for (int i = 0; i < keywords.size(); ++i) { - const QString &kwd = keywords.at(i); - if (isPrefixOf(prefix, kwd)) - matches.insert(kwd); - } - } - - for (int i = 0; i < objects.size(); ++i) { - QScriptValue obj = objects.at(i); - while (obj.isObject()) { - QScriptValueIterator it(obj); - while (it.hasNext()) { - it.next(); - QString propertyName = it.name(); - if (isPrefixOf(prefix, propertyName)) - matches.insert(propertyName); - } - obj = obj.prototype(); - } - } - QStringList matchesList = matches.toList(); - qStableSort(matchesList); - response.setResult(matchesList); - } break; - - case QScriptDebuggerCommand::NewScriptObjectSnapshot: { - int id = backend->newScriptObjectSnapshot(); - response.setResult(id); - } break; - - case QScriptDebuggerCommand::ScriptObjectSnapshotCapture: { - int id = command.snapshotId(); - QScriptObjectSnapshot *snap = backend->scriptObjectSnapshot(id); - Q_ASSERT(snap != 0); - QScriptDebuggerValue object = command.scriptValue(); - Q_ASSERT(object.type() == QScriptDebuggerValue::ObjectValue); - QScriptEngine *engine = backend->engine(); - QScriptValue realObject = object.toScriptValue(engine); - Q_ASSERT(realObject.isObject()); - QScriptObjectSnapshot::Delta delta = snap->capture(realObject); - QScriptDebuggerObjectSnapshotDelta result; - result.removedProperties = delta.removedProperties; - bool didIgnoreExceptions = backend->ignoreExceptions(); - backend->setIgnoreExceptions(true); - for (int i = 0; i < delta.changedProperties.size(); ++i) { - const QScriptValueProperty &src = delta.changedProperties.at(i); - bool hadException = engine->hasUncaughtException(); - QString str = src.value().toString(); - if (!hadException && engine->hasUncaughtException()) - engine->clearExceptions(); - QScriptDebuggerValueProperty dest(src.name(), src.value(), str, src.flags()); - result.changedProperties.append(dest); - } - for (int j = 0; j < delta.addedProperties.size(); ++j) { - const QScriptValueProperty &src = delta.addedProperties.at(j); - bool hadException = engine->hasUncaughtException(); - QString str = src.value().toString(); - if (!hadException && engine->hasUncaughtException()) - engine->clearExceptions(); - QScriptDebuggerValueProperty dest(src.name(), src.value(), str, src.flags()); - result.addedProperties.append(dest); - } - backend->setIgnoreExceptions(didIgnoreExceptions); - response.setResult(QVariant::fromValue(result)); - } break; - - case QScriptDebuggerCommand::DeleteScriptObjectSnapshot: { - int id = command.snapshotId(); - backend->deleteScriptObjectSnapshot(id); - } break; - - case QScriptDebuggerCommand::NewScriptValueIterator: { - QScriptDebuggerValue object = command.scriptValue(); - Q_ASSERT(object.type() == QScriptDebuggerValue::ObjectValue); - QScriptEngine *engine = backend->engine(); - QScriptValue realObject = object.toScriptValue(engine); - Q_ASSERT(realObject.isObject()); - int id = backend->newScriptValueIterator(realObject); - response.setResult(id); - } break; - - case QScriptDebuggerCommand::GetPropertiesByIterator: { - int id = command.iteratorId(); - int count = 1000; - QScriptValueIterator *it = backend->scriptValueIterator(id); - Q_ASSERT(it != 0); - QScriptDebuggerValuePropertyList props; - for (int i = 0; (i < count) && it->hasNext(); ++i) { - it->next(); - QString name = it->name(); - QScriptValue value = it->value(); - QString valueAsString = value.toString(); - QScriptValue::PropertyFlags flags = it->flags(); - QScriptDebuggerValueProperty prp(name, value, valueAsString, flags); - props.append(prp); - } - response.setResult(props); - } break; - - case QScriptDebuggerCommand::DeleteScriptValueIterator: { - int id = command.iteratorId(); - backend->deleteScriptValueIterator(id); - } break; - - case QScriptDebuggerCommand::Evaluate: { - int contextIndex = command.contextIndex(); - QString program = command.program(); - QString fileName = command.fileName(); - int lineNumber = command.lineNumber(); - backend->evaluate(contextIndex, program, fileName, lineNumber); - response.setAsync(true); - } break; - - case QScriptDebuggerCommand::ScriptValueToString: { - QScriptDebuggerValue value = command.scriptValue(); - QScriptEngine *engine = backend->engine(); - QScriptValue realValue = value.toScriptValue(engine); - response.setResult(realValue.toString()); - } break; - - case QScriptDebuggerCommand::SetScriptValueProperty: { - QScriptDebuggerValue object = command.scriptValue(); - QScriptEngine *engine = backend->engine(); - QScriptValue realObject = object.toScriptValue(engine); - QScriptDebuggerValue value = command.subordinateScriptValue(); - QScriptValue realValue = value.toScriptValue(engine); - QString name = command.name(); - realObject.setProperty(name, realValue); - } break; - - case QScriptDebuggerCommand::ClearExceptions: - backend->engine()->clearExceptions(); - break; - - case QScriptDebuggerCommand::UserCommand: - case QScriptDebuggerCommand::MaxUserCommand: - break; - } - return response; -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptdebuggercommandexecutor_p.h b/src/scripttools/debugging/qscriptdebuggercommandexecutor_p.h deleted file mode 100644 index 467564156..000000000 --- a/src/scripttools/debugging/qscriptdebuggercommandexecutor_p.h +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCOMMANDEXECUTOR_P_H -#define QSCRIPTDEBUGGERCOMMANDEXECUTOR_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerBackend; -class QScriptDebuggerCommand; -class QScriptDebuggerResponse; - -class QScriptDebuggerCommandExecutorPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerCommandExecutor -{ -public: - QScriptDebuggerCommandExecutor(); - virtual ~QScriptDebuggerCommandExecutor(); - - virtual QScriptDebuggerResponse execute( - QScriptDebuggerBackend *backend, - const QScriptDebuggerCommand &command); - -protected: - QScriptDebuggerCommandExecutor(QScriptDebuggerCommandExecutorPrivate &dd); - QScopedPointer d_ptr; - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerCommandExecutor) - Q_DISABLE_COPY(QScriptDebuggerCommandExecutor) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggercommandschedulerfrontend.cpp b/src/scripttools/debugging/qscriptdebuggercommandschedulerfrontend.cpp deleted file mode 100644 index 54274f2fc..000000000 --- a/src/scripttools/debugging/qscriptdebuggercommandschedulerfrontend.cpp +++ /dev/null @@ -1,300 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggercommandschedulerfrontend_p.h" -#include "qscriptdebuggercommandschedulerinterface_p.h" -#include "qscriptdebuggercommand_p.h" - -QT_BEGIN_NAMESPACE - -QScriptDebuggerCommandSchedulerFrontend::QScriptDebuggerCommandSchedulerFrontend( - QScriptDebuggerCommandSchedulerInterface *scheduler, - QScriptDebuggerResponseHandlerInterface *responseHandler) - : m_scheduler(scheduler), m_responseHandler(responseHandler) -{ -} - -QScriptDebuggerCommandSchedulerFrontend::~QScriptDebuggerCommandSchedulerFrontend() -{ -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleCommand(const QScriptDebuggerCommand &command) -{ - return m_scheduler->scheduleCommand(command, m_responseHandler); -} - -/*! - Instructs the front-end to break at the next script statement, and - returns a unique identifier associated with this command. - - When the next script statement is encountered, the client will be - notified, and the front-end will be ready to accept commands. - - \sa scheduleContinue() -*/ -int QScriptDebuggerCommandSchedulerFrontend::scheduleInterrupt() -{ - return scheduleCommand(QScriptDebuggerCommand::interruptCommand()); -} - -/*! - Instructs the front-end to continue evaluation, and returns a unique - identifier associated with this command. - - \sa scheduleBreak() -*/ -int QScriptDebuggerCommandSchedulerFrontend::scheduleContinue() -{ - return scheduleCommand(QScriptDebuggerCommand::continueCommand()); -} - -/*! - Instructs the front-end to step into the next script statement, and - returns a unique identifier associated with this command. - - Evaluation will automatically be continued, and the client()'s event() - function will be called when the statement has been stepped into. -*/ -int QScriptDebuggerCommandSchedulerFrontend::scheduleStepInto(int count) -{ - return scheduleCommand(QScriptDebuggerCommand::stepIntoCommand(count)); -} - -/*! - Instructs the front-end to step over the next script statement, and - returns a unique identifier associated with this command. - - Evaluation will automatically be continued, and the client()'s event() - function will be called when the statement has been stepped over. -*/ -int QScriptDebuggerCommandSchedulerFrontend::scheduleStepOver(int count) -{ - return scheduleCommand(QScriptDebuggerCommand::stepOverCommand(count)); -} - -/*! - Instructs the front-end to step out of the current script function, and - returns a unique identifier associated with this command. - - Evaluation will automatically be continued, and the client()'s - event() function will be called when the script function has been - stepped out of. -*/ -int QScriptDebuggerCommandSchedulerFrontend::scheduleStepOut() -{ - return scheduleCommand(QScriptDebuggerCommand::stepOutCommand()); -} - -/*! - Instructs the front-end to continue evaluation until the location - specified by the given \a fileName and \a lineNumber is reached. -*/ -int QScriptDebuggerCommandSchedulerFrontend::scheduleRunToLocation(const QString &fileName, int lineNumber) -{ - return scheduleCommand(QScriptDebuggerCommand::runToLocationCommand(fileName, lineNumber)); -} - -/*! - Instructs the front-end to continue evaluation until the location - specified by the given \a scriptId and \a lineNumber is reached. -*/ -int QScriptDebuggerCommandSchedulerFrontend::scheduleRunToLocation(qint64 scriptId, int lineNumber) -{ - return scheduleCommand(QScriptDebuggerCommand::runToLocationCommand(scriptId, lineNumber)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleForceReturn(int contextIndex, const QScriptDebuggerValue &value) -{ - return scheduleCommand(QScriptDebuggerCommand::forceReturnCommand(contextIndex, value)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleSetBreakpoint(const QString &fileName, int lineNumber) -{ - return scheduleCommand(QScriptDebuggerCommand::setBreakpointCommand(fileName, lineNumber)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleSetBreakpoint(const QScriptBreakpointData &data) -{ - return scheduleCommand(QScriptDebuggerCommand::setBreakpointCommand(data)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleDeleteBreakpoint(int id) -{ - return scheduleCommand(QScriptDebuggerCommand::deleteBreakpointCommand(id)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleDeleteAllBreakpoints() -{ - return scheduleCommand(QScriptDebuggerCommand::deleteAllBreakpointsCommand()); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleGetBreakpoints() -{ - return scheduleCommand(QScriptDebuggerCommand::getBreakpointsCommand()); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleGetBreakpointData(int id) -{ - return scheduleCommand(QScriptDebuggerCommand::getBreakpointDataCommand(id)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleSetBreakpointData(int id, const QScriptBreakpointData &data) -{ - return scheduleCommand(QScriptDebuggerCommand::setBreakpointDataCommand(id, data)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleGetScripts() -{ - return scheduleCommand(QScriptDebuggerCommand::getScriptsCommand()); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleGetScriptData(qint64 id) -{ - return scheduleCommand(QScriptDebuggerCommand::getScriptDataCommand(id)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleScriptsCheckpoint() -{ - return scheduleCommand(QScriptDebuggerCommand::scriptsCheckpointCommand()); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleGetScriptsDelta() -{ - return scheduleCommand(QScriptDebuggerCommand::getScriptsDeltaCommand()); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleResolveScript(const QString &fileName) -{ - return scheduleCommand(QScriptDebuggerCommand::resolveScriptCommand(fileName)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleGetBacktrace() -{ - return scheduleCommand(QScriptDebuggerCommand::getBacktraceCommand()); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleGetContextCount() -{ - return scheduleCommand(QScriptDebuggerCommand::getContextCountCommand()); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleGetContextState(int contextIndex) -{ - return scheduleCommand(QScriptDebuggerCommand::getContextStateCommand(contextIndex)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleGetContextInfo(int contextIndex) -{ - return scheduleCommand(QScriptDebuggerCommand::getContextInfoCommand(contextIndex)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleGetContextId(int contextIndex) -{ - return scheduleCommand(QScriptDebuggerCommand::getContextIdCommand(contextIndex)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleGetThisObject(int contextIndex) -{ - return scheduleCommand(QScriptDebuggerCommand::getThisObjectCommand(contextIndex)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleGetActivationObject(int contextIndex) -{ - return scheduleCommand(QScriptDebuggerCommand::getActivationObjectCommand(contextIndex)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleGetScopeChain(int contextIndex) -{ - return scheduleCommand(QScriptDebuggerCommand::getScopeChainCommand(contextIndex)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleContextsCheckpoint() -{ - return scheduleCommand(QScriptDebuggerCommand::contextsCheckpoint()); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleGetPropertyExpressionValue( - int contextIndex, int lineNumber, const QStringList &path) -{ - return scheduleCommand(QScriptDebuggerCommand::getPropertyExpressionValue(contextIndex, lineNumber, path)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleGetCompletions(int contextIndex, const QStringList &path) -{ - return scheduleCommand(QScriptDebuggerCommand::getCompletions(contextIndex, path)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleEvaluate(int contextIndex, - const QString &program, - const QString &fileName, - int lineNumber) -{ - return scheduleCommand(QScriptDebuggerCommand::evaluateCommand(contextIndex, program, fileName, lineNumber)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleNewScriptValueIterator(const QScriptDebuggerValue &object) -{ - return scheduleCommand(QScriptDebuggerCommand::newScriptValueIteratorCommand(object)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleGetPropertiesByIterator(int id, int count) -{ - return scheduleCommand(QScriptDebuggerCommand::getPropertiesByIteratorCommand(id, count)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleDeleteScriptValueIterator(int id) -{ - return scheduleCommand(QScriptDebuggerCommand::deleteScriptValueIteratorCommand(id)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleScriptValueToString(const QScriptDebuggerValue &value) -{ - return scheduleCommand(QScriptDebuggerCommand::scriptValueToStringCommand(value)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleSetScriptValueProperty(const QScriptDebuggerValue &object, - const QString &name, - const QScriptDebuggerValue &value) -{ - return scheduleCommand(QScriptDebuggerCommand::setScriptValuePropertyCommand(object, name, value)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleClearExceptions() -{ - return scheduleCommand(QScriptDebuggerCommand::clearExceptionsCommand()); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleNewScriptObjectSnapshot() -{ - return scheduleCommand(QScriptDebuggerCommand::newScriptObjectSnapshotCommand()); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleScriptObjectSnapshotCapture(int id, const QScriptDebuggerValue &object) -{ - return scheduleCommand(QScriptDebuggerCommand::scriptObjectSnapshotCaptureCommand(id, object)); -} - -int QScriptDebuggerCommandSchedulerFrontend::scheduleDeleteScriptObjectSnapshot(int id) -{ - return scheduleCommand(QScriptDebuggerCommand::deleteScriptObjectSnapshotCommand(id)); -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptdebuggercommandschedulerfrontend_p.h b/src/scripttools/debugging/qscriptdebuggercommandschedulerfrontend_p.h deleted file mode 100644 index afa43bc54..000000000 --- a/src/scripttools/debugging/qscriptdebuggercommandschedulerfrontend_p.h +++ /dev/null @@ -1,128 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCOMMANDSCHEDULERFRONTEND_P_H -#define QSCRIPTDEBUGGERCOMMANDSCHEDULERFRONTEND_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerCommandSchedulerInterface; -class QScriptDebuggerResponseHandlerInterface; -class QScriptDebuggerCommand; -class QScriptDebuggerValue; -class QScriptBreakpointData; - -class Q_AUTOTEST_EXPORT QScriptDebuggerCommandSchedulerFrontend -{ -public: - QScriptDebuggerCommandSchedulerFrontend( - QScriptDebuggerCommandSchedulerInterface *scheduler, - QScriptDebuggerResponseHandlerInterface *responseHandler); - ~QScriptDebuggerCommandSchedulerFrontend(); - - // execution control - int scheduleInterrupt(); - int scheduleContinue(); - int scheduleStepInto(int count = 1); - int scheduleStepOver(int count = 1); - int scheduleStepOut(); - int scheduleRunToLocation(const QString &fileName, int lineNumber); - int scheduleRunToLocation(qint64 scriptId, int lineNumber); - int scheduleForceReturn(int contextIndex, const QScriptDebuggerValue &value); - - // breakpoints - int scheduleSetBreakpoint(const QString &fileName, int lineNumber); - int scheduleSetBreakpoint(const QScriptBreakpointData &data); - int scheduleDeleteBreakpoint(int id); - int scheduleDeleteAllBreakpoints(); - int scheduleGetBreakpoints(); - int scheduleGetBreakpointData(int id); - int scheduleSetBreakpointData(int id, const QScriptBreakpointData &data); - - // scripts - int scheduleGetScripts(); - int scheduleGetScriptData(qint64 id); - int scheduleScriptsCheckpoint(); - int scheduleGetScriptsDelta(); - int scheduleResolveScript(const QString &fileName); - - // stack - int scheduleGetBacktrace(); - int scheduleGetContextCount(); - int scheduleGetContextState(int contextIndex); - int scheduleGetContextInfo(int contextIndex); - int scheduleGetContextId(int contextIndex); - int scheduleGetThisObject(int contextIndex); - int scheduleGetActivationObject(int contextIndex); - int scheduleGetScopeChain(int contextIndex); - int scheduleContextsCheckpoint(); - int scheduleGetPropertyExpressionValue(int contextIndex, int lineNumber, - const QStringList &path); - int scheduleGetCompletions(int contextIndex, const QStringList &path); - - // iteration - int scheduleNewScriptValueIterator(const QScriptDebuggerValue &object); - int scheduleGetPropertiesByIterator(int id, int count); - int scheduleDeleteScriptValueIterator(int id); - - // evaluation - int scheduleEvaluate(int contextIndex, const QString &program, - const QString &fileName = QString(), - int lineNumber = 1); - - int scheduleScriptValueToString(const QScriptDebuggerValue &value); - int scheduleSetScriptValueProperty(const QScriptDebuggerValue &object, - const QString &name, - const QScriptDebuggerValue &value); - - int scheduleClearExceptions(); - - int scheduleNewScriptObjectSnapshot(); - int scheduleScriptObjectSnapshotCapture(int id, const QScriptDebuggerValue &object); - int scheduleDeleteScriptObjectSnapshot(int id); - -private: - int scheduleCommand(const QScriptDebuggerCommand &command); - - QScriptDebuggerCommandSchedulerInterface *m_scheduler; - QScriptDebuggerResponseHandlerInterface *m_responseHandler; - - Q_DISABLE_COPY(QScriptDebuggerCommandSchedulerFrontend) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggercommandschedulerinterface_p.h b/src/scripttools/debugging/qscriptdebuggercommandschedulerinterface_p.h deleted file mode 100644 index 28b9de7cf..000000000 --- a/src/scripttools/debugging/qscriptdebuggercommandschedulerinterface_p.h +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCOMMANDSCHEDULERINTERFACE_P_H -#define QSCRIPTDEBUGGERCOMMANDSCHEDULERINTERFACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerCommand; -class QScriptDebuggerResponseHandlerInterface; - -class Q_AUTOTEST_EXPORT QScriptDebuggerCommandSchedulerInterface -{ -public: - virtual ~QScriptDebuggerCommandSchedulerInterface() {} - - virtual int scheduleCommand( - const QScriptDebuggerCommand &command, - QScriptDebuggerResponseHandlerInterface *responseHandler) = 0; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggercommandschedulerjob.cpp b/src/scripttools/debugging/qscriptdebuggercommandschedulerjob.cpp deleted file mode 100644 index 26580c707..000000000 --- a/src/scripttools/debugging/qscriptdebuggercommandschedulerjob.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggercommandschedulerjob_p.h" -#include "qscriptdebuggercommandschedulerjob_p_p.h" - -QT_BEGIN_NAMESPACE - -QScriptDebuggerCommandSchedulerJobPrivate::QScriptDebuggerCommandSchedulerJobPrivate() -{ -} - -QScriptDebuggerCommandSchedulerJobPrivate::~QScriptDebuggerCommandSchedulerJobPrivate() -{ -} - -QScriptDebuggerCommandSchedulerJob::QScriptDebuggerCommandSchedulerJob( - QScriptDebuggerCommandSchedulerInterface *commandScheduler) - : QScriptDebuggerJob(*new QScriptDebuggerCommandSchedulerJobPrivate) -{ - Q_D(QScriptDebuggerCommandSchedulerJob); - d->commandScheduler = commandScheduler; -} - -QScriptDebuggerCommandSchedulerJob::~QScriptDebuggerCommandSchedulerJob() -{ -} - -QScriptDebuggerCommandSchedulerJob::QScriptDebuggerCommandSchedulerJob( - QScriptDebuggerCommandSchedulerJobPrivate &dd, - QScriptDebuggerCommandSchedulerInterface *commandScheduler) - : QScriptDebuggerJob(dd) -{ - Q_D(QScriptDebuggerCommandSchedulerJob); - d->commandScheduler = commandScheduler; -} - -QScriptDebuggerCommandSchedulerInterface *QScriptDebuggerCommandSchedulerJob::commandScheduler() const -{ - Q_D(const QScriptDebuggerCommandSchedulerJob); - return d->commandScheduler; -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptdebuggercommandschedulerjob_p.h b/src/scripttools/debugging/qscriptdebuggercommandschedulerjob_p.h deleted file mode 100644 index c06295cbe..000000000 --- a/src/scripttools/debugging/qscriptdebuggercommandschedulerjob_p.h +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCOMMANDSCHEDULERJOB_P_H -#define QSCRIPTDEBUGGERCOMMANDSCHEDULERJOB_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qscriptdebuggerjob_p.h" - -#include "qscriptdebuggerresponsehandlerinterface_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerCommandSchedulerInterface; - -class QScriptDebuggerCommandSchedulerJobPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerCommandSchedulerJob - : public QScriptDebuggerJob, - public QScriptDebuggerResponseHandlerInterface -{ -public: - QScriptDebuggerCommandSchedulerJob(QScriptDebuggerCommandSchedulerInterface *commandScheduler); - ~QScriptDebuggerCommandSchedulerJob(); - - QScriptDebuggerCommandSchedulerInterface *commandScheduler() const; - -protected: - QScriptDebuggerCommandSchedulerJob( - QScriptDebuggerCommandSchedulerJobPrivate &dd, - QScriptDebuggerCommandSchedulerInterface *commandScheduler); - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerCommandSchedulerJob) - Q_DISABLE_COPY(QScriptDebuggerCommandSchedulerJob) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggercommandschedulerjob_p_p.h b/src/scripttools/debugging/qscriptdebuggercommandschedulerjob_p_p.h deleted file mode 100644 index 54a8a195b..000000000 --- a/src/scripttools/debugging/qscriptdebuggercommandschedulerjob_p_p.h +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCOMMANDSCHEDULERJOB_P_P_H -#define QSCRIPTDEBUGGERCOMMANDSCHEDULERJOB_P_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qscriptdebuggerjob_p_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerCommandSchedulerInterface; - -class QScriptDebuggerCommandSchedulerJob; -class QScriptDebuggerCommandSchedulerJobPrivate - : public QScriptDebuggerJobPrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerCommandSchedulerJob) -public: - QScriptDebuggerCommandSchedulerJobPrivate(); - ~QScriptDebuggerCommandSchedulerJobPrivate(); - - QScriptDebuggerCommandSchedulerInterface *commandScheduler; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerconsole.cpp b/src/scripttools/debugging/qscriptdebuggerconsole.cpp deleted file mode 100644 index 429886243..000000000 --- a/src/scripttools/debugging/qscriptdebuggerconsole.cpp +++ /dev/null @@ -1,598 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerconsole_p.h" -#include "qscriptdebuggerconsolecommandjob_p.h" -#include "qscriptdebuggerconsolecommandmanager_p.h" -#include "qscriptdebuggerscriptedconsolecommand_p.h" -#include "qscriptmessagehandlerinterface_p.h" -#include "qscriptbreakpointdata_p.h" -#include "qscriptdebuggerresponse_p.h" -#include "qscriptdebuggervalueproperty_p.h" -#include "qscriptscriptdata_p.h" -#include "qscripttoolscommon_p.h" -#include "qscripttoolsresources_p.h" - -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -static QScriptValue debuggerResponseToScriptValue(QScriptEngine *eng, const QScriptDebuggerResponse &in) -{ - QScriptValue out = eng->newObject(); - out.setProperty(QString::fromLatin1("result"), eng->toScriptValue(in.result())); - out.setProperty(QString::fromLatin1("error"), QScriptValue(eng, in.error())); - out.setProperty(QString::fromLatin1("async"), QScriptValue(eng, in.async())); - return out; -} - -static void debuggerResponseFromScriptValue(const QScriptValue &, QScriptDebuggerResponse &) -{ - Q_ASSERT(false); -} - -static QScriptValue breakpointDataToScriptValue(QScriptEngine *eng, const QScriptBreakpointData &in) -{ - QScriptValue out = eng->newObject(); - out.setProperty(QString::fromLatin1("scriptId"), QScriptValue(eng, qsreal(in.scriptId()))); - out.setProperty(QString::fromLatin1("fileName"), QScriptValue(eng, in.fileName())); - out.setProperty(QString::fromLatin1("lineNumber"), QScriptValue(eng, in.lineNumber())); - out.setProperty(QString::fromLatin1("enabled"), QScriptValue(eng, in.isEnabled())); - out.setProperty(QString::fromLatin1("singleShot"), QScriptValue(eng, in.isSingleShot())); - out.setProperty(QString::fromLatin1("ignoreCount"), QScriptValue(eng, in.ignoreCount())); - out.setProperty(QString::fromLatin1("condition"), QScriptValue(eng, in.condition())); - return out; -} - -static void breakpointDataFromScriptValue(const QScriptValue &in, QScriptBreakpointData &out) -{ - QScriptValue scriptId = in.property(QString::fromLatin1("scriptId")); - if (scriptId.isValid()) - out.setScriptId((qint64)scriptId.toNumber()); - out.setFileName(in.property(QString::fromLatin1("fileName")).toString()); - out.setLineNumber(in.property(QString::fromLatin1("lineNumber")).toInt32()); - QScriptValue enabled = in.property(QString::fromLatin1("enabled")); - if (enabled.isValid()) - out.setEnabled(enabled.toBoolean()); - QScriptValue singleShot = in.property(QString::fromLatin1("singleShot")); - if (singleShot.isValid()) - out.setSingleShot(singleShot.toBoolean()); - out.setIgnoreCount(in.property(QString::fromLatin1("ignoreCount")).toInt32()); - out.setCondition(in.property(QString::fromLatin1("condition")).toString()); -} - -static QScriptValue breakpointMapToScriptValue(QScriptEngine *eng, const QScriptBreakpointMap &in) -{ - QScriptValue out = eng->newObject(); - QScriptBreakpointMap::const_iterator it; - for (it = in.constBegin(); it != in.constEnd(); ++it) { - out.setProperty(QString::number(it.key()), eng->toScriptValue(it.value())); - } - return out; -} - -static void breakpointMapFromScriptValue(const QScriptValue &, QScriptBreakpointMap &) -{ - Q_ASSERT(false); -} - -static QScriptValue scriptDataToScriptValue(QScriptEngine *eng, const QScriptScriptData &in) -{ - QScriptValue out = eng->newObject(); - out.setProperty(QString::fromLatin1("contents"), QScriptValue(eng, in.contents())); - out.setProperty(QString::fromLatin1("fileName"), QScriptValue(eng, in.fileName())); - out.setProperty(QString::fromLatin1("baseLineNumber"), QScriptValue(eng, in.baseLineNumber())); - return out; -} - -static void scriptDataFromScriptValue(const QScriptValue &in, QScriptScriptData &out) -{ - QString contents = in.property(QString::fromLatin1("contents")).toString(); - QString fileName = in.property(QString::fromLatin1("fileName")).toString(); - int baseLineNumber = in.property(QString::fromLatin1("baseLineNumber")).toInt32(); - QScriptScriptData tmp(contents, fileName, baseLineNumber); - out = tmp; -} - -static QScriptValue scriptMapToScriptValue(QScriptEngine *eng, const QScriptScriptMap &in) -{ - QScriptValue out = eng->newObject(); - QScriptScriptMap::const_iterator it; - for (it = in.constBegin(); it != in.constEnd(); ++it) { - out.setProperty(QString::number(it.key()), eng->toScriptValue(it.value())); - } - return out; -} - -static void scriptMapFromScriptValue(const QScriptValue &, QScriptScriptMap &) -{ - Q_ASSERT(false); -} - -static QScriptValue consoleCommandToScriptValue( - QScriptEngine *eng, QScriptDebuggerConsoleCommand* const &in) -{ - if (!in) - return eng->undefinedValue(); - QScriptValue out = eng->newObject(); - out.setProperty(QString::fromLatin1("name"), QScriptValue(eng, in->name())); - out.setProperty(QString::fromLatin1("group"), QScriptValue(eng, in->group())); - out.setProperty(QString::fromLatin1("shortDescription"), QScriptValue(eng, in->shortDescription())); - out.setProperty(QString::fromLatin1("longDescription"), QScriptValue(eng, in->longDescription())); - out.setProperty(QString::fromLatin1("aliases"), eng->toScriptValue(in->aliases())); - out.setProperty(QString::fromLatin1("seeAlso"), eng->toScriptValue(in->seeAlso())); - return out; -} - -static void consoleCommandFromScriptValue( - const QScriptValue &, QScriptDebuggerConsoleCommand* &) -{ - Q_ASSERT(false); -} - -static QScriptValue consoleCommandGroupDataToScriptValue( - QScriptEngine *eng, const QScriptDebuggerConsoleCommandGroupData &in) -{ - QScriptValue out = eng->newObject(); - out.setProperty(QString::fromLatin1("longDescription"), QScriptValue(eng, in.longDescription())); - out.setProperty(QString::fromLatin1("shortDescription"), QScriptValue(eng, in.shortDescription())); - return out; -} - -static void consoleCommandGroupDataFromScriptValue( - const QScriptValue &, QScriptDebuggerConsoleCommandGroupData &) -{ - Q_ASSERT(false); -} - -static QScriptValue consoleCommandGroupMapToScriptValue( - QScriptEngine *eng, const QScriptDebuggerConsoleCommandGroupMap &in) -{ - QScriptValue out = eng->newObject(); - QScriptDebuggerConsoleCommandGroupMap::const_iterator it; - for (it = in.constBegin(); it != in.constEnd(); ++it) { - out.setProperty(it.key(), eng->toScriptValue(it.value())); - } - return out; -} - -static void consoleCommandGroupMapFromScriptValue( - const QScriptValue &, QScriptDebuggerConsoleCommandGroupMap &) -{ - Q_ASSERT(false); -} - -static QScriptValue contextInfoToScriptValue(QScriptEngine *eng, const QScriptContextInfo &in) -{ - QScriptValue out = eng->newObject(); - out.setProperty(QString::fromLatin1("scriptId"), QScriptValue(eng, qsreal(in.scriptId()))); - out.setProperty(QString::fromLatin1("fileName"), QScriptValue(eng, in.fileName())); - out.setProperty(QString::fromLatin1("lineNumber"), QScriptValue(eng, in.lineNumber())); - out.setProperty(QString::fromLatin1("functionName"), QScriptValue(eng, in.functionName())); - return out; -} - -static void contextInfoFromScriptValue(const QScriptValue &, QScriptContextInfo &) -{ - Q_ASSERT(false); -} - -static QScriptValue debuggerScriptValuePropertyToScriptValue(QScriptEngine *eng, const QScriptDebuggerValueProperty &in) -{ - QScriptValue out = eng->newObject(); - out.setProperty(QString::fromLatin1("name"), QScriptValue(eng, in.name())); - out.setProperty(QString::fromLatin1("value"), eng->toScriptValue(in.value())); - out.setProperty(QString::fromLatin1("valueAsString"), QScriptValue(eng, in.valueAsString())); - out.setProperty(QString::fromLatin1("flags"), QScriptValue(eng, static_cast(in.flags()))); - return out; -} - -static void debuggerScriptValuePropertyFromScriptValue(const QScriptValue &in, QScriptDebuggerValueProperty &out) -{ - QString name = in.property(QString::fromLatin1("name")).toString(); - QScriptDebuggerValue value = qscriptvalue_cast(in.property(QString::fromLatin1("value"))); - QString valueAsString = in.property(QString::fromLatin1("valueAsString")).toString(); - int flags = in.property(QString::fromLatin1("flags")).toInt32(); - QScriptDebuggerValueProperty tmp(name, value, valueAsString, QScriptValue::PropertyFlags(flags)); - out = tmp; -} - -/*! - \since 4.5 - \class QScriptDebuggerConsole - \internal - - \brief The QScriptDebuggerConsole class provides the core functionality of a debugger console. -*/ - -class QScriptDebuggerConsolePrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerConsole) -public: - QScriptDebuggerConsolePrivate(QScriptDebuggerConsole*); - ~QScriptDebuggerConsolePrivate(); - - void loadScriptedCommands(QScriptMessageHandlerInterface *messageHandler); - QScriptDebuggerConsoleCommandJob *createJob( - const QString &command, - QScriptMessageHandlerInterface *messageHandler, - QScriptDebuggerCommandSchedulerInterface *commandScheduler); - - QScriptEngine *commandEngine; - QScriptDebuggerConsoleCommandManager *commandManager; - QString commandPrefix; - QString input; - QStringList commandHistory; - int currentFrameIndex; - qint64 currentScriptId; - int currentLineNumber; - int evaluateAction; - qint64 sessionId; - - QScriptDebuggerConsole *q_ptr; -}; - -QScriptDebuggerConsolePrivate::QScriptDebuggerConsolePrivate(QScriptDebuggerConsole* parent) - : q_ptr(parent) -{ - sessionId = 0; - currentFrameIndex = 0; - currentScriptId = -1; - currentLineNumber = -1; - evaluateAction = 0; - commandPrefix = QLatin1String("."); - commandManager = new QScriptDebuggerConsoleCommandManager(); - - commandEngine = new QScriptEngine; - qScriptRegisterMetaType(commandEngine, breakpointDataToScriptValue, breakpointDataFromScriptValue); - qScriptRegisterMetaType(commandEngine, breakpointMapToScriptValue, breakpointMapFromScriptValue); - qScriptRegisterMetaType(commandEngine, scriptDataToScriptValue, scriptDataFromScriptValue); - qScriptRegisterMetaType(commandEngine, scriptMapToScriptValue, scriptMapFromScriptValue); - qScriptRegisterMetaType(commandEngine, contextInfoToScriptValue, contextInfoFromScriptValue); - qScriptRegisterMetaType(commandEngine, debuggerScriptValuePropertyToScriptValue, debuggerScriptValuePropertyFromScriptValue); - qScriptRegisterSequenceMetaType(commandEngine); - qScriptRegisterMetaType(commandEngine, debuggerResponseToScriptValue, debuggerResponseFromScriptValue); - qScriptRegisterMetaType(commandEngine, consoleCommandToScriptValue, consoleCommandFromScriptValue); - qScriptRegisterSequenceMetaType(commandEngine); - qScriptRegisterMetaType(commandEngine, consoleCommandGroupDataToScriptValue, consoleCommandGroupDataFromScriptValue); - qScriptRegisterMetaType(commandEngine, consoleCommandGroupMapToScriptValue, consoleCommandGroupMapFromScriptValue); -// ### can't do this, if it's an object ID the conversion will be incorrect since -// ### the object ID refers to an object in a different engine! -// qScriptRegisterMetaType(commandEngine, debuggerScriptValueToScriptValue, debuggerScriptValueFromScriptValue); -} - -QScriptDebuggerConsolePrivate::~QScriptDebuggerConsolePrivate() -{ - delete commandManager; - delete commandEngine; -} - -/*! - Loads command definitions from scripts. -*/ -void QScriptDebuggerConsolePrivate::loadScriptedCommands( - QScriptMessageHandlerInterface *messageHandler) -{ - static const struct ScriptsTblData { - const unsigned char* script; - const unsigned int scriptlen; - const char* scriptname; - } ScriptsTbl[] = { - { scripts_advance_qs, scripts_advance_qs_len, "advance.qs" }, - { scripts_backtrace_qs, scripts_backtrace_qs_len, "backtrace.qs" }, - { scripts_break_qs, scripts_break_qs_len, "break.qs" }, - { scripts_clear_qs, scripts_clear_qs_len, "clear.qs" }, - { scripts_complete_qs, scripts_complete_qs_len, "complete.qs" }, - { scripts_condition_qs, scripts_condition_qs_len, "condition.qs" }, - { scripts_continue_qs, scripts_continue_qs_len, "continue.qs" }, - { scripts_delete_qs, scripts_delete_qs_len, "delete.qs" }, - { scripts_disable_qs, scripts_disable_qs_len, "disable.qs" }, - { scripts_down_qs, scripts_down_qs_len, "down.qs" }, - { scripts_enable_qs, scripts_enable_qs_len, "enable.qs" }, - { scripts_eval_qs, scripts_eval_qs_len, "eval.qs" }, - { scripts_finish_qs, scripts_finish_qs_len, "finish.qs" }, - { scripts_frame_qs, scripts_frame_qs_len, "frame.qs" }, - { scripts_help_qs, scripts_help_qs_len, "help.qs" }, - { scripts_ignore_qs, scripts_ignore_qs_len, "ignore.qs" }, - { scripts_info_qs, scripts_info_qs_len, "info.qs" }, - { scripts_interrupt_qs, scripts_interrupt_qs_len, "interrupt.qs" }, - { scripts_list_qs, scripts_list_qs_len, "list.qs" }, - { scripts_next_qs, scripts_next_qs_len, "next.qs" }, - { scripts_print_qs, scripts_print_qs_len, "print.qs" }, - { scripts_return_qs, scripts_return_qs_len, "return.qs" }, - { scripts_step_qs, scripts_step_qs_len, "step.qs" }, - { scripts_tbreak_qs, scripts_tbreak_qs_len, "tbreak.qs" }, - { scripts_up_qs, scripts_up_qs_len, "up.qs" } - }; - static const qint16 ScriptsTblSize = sizeof(ScriptsTbl) / sizeof(ScriptsTblData); - - for (int i = 0; i < ScriptsTblSize; ++i) { - - QString program = QString::fromLocal8Bit( - reinterpret_cast(ScriptsTbl[i].script), - ScriptsTbl[i].scriptlen - ); - QString fileName = QString::fromLocal8Bit(ScriptsTbl[i].scriptname); - QScriptDebuggerScriptedConsoleCommand *command; - command = QScriptDebuggerScriptedConsoleCommand::parse( - program, fileName, commandEngine, messageHandler); - if (!command) - continue; - commandManager->addCommand(command); - } -} - - -/*! - Creates a job that will execute the given debugger \a command. - Returns the new job, or 0 if the command is undefined. -*/ -QScriptDebuggerConsoleCommandJob *QScriptDebuggerConsolePrivate::createJob( - const QString &command, QScriptMessageHandlerInterface *messageHandler, - QScriptDebuggerCommandSchedulerInterface *commandScheduler) -{ - QString name; - int i = command.indexOf(QLatin1Char(' ')); - if (i == -1) { - name = command; - i = name.size(); - } else { - name = command.left(i); - } - if (name.isEmpty()) - return 0; - QScriptDebuggerConsoleCommand *cmd = commandManager->findCommand(name); - if (!cmd) { - // try to auto-complete - QStringList completions = commandManager->completions(name); - if (!completions.isEmpty()) { - if (completions.size() > 1) { - QString msg; - msg.append(QString::fromLatin1("Ambiguous command \"%0\": ") - .arg(name)); - for (int j = 0; j < completions.size(); ++j) { - if (j > 0) - msg.append(QLatin1String(", ")); - msg.append(completions.at(j)); - } - msg.append(QLatin1Char('.')); - messageHandler->message(QtWarningMsg, msg); - return 0; - } - cmd = commandManager->findCommand(completions.at(0)); - Q_ASSERT(cmd != 0); - } - if (!cmd) { - messageHandler->message( - QtWarningMsg, - QString::fromLatin1("Undefined command \"%0\". Try \"help\".") - .arg(name)); - return 0; - } - } - QStringList args; - QString tmp = command.mid(i+1); - if (cmd->argumentTypes().contains(QString::fromLatin1("script"))) { - if (!tmp.isEmpty()) - args.append(tmp); - } else { - args = tmp.split(QLatin1Char(' '), QString::SkipEmptyParts); - } - return cmd->createJob(args, q_func(), messageHandler, commandScheduler); -} - -QScriptDebuggerConsole::QScriptDebuggerConsole() - : d_ptr(new QScriptDebuggerConsolePrivate(this)) -{ -} - -QScriptDebuggerConsole::~QScriptDebuggerConsole() -{ -} - -void QScriptDebuggerConsole::loadScriptedCommands(QScriptMessageHandlerInterface *messageHandler) -{ - Q_D(QScriptDebuggerConsole); - d->loadScriptedCommands(messageHandler); -} - -QScriptDebuggerConsoleCommandManager *QScriptDebuggerConsole::commandManager() const -{ - Q_D(const QScriptDebuggerConsole); - return d->commandManager; -} - -bool QScriptDebuggerConsole::hasIncompleteInput() const -{ - Q_D(const QScriptDebuggerConsole); - return !d->input.isEmpty(); -} - -QString QScriptDebuggerConsole::incompleteInput() const -{ - Q_D(const QScriptDebuggerConsole); - return d->input; -} - -void QScriptDebuggerConsole::setIncompleteInput(const QString &input) -{ - Q_D(QScriptDebuggerConsole); - d->input = input; -} - -QString QScriptDebuggerConsole::commandPrefix() const -{ - Q_D(const QScriptDebuggerConsole); - return d->commandPrefix; -} - -/*! - Consumes the given line of \a input. If the input starts with the - command prefix, it is regarded as a debugger command; otherwise the - input is evaluated as a plain script. -*/ -QScriptDebuggerConsoleCommandJob *QScriptDebuggerConsole::consumeInput( - const QString &input, QScriptMessageHandlerInterface *messageHandler, - QScriptDebuggerCommandSchedulerInterface *commandScheduler) -{ - Q_D(QScriptDebuggerConsole); - static const int maximumHistoryCount = 100; - QString cmd; - if (d->input.isEmpty() && input.isEmpty()) { - if (d->commandHistory.isEmpty()) - return 0; - cmd = d->commandHistory.first(); - } else { - cmd = input; - } - if (d->input.isEmpty() && cmd.startsWith(d->commandPrefix)) { - if (!input.isEmpty()) { - d->commandHistory.prepend(cmd); - if (d->commandHistory.size() > maximumHistoryCount) - d->commandHistory.removeLast(); - } - cmd.remove(0, d->commandPrefix.length()); - return d->createJob(cmd, messageHandler, commandScheduler); - } - d->input += cmd; - d->input += QLatin1Char('\n'); - QScriptSyntaxCheckResult check = QScriptEngine::checkSyntax(d->input); - if (check.state() == QScriptSyntaxCheckResult::Intermediate) - return 0; - d->input.chop(1); // remove the last \n - cmd = QString(); - cmd.append(d->commandPrefix); - cmd.append(QString::fromLatin1("eval ")); - cmd.append(d->input); - d->commandHistory.prepend(cmd); - if (d->commandHistory.size() > maximumHistoryCount) - d->commandHistory.removeLast(); - d->input.clear(); - cmd.remove(0, d->commandPrefix.length()); - return d->createJob(cmd, messageHandler, commandScheduler); -} - -int QScriptDebuggerConsole::currentFrameIndex() const -{ - Q_D(const QScriptDebuggerConsole); - return d->currentFrameIndex; -} - -void QScriptDebuggerConsole::setCurrentFrameIndex(int index) -{ - Q_D(QScriptDebuggerConsole); - d->currentFrameIndex = index; -} - -qint64 QScriptDebuggerConsole::currentScriptId() const -{ - Q_D(const QScriptDebuggerConsole); - return d->currentScriptId; -} - -void QScriptDebuggerConsole::setCurrentScriptId(qint64 id) -{ - Q_D(QScriptDebuggerConsole); - d->currentScriptId = id; -} - -int QScriptDebuggerConsole::currentLineNumber() const -{ - Q_D(const QScriptDebuggerConsole); - return d->currentLineNumber; -} - -void QScriptDebuggerConsole::setCurrentLineNumber(int lineNumber) -{ - Q_D(QScriptDebuggerConsole); - d->currentLineNumber = lineNumber; -} - -int QScriptDebuggerConsole::evaluateAction() const -{ - Q_D(const QScriptDebuggerConsole); - return d->evaluateAction; -} - -void QScriptDebuggerConsole::setEvaluateAction(int action) -{ - Q_D(QScriptDebuggerConsole); - d->evaluateAction = action; -} - -qint64 QScriptDebuggerConsole::sessionId() const -{ - Q_D(const QScriptDebuggerConsole); - return d->sessionId; -} - -void QScriptDebuggerConsole::bumpSessionId() -{ - Q_D(QScriptDebuggerConsole); - ++d->sessionId; -} - -void QScriptDebuggerConsole::showDebuggerInfoMessage( - QScriptMessageHandlerInterface *messageHandler) -{ - messageHandler->message( - QtDebugMsg, - QString::fromLatin1( - "Welcome to the Qt Script debugger.\n" - "Debugger commands start with a . (period).\n" - "Any other input will be evaluated by the script interpreter.\n" - "Type \".help\" for help.\n")); -} - -/*! - \reimp -*/ -int QScriptDebuggerConsole::historyCount() const -{ - Q_D(const QScriptDebuggerConsole); - return d->commandHistory.size(); -} - -/*! - \reimp -*/ -QString QScriptDebuggerConsole::historyAt(int index) const -{ - Q_D(const QScriptDebuggerConsole); - return d->commandHistory.value(index); -} - -/*! - \reimp -*/ -void QScriptDebuggerConsole::changeHistoryAt(int index, const QString &newHistory) -{ - Q_D(QScriptDebuggerConsole); - d->commandHistory[index] = newHistory; -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptdebuggerconsole_p.h b/src/scripttools/debugging/qscriptdebuggerconsole_p.h deleted file mode 100644 index aa193fb2b..000000000 --- a/src/scripttools/debugging/qscriptdebuggerconsole_p.h +++ /dev/null @@ -1,100 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCONSOLE_P_H -#define QSCRIPTDEBUGGERCONSOLE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include - -#include "qscriptdebuggerconsolehistorianinterface_p.h" - -QT_BEGIN_NAMESPACE - -class QString; -class QScriptDebuggerConsoleCommandJob; -class QScriptMessageHandlerInterface; -class QScriptDebuggerCommandSchedulerInterface; -class QScriptDebuggerConsoleCommandManager; - -class QScriptDebuggerConsolePrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerConsole - : public QScriptDebuggerConsoleHistorianInterface -{ -public: - QScriptDebuggerConsole(); - ~QScriptDebuggerConsole(); - - void loadScriptedCommands(QScriptMessageHandlerInterface *messageHandler); - - void showDebuggerInfoMessage(QScriptMessageHandlerInterface *messageHandler); - - QScriptDebuggerConsoleCommandManager *commandManager() const; - - QScriptDebuggerConsoleCommandJob *consumeInput( - const QString &input, - QScriptMessageHandlerInterface *messageHandler, - QScriptDebuggerCommandSchedulerInterface *commandScheduler); - bool hasIncompleteInput() const; - QString incompleteInput() const; - void setIncompleteInput(const QString &input); - QString commandPrefix() const; - - int historyCount() const; - QString historyAt(int index) const; - void changeHistoryAt(int index, const QString &newHistory); - - int currentFrameIndex() const; - void setCurrentFrameIndex(int index); - - qint64 currentScriptId() const; - void setCurrentScriptId(qint64 id); - - int currentLineNumber() const; - void setCurrentLineNumber(int lineNumber); - - int evaluateAction() const; - void setEvaluateAction(int action); - - qint64 sessionId() const; - void bumpSessionId(); - -private: - QScopedPointer d_ptr; - - Q_DECLARE_PRIVATE(QScriptDebuggerConsole) - Q_DISABLE_COPY(QScriptDebuggerConsole) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerconsolecommand.cpp b/src/scripttools/debugging/qscriptdebuggerconsolecommand.cpp deleted file mode 100644 index 3bfd2e34f..000000000 --- a/src/scripttools/debugging/qscriptdebuggerconsolecommand.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerconsolecommand_p.h" -#include "qscriptdebuggerconsolecommand_p_p.h" - -#include - -QT_BEGIN_NAMESPACE - -/*! - \since 4.5 - \class QScriptDebuggerConsoleCommand - \internal - - \brief The QScriptDebuggerConsoleCommand class is the base class of console commands. - - \sa QScriptDebuggerConsoleCommandManager -*/ - -QScriptDebuggerConsoleCommandPrivate::QScriptDebuggerConsoleCommandPrivate() -{ -} - -QScriptDebuggerConsoleCommandPrivate::~QScriptDebuggerConsoleCommandPrivate() -{ -} - -QScriptDebuggerConsoleCommand::QScriptDebuggerConsoleCommand() - : d_ptr(new QScriptDebuggerConsoleCommandPrivate) -{ -} - -QScriptDebuggerConsoleCommand::~QScriptDebuggerConsoleCommand() -{ -} - -QScriptDebuggerConsoleCommand::QScriptDebuggerConsoleCommand(QScriptDebuggerConsoleCommandPrivate &dd) - : d_ptr(&dd) -{ -} - -/*! - \fn QString QScriptDebuggerConsoleCommand::name() const - - Returns the name of this console command. -*/ - -/*! - \fn QString QScriptDebuggerConsoleCommand::group() const - - Returns the group that this console command belongs to. -*/ - -/*! - \fn QString QScriptDebuggerConsoleCommand::shortDescription() const - - Returns a short (one line) description of the command. -*/ - -/*! - \fn QString QScriptDebuggerConsoleCommand::longDescription() const - - Returns a detailed description of how to use the command. -*/ - -/*! - \fn QScriptDebuggerConsoleCommandJob *QScriptDebuggerConsoleCommand::createJob( - const QStringList &arguments, - QScriptDebuggerConsole *console, - QScriptMessageHandlerInterface *messageHandler, - QScriptDebuggerCommandSchedulerInterface *scheduler) = 0 - - Creates a job that will execute this command with the given \a - arguments. If the command cannot be executed (e.g. because one or - more arguments are invalid), a suitable error message should be - output to the \a messageHandler, and 0 should be returned. -*/ - -/*! - Returns a list of names of commands that may also be of interest to - users of this command. -*/ -QStringList QScriptDebuggerConsoleCommand::seeAlso() const -{ - return QStringList(); -} - -/*! - Returns a list of aliases for this command. -*/ -QStringList QScriptDebuggerConsoleCommand::aliases() const -{ - return QStringList(); -} - -QStringList QScriptDebuggerConsoleCommand::argumentTypes() const -{ - return QStringList(); -} - -QStringList QScriptDebuggerConsoleCommand::subCommands() const -{ - return QStringList(); -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptdebuggerconsolecommand_p.h b/src/scripttools/debugging/qscriptdebuggerconsolecommand_p.h deleted file mode 100644 index 5154701bf..000000000 --- a/src/scripttools/debugging/qscriptdebuggerconsolecommand_p.h +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCONSOLECOMMAND_P_H -#define QSCRIPTDEBUGGERCONSOLECOMMAND_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QString; -class QStringList; -class QScriptDebuggerConsole; -class QScriptDebuggerConsoleCommandJob; -class QScriptMessageHandlerInterface; -class QScriptDebuggerCommandSchedulerInterface; - -class QScriptDebuggerConsoleCommandPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerConsoleCommand -{ -public: - QScriptDebuggerConsoleCommand(); - virtual ~QScriptDebuggerConsoleCommand(); - - virtual QString name() const = 0; - virtual QString group() const = 0; - virtual QString shortDescription() const = 0; - virtual QString longDescription() const = 0; - virtual QStringList seeAlso() const; - virtual QStringList aliases() const; - - virtual QStringList argumentTypes() const; - - virtual QStringList subCommands() const; - virtual QScriptDebuggerConsoleCommandJob *createJob( - const QStringList &arguments, - QScriptDebuggerConsole *console, - QScriptMessageHandlerInterface *messageHandler, - QScriptDebuggerCommandSchedulerInterface *scheduler) = 0; - -protected: - QScriptDebuggerConsoleCommand(QScriptDebuggerConsoleCommandPrivate &dd); - QScopedPointer d_ptr; - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerConsoleCommand) - Q_DISABLE_COPY(QScriptDebuggerConsoleCommand) -}; - -typedef QList QScriptDebuggerConsoleCommandList; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerconsolecommand_p_p.h b/src/scripttools/debugging/qscriptdebuggerconsolecommand_p_p.h deleted file mode 100644 index 970367500..000000000 --- a/src/scripttools/debugging/qscriptdebuggerconsolecommand_p_p.h +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCONSOLECOMMAND_P_P_H -#define QSCRIPTDEBUGGERCONSOLECOMMAND_P_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerConsoleCommand; -class QScriptDebuggerConsoleCommandPrivate -{ -public: - QScriptDebuggerConsoleCommandPrivate(); - virtual ~QScriptDebuggerConsoleCommandPrivate(); -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerconsolecommandgroupdata.cpp b/src/scripttools/debugging/qscriptdebuggerconsolecommandgroupdata.cpp deleted file mode 100644 index e2685a113..000000000 --- a/src/scripttools/debugging/qscriptdebuggerconsolecommandgroupdata.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerconsolecommandgroupdata_p.h" - -#include -#include - -QT_BEGIN_NAMESPACE - -/*! - \since 4.5 - \class QScriptDebuggerConsoleCommandGroupData - \internal - - \brief The QScriptDebuggerConsoleCommandGroupData class holds data associated with a console command group. -*/ - -class QScriptDebuggerConsoleCommandGroupDataPrivate : public QSharedData -{ -public: - QScriptDebuggerConsoleCommandGroupDataPrivate(); - ~QScriptDebuggerConsoleCommandGroupDataPrivate(); - - QString shortDescription; - QString longDescription; -}; - -QScriptDebuggerConsoleCommandGroupDataPrivate::QScriptDebuggerConsoleCommandGroupDataPrivate() -{ -} - -QScriptDebuggerConsoleCommandGroupDataPrivate::~QScriptDebuggerConsoleCommandGroupDataPrivate() -{ -} - -QScriptDebuggerConsoleCommandGroupData::QScriptDebuggerConsoleCommandGroupData() - : d_ptr(0) -{ -} - -QScriptDebuggerConsoleCommandGroupData::QScriptDebuggerConsoleCommandGroupData( - const QString &shortDescription, const QString &longDescription) - : d_ptr(new QScriptDebuggerConsoleCommandGroupDataPrivate) -{ - d_ptr->shortDescription = shortDescription; - d_ptr->longDescription = longDescription; - d_ptr->ref.ref(); -} - -QScriptDebuggerConsoleCommandGroupData::QScriptDebuggerConsoleCommandGroupData( - const QScriptDebuggerConsoleCommandGroupData &other) - : d_ptr(other.d_ptr.data()) -{ - if (d_ptr) - d_ptr->ref.ref(); -} - -QScriptDebuggerConsoleCommandGroupData::~QScriptDebuggerConsoleCommandGroupData() -{ -} - -QScriptDebuggerConsoleCommandGroupData &QScriptDebuggerConsoleCommandGroupData::operator=( - const QScriptDebuggerConsoleCommandGroupData &other) -{ - d_ptr.assign(other.d_ptr.data()); - return *this; -} - -QString QScriptDebuggerConsoleCommandGroupData::shortDescription() const -{ - Q_D(const QScriptDebuggerConsoleCommandGroupData); - return d->shortDescription; -} - -QString QScriptDebuggerConsoleCommandGroupData::longDescription() const -{ - Q_D(const QScriptDebuggerConsoleCommandGroupData); - return d->longDescription; -} - -bool QScriptDebuggerConsoleCommandGroupData::isValid() const -{ - Q_D(const QScriptDebuggerConsoleCommandGroupData); - return (d != 0); -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptdebuggerconsolecommandgroupdata_p.h b/src/scripttools/debugging/qscriptdebuggerconsolecommandgroupdata_p.h deleted file mode 100644 index dc16be9ae..000000000 --- a/src/scripttools/debugging/qscriptdebuggerconsolecommandgroupdata_p.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCONSOLECOMMANDGROUPDATA_P_H -#define QSCRIPTDEBUGGERCONSOLECOMMANDGROUPDATA_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qobjectdefs.h" -#include "qscopedpointer_p.h" -#include "qmap.h" - -QT_BEGIN_NAMESPACE - -class QString; - -class QScriptDebuggerConsoleCommandGroupDataPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerConsoleCommandGroupData -{ -public: - QScriptDebuggerConsoleCommandGroupData(); - QScriptDebuggerConsoleCommandGroupData( - const QString &shortDescription, - const QString &longDescription); - QScriptDebuggerConsoleCommandGroupData( - const QScriptDebuggerConsoleCommandGroupData &other); - ~QScriptDebuggerConsoleCommandGroupData(); - - QString shortDescription() const; - QString longDescription() const; - - bool isValid() const; - - QScriptDebuggerConsoleCommandGroupData &operator=( - const QScriptDebuggerConsoleCommandGroupData &other); - -private: - QScopedSharedPointer d_ptr; - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerConsoleCommandGroupData) -}; - -typedef QMap QScriptDebuggerConsoleCommandGroupMap; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerconsolecommandjob.cpp b/src/scripttools/debugging/qscriptdebuggerconsolecommandjob.cpp deleted file mode 100644 index f92555252..000000000 --- a/src/scripttools/debugging/qscriptdebuggerconsolecommandjob.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerconsolecommandjob_p.h" -#include "qscriptdebuggerconsolecommandjob_p_p.h" - -#include - -QT_BEGIN_NAMESPACE - -QScriptDebuggerConsoleCommandJobPrivate::QScriptDebuggerConsoleCommandJobPrivate() -{ -} - -QScriptDebuggerConsoleCommandJobPrivate::~QScriptDebuggerConsoleCommandJobPrivate() -{ -} - -QScriptDebuggerConsoleCommandJob::QScriptDebuggerConsoleCommandJob( - QScriptDebuggerConsole *console, - QScriptMessageHandlerInterface *messageHandler, - QScriptDebuggerCommandSchedulerInterface *scheduler) - : QScriptDebuggerCommandSchedulerJob(*new QScriptDebuggerConsoleCommandJobPrivate, - scheduler) -{ - Q_D(QScriptDebuggerConsoleCommandJob); - d->console = console; - d->messageHandler = messageHandler; -} - -QScriptDebuggerConsoleCommandJob::~QScriptDebuggerConsoleCommandJob() -{ -} - -QScriptDebuggerConsoleCommandJob::QScriptDebuggerConsoleCommandJob( - QScriptDebuggerConsoleCommandJobPrivate &dd, - QScriptDebuggerConsole *console, - QScriptMessageHandlerInterface *messageHandler, - QScriptDebuggerCommandSchedulerInterface *scheduler) - : QScriptDebuggerCommandSchedulerJob(dd, scheduler) -{ - Q_D(QScriptDebuggerConsoleCommandJob); - d->console = console; - d->messageHandler = messageHandler; -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptdebuggerconsolecommandjob_p.h b/src/scripttools/debugging/qscriptdebuggerconsolecommandjob_p.h deleted file mode 100644 index e652eda06..000000000 --- a/src/scripttools/debugging/qscriptdebuggerconsolecommandjob_p.h +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCONSOLECOMMANDJOB_P_H -#define QSCRIPTDEBUGGERCONSOLECOMMANDJOB_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qscriptdebuggercommandschedulerjob_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerConsole; -class QScriptMessageHandlerInterface; - -class QScriptDebuggerConsoleCommandJobPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerConsoleCommandJob - : public QScriptDebuggerCommandSchedulerJob -{ -public: - QScriptDebuggerConsoleCommandJob(QScriptDebuggerConsole *console, - QScriptMessageHandlerInterface *messageHandler, - QScriptDebuggerCommandSchedulerInterface *scheduler); - ~QScriptDebuggerConsoleCommandJob(); - -protected: - QScriptDebuggerConsoleCommandJob(QScriptDebuggerConsoleCommandJobPrivate &dd, - QScriptDebuggerConsole *console, - QScriptMessageHandlerInterface *messageHandler, - QScriptDebuggerCommandSchedulerInterface *scheduler); - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerConsoleCommandJob) - Q_DISABLE_COPY(QScriptDebuggerConsoleCommandJob) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerconsolecommandjob_p_p.h b/src/scripttools/debugging/qscriptdebuggerconsolecommandjob_p_p.h deleted file mode 100644 index cbef980ad..000000000 --- a/src/scripttools/debugging/qscriptdebuggerconsolecommandjob_p_p.h +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCONSOLECOMMANDJOB_P_P_H -#define QSCRIPTDEBUGGERCONSOLECOMMANDJOB_P_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qscriptdebuggercommandschedulerjob_p_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerConsole; -class QScriptMessageHandlerInterface; - -class QScriptDebuggerConsoleCommandJob; -class QScriptDebuggerConsoleCommandJobPrivate - : public QScriptDebuggerCommandSchedulerJobPrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerConsoleCommandJob) -public: - QScriptDebuggerConsoleCommandJobPrivate(); - ~QScriptDebuggerConsoleCommandJobPrivate(); - - QScriptDebuggerConsole *console; - QScriptMessageHandlerInterface *messageHandler; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerconsolecommandmanager.cpp b/src/scripttools/debugging/qscriptdebuggerconsolecommandmanager.cpp deleted file mode 100644 index f93ec9d40..000000000 --- a/src/scripttools/debugging/qscriptdebuggerconsolecommandmanager.cpp +++ /dev/null @@ -1,224 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerconsolecommandmanager_p.h" -#include "qscriptdebuggerconsolecommand_p.h" -#include "qscriptdebuggerconsolecommandgroupdata_p.h" - -#include -#include - -QT_BEGIN_NAMESPACE - -/*! - \since 4.5 - \class QScriptDebuggerConsoleCommandManager - \internal - - \brief The QScriptDebuggerConsoleCommandManager manages a collection of console commands. - -*/ - -class QScriptDebuggerConsoleCommandManagerPrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerConsoleCommandManager) -public: - QScriptDebuggerConsoleCommandManagerPrivate(); - ~QScriptDebuggerConsoleCommandManagerPrivate(); - - QList commands; - QMap groups; - - QScriptDebuggerConsoleCommandManager *q_ptr; -}; - -QScriptDebuggerConsoleCommandManagerPrivate::QScriptDebuggerConsoleCommandManagerPrivate() -{ - groups[QLatin1String("breakpoints")] = - QScriptDebuggerConsoleCommandGroupData(QLatin1String("Making program stop at certain points"), - QLatin1String("")); - groups[QLatin1String("files")] = - QScriptDebuggerConsoleCommandGroupData(QLatin1String("Examining files"), - QLatin1String("")); - groups[QLatin1String("stack")] = - QScriptDebuggerConsoleCommandGroupData(QLatin1String("Examining the stack"), - QLatin1String("")); - groups[QLatin1String("running")] = - QScriptDebuggerConsoleCommandGroupData(QLatin1String("Running the program"), - QLatin1String("")); - groups[QLatin1String("status")] = - QScriptDebuggerConsoleCommandGroupData(QLatin1String("Status inquiries"), - QLatin1String("")); - groups[QLatin1String("void")] = - QScriptDebuggerConsoleCommandGroupData(QLatin1String("No such group"), - QLatin1String("It's a secret to everyone")); -} - -QScriptDebuggerConsoleCommandManagerPrivate::~QScriptDebuggerConsoleCommandManagerPrivate() -{ - qDeleteAll(commands); -} - -QScriptDebuggerConsoleCommandManager::QScriptDebuggerConsoleCommandManager() - : d_ptr(new QScriptDebuggerConsoleCommandManagerPrivate) -{ - d_ptr->q_ptr = this; -} - -QScriptDebuggerConsoleCommandManager::~QScriptDebuggerConsoleCommandManager() -{ -} - -/*! - Adds the given \a command. - The manager takes ownership of the command. -*/ -void QScriptDebuggerConsoleCommandManager::addCommand(QScriptDebuggerConsoleCommand *command) -{ - Q_D(QScriptDebuggerConsoleCommandManager); - Q_ASSERT(command != 0); - if (Q_UNLIKELY(command->name().isEmpty())) { - qWarning("addCommand(): nameless command ignored"); - return; - } - if (Q_UNLIKELY(command->group().isEmpty())) { - qWarning("addCommand(): groupless command '%s' ignored", - qPrintable(command->name())); - return; - } - if (Q_UNLIKELY(findCommand(command->name()) != 0)) { - qWarning("addCommand(): duplicate command '%s' (group '%s') ignored", - qPrintable(command->name()), qPrintable(command->group())); - return; - } - if (Q_UNLIKELY(!d->groups.contains(command->group()))) { - qWarning("addCommand(): group '%s' for command '%s' is unknown!", - qPrintable(command->group()), qPrintable(command->name())); - } - d->commands.append(command); -} - -/*! - Registers a command group with the given \a name and \a data. -*/ -void QScriptDebuggerConsoleCommandManager::addCommandGroup( - const QString &name, const QScriptDebuggerConsoleCommandGroupData &data) -{ - Q_D(QScriptDebuggerConsoleCommandManager); - if (Q_UNLIKELY(name.isEmpty())) { - qWarning("addCommandGroup(): nameless group ignored"); - return; - } - if (Q_UNLIKELY(d->groups.contains(name))) { - qWarning("addCommandGroup(): group '%s' already defined", - qPrintable(name)); - return; - } - d->groups[name] = data; -} - -/*! - Returns the command with the given \a name if one exists, otherwise - returns 0. -*/ -QScriptDebuggerConsoleCommand *QScriptDebuggerConsoleCommandManager::findCommand(const QString &name) const -{ - Q_D(const QScriptDebuggerConsoleCommandManager); - for (int i = 0; i < d->commands.size(); ++i) { - QScriptDebuggerConsoleCommand *cmd = d->commands.at(i); - if (cmd->name() == name) - return cmd; - else if (cmd->aliases().contains(name)) - return cmd; - } - return 0; -} - -/*! - Returns the commands organized into groups. -*/ -QMap > QScriptDebuggerConsoleCommandManager::commands() const -{ - Q_D(const QScriptDebuggerConsoleCommandManager); - QMap > result; - for (int i = 0; i < d->commands.size(); ++i) { - QScriptDebuggerConsoleCommand *cmd = d->commands.at(i); - result[cmd->group()].append(cmd); - } - return result; -} - -/*! - Returns commands in the group of the given \a name. -*/ -QScriptDebuggerConsoleCommandList QScriptDebuggerConsoleCommandManager::commandsInGroup(const QString &name) const -{ - Q_D(const QScriptDebuggerConsoleCommandManager); - QScriptDebuggerConsoleCommandList result; - for (int i = 0; i < d->commands.size(); ++i) { - QScriptDebuggerConsoleCommand *cmd = d->commands.at(i); - if (cmd->group() == name) - result.append(cmd); - } - return result; -} - -/*! - Returns data associated with the group of the given \a name. -*/ -QScriptDebuggerConsoleCommandGroupData QScriptDebuggerConsoleCommandManager::commandGroupData(const QString &name) const -{ - Q_D(const QScriptDebuggerConsoleCommandManager); - return d->groups.value(name); -} - -/*! - Returns all command groups. -*/ -QMap QScriptDebuggerConsoleCommandManager::commandGroups() const -{ - Q_D(const QScriptDebuggerConsoleCommandManager); - return d->groups; -} - -/*! - Returns the possible completions for the given \a prefix. -*/ -QStringList QScriptDebuggerConsoleCommandManager::completions(const QString &prefix) const -{ - Q_D(const QScriptDebuggerConsoleCommandManager); - QStringList result; - for (int i = 0; i < d->commands.size(); ++i) { - QScriptDebuggerConsoleCommand *cmd = d->commands.at(i); - QStringList names; - names.append(cmd->name()); -// names += cmd->aliases(); - for (int j = 0; j < names.size(); ++j) { - const QString &name = names.at(j); - if ((name.length() > prefix.length()) && name.startsWith(prefix)) - result.append(name); - } - } - qStableSort(result); - return result; -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptdebuggerconsolecommandmanager_p.h b/src/scripttools/debugging/qscriptdebuggerconsolecommandmanager_p.h deleted file mode 100644 index bd3d89355..000000000 --- a/src/scripttools/debugging/qscriptdebuggerconsolecommandmanager_p.h +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCONSOLECOMMANDMANAGER_P_H -#define QSCRIPTDEBUGGERCONSOLECOMMANDMANAGER_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include -#include -#include - -#include "qscriptdebuggerconsolecommandgroupdata_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerConsoleCommand; -class QStringList; - -class QScriptDebuggerConsoleCommandManagerPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerConsoleCommandManager -{ -public: - QScriptDebuggerConsoleCommandManager(); - ~QScriptDebuggerConsoleCommandManager(); - - void addCommand(QScriptDebuggerConsoleCommand *command); - void addCommandGroup(const QString &name, - const QScriptDebuggerConsoleCommandGroupData &data); - - QScriptDebuggerConsoleCommand *findCommand(const QString &name) const; - QMap > commands() const; - QList commandsInGroup(const QString &name) const; - - QScriptDebuggerConsoleCommandGroupData commandGroupData(const QString &name) const; - QScriptDebuggerConsoleCommandGroupMap commandGroups() const; - - QStringList completions(const QString &prefix) const; - -private: - QScopedPointer d_ptr; - - Q_DECLARE_PRIVATE(QScriptDebuggerConsoleCommandManager) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerconsoleglobalobject.cpp b/src/scripttools/debugging/qscriptdebuggerconsoleglobalobject.cpp deleted file mode 100644 index 039b555db..000000000 --- a/src/scripttools/debugging/qscriptdebuggerconsoleglobalobject.cpp +++ /dev/null @@ -1,444 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerconsoleglobalobject_p.h" -#include "qscriptdebuggercommandschedulerinterface_p.h" -#include "qscriptdebuggercommandschedulerfrontend_p.h" -#include "qscriptmessagehandlerinterface_p.h" -#include "qscriptdebuggerconsole_p.h" -#include "qscriptdebuggerconsolecommandmanager_p.h" - -#include "qobject_p.h" - -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerConsoleGlobalObjectPrivate : public QObjectPrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerConsoleGlobalObject) -public: - QScriptDebuggerConsoleGlobalObjectPrivate(); - ~QScriptDebuggerConsoleGlobalObjectPrivate(); - - QScriptDebuggerCommandSchedulerInterface *scheduler; - QScriptDebuggerResponseHandlerInterface *responseHandler; - QScriptMessageHandlerInterface *messageHandler; - QScriptDebuggerConsole *console; -}; - -QScriptDebuggerConsoleGlobalObjectPrivate::QScriptDebuggerConsoleGlobalObjectPrivate() -{ - scheduler = 0; - responseHandler = 0; - messageHandler = 0; - console = 0; -} - -QScriptDebuggerConsoleGlobalObjectPrivate::~QScriptDebuggerConsoleGlobalObjectPrivate() -{ -} - -QScriptDebuggerConsoleGlobalObject::QScriptDebuggerConsoleGlobalObject(QObject *parent) - : QObject(*new QScriptDebuggerConsoleGlobalObjectPrivate, parent) -{ -} - -QScriptDebuggerConsoleGlobalObject::~QScriptDebuggerConsoleGlobalObject() -{ -} - -QScriptDebuggerCommandSchedulerInterface *QScriptDebuggerConsoleGlobalObject::scheduler() const -{ - Q_D(const QScriptDebuggerConsoleGlobalObject); - return d->scheduler; -} - -void QScriptDebuggerConsoleGlobalObject::setScheduler(QScriptDebuggerCommandSchedulerInterface *scheduler) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - d->scheduler = scheduler; -} - -QScriptDebuggerResponseHandlerInterface *QScriptDebuggerConsoleGlobalObject::responseHandler() const -{ - Q_D(const QScriptDebuggerConsoleGlobalObject); - return d->responseHandler; -} - -void QScriptDebuggerConsoleGlobalObject::setResponseHandler( - QScriptDebuggerResponseHandlerInterface *responseHandler) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - d->responseHandler = responseHandler; -} - -QScriptMessageHandlerInterface *QScriptDebuggerConsoleGlobalObject::messageHandler() const -{ - Q_D(const QScriptDebuggerConsoleGlobalObject); - return d->messageHandler; -} - -void QScriptDebuggerConsoleGlobalObject::setMessageHandler(QScriptMessageHandlerInterface *messageHandler) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - d->messageHandler = messageHandler; -} - -QScriptDebuggerConsole *QScriptDebuggerConsoleGlobalObject::console() const -{ - Q_D(const QScriptDebuggerConsoleGlobalObject); - return d->console; -} - -void QScriptDebuggerConsoleGlobalObject::setConsole(QScriptDebuggerConsole *console) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - d->console = console; -} - -// ### the scheduleXXX functions could take a callback function as argument (rather than using the -// global handleResponse() function) - -int QScriptDebuggerConsoleGlobalObject::scheduleInterrupt() -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleInterrupt(); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleContinue() -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleContinue(); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleStepInto(int count) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleStepInto(count); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleStepOver(int count) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleStepOver(count); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleStepOut() -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleStepOut(); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleRunToLocation(const QString &fileName, int lineNumber) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleRunToLocation(fileName, lineNumber); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleRunToLocation(qint64 scriptId, int lineNumber) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleRunToLocation(scriptId, lineNumber); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleForceReturn(int contextIndex, const QScriptDebuggerValue &value) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleForceReturn(contextIndex, value); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleSetBreakpoint(const QScriptBreakpointData &data) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleSetBreakpoint(data); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleDeleteBreakpoint(int id) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleDeleteBreakpoint(id); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleDeleteAllBreakpoints() -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleDeleteAllBreakpoints(); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleGetBreakpoints() -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleGetBreakpoints(); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleGetBreakpointData(int id) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleGetBreakpointData(id); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleSetBreakpointData(int id, const QScriptBreakpointData &data) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleSetBreakpointData(id, data); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleGetScripts() -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleGetScripts(); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleGetScriptData(qint64 id) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleGetScriptData(id); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleScriptsCheckpoint() -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleScriptsCheckpoint(); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleGetScriptsDelta() -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleGetScriptsDelta(); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleResolveScript(const QString &fileName) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleResolveScript(fileName); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleGetBacktrace() -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleGetBacktrace(); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleGetThisObject(int contextIndex) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleGetThisObject(contextIndex); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleGetActivationObject(int contextIndex) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleGetActivationObject(contextIndex); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleGetContextCount() -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleGetContextCount(); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleGetContextInfo(int contextIndex) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleGetContextInfo(contextIndex); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleNewScriptValueIterator(const QScriptDebuggerValue &object) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleNewScriptValueIterator(object); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleGetPropertiesByIterator(int id, int count) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleGetPropertiesByIterator(id, count); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleDeleteScriptValueIterator(int id) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleDeleteScriptValueIterator(id); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleEvaluate(int contextIndex, const QString &program, - const QString &fileName, - int lineNumber) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleEvaluate(contextIndex, program, fileName, lineNumber); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleScriptValueToString(const QScriptDebuggerValue &value) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleScriptValueToString(value); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleClearExceptions() -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - QScriptDebuggerCommandSchedulerFrontend frontend(d->scheduler, d->responseHandler); - return frontend.scheduleClearExceptions(); -} - -int QScriptDebuggerConsoleGlobalObject::scheduleCommand(const QScriptDebuggerCommand &command) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - return d->scheduler->scheduleCommand(command, d->responseHandler); -} - -void QScriptDebuggerConsoleGlobalObject::warning(const QString &text, - const QString &fileName, - int lineNumber, int columnNumber) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - Q_ASSERT(d->messageHandler != 0); - d->messageHandler->message(QtWarningMsg, text, fileName, lineNumber, columnNumber); -} - -void QScriptDebuggerConsoleGlobalObject::message(const QString &text, - const QString &fileName, - int lineNumber, int columnNumber) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - Q_ASSERT(d->messageHandler != 0); - d->messageHandler->message(QtDebugMsg, text, fileName, lineNumber, columnNumber); -} - -void QScriptDebuggerConsoleGlobalObject::error(const QString &text, - const QString &fileName, - int lineNumber, int columnNumber) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - Q_ASSERT(d->messageHandler != 0); - d->messageHandler->message(QtCriticalMsg, text, fileName, lineNumber, columnNumber); -} - -int QScriptDebuggerConsoleGlobalObject::getCurrentFrameIndex() const -{ - Q_D(const QScriptDebuggerConsoleGlobalObject); - return d->console->currentFrameIndex(); -} - -void QScriptDebuggerConsoleGlobalObject::setCurrentFrameIndex(int index) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - d->console->setCurrentFrameIndex(index); -} - -int QScriptDebuggerConsoleGlobalObject::getCurrentLineNumber() const -{ - Q_D(const QScriptDebuggerConsoleGlobalObject); - return d->console->currentLineNumber(); -} - -void QScriptDebuggerConsoleGlobalObject::setCurrentLineNumber(int lineNumber) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - d->console->setCurrentLineNumber(lineNumber); -} - -qint64 QScriptDebuggerConsoleGlobalObject::getCurrentScriptId() const -{ - Q_D(const QScriptDebuggerConsoleGlobalObject); - return d->console->currentScriptId(); -} - -void QScriptDebuggerConsoleGlobalObject::setCurrentScriptId(qint64 id) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - d->console->setCurrentScriptId(id); -} - -qint64 QScriptDebuggerConsoleGlobalObject::getSessionId() const -{ - Q_D(const QScriptDebuggerConsoleGlobalObject); - return d->console->sessionId(); -} - -QScriptDebuggerConsoleCommandGroupMap QScriptDebuggerConsoleGlobalObject::getCommandGroups() const -{ - Q_D(const QScriptDebuggerConsoleGlobalObject); - return d->console->commandManager()->commandGroups(); -} - -QScriptDebuggerConsoleCommand *QScriptDebuggerConsoleGlobalObject::findCommand(const QString &name) const -{ - Q_D(const QScriptDebuggerConsoleGlobalObject); - return d->console->commandManager()->findCommand(name); -} - -QScriptDebuggerConsoleCommandList QScriptDebuggerConsoleGlobalObject::getCommandsInGroup(const QString &name) const -{ - Q_D(const QScriptDebuggerConsoleGlobalObject); - return d->console->commandManager()->commandsInGroup(name); -} - -QStringList QScriptDebuggerConsoleGlobalObject::getCommandCompletions(const QString &prefix) const -{ - Q_D(const QScriptDebuggerConsoleGlobalObject); - return d->console->commandManager()->completions(prefix); -} - -bool QScriptDebuggerConsoleGlobalObject::checkSyntax(const QString &program) -{ - return (QScriptEngine::checkSyntax(program).state() == QScriptSyntaxCheckResult::Valid); -} - -void QScriptDebuggerConsoleGlobalObject::setEvaluateAction(int action) -{ - Q_D(QScriptDebuggerConsoleGlobalObject); - d->console->setEvaluateAction(action); -} - -QT_END_NAMESPACE -#include "moc_qscriptdebuggerconsoleglobalobject_p.h" diff --git a/src/scripttools/debugging/qscriptdebuggerconsoleglobalobject_p.h b/src/scripttools/debugging/qscriptdebuggerconsoleglobalobject_p.h deleted file mode 100644 index f0f031220..000000000 --- a/src/scripttools/debugging/qscriptdebuggerconsoleglobalobject_p.h +++ /dev/null @@ -1,152 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCONSOLEGLOBALOBJECT_P_H -#define QSCRIPTDEBUGGERCONSOLEGLOBALOBJECT_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include - -#include "qscriptdebuggerconsolecommandgroupdata_p.h" -#include "qscriptdebuggerconsolecommand_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerCommandSchedulerInterface; -class QScriptMessageHandlerInterface; -class QScriptDebuggerResponseHandlerInterface; -class QScriptDebuggerConsole; -class QScriptDebuggerValue; -class QScriptDebuggerCommand; -class QScriptBreakpointData; - -class QScriptDebuggerConsoleGlobalObjectPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerConsoleGlobalObject - : public QObject -{ - Q_OBJECT -public: - QScriptDebuggerConsoleGlobalObject(QObject *parent = nullptr); - ~QScriptDebuggerConsoleGlobalObject(); - - QScriptDebuggerCommandSchedulerInterface *scheduler() const; - void setScheduler(QScriptDebuggerCommandSchedulerInterface *scheduler); - - QScriptDebuggerResponseHandlerInterface *responseHandler() const; - void setResponseHandler(QScriptDebuggerResponseHandlerInterface *responseHandler); - - QScriptMessageHandlerInterface *messageHandler() const; - void setMessageHandler(QScriptMessageHandlerInterface *messageHandler); - - QScriptDebuggerConsole *console() const; - void setConsole(QScriptDebuggerConsole *console); - -public Q_SLOTS: - // frontend - int scheduleInterrupt(); - int scheduleContinue(); - int scheduleStepInto(int count = 1); - int scheduleStepOver(int count = 1); - int scheduleStepOut(); - int scheduleRunToLocation(const QString &fileName, int lineNumber); - int scheduleRunToLocation(qint64 scriptId, int lineNumber); - int scheduleForceReturn(int contextIndex, const QScriptDebuggerValue &value); - - int scheduleSetBreakpoint(const QScriptBreakpointData &data); - int scheduleDeleteBreakpoint(int id); - int scheduleDeleteAllBreakpoints(); - int scheduleGetBreakpoints(); - int scheduleGetBreakpointData(int id); - int scheduleSetBreakpointData(int id, const QScriptBreakpointData &data); - - int scheduleGetScripts(); - int scheduleGetScriptData(qint64 id); - int scheduleScriptsCheckpoint(); - int scheduleGetScriptsDelta(); - int scheduleResolveScript(const QString &fileName); - - int scheduleGetBacktrace(); - int scheduleGetThisObject(int contextIndex); - int scheduleGetActivationObject(int contextIndex); - int scheduleGetContextCount(); - int scheduleGetContextInfo(int contextIndex); - - int scheduleNewScriptValueIterator(const QScriptDebuggerValue &object); - int scheduleGetPropertiesByIterator(int id, int count); - int scheduleDeleteScriptValueIterator(int id); - - int scheduleEvaluate(int contextIndex, const QString &program, - const QString &fileName = QString(), - int lineNumber = 1); - - int scheduleScriptValueToString(const QScriptDebuggerValue &value); - - int scheduleClearExceptions(); - - int scheduleCommand(const QScriptDebuggerCommand &command); - - // message handler - void message(const QString &text, const QString &fileName = QString(), - int lineNumber = -1, int columnNumber = -1); - void warning(const QString &text, const QString &fileName = QString(), - int lineNumber = -1, int columnNumber = -1); - void error(const QString &text, const QString &fileName = QString(), - int lineNumber = -1, int columnNumber = -1); - - // console state - int getCurrentFrameIndex() const; - void setCurrentFrameIndex(int index); - qint64 getCurrentScriptId() const; - void setCurrentScriptId(qint64 id); - qint64 getSessionId() const; - int getCurrentLineNumber() const; - void setCurrentLineNumber(int lineNumber); - - // command introspection - QScriptDebuggerConsoleCommandGroupMap getCommandGroups() const; - QScriptDebuggerConsoleCommand *findCommand(const QString &command) const; - QScriptDebuggerConsoleCommandList getCommandsInGroup(const QString &name) const; - QStringList getCommandCompletions(const QString &prefix) const; - - bool checkSyntax(const QString &program); - - void setEvaluateAction(int action); - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerConsoleGlobalObject) - Q_DISABLE_COPY(QScriptDebuggerConsoleGlobalObject) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerconsolehistorianinterface_p.h b/src/scripttools/debugging/qscriptdebuggerconsolehistorianinterface_p.h deleted file mode 100644 index 2b2e658da..000000000 --- a/src/scripttools/debugging/qscriptdebuggerconsolehistorianinterface_p.h +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCONSOLEHISTORIANINTERFACE_P_H -#define QSCRIPTDEBUGGERCONSOLEHISTORIANINTERFACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -QT_BEGIN_NAMESPACE - -class QString; - -class Q_AUTOTEST_EXPORT QScriptDebuggerConsoleHistorianInterface -{ -public: - virtual ~QScriptDebuggerConsoleHistorianInterface() {} - - virtual int historyCount() const = 0; - virtual QString historyAt(int index) const = 0; - virtual void changeHistoryAt(int index, const QString &newHistory) = 0; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerconsolewidget.cpp b/src/scripttools/debugging/qscriptdebuggerconsolewidget.cpp deleted file mode 100644 index a60050ca9..000000000 --- a/src/scripttools/debugging/qscriptdebuggerconsolewidget.cpp +++ /dev/null @@ -1,419 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerconsolewidget_p.h" -#include "qscriptdebuggerconsolewidgetinterface_p_p.h" -#include "qscriptdebuggerconsolehistorianinterface_p.h" -#include "qscriptcompletionproviderinterface_p.h" -#include "qscriptcompletiontaskinterface_p.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class PromptLabel : public QLabel -{ -public: - PromptLabel(QWidget *parent = nullptr) - : QLabel(parent) - { - setFrameShape(QFrame::NoFrame); - setIndent(2); - setMargin(2); - setSizePolicy(QSizePolicy::Minimum, sizePolicy().verticalPolicy()); - setAlignment(Qt::AlignHCenter); -#ifndef QT_NO_STYLE_STYLESHEET - setStyleSheet(QLatin1String("background: white;")); -#endif - } - - QSize sizeHint() const { - QFontMetrics fm(font()); - return fm.size(0, text()) + QSize(8, 0); - } -}; - -class InputEdit : public QLineEdit -{ -public: - InputEdit(QWidget *parent = nullptr) - : QLineEdit(parent) - { - setFrame(false); - setSizePolicy(QSizePolicy::MinimumExpanding, sizePolicy().verticalPolicy()); - } -}; - -class CommandLine : public QWidget -{ - Q_OBJECT -public: - CommandLine(QWidget *parent = nullptr) - : QWidget(parent) - { - promptLabel = new PromptLabel(); - inputEdit = new InputEdit(); - QHBoxLayout *hbox = new QHBoxLayout(this); - hbox->setSpacing(0); - hbox->setMargin(0); - hbox->addWidget(promptLabel); - hbox->addWidget(inputEdit); - - QObject::connect(inputEdit, SIGNAL(returnPressed()), - this, SLOT(onReturnPressed())); - QObject::connect(inputEdit, SIGNAL(textEdited(QString)), - this, SIGNAL(lineEdited(QString))); - - setFocusProxy(inputEdit); - } - - QString prompt() const - { - return promptLabel->text(); - } - void setPrompt(const QString &prompt) - { - promptLabel->setText(prompt); - } - - QString input() const - { - return inputEdit->text(); - } - void setInput(const QString &input) - { - inputEdit->setText(input); - } - - int cursorPosition() const - { - return inputEdit->cursorPosition(); - } - void setCursorPosition(int position) - { - inputEdit->setCursorPosition(position); - } - - QWidget *editor() const - { - return inputEdit; - } - -Q_SIGNALS: - void lineEntered(const QString &contents); - void lineEdited(const QString &contents); - -private Q_SLOTS: - void onReturnPressed() - { - QString text = inputEdit->text(); - inputEdit->clear(); - emit lineEntered(text); - } - -private: - PromptLabel *promptLabel; - InputEdit *inputEdit; -}; - -class QScriptDebuggerConsoleWidgetOutputEdit : public QPlainTextEdit -{ -public: - QScriptDebuggerConsoleWidgetOutputEdit(QWidget *parent = nullptr) - : QPlainTextEdit(parent) - { - setFrameShape(QFrame::NoFrame); - setReadOnly(true); -// ### there's no context menu when the edit can't have focus, -// even though you can select text in it. -// setFocusPolicy(Qt::NoFocus); - setMaximumBlockCount(2500); - } - - void scrollToBottom() - { - QScrollBar *bar = verticalScrollBar(); - bar->setValue(bar->maximum()); - } - - int charactersPerLine() const - { - QFontMetrics fm(font()); - return width() / fm.maxWidth(); - } -}; - -class QScriptDebuggerConsoleWidgetPrivate - : public QScriptDebuggerConsoleWidgetInterfacePrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerConsoleWidget) -public: - QScriptDebuggerConsoleWidgetPrivate(); - ~QScriptDebuggerConsoleWidgetPrivate(); - - // private slots - void _q_onLineEntered(const QString &contents); - void _q_onLineEdited(const QString &contents); - void _q_onCompletionTaskFinished(); - - CommandLine *commandLine; - QScriptDebuggerConsoleWidgetOutputEdit *outputEdit; - int historyIndex; - QString newInput; -}; - -QScriptDebuggerConsoleWidgetPrivate::QScriptDebuggerConsoleWidgetPrivate() -{ - historyIndex = -1; -} - -QScriptDebuggerConsoleWidgetPrivate::~QScriptDebuggerConsoleWidgetPrivate() -{ -} - -void QScriptDebuggerConsoleWidgetPrivate::_q_onLineEntered(const QString &contents) -{ - Q_Q(QScriptDebuggerConsoleWidget); - outputEdit->appendPlainText(QString::fromLatin1("%0 %1").arg(commandLine->prompt()).arg(contents)); - outputEdit->scrollToBottom(); - historyIndex = -1; - newInput.clear(); - emit q->lineEntered(contents); -} - -void QScriptDebuggerConsoleWidgetPrivate::_q_onLineEdited(const QString &contents) -{ - if (historyIndex != -1) { - // ### try to get the bash behavior... -#if 0 - historian->changeHistoryAt(historyIndex, contents); -#endif - } else { - newInput = contents; - } -} - -static bool lengthLessThan(const QString &s1, const QString &s2) -{ - return s1.length() < s2.length(); -} - -// input must be sorted by length already -static QString longestCommonPrefix(const QStringList &lst) -{ - QString result = lst.last(); - for (int i = lst.size() - 2; (i >= 0) && !result.isEmpty(); --i) { - const QString &s = lst.at(i); - int j = 0; - for ( ; (j < qMin(s.length(), result.length())) && (s.at(j) == result.at(j)); ++j) - ; - result = result.left(j); - } - return result; -} - -void QScriptDebuggerConsoleWidgetPrivate::_q_onCompletionTaskFinished() -{ - QScriptCompletionTaskInterface *task = 0; - task = qobject_cast(q_func()->sender()); - if (task->resultCount() == 1) { - QString completion = task->resultAt(0); - completion.append(task->appendix()); - QString tmp = commandLine->input(); - tmp.remove(task->position(), task->length()); - tmp.insert(task->position(), completion); - commandLine->setInput(tmp); - } else if (task->resultCount() > 1) { - { - QStringList lst; - for (int i = 0; i < task->resultCount(); ++i) - lst.append(task->resultAt(i).mid(task->length())); - qSort(lst.begin(), lst.end(), lengthLessThan); - QString lcp = longestCommonPrefix(lst); - if (!lcp.isEmpty()) { - QString tmp = commandLine->input(); - tmp.insert(task->position() + task->length(), lcp); - commandLine->setInput(tmp); - } - } - - outputEdit->appendPlainText(QString::fromLatin1("%0 %1") - .arg(commandLine->prompt()).arg(commandLine->input())); - int maxLength = 0; - for (int i = 0; i < task->resultCount(); ++i) - maxLength = qMax(maxLength, task->resultAt(i).length()); - Q_ASSERT(maxLength > 0); - int tab = 8; - int columns = qMax(1, outputEdit->charactersPerLine() / (maxLength + tab)); - QString msg; - for (int i = 0; i < task->resultCount(); ++i) { - if (i != 0) { - if ((i % columns) == 0) { - outputEdit->appendPlainText(msg); - msg.clear(); - } else { - int pad = maxLength + tab - (msg.length() % (maxLength + tab)); - msg.append(QString(pad, QLatin1Char(' '))); - } - } - msg.append(task->resultAt(i)); - } - if (!msg.isEmpty()) - outputEdit->appendPlainText(msg); - outputEdit->scrollToBottom(); - } - task->deleteLater(); -} - -QScriptDebuggerConsoleWidget::QScriptDebuggerConsoleWidget(QWidget *parent) - : QScriptDebuggerConsoleWidgetInterface(*new QScriptDebuggerConsoleWidgetPrivate, parent, 0) -{ - Q_D(QScriptDebuggerConsoleWidget); - d->commandLine = new CommandLine(); - d->commandLine->setPrompt(QString::fromLatin1("qsdb>")); - d->outputEdit = new QScriptDebuggerConsoleWidgetOutputEdit(); - QVBoxLayout *vbox = new QVBoxLayout(this); - vbox->setSpacing(0); - vbox->setMargin(0); - vbox->addWidget(d->outputEdit); - vbox->addWidget(d->commandLine); - -#if 0 - QString sheet = QString::fromLatin1("background-color: black;" - "color: aquamarine;" - "font-size: 14px;" - "font-family: \"Monospace\""); -#endif -#ifndef QT_NO_STYLE_STYLESHEET - QString sheet = QString::fromLatin1("font-size: 14px; font-family: \"Monospace\";"); - setStyleSheet(sheet); -#endif - - QObject::connect(d->commandLine, SIGNAL(lineEntered(QString)), - this, SLOT(_q_onLineEntered(QString))); - QObject::connect(d->commandLine, SIGNAL(lineEdited(QString)), - this, SLOT(_q_onLineEdited(QString))); -} - -QScriptDebuggerConsoleWidget::~QScriptDebuggerConsoleWidget() -{ -} - -void QScriptDebuggerConsoleWidget::message( - QtMsgType type, const QString &text, const QString &fileName, - int lineNumber, int columnNumber, const QVariant &/*data*/) -{ - Q_D(QScriptDebuggerConsoleWidget); - QString msg; - if (!fileName.isEmpty() || (lineNumber != -1)) { - if (!fileName.isEmpty()) - msg.append(fileName); - else - msg.append(QLatin1String("")); - if (lineNumber != -1) { - msg.append(QLatin1Char(':')); - msg.append(QString::number(lineNumber)); - if (columnNumber != -1) { - msg.append(QLatin1Char(':')); - msg.append(QString::number(columnNumber)); - } - } - msg.append(QLatin1String(": ")); - } - msg.append(text); - QTextCharFormat oldFmt = d->outputEdit->currentCharFormat(); - QTextCharFormat fmt(oldFmt); - if (type == QtCriticalMsg) { - fmt.setForeground(Qt::red); - d->outputEdit->setCurrentCharFormat(fmt); - } - d->outputEdit->appendPlainText(msg); - d->outputEdit->setCurrentCharFormat(oldFmt); - d->outputEdit->scrollToBottom(); -} - -void QScriptDebuggerConsoleWidget::setLineContinuationMode(bool enabled) -{ - Q_D(QScriptDebuggerConsoleWidget); - QString prompt = enabled - ? QString::fromLatin1("....") - : QString::fromLatin1("qsdb>"); - d->commandLine->setPrompt(prompt); -} - -void QScriptDebuggerConsoleWidget::clear() -{ - Q_D(QScriptDebuggerConsoleWidget); - d->outputEdit->clear(); -} - -void QScriptDebuggerConsoleWidget::keyPressEvent(QKeyEvent *event) -{ - Q_D(QScriptDebuggerConsoleWidget); - if (event->key() == Qt::Key_Up) { - if (d->historyIndex+1 == d->historian->historyCount()) - return; - QString cmd = d->historian->historyAt(++d->historyIndex); - d->commandLine->setInput(cmd); - } else if (event->key() == Qt::Key_Down) { - if (d->historyIndex == -1) { - // nothing to do - } else if (d->historyIndex == 0) { - d->commandLine->setInput(d->newInput); - --d->historyIndex; - } else { - QString cmd = d->historian->historyAt(--d->historyIndex); - d->commandLine->setInput(cmd); - } - } else if (event->key() == Qt::Key_Tab) { - QScriptCompletionTaskInterface *task = 0; - task = d->completionProvider->createCompletionTask( - d->commandLine->input(), d->commandLine->cursorPosition(), - /*frameIndex=*/-1, // current frame - QScriptCompletionProviderInterface::ConsoleCommandCompletion); - QObject::connect(task, SIGNAL(finished()), - this, SLOT(_q_onCompletionTaskFinished())); - task->start(); - } else { - QScriptDebuggerConsoleWidgetInterface::keyPressEvent(event); - } -} - -bool QScriptDebuggerConsoleWidget::focusNextPrevChild(bool b) -{ - Q_D(QScriptDebuggerConsoleWidget); - if (d->outputEdit->hasFocus()) - return QScriptDebuggerConsoleWidgetInterface::focusNextPrevChild(b); - else - return false; -} - -QT_END_NAMESPACE - -#include "moc_qscriptdebuggerconsolewidget.cpp" -#include "moc_qscriptdebuggerconsolewidget_p.h" diff --git a/src/scripttools/debugging/qscriptdebuggerconsolewidget_p.h b/src/scripttools/debugging/qscriptdebuggerconsolewidget_p.h deleted file mode 100644 index ba2620d51..000000000 --- a/src/scripttools/debugging/qscriptdebuggerconsolewidget_p.h +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCONSOLEWIDGET_P_H -#define QSCRIPTDEBUGGERCONSOLEWIDGET_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qscriptdebuggerconsolewidgetinterface_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerConsoleWidgetPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerConsoleWidget: - public QScriptDebuggerConsoleWidgetInterface -{ - Q_OBJECT -public: - QScriptDebuggerConsoleWidget(QWidget *parent = nullptr); - ~QScriptDebuggerConsoleWidget(); - - void message(QtMsgType type, const QString &text, - const QString &fileName = QString(), - int lineNumber = -1, int columnNumber = -1, - const QVariant &data = QVariant()); - - void setLineContinuationMode(bool enabled); - - void clear(); - -protected: - void keyPressEvent(QKeyEvent *event); - bool focusNextPrevChild(bool); - -protected: - QScriptDebuggerConsoleWidget( - QScriptDebuggerConsoleWidgetPrivate &dd, - QWidget *parent); - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerConsoleWidget) - Q_DISABLE_COPY(QScriptDebuggerConsoleWidget) - - Q_PRIVATE_SLOT(d_func(), void _q_onLineEntered(const QString &)) - Q_PRIVATE_SLOT(d_func(), void _q_onLineEdited(const QString &)) - Q_PRIVATE_SLOT(d_func(), void _q_onCompletionTaskFinished()) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerconsolewidgetinterface.cpp b/src/scripttools/debugging/qscriptdebuggerconsolewidgetinterface.cpp deleted file mode 100644 index 78e4f8ce6..000000000 --- a/src/scripttools/debugging/qscriptdebuggerconsolewidgetinterface.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerconsolewidgetinterface_p.h" -#include "qscriptdebuggerconsolewidgetinterface_p_p.h" - -QT_BEGIN_NAMESPACE - -QScriptDebuggerConsoleWidgetInterfacePrivate::QScriptDebuggerConsoleWidgetInterfacePrivate() -{ - historian = 0; - completionProvider = 0; -} - -QScriptDebuggerConsoleWidgetInterfacePrivate::~QScriptDebuggerConsoleWidgetInterfacePrivate() -{ -} - -QScriptDebuggerConsoleWidgetInterface::~QScriptDebuggerConsoleWidgetInterface() -{ -} - -QScriptDebuggerConsoleWidgetInterface::QScriptDebuggerConsoleWidgetInterface( - QScriptDebuggerConsoleWidgetInterfacePrivate &dd, - QWidget *parent, Qt::WindowFlags flags) - : QWidget(dd, parent, flags) -{ -} - -QScriptDebuggerConsoleHistorianInterface *QScriptDebuggerConsoleWidgetInterface::commandHistorian() const -{ - Q_D(const QScriptDebuggerConsoleWidgetInterface); - return d->historian; -} - -void QScriptDebuggerConsoleWidgetInterface::setCommandHistorian( - QScriptDebuggerConsoleHistorianInterface *historian) -{ - Q_D(QScriptDebuggerConsoleWidgetInterface); - d->historian = historian; -} - -QScriptCompletionProviderInterface *QScriptDebuggerConsoleWidgetInterface::completionProvider() const -{ - Q_D(const QScriptDebuggerConsoleWidgetInterface); - return d->completionProvider; -} - -void QScriptDebuggerConsoleWidgetInterface::setCompletionProvider( - QScriptCompletionProviderInterface *completionProvider) -{ - Q_D(QScriptDebuggerConsoleWidgetInterface); - d->completionProvider = completionProvider; -} - -QT_END_NAMESPACE -#include "moc_qscriptdebuggerconsolewidgetinterface_p.h" diff --git a/src/scripttools/debugging/qscriptdebuggerconsolewidgetinterface_p.h b/src/scripttools/debugging/qscriptdebuggerconsolewidgetinterface_p.h deleted file mode 100644 index 9732c5b25..000000000 --- a/src/scripttools/debugging/qscriptdebuggerconsolewidgetinterface_p.h +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCONSOLEWIDGETINTERFACE_P_H -#define QSCRIPTDEBUGGERCONSOLEWIDGETINTERFACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include "qscriptmessagehandlerinterface_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerConsoleHistorianInterface; -class QScriptCompletionProviderInterface; - -class QScriptDebuggerConsoleWidgetInterfacePrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerConsoleWidgetInterface: - public QWidget, - public QScriptMessageHandlerInterface -{ - Q_OBJECT -public: - enum InputMode { - NormalInputMode, - PartialInputMode - }; - - ~QScriptDebuggerConsoleWidgetInterface(); - - QScriptDebuggerConsoleHistorianInterface *commandHistorian() const; - void setCommandHistorian(QScriptDebuggerConsoleHistorianInterface *historian); - - QScriptCompletionProviderInterface *completionProvider() const; - void setCompletionProvider(QScriptCompletionProviderInterface *completionProvider); - - virtual void setLineContinuationMode(bool enabled) = 0; - - virtual void clear() = 0; - -Q_SIGNALS: - void lineEntered(const QString &contents); - -protected: - QScriptDebuggerConsoleWidgetInterface(QScriptDebuggerConsoleWidgetInterfacePrivate &dd, - QWidget *parent, Qt::WindowFlags flags); - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerConsoleWidgetInterface) - Q_DISABLE_COPY(QScriptDebuggerConsoleWidgetInterface) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerconsolewidgetinterface_p_p.h b/src/scripttools/debugging/qscriptdebuggerconsolewidgetinterface_p_p.h deleted file mode 100644 index 6c30a01e3..000000000 --- a/src/scripttools/debugging/qscriptdebuggerconsolewidgetinterface_p_p.h +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCONSOLEWIDGETINTERFACE_P_P_H -#define QSCRIPTDEBUGGERCONSOLEWIDGETINTERFACE_P_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qwidget_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerConsoleHistorianInterface; -class QScriptCompletionProviderInterface; - -class QScriptDebuggerConsoleWidgetInterface; -class QScriptDebuggerConsoleWidgetInterfacePrivate - : public QWidgetPrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerConsoleWidgetInterface) -public: - QScriptDebuggerConsoleWidgetInterfacePrivate(); - ~QScriptDebuggerConsoleWidgetInterfacePrivate(); - - QScriptDebuggerConsoleHistorianInterface *historian; - QScriptCompletionProviderInterface *completionProvider; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerevent.cpp b/src/scripttools/debugging/qscriptdebuggerevent.cpp deleted file mode 100644 index ea4b1c852..000000000 --- a/src/scripttools/debugging/qscriptdebuggerevent.cpp +++ /dev/null @@ -1,299 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerevent_p.h" -#include "qscriptdebuggervalue_p.h" -#include "qscripttoolscommon_p.h" - -#include -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerEventPrivate -{ -public: - QScriptDebuggerEventPrivate(); - ~QScriptDebuggerEventPrivate(); - - QScriptDebuggerEvent::Type type; - QHash attributes; -}; - -QScriptDebuggerEventPrivate::QScriptDebuggerEventPrivate() - : type(QScriptDebuggerEvent::None) -{ -} - -QScriptDebuggerEventPrivate::~QScriptDebuggerEventPrivate() -{ -} - -QScriptDebuggerEvent::QScriptDebuggerEvent() - : d_ptr(new QScriptDebuggerEventPrivate) -{ - d_ptr->type = None; -} - -QScriptDebuggerEvent::QScriptDebuggerEvent(Type type) - : d_ptr(new QScriptDebuggerEventPrivate) -{ - d_ptr->type = type; -} - -QScriptDebuggerEvent::QScriptDebuggerEvent(Type type, qint64 scriptId, - int lineNumber, int columnNumber) - : d_ptr(new QScriptDebuggerEventPrivate) -{ - d_ptr->type = type; - d_ptr->attributes[ScriptID] = scriptId; - d_ptr->attributes[LineNumber] = lineNumber; - d_ptr->attributes[ColumnNumber] = columnNumber; -} - -QScriptDebuggerEvent::QScriptDebuggerEvent(const QScriptDebuggerEvent &other) - : d_ptr(new QScriptDebuggerEventPrivate) -{ - *d_ptr = *other.d_ptr; -} - -QScriptDebuggerEvent::~QScriptDebuggerEvent() -{ -} - -QScriptDebuggerEvent &QScriptDebuggerEvent::operator=(const QScriptDebuggerEvent &other) -{ - *d_ptr = *other.d_ptr; - return *this; -} - -QScriptDebuggerEvent::Type QScriptDebuggerEvent::type() const -{ - Q_D(const QScriptDebuggerEvent); - return d->type; -} - -QVariant QScriptDebuggerEvent::attribute(Attribute attribute, - const QVariant &defaultValue) const -{ - Q_D(const QScriptDebuggerEvent); - return d->attributes.value(attribute, defaultValue); -} - -void QScriptDebuggerEvent::setAttribute(Attribute attribute, - const QVariant &value) -{ - Q_D(QScriptDebuggerEvent); - if (!value.isValid()) - d->attributes.remove(attribute); - else - d->attributes[attribute] = value; -} - -QHash QScriptDebuggerEvent::attributes() const -{ - Q_D(const QScriptDebuggerEvent); - return d->attributes; -} - -qint64 QScriptDebuggerEvent::scriptId() const -{ - Q_D(const QScriptDebuggerEvent); - return d->attributes.value(ScriptID, -1).toLongLong(); -} - -void QScriptDebuggerEvent::setScriptId(qint64 id) -{ - Q_D(QScriptDebuggerEvent); - d->attributes[ScriptID] = id; -} - -QString QScriptDebuggerEvent::fileName() const -{ - Q_D(const QScriptDebuggerEvent); - return d->attributes.value(FileName).toString(); -} - -void QScriptDebuggerEvent::setFileName(const QString &fileName) -{ - Q_D(QScriptDebuggerEvent); - d->attributes[FileName] = fileName; -} - -int QScriptDebuggerEvent::lineNumber() const -{ - Q_D(const QScriptDebuggerEvent); - return d->attributes.value(LineNumber, -1).toInt(); -} - -void QScriptDebuggerEvent::setLineNumber(int lineNumber) -{ - Q_D(QScriptDebuggerEvent); - d->attributes[LineNumber] = lineNumber; -} - -int QScriptDebuggerEvent::columnNumber() const -{ - Q_D(const QScriptDebuggerEvent); - return d->attributes.value(ColumnNumber, -1).toInt(); -} - -void QScriptDebuggerEvent::setColumnNumber(int columnNumber) -{ - Q_D(QScriptDebuggerEvent); - d->attributes[ColumnNumber] = columnNumber; -} - -int QScriptDebuggerEvent::breakpointId() const -{ - Q_D(const QScriptDebuggerEvent); - return d->attributes.value(BreakpointID, -1).toInt(); -} - -void QScriptDebuggerEvent::setBreakpointId(int id) -{ - Q_D(QScriptDebuggerEvent); - d->attributes[BreakpointID] = id; -} - -QString QScriptDebuggerEvent::message() const -{ - Q_D(const QScriptDebuggerEvent); - return d->attributes.value(Message).toString(); -} - -void QScriptDebuggerEvent::setMessage(const QString &message) -{ - Q_D(QScriptDebuggerEvent); - d->attributes[Message] = message; -} - -QScriptDebuggerValue QScriptDebuggerEvent::scriptValue() const -{ - Q_D(const QScriptDebuggerEvent); - return qvariant_cast(d->attributes[Value]); -} - -void QScriptDebuggerEvent::setScriptValue(const QScriptDebuggerValue &value) -{ - Q_D(QScriptDebuggerEvent); - d->attributes[Value] = QVariant::fromValue(value); -} - -void QScriptDebuggerEvent::setNestedEvaluate(bool nested) -{ - Q_D(QScriptDebuggerEvent); - d->attributes[IsNestedEvaluate] = nested; -} - -bool QScriptDebuggerEvent::isNestedEvaluate() const -{ - Q_D(const QScriptDebuggerEvent); - return d->attributes.value(IsNestedEvaluate).toBool(); -} - -void QScriptDebuggerEvent::setHasExceptionHandler(bool hasHandler) -{ - Q_D(QScriptDebuggerEvent); - d->attributes[HasExceptionHandler] = hasHandler; -} - -bool QScriptDebuggerEvent::hasExceptionHandler() const -{ - Q_D(const QScriptDebuggerEvent); - return d->attributes.value(HasExceptionHandler).toBool(); -} - -/*! - Returns true if this QScriptDebuggerEvent is equal to the \a other - event, otherwise returns false. -*/ -bool QScriptDebuggerEvent::operator==(const QScriptDebuggerEvent &other) const -{ - Q_D(const QScriptDebuggerEvent); - const QScriptDebuggerEventPrivate *od = other.d_func(); - if (d == od) - return true; - if (!d || !od) - return false; - return ((d->type == od->type) - && (d->attributes == od->attributes)); -} - -/*! - Returns true if this QScriptDebuggerEvent is not equal to the \a - other event, otherwise returns false. -*/ -bool QScriptDebuggerEvent::operator!=(const QScriptDebuggerEvent &other) const -{ - return !(*this == other); -} - -/*! - \fn QDataStream &operator<<(QDataStream &stream, const QScriptDebuggerEvent &event) - \relates QScriptDebuggerEvent - - Writes the given \a event to the specified \a stream. -*/ -QDataStream &operator<<(QDataStream &out, const QScriptDebuggerEvent &event) -{ - const QScriptDebuggerEventPrivate *d = event.d_ptr.data(); - out << (quint32)d->type; - out << (qint32)d->attributes.size(); - QHash::const_iterator it; - for (it = d->attributes.constBegin(); it != d->attributes.constEnd(); ++it) { - out << (quint32)it.key(); - out << it.value(); - } - return out; -} - -/*! - \fn QDataStream &operator>>(QDataStream &stream, QScriptDebuggerEvent &event) - \relates QScriptDebuggerEvent - - Reads a QScriptDebuggerEvent from the specified \a stream into the - given \a event. -*/ -QDataStream &operator>>(QDataStream &in, QScriptDebuggerEvent &event) -{ - QScriptDebuggerEventPrivate *d = event.d_ptr.data(); - - quint32 type; - in >> type; - d->type = QScriptDebuggerEvent::Type(type); - - qint32 attribCount; - in >> attribCount; - QHash attribs; - for (qint32 i = 0; i < attribCount; ++i) { - quint32 key; - in >> key; - QVariant value; - in >> value; - attribs[QScriptDebuggerEvent::Attribute(key)] = value; - } - d->attributes = attribs; - - return in; -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptdebuggerevent_p.h b/src/scripttools/debugging/qscriptdebuggerevent_p.h deleted file mode 100644 index 110022a2d..000000000 --- a/src/scripttools/debugging/qscriptdebuggerevent_p.h +++ /dev/null @@ -1,144 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGEREVENT_P_H -#define QSCRIPTDEBUGGEREVENT_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QDataStream; -class QScriptDebuggerValue; - -class QScriptDebuggerEventPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerEvent -{ -public: - friend Q_AUTOTEST_EXPORT QDataStream &operator<<(QDataStream &, const QScriptDebuggerEvent &); - friend Q_AUTOTEST_EXPORT QDataStream &operator>>(QDataStream &, QScriptDebuggerEvent &); - - enum Type { - None, - Interrupted, - SteppingFinished, - LocationReached, - Breakpoint, - Exception, - Trace, - InlineEvalFinished, - DebuggerInvocationRequest, - ForcedReturn, - UserEvent = 1000, - MaxUserEvent = 32767 - }; - - enum Attribute { - ScriptID, - FileName, - BreakpointID, - LineNumber, - ColumnNumber, - Value, - Message, - IsNestedEvaluate, - HasExceptionHandler, - UserAttribute = 1000, - MaxUserAttribute = 32767 - }; - - QScriptDebuggerEvent(); - QScriptDebuggerEvent(Type type); - QScriptDebuggerEvent(Type type, qint64 scriptId, int lineNumber, int columnNumber); - QScriptDebuggerEvent(const QScriptDebuggerEvent &other); - ~QScriptDebuggerEvent(); - - Type type() const; - - QVariant attribute(Attribute attribute, - const QVariant &defaultValue = QVariant()) const; - void setAttribute(Attribute attribute, const QVariant &value); - QHash attributes() const; - - qint64 scriptId() const; - void setScriptId(qint64 id); - QString fileName() const; - void setFileName(const QString &fileName); - int lineNumber() const; - void setLineNumber(int lineNumber); - int columnNumber() const; - void setColumnNumber(int columnNumber); - int breakpointId() const; - void setBreakpointId(int id); - QString message() const; - void setMessage(const QString &message); - QScriptDebuggerValue scriptValue() const; - void setScriptValue(const QScriptDebuggerValue &value); - void setNestedEvaluate(bool nested); - bool isNestedEvaluate() const; - void setHasExceptionHandler(bool hasHandler); - bool hasExceptionHandler() const; - - QScriptDebuggerEvent &operator=(const QScriptDebuggerEvent &other); - - bool operator==(const QScriptDebuggerEvent &other) const; - bool operator!=(const QScriptDebuggerEvent &other) const; - -private: - QScopedPointer d_ptr; - - Q_DECLARE_PRIVATE(QScriptDebuggerEvent) -}; - -Q_AUTOTEST_EXPORT QDataStream &operator<<(QDataStream &, const QScriptDebuggerEvent &); -Q_AUTOTEST_EXPORT QDataStream &operator>>(QDataStream &, QScriptDebuggerEvent &); - -// helper class that's used to transport a debugger event through the Qt event loop -class QScriptDebuggerEventEvent : public QEvent -{ -public: - QScriptDebuggerEventEvent(const QScriptDebuggerEvent &event) - : QEvent(QEvent::Type(QEvent::User+1)), m_event(event) {} - ~QScriptDebuggerEventEvent() {} - const QScriptDebuggerEvent &event() const - { return m_event; } -private: - QScriptDebuggerEvent m_event; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggereventhandlerinterface_p.h b/src/scripttools/debugging/qscriptdebuggereventhandlerinterface_p.h deleted file mode 100644 index 7914c7e2a..000000000 --- a/src/scripttools/debugging/qscriptdebuggereventhandlerinterface_p.h +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGEREVENTHANDLERINTERFACE_P_H -#define QSCRIPTDEBUGGEREVENTHANDLERINTERFACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerEvent; - -class Q_AUTOTEST_EXPORT QScriptDebuggerEventHandlerInterface -{ -public: - virtual ~QScriptDebuggerEventHandlerInterface() {} - - virtual bool debuggerEvent(const QScriptDebuggerEvent &event) = 0; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerfrontend.cpp b/src/scripttools/debugging/qscriptdebuggerfrontend.cpp deleted file mode 100644 index 653ce3cfe..000000000 --- a/src/scripttools/debugging/qscriptdebuggerfrontend.cpp +++ /dev/null @@ -1,215 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerfrontend_p.h" -#include "qscriptdebuggerfrontend_p_p.h" -#include "qscriptdebuggercommand_p.h" -#include "qscriptdebuggerevent_p.h" -#include "qscriptdebuggerresponse_p.h" -#include "qscriptdebuggereventhandlerinterface_p.h" -#include "qscriptdebuggerresponsehandlerinterface_p.h" - -#include -#include - -QT_BEGIN_NAMESPACE - -/*! - \class QScriptDebuggerFrontend - \since 4.5 - \internal - - \brief The QScriptDebuggerFrontend class is the base class of debugger front-ends. -*/ - -// helper class that's used to handle our custom Qt events -class QScriptDebuggerFrontendEventReceiver : public QObject -{ -public: - QScriptDebuggerFrontendEventReceiver(QScriptDebuggerFrontendPrivate *frontend, - QObject *parent = nullptr); - ~QScriptDebuggerFrontendEventReceiver(); - - bool event(QEvent *); - -private: - QScriptDebuggerFrontendPrivate *m_frontend; -}; - -QScriptDebuggerFrontendEventReceiver::QScriptDebuggerFrontendEventReceiver( - QScriptDebuggerFrontendPrivate *frontend, QObject *parent) - : QObject(parent), m_frontend(frontend) -{ -} - -QScriptDebuggerFrontendEventReceiver::~QScriptDebuggerFrontendEventReceiver() -{ -} - -bool QScriptDebuggerFrontendEventReceiver::event(QEvent *e) -{ - return m_frontend->event(e); -} - - -QScriptDebuggerFrontendPrivate::QScriptDebuggerFrontendPrivate() -{ - eventHandler = 0; - nextCommandId = 0; - eventReceiver = new QScriptDebuggerFrontendEventReceiver(this); -} - -QScriptDebuggerFrontendPrivate::~QScriptDebuggerFrontendPrivate() -{ - delete eventReceiver; -} - -void QScriptDebuggerFrontendPrivate::postEvent(QEvent *e) -{ - QCoreApplication::postEvent(eventReceiver, e); -} - -bool QScriptDebuggerFrontendPrivate::event(QEvent *e) -{ - Q_Q(QScriptDebuggerFrontend); - if (e->type() == QEvent::User+1) { - QScriptDebuggerEventEvent *de = static_cast(e); - bool handled = q->notifyEvent(de->event()); - if (handled) { - q->scheduleCommand(QScriptDebuggerCommand::resumeCommand(), - /*responseHandler=*/0); - } - return true; - } else if (e->type() == QEvent::User+2) { - processCommands(); - return true; - } - return false; -} - -void QScriptDebuggerFrontendPrivate::processCommands() -{ - Q_Q(QScriptDebuggerFrontend); - while (!pendingCommands.isEmpty()) { - QScriptDebuggerCommand command(pendingCommands.takeFirst()); - int id = pendingCommandIds.takeFirst(); - q->processCommand(id, command); - } -} - -QScriptDebuggerFrontend::QScriptDebuggerFrontend() - : d_ptr(new QScriptDebuggerFrontendPrivate()) -{ - d_ptr->q_ptr = this; -} - -QScriptDebuggerFrontend::~QScriptDebuggerFrontend() -{ -} - -QScriptDebuggerFrontend::QScriptDebuggerFrontend(QScriptDebuggerFrontendPrivate &dd) - : d_ptr(&dd) -{ - d_ptr->q_ptr = this; -} - -QScriptDebuggerEventHandlerInterface *QScriptDebuggerFrontend::eventHandler() const -{ - Q_D(const QScriptDebuggerFrontend); - return d->eventHandler; -} - -void QScriptDebuggerFrontend::setEventHandler(QScriptDebuggerEventHandlerInterface *eventHandler) -{ - Q_D(QScriptDebuggerFrontend); - d->eventHandler = eventHandler; -} - -/*! - Schedules the given \a command for execution by this front-end, - and returns a unique identifier associated with this command. - - Subclasses can call this function to schedule custom commands. - - \sa notifyCommandFinished() -*/ -int QScriptDebuggerFrontend::scheduleCommand( - const QScriptDebuggerCommand &command, - QScriptDebuggerResponseHandlerInterface *responseHandler) -{ - Q_D(QScriptDebuggerFrontend); - int id = ++d->nextCommandId; - d->pendingCommands.append(command); - d->pendingCommandIds.append(id); - if (responseHandler) - d->responseHandlers.insert(id, responseHandler); - if (d->pendingCommands.size() == 1) { - QEvent *e = new QEvent(QEvent::Type(QEvent::User+2)); // ProcessCommands - d->postEvent(e); - } - return id; -} - -/*! - Subclasses should call this function when the command identified by - the given \a id has finished and produced the given \a response. - - \sa processCommand(), notifyEvent() -*/ -void QScriptDebuggerFrontend::notifyCommandFinished(int id, const QScriptDebuggerResponse &response) -{ - Q_D(QScriptDebuggerFrontend); - if (d->responseHandlers.contains(id)) { - QScriptDebuggerResponseHandlerInterface *handler = d->responseHandlers.take(id); - Q_ASSERT(handler != 0); - handler->handleResponse(response, id); - } -} - -/*! - Subclasses should call this function when the given \a event is - received from the back-end. - - \sa notifyCommandFinished(), QScriptDebuggerBackend::event() -*/ -bool QScriptDebuggerFrontend::notifyEvent(const QScriptDebuggerEvent &event) -{ - Q_D(QScriptDebuggerFrontend); - if (d->eventHandler) - return d->eventHandler->debuggerEvent(event); - return false; -} - -int QScriptDebuggerFrontend::scheduledCommandCount() const -{ - Q_D(const QScriptDebuggerFrontend); - return d->nextCommandId; -} - -/*! - \fn void QScriptDebuggerFrontend::processCommand(int id, const QScriptDebuggerCommand &command) - - Subclasses must reimplement this function to process the given \a command - identified by \a id. Call notifyCommandFinished() when processing is - complete. -*/ - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptdebuggerfrontend_p.h b/src/scripttools/debugging/qscriptdebuggerfrontend_p.h deleted file mode 100644 index 7f551ee83..000000000 --- a/src/scripttools/debugging/qscriptdebuggerfrontend_p.h +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERFRONTEND_P_H -#define QSCRIPTDEBUGGERFRONTEND_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include -#include - -#include "qscriptdebuggercommandschedulerinterface_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerEventHandlerInterface; -class QScriptDebuggerCommand; -class QScriptDebuggerEvent; -class QScriptDebuggerResponse; - -class QScriptDebuggerFrontendPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerFrontend - : public QScriptDebuggerCommandSchedulerInterface -{ -public: - QScriptDebuggerFrontend(); - virtual ~QScriptDebuggerFrontend(); - - QScriptDebuggerEventHandlerInterface *eventHandler() const; - void setEventHandler(QScriptDebuggerEventHandlerInterface *eventHandler); - - int scheduleCommand(const QScriptDebuggerCommand &command, - QScriptDebuggerResponseHandlerInterface *responseHandler); - - int scheduledCommandCount() const; - -protected: - void notifyCommandFinished(int id, const QScriptDebuggerResponse &response); - bool notifyEvent(const QScriptDebuggerEvent &event); - - virtual void processCommand(int id, const QScriptDebuggerCommand &command) = 0; - -protected: - QScriptDebuggerFrontend(QScriptDebuggerFrontendPrivate &dd); - QScopedPointer d_ptr; - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerFrontend) - Q_DISABLE_COPY(QScriptDebuggerFrontend) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerfrontend_p_p.h b/src/scripttools/debugging/qscriptdebuggerfrontend_p_p.h deleted file mode 100644 index 7f8ec4828..000000000 --- a/src/scripttools/debugging/qscriptdebuggerfrontend_p_p.h +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERFRONTEND_P_P_H -#define QSCRIPTDEBUGGERFRONTEND_P_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include -#include - -#include "qscriptdebuggercommand_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerEventHandlerInterface; -class QScriptDebuggerResponseHandlerInterface; -class QEvent; - -class QScriptDebuggerFrontend; -class QScriptDebuggerFrontendPrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerFrontend) -public: - QScriptDebuggerFrontendPrivate(); - virtual ~QScriptDebuggerFrontendPrivate(); - - void postEvent(QEvent *e); - virtual bool event(QEvent *); - void processCommands(); - - QScriptDebuggerEventHandlerInterface *eventHandler; - QList pendingCommands; - QList pendingCommandIds; - QHash responseHandlers; - int nextCommandId; - QObject *eventReceiver; - - QScriptDebuggerFrontend *q_ptr; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerjob.cpp b/src/scripttools/debugging/qscriptdebuggerjob.cpp deleted file mode 100644 index 3b8a700fd..000000000 --- a/src/scripttools/debugging/qscriptdebuggerjob.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerjob_p.h" -#include "qscriptdebuggerjob_p_p.h" -#include "qscriptdebuggerjobschedulerinterface_p.h" - -#include - -QT_BEGIN_NAMESPACE - -/*! - \class QScriptDebuggerJob - \since 4.5 - \internal - - \brief The QScriptDebuggerJob class is the base class of debugger jobs. - -*/ - -QScriptDebuggerJobPrivate::QScriptDebuggerJobPrivate() -{ -} - -QScriptDebuggerJobPrivate::~QScriptDebuggerJobPrivate() -{ -} - -QScriptDebuggerJobPrivate *QScriptDebuggerJobPrivate::get(QScriptDebuggerJob *q) -{ - return q->d_func(); -} - -QScriptDebuggerJob::QScriptDebuggerJob() - : d_ptr(new QScriptDebuggerJobPrivate) -{ - d_ptr->q_ptr = this; - d_ptr->jobScheduler = 0; -} - -QScriptDebuggerJob::QScriptDebuggerJob(QScriptDebuggerJobPrivate &dd) - : d_ptr(&dd) -{ - d_ptr->q_ptr = this; - d_ptr->jobScheduler = 0; -} - -QScriptDebuggerJob::~QScriptDebuggerJob() -{ -} - -void QScriptDebuggerJob::finish() -{ - Q_D(QScriptDebuggerJob); - Q_ASSERT(d->jobScheduler != 0); - d->jobScheduler->finishJob(this); -} - -void QScriptDebuggerJob::hibernateUntilEvaluateFinished() -{ - Q_D(QScriptDebuggerJob); - Q_ASSERT(d->jobScheduler != 0); - d->jobScheduler->hibernateUntilEvaluateFinished(this); -} - -void QScriptDebuggerJob::evaluateFinished(const QScriptDebuggerValue &) -{ - Q_ASSERT_X(false, "QScriptDebuggerJob::evaluateFinished()", - "implement if hibernateUntilEvaluateFinished() is called"); -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptdebuggerjob_p.h b/src/scripttools/debugging/qscriptdebuggerjob_p.h deleted file mode 100644 index 8c9214c68..000000000 --- a/src/scripttools/debugging/qscriptdebuggerjob_p.h +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERJOB_P_H -#define QSCRIPTDEBUGGERJOB_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerJobSchedulerInterface; -class QScriptDebuggerValue; - -class QScriptDebuggerJobPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerJob -{ -public: - QScriptDebuggerJob(); - virtual ~QScriptDebuggerJob(); - - virtual void start() = 0; - - void finish(); - - void hibernateUntilEvaluateFinished(); - virtual void evaluateFinished(const QScriptDebuggerValue &result); - -protected: - QScriptDebuggerJob(QScriptDebuggerJobPrivate &dd); - QScopedPointer d_ptr; - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerJob) - Q_DISABLE_COPY(QScriptDebuggerJob) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerjob_p_p.h b/src/scripttools/debugging/qscriptdebuggerjob_p_p.h deleted file mode 100644 index d66bd51bf..000000000 --- a/src/scripttools/debugging/qscriptdebuggerjob_p_p.h +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERJOB_P_P_H -#define QSCRIPTDEBUGGERJOB_P_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerJobSchedulerInterface; - -class QScriptDebuggerJob; -class QScriptDebuggerJobPrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerJob) -public: - QScriptDebuggerJobPrivate(); - virtual ~QScriptDebuggerJobPrivate(); - - static QScriptDebuggerJobPrivate *get(QScriptDebuggerJob *q); - - QScriptDebuggerJobSchedulerInterface *jobScheduler; - QScriptDebuggerJob *q_ptr; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerjobschedulerinterface_p.h b/src/scripttools/debugging/qscriptdebuggerjobschedulerinterface_p.h deleted file mode 100644 index 462e1634a..000000000 --- a/src/scripttools/debugging/qscriptdebuggerjobschedulerinterface_p.h +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERJOBSCHEDULERINTERFACE_P_H -#define QSCRIPTDEBUGGERJOBSCHEDULERINTERFACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerJob; - -class Q_AUTOTEST_EXPORT QScriptDebuggerJobSchedulerInterface -{ -public: - virtual ~QScriptDebuggerJobSchedulerInterface() {} - - virtual int scheduleJob(QScriptDebuggerJob *job) = 0; - virtual void finishJob(QScriptDebuggerJob *job) = 0; - virtual void hibernateUntilEvaluateFinished(QScriptDebuggerJob *job) = 0; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp b/src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp deleted file mode 100644 index a1204d5e1..000000000 --- a/src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp +++ /dev/null @@ -1,939 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerlocalsmodel_p.h" -#include "qscriptdebuggercommandschedulerjob_p.h" -#include "qscriptdebuggervalue_p.h" -#include "qscriptdebuggerresponse_p.h" -#include "qscriptdebuggerevent_p.h" -#include "qscriptdebuggervalueproperty_p.h" -#include "qscriptdebuggercommandschedulerinterface_p.h" -#include "qscriptdebuggercommandschedulerfrontend_p.h" -#include "qscriptdebuggerjobschedulerinterface_p.h" -#include "qscriptdebuggerobjectsnapshotdelta_p.h" -#include "qscripttoolscommon_p.h" - -#include "qabstractitemmodel_p.h" - -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -struct QScriptDebuggerLocalsModelNode -{ - enum PopulationState { - NotPopulated, - Populating, - Populated - }; - - QScriptDebuggerLocalsModelNode() - : parent(0), populationState(NotPopulated), snapshotId(-1), changed(false) {} - - QScriptDebuggerLocalsModelNode( - const QScriptDebuggerValueProperty &prop, - QScriptDebuggerLocalsModelNode *par) - : property(prop), parent(par), - populationState(NotPopulated), snapshotId(-1), changed(false) - { - parent->children.append(this); - } - - ~QScriptDebuggerLocalsModelNode() { qDeleteAll(children); } - - QScriptDebuggerLocalsModelNode *findChild(const QString &name) - { - for (int i = 0; i < children.size(); ++i) { - QScriptDebuggerLocalsModelNode *child = children.at(i); - if (child->property.name() == name) - return child; - } - return 0; - } - - QScriptDebuggerValueProperty property; - QScriptDebuggerLocalsModelNode *parent; - QList children; - PopulationState populationState; - int snapshotId; - bool changed; -}; - -class QScriptDebuggerLocalsModelPrivate - : public QAbstractItemModelPrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerLocalsModel) -public: - QScriptDebuggerLocalsModelPrivate(); - ~QScriptDebuggerLocalsModelPrivate(); - - static QScriptDebuggerLocalsModelPrivate *get(QScriptDebuggerLocalsModel *q); - - QModelIndex addTopLevelObject(const QString &name, const QScriptDebuggerValue &object); - - QScriptDebuggerLocalsModelNode *nodeFromIndex(const QModelIndex &index) const; - QModelIndex indexFromNode(QScriptDebuggerLocalsModelNode *node) const; - bool isTopLevelNode(QScriptDebuggerLocalsModelNode *node) const; - - void populateIndex(const QModelIndex &index); - void reallyPopulateIndex(const QModelIndex &index, - const QScriptDebuggerValuePropertyList &props); - void syncIndex(const QModelIndex &index); - void reallySyncIndex(const QModelIndex &index, - const QScriptDebuggerObjectSnapshotDelta &delta); - void syncTopLevelNodes(); - void removeTopLevelNodes(); - void emitScopeObjectAvailable(const QModelIndex &index); - - void emitDataChanged(const QModelIndex &tl, const QModelIndex &br); - void removeChild(const QModelIndex &parentIndex, - QScriptDebuggerLocalsModelNode *parentNode, int row); - void depopulate(QScriptDebuggerLocalsModelNode *node); - void repopulate(QScriptDebuggerLocalsModelNode *node); - void addChildren(const QModelIndex &parentIndex, - QScriptDebuggerLocalsModelNode *parentNode, - const QScriptDebuggerValuePropertyList &props); - - void deleteObjectSnapshots(const QList &snapshotIds); - void deleteAllObjectSnapshots(); - - QScriptDebuggerJobSchedulerInterface *jobScheduler; - QScriptDebuggerCommandSchedulerInterface *commandScheduler; - QScriptDebuggerLocalsModelNode *invisibleRootNode; - int frameIndex; -}; - -QScriptDebuggerLocalsModelPrivate::QScriptDebuggerLocalsModelPrivate() -{ - invisibleRootNode = new QScriptDebuggerLocalsModelNode(); - frameIndex = -1; -} - -QScriptDebuggerLocalsModelPrivate::~QScriptDebuggerLocalsModelPrivate() -{ - delete invisibleRootNode; -} - -void QScriptDebuggerLocalsModelPrivate::emitDataChanged(const QModelIndex &tl, const QModelIndex &br) -{ - q_func()->dataChanged(tl, br); -} - -static QList findSnapshotIdsRecursively(QScriptDebuggerLocalsModelNode *root) -{ - QList result; - if (root->snapshotId == -1) { - Q_ASSERT(root->children.isEmpty()); - return result; - } - QList nodeStack; - nodeStack.append(root); - while (!nodeStack.isEmpty()) { - QScriptDebuggerLocalsModelNode *node = nodeStack.takeFirst(); - result.append(node->snapshotId); - for (int i = 0; i < node->children.count(); ++i) { - QScriptDebuggerLocalsModelNode *child = node->children.at(i); - if (child->snapshotId != -1) - nodeStack.prepend(child); - } - } - return result; -} - -void QScriptDebuggerLocalsModelPrivate::removeChild(const QModelIndex &parentIndex, - QScriptDebuggerLocalsModelNode *parentNode, - int row) -{ - Q_Q(QScriptDebuggerLocalsModel); - q->beginRemoveRows(parentIndex, row, row); - QScriptDebuggerLocalsModelNode *child = parentNode->children.takeAt(row); - QList snapshotIds = findSnapshotIdsRecursively(child); - delete child; - q->endRemoveRows(); - deleteObjectSnapshots(snapshotIds); -} - -void QScriptDebuggerLocalsModelPrivate::depopulate(QScriptDebuggerLocalsModelNode *node) -{ - Q_Q(QScriptDebuggerLocalsModel); - bool hasChildren = !node->children.isEmpty(); - if (hasChildren) - q->beginRemoveRows(indexFromNode(node), 0, node->children.count() - 1); - QList snapshotIds = findSnapshotIdsRecursively(node); - qDeleteAll(node->children); - node->children.clear(); - node->snapshotId = -1; - node->populationState = QScriptDebuggerLocalsModelNode::NotPopulated; - if (hasChildren) - q->endRemoveRows(); - deleteObjectSnapshots(snapshotIds); -} - -void QScriptDebuggerLocalsModelPrivate::repopulate(QScriptDebuggerLocalsModelNode *node) -{ - if (node->populationState != QScriptDebuggerLocalsModelNode::Populated) - return; - depopulate(node); - if (node->property.value().type() == QScriptDebuggerValue::ObjectValue) - populateIndex(indexFromNode(node)); -} - -void QScriptDebuggerLocalsModelPrivate::addChildren(const QModelIndex &parentIndex, - QScriptDebuggerLocalsModelNode *parentNode, - const QScriptDebuggerValuePropertyList &props) -{ - Q_Q(QScriptDebuggerLocalsModel); - if (props.isEmpty()) - return; - int first = parentNode->children.size(); - int last = first + props.size() - 1; - q->beginInsertRows(parentIndex, first, last); - for (int i = 0; i < props.size(); ++i) - new QScriptDebuggerLocalsModelNode(props.at(i), parentNode); - q->endInsertRows(); -} - -void QScriptDebuggerLocalsModelPrivate::deleteObjectSnapshots(const QList &snapshotIds) -{ - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler, 0); - for (int i = 0; i < snapshotIds.size(); ++i) - frontend.scheduleDeleteScriptObjectSnapshot(snapshotIds.at(i)); -} - -void QScriptDebuggerLocalsModelPrivate::deleteAllObjectSnapshots() -{ - QList snapshotIds; - for (int i = 0; i < invisibleRootNode->children.count(); ++i) - snapshotIds += findSnapshotIdsRecursively(invisibleRootNode->children.at(i)); - deleteObjectSnapshots(snapshotIds); -} - -QScriptDebuggerLocalsModelPrivate *QScriptDebuggerLocalsModelPrivate::get(QScriptDebuggerLocalsModel *q) -{ - return q->d_func(); -} - -namespace { - -class SetPropertyJob : public QScriptDebuggerCommandSchedulerJob -{ -public: - SetPropertyJob(const QPersistentModelIndex &index, - const QString &expression, - QScriptDebuggerCommandSchedulerInterface *scheduler) - : QScriptDebuggerCommandSchedulerJob(scheduler), - m_index(index), m_expression(expression), m_state(0) {} - - QScriptDebuggerLocalsModelPrivate *model() const - { - if (!m_index.isValid()) - return 0; - QAbstractItemModel *m = const_cast(m_index.model()); - QScriptDebuggerLocalsModel *lm = qobject_cast(m); - return QScriptDebuggerLocalsModelPrivate::get(lm); - } - - void start() - { - if (!m_index.isValid()) { - // nothing to do, the node has been removed - return; - } - QScriptDebuggerLocalsModelNode *node = model()->nodeFromIndex(m_index); - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - frontend.scheduleEvaluate(model()->frameIndex, m_expression, - QString::fromLatin1("set property '%0' (%1)") - .arg(node->property.name()) - .arg(QDateTime::currentDateTime().toString())); - } - - void handleResponse(const QScriptDebuggerResponse &, int) - { - switch (m_state) { - case 0: - hibernateUntilEvaluateFinished(); - ++m_state; - break; - case 1: - finish(); - break; - } - } - - void evaluateFinished(const QScriptDebuggerValue &result) - { - if (!m_index.isValid()) { - // nothing to do, the node has been removed - return; - } - QScriptDebuggerLocalsModelNode *node = model()->nodeFromIndex(m_index); - Q_ASSERT(node->parent != 0); - QScriptDebuggerValue object = node->parent->property.value(); - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - frontend.scheduleSetScriptValueProperty(object, node->property.name(), result); - } - -private: - QPersistentModelIndex m_index; - QString m_expression; - int m_state; -}; - -} // namespace - -QScriptDebuggerLocalsModelNode *QScriptDebuggerLocalsModelPrivate::nodeFromIndex( - const QModelIndex &index) const -{ - if (!index.isValid()) - return invisibleRootNode; - return static_cast(index.internalPointer()); -} - -QModelIndex QScriptDebuggerLocalsModelPrivate::indexFromNode( - QScriptDebuggerLocalsModelNode *node) const -{ - if (!node || (node == invisibleRootNode)) - return QModelIndex(); - QScriptDebuggerLocalsModelNode *par = node->parent; - int row = par ? par->children.indexOf(node) : 0; - return createIndex(row, 0, node); -} - -bool QScriptDebuggerLocalsModelPrivate::isTopLevelNode(QScriptDebuggerLocalsModelNode *node) const -{ - return node && (node->parent == invisibleRootNode); -} - -namespace { - -class PopulateModelIndexJob : public QScriptDebuggerCommandSchedulerJob -{ -public: - PopulateModelIndexJob(const QPersistentModelIndex &index, - QScriptDebuggerCommandSchedulerInterface *scheduler) - : QScriptDebuggerCommandSchedulerJob(scheduler), - m_index(index), m_state(0) - { } - - QScriptDebuggerLocalsModelPrivate *model() const - { - if (!m_index.isValid()) - return 0; - QAbstractItemModel *m = const_cast(m_index.model()); - QScriptDebuggerLocalsModel *lm = qobject_cast(m); - return QScriptDebuggerLocalsModelPrivate::get(lm); - } - - void start() - { - if (!m_index.isValid()) { - // nothing to do, the node has been removed - finish(); - return; - } - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - frontend.scheduleNewScriptObjectSnapshot(); - } - - void handleResponse(const QScriptDebuggerResponse &response, - int) - { - if (!m_index.isValid()) { - // the node has been removed - finish(); - return; - } - switch (m_state) { - case 0: { - QScriptDebuggerLocalsModelNode *node = model()->nodeFromIndex(m_index); - Q_ASSERT(node->populationState == QScriptDebuggerLocalsModelNode::Populating); - node->snapshotId = response.resultAsInt(); - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - frontend.scheduleScriptObjectSnapshotCapture(node->snapshotId, node->property.value()); - ++m_state; - } break; - case 1: { - QScriptDebuggerObjectSnapshotDelta delta; - delta = qvariant_cast(response.result()); - Q_ASSERT(delta.removedProperties.isEmpty()); - Q_ASSERT(delta.changedProperties.isEmpty()); - QScriptDebuggerValuePropertyList props = delta.addedProperties; - model()->reallyPopulateIndex(m_index, props); - finish(); - } break; - } - } - -private: - QPersistentModelIndex m_index; - int m_state; -}; - -} // namespace - -void QScriptDebuggerLocalsModelPrivate::populateIndex( - const QModelIndex &index) -{ - if (!index.isValid()) - return; - QScriptDebuggerLocalsModelNode *node = nodeFromIndex(index); - if (node->populationState != QScriptDebuggerLocalsModelNode::NotPopulated) - return; - if (node->property.value().type() != QScriptDebuggerValue::ObjectValue) - return; - node->populationState = QScriptDebuggerLocalsModelNode::Populating; - QScriptDebuggerJob *job = new PopulateModelIndexJob(index, commandScheduler); - jobScheduler->scheduleJob(job); -} - -void QScriptDebuggerLocalsModelPrivate::reallyPopulateIndex( - const QModelIndex &index, - const QScriptDebuggerValuePropertyList &props) -{ - if (!index.isValid()) - return; - QScriptDebuggerLocalsModelNode *node = nodeFromIndex(index); - Q_ASSERT(node->populationState == QScriptDebuggerLocalsModelNode::Populating); - node->populationState = QScriptDebuggerLocalsModelNode::Populated; - addChildren(index, node, props); -} - -QScriptDebuggerLocalsModel::QScriptDebuggerLocalsModel( - QScriptDebuggerJobSchedulerInterface *jobScheduler, - QScriptDebuggerCommandSchedulerInterface *commandScheduler, - QObject *parent) - : QAbstractItemModel(*new QScriptDebuggerLocalsModelPrivate, parent) -{ - Q_D(QScriptDebuggerLocalsModel); - d->jobScheduler = jobScheduler; - d->commandScheduler = commandScheduler; -} - -QScriptDebuggerLocalsModel::~QScriptDebuggerLocalsModel() -{ -} - -QModelIndex QScriptDebuggerLocalsModelPrivate::addTopLevelObject(const QString &name, const QScriptDebuggerValue &object) -{ - Q_Q(QScriptDebuggerLocalsModel); - QScriptDebuggerLocalsModelNode *node = invisibleRootNode->findChild(name); - if (node) - return indexFromNode(node); - QScriptDebuggerValueProperty prop(name, object, - QString::fromLatin1(""), // ### string representation of object - /*flags=*/0); - int rowIndex = invisibleRootNode->children.size(); - q->beginInsertRows(QModelIndex(), rowIndex, rowIndex); - node = new QScriptDebuggerLocalsModelNode(prop, invisibleRootNode); - q->endInsertRows(); - return indexFromNode(node); -} - -namespace { - -class InitModelJob : public QScriptDebuggerCommandSchedulerJob -{ -public: - InitModelJob(QScriptDebuggerLocalsModel *model, - int frameIndex, - QScriptDebuggerCommandSchedulerInterface *scheduler) - : QScriptDebuggerCommandSchedulerJob(scheduler), - m_model(model), m_frameIndex(frameIndex), m_state(0) - { } - - void start() - { - if (!m_model) { - // Model has been deleted. - finish(); - return; - } - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - frontend.scheduleGetScopeChain(m_frameIndex); - } - - void handleResponse(const QScriptDebuggerResponse &response, - int) - { - if (!m_model) { - // Model has been deleted. - finish(); - return; - } - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - QScriptDebuggerLocalsModelPrivate *model_d = QScriptDebuggerLocalsModelPrivate::get(m_model); - switch (m_state) { - case 0: { - QScriptDebuggerValueList scopeChain = response.resultAsScriptValueList(); - for (int i = 0; i < scopeChain.size(); ++i) { - const QScriptDebuggerValue &scopeObject = scopeChain.at(i); - QString name = QString::fromLatin1("Scope"); - if (i > 0) - name.append(QString::fromLatin1(" (%0)").arg(i)); - QModelIndex index = model_d->addTopLevelObject(name, scopeObject); - if (i == 0) - model_d->emitScopeObjectAvailable(index); - } - frontend.scheduleGetThisObject(m_frameIndex); - ++m_state; - } break; - case 1: { - QScriptDebuggerValue thisObject = response.resultAsScriptValue(); - model_d->addTopLevelObject(QLatin1String("this"), thisObject); - finish(); - } break; - } - } - -private: - QPointer m_model; - int m_frameIndex; - int m_state; -}; - -} // namespace - -void QScriptDebuggerLocalsModel::init(int frameIndex) -{ - Q_D(QScriptDebuggerLocalsModel); - d->frameIndex = frameIndex; - QScriptDebuggerJob *job = new InitModelJob(this, frameIndex, d->commandScheduler); - d->jobScheduler->scheduleJob(job); -} - -namespace { - -class SyncModelJob : public QScriptDebuggerCommandSchedulerJob -{ -public: - SyncModelJob(QScriptDebuggerLocalsModel *model, - int frameIndex, - QScriptDebuggerCommandSchedulerInterface *scheduler) - : QScriptDebuggerCommandSchedulerJob(scheduler), - m_model(model), m_frameIndex(frameIndex), m_state(0) - { } - - void start() - { - if (!m_model) { - // Model has been deleted. - finish(); - return; - } - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - frontend.scheduleGetScopeChain(m_frameIndex); - } - - void handleResponse(const QScriptDebuggerResponse &response, - int) - { - if (!m_model) { - // Model has been deleted. - finish(); - return; - } - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - switch (m_state) { - case 0: { - QScriptDebuggerValueList scopeChain = response.resultAsScriptValueList(); - m_topLevelObjects << scopeChain; - frontend.scheduleGetThisObject(m_frameIndex); - ++m_state; - } break; - case 1: { - QScriptDebuggerLocalsModelPrivate *model_d = QScriptDebuggerLocalsModelPrivate::get(m_model); - QScriptDebuggerValue thisObject = response.resultAsScriptValue(); - m_topLevelObjects.append(thisObject); - bool equal = (m_topLevelObjects.size() == model_d->invisibleRootNode->children.size()); - for (int i = 0; equal && (i < m_topLevelObjects.size()); ++i) { - const QScriptDebuggerValue &object = m_topLevelObjects.at(i); - equal = (object == model_d->invisibleRootNode->children.at(i)->property.value()); - } - if (!equal) { - // the scope chain and/or this-object changed, so invalidate the model. - // we could try to be more clever, i.e. figure out - // exactly which objects were popped/pushed - model_d->removeTopLevelNodes(); - for (int j = 0; j < m_topLevelObjects.size(); ++j) { - const QScriptDebuggerValue &object = m_topLevelObjects.at(j); - QString name; - if (j == m_topLevelObjects.size()-1) { - name = QString::fromLatin1("this"); - } else { - name = QString::fromLatin1("Scope"); - if (j > 0) - name.append(QString::fromLatin1(" (%0)").arg(j)); - } - QModelIndex index = model_d->addTopLevelObject(name, object); - if (j == 0) - model_d->emitScopeObjectAvailable(index); - } - } else { - model_d->syncTopLevelNodes(); - } - finish(); - } break; - } - } - -private: - QPointer m_model; - int m_frameIndex; - int m_state; - QScriptDebuggerValueList m_topLevelObjects; -}; - -} // namespace - -void QScriptDebuggerLocalsModel::sync(int frameIndex) -{ - Q_D(QScriptDebuggerLocalsModel); - d->frameIndex = frameIndex; - QScriptDebuggerJob *job = new SyncModelJob(this, frameIndex, d->commandScheduler); - d->jobScheduler->scheduleJob(job); -} - -namespace { - -class SyncModelIndexJob : public QScriptDebuggerCommandSchedulerJob -{ -public: - SyncModelIndexJob(const QPersistentModelIndex &index, - QScriptDebuggerCommandSchedulerInterface *scheduler) - : QScriptDebuggerCommandSchedulerJob(scheduler), - m_index(index) - { } - - QScriptDebuggerLocalsModelPrivate *model() const - { - if (!m_index.isValid()) - return 0; - QAbstractItemModel *m = const_cast(m_index.model()); - QScriptDebuggerLocalsModel *lm = qobject_cast(m); - return QScriptDebuggerLocalsModelPrivate::get(lm); - } - - void start() - { - if (!m_index.isValid()) { - // nothing to do, the node has been removed - finish(); - return; - } - QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); - QScriptDebuggerLocalsModelNode *node = model()->nodeFromIndex(m_index); - frontend.scheduleScriptObjectSnapshotCapture(node->snapshotId, node->property.value()); - } - - void handleResponse(const QScriptDebuggerResponse &response, - int) - { - QScriptDebuggerObjectSnapshotDelta delta; - delta = qvariant_cast(response.result()); - model()->reallySyncIndex(m_index, delta); - finish(); - } - -private: - QPersistentModelIndex m_index; -}; - -} // namespace - -void QScriptDebuggerLocalsModelPrivate::syncIndex(const QModelIndex &index) -{ - if (!index.isValid()) - return; - QScriptDebuggerLocalsModelNode *node = nodeFromIndex(index); - if (node->populationState != QScriptDebuggerLocalsModelNode::Populated) - return; - QScriptDebuggerJob *job = new SyncModelIndexJob(index, commandScheduler); - jobScheduler->scheduleJob(job); -} - -void QScriptDebuggerLocalsModelPrivate::reallySyncIndex(const QModelIndex &index, - const QScriptDebuggerObjectSnapshotDelta &delta) -{ - if (!index.isValid()) - return; - QScriptDebuggerLocalsModelNode *node = nodeFromIndex(index); - // update or remove existing children - for (int i = 0; i < node->children.count(); ++i) { - QScriptDebuggerLocalsModelNode *child = node->children.at(i); - int j; - for (j = 0; j < delta.changedProperties.count(); ++j) { - if (child->property.name() == delta.changedProperties.at(j).name()) { - child->property = delta.changedProperties.at(j); - child->changed = true; - emitDataChanged(index, index.sibling(0, 1)); - repopulate(child); - break; - } - } - if (j != delta.changedProperties.count()) - continue; // was changed - for (j = 0; j < delta.removedProperties.count(); ++j) { - if (child->property.name() == delta.removedProperties.at(j)) { - removeChild(index, node, i); - --i; - break; - } - } - if (j != delta.removedProperties.count()) - continue; // was removed - // neither changed nor removed, but its children might be - if (child->populationState == QScriptDebuggerLocalsModelNode::Populated) { - QScriptDebuggerJob *job = new SyncModelIndexJob(indexFromNode(child), commandScheduler); - jobScheduler->scheduleJob(job); - } - } - addChildren(index, node, delta.addedProperties); -} - -void QScriptDebuggerLocalsModelPrivate::syncTopLevelNodes() -{ - Q_Q(QScriptDebuggerLocalsModel); - for (int i = 0; i < invisibleRootNode->children.count(); ++i) { - QModelIndex index = q->index(i, 0, QModelIndex()); - syncIndex(index); - if (i == 0) - emit q->scopeObjectAvailable(index); - } -} - -void QScriptDebuggerLocalsModelPrivate::removeTopLevelNodes() -{ - while (!invisibleRootNode->children.isEmpty()) - removeChild(QModelIndex(), invisibleRootNode, 0); -} - -void QScriptDebuggerLocalsModelPrivate::emitScopeObjectAvailable(const QModelIndex &index) -{ - emit q_func()->scopeObjectAvailable(index); -} - -int QScriptDebuggerLocalsModel::frameIndex() const -{ - Q_D(const QScriptDebuggerLocalsModel); - return d->frameIndex; -} - -/*! - \reimp -*/ -QModelIndex QScriptDebuggerLocalsModel::index(int row, int column, const QModelIndex &parent) const -{ - Q_D(const QScriptDebuggerLocalsModel); - QScriptDebuggerLocalsModelNode *node = d->nodeFromIndex(parent); - if ((row < 0) || (row >= node->children.count())) - return QModelIndex(); - return createIndex(row, column, node->children.at(row)); -} - -/*! - \reimp -*/ -QModelIndex QScriptDebuggerLocalsModel::parent(const QModelIndex &index) const -{ - Q_D(const QScriptDebuggerLocalsModel); - if (!index.isValid()) - return QModelIndex(); - QScriptDebuggerLocalsModelNode *node = d->nodeFromIndex(index); - return d->indexFromNode(node->parent); -} - -/*! - \reimp -*/ -int QScriptDebuggerLocalsModel::columnCount(const QModelIndex &) const -{ - return 2; -} - -/*! - \reimp -*/ -int QScriptDebuggerLocalsModel::rowCount(const QModelIndex &parent) const -{ - Q_D(const QScriptDebuggerLocalsModel); - // ### need this to make it work with a sortfilterproxymodel (QSFPM is too eager) - const_cast(this)->fetchMore(parent); - QScriptDebuggerLocalsModelNode *node = d->nodeFromIndex(parent); - return node ? node->children.count() : 0; -} - -/*! - \reimp -*/ -QVariant QScriptDebuggerLocalsModel::data(const QModelIndex &index, int role) const -{ - Q_D(const QScriptDebuggerLocalsModel); - if (!index.isValid()) - return QVariant(); - QScriptDebuggerLocalsModelNode *node = d->nodeFromIndex(index); - if (role == Qt::DisplayRole) { - if (index.column() == 0) - return node->property.name(); - else if (index.column() == 1) { - QString str = node->property.valueAsString(); - if (str.indexOf(QLatin1Char('\n')) != -1) { - QStringList lines = str.split(QLatin1Char('\n')); - int lineCount = lines.size(); - if (lineCount > 1) { - lines = lines.mid(0, 1); - lines.append(QString::fromLatin1("(... %0 more lines ...)").arg(lineCount - 1)); - } - str = lines.join(QLatin1String("\n")); - } - return str; - } - } else if (role == Qt::EditRole) { - if ((index.column() == 1) && !d->isTopLevelNode(node)) { - QString str = node->property.valueAsString(); - if (node->property.value().type() == QScriptDebuggerValue::StringValue) { - // escape - str.replace(QLatin1Char('\"'), QLatin1String("\\\"")); - str.prepend(QLatin1Char('\"')); - str.append(QLatin1Char('\"')); - } - return str; - } - } else if (role == Qt::ToolTipRole) { - if (index.column() == 1) { - QString str = node->property.valueAsString(); - if (str.indexOf(QLatin1Char('\n')) != -1) - return str; - } - } - // ### do this in the delegate - else if (role == Qt::BackgroundRole) { - if (d->isTopLevelNode(node)) - return QBrush(Qt::darkGray); - } else if (role == Qt::ForegroundRole) { - if (d->isTopLevelNode(node)) - return QColor(Qt::white); - } else if (role == Qt::FontRole) { - if (d->isTopLevelNode(node) || node->changed) { - QFont fnt; - fnt.setBold(true); - return fnt; - } - } - return QVariant(); -} - -/*! - \reimp -*/ -bool QScriptDebuggerLocalsModel::setData(const QModelIndex &index, const QVariant &value, int role) -{ - Q_D(QScriptDebuggerLocalsModel); - if (!index.isValid()) - return false; - if (role != Qt::EditRole) - return false; - QScriptDebuggerLocalsModelNode *node = d->nodeFromIndex(index); - if (!node) - return false; - QString expr = value.toString().trimmed(); - if (expr.isEmpty()) - return false; - QScriptDebuggerJob *job = new SetPropertyJob(index, expr, d->commandScheduler); - d->jobScheduler->scheduleJob(job); - return true; -} - -/*! - \reimp -*/ -QVariant QScriptDebuggerLocalsModel::headerData(int section, Qt::Orientation orient, int role) const -{ - if (orient == Qt::Horizontal) { - if (role == Qt::DisplayRole) { - if (section == 0) - return QCoreApplication::translate("QScriptDebuggerLocalsModel", "Name"); - else if (section == 1) - return QCoreApplication::translate("QScriptDebuggerLocalsModel", "Value"); - } - } - return QVariant(); -} - -/*! - \reimp -*/ -Qt::ItemFlags QScriptDebuggerLocalsModel::flags(const QModelIndex &index) const -{ - Q_D(const QScriptDebuggerLocalsModel); - if (!index.isValid()) - return 0; - Qt::ItemFlags ret = Qt::ItemIsEnabled | Qt::ItemIsSelectable; - if ((index.column() == 1) && index.parent().isValid()) { - QScriptDebuggerLocalsModelNode *node = d->nodeFromIndex(index); - if (!(node->property.flags() & QScriptValue::ReadOnly)) - ret |= Qt::ItemIsEditable; - } - return ret; -} - -/*! - \reimp -*/ -bool QScriptDebuggerLocalsModel::hasChildren(const QModelIndex &parent) const -{ - Q_D(const QScriptDebuggerLocalsModel); - QScriptDebuggerLocalsModelNode *node = d->nodeFromIndex(parent); - if (!node) - return false; - return !node->children.isEmpty() - || ((node->property.value().type() == QScriptDebuggerValue::ObjectValue) - && (node->populationState == QScriptDebuggerLocalsModelNode::NotPopulated)); -} - -/*! - \reimp -*/ -bool QScriptDebuggerLocalsModel::canFetchMore(const QModelIndex &parent) const -{ - Q_D(const QScriptDebuggerLocalsModel); - if (!parent.isValid()) - return false; - QScriptDebuggerLocalsModelNode *node = d->nodeFromIndex(parent); - return node - && (node->property.value().type() == QScriptDebuggerValue::ObjectValue) - && (node->populationState == QScriptDebuggerLocalsModelNode::NotPopulated); -} - -/*! - \reimp -*/ -void QScriptDebuggerLocalsModel::fetchMore(const QModelIndex &parent) -{ - Q_D(QScriptDebuggerLocalsModel); - d->populateIndex(parent); -} - -QT_END_NAMESPACE -#include "moc_qscriptdebuggerlocalsmodel_p.h" diff --git a/src/scripttools/debugging/qscriptdebuggerlocalsmodel_p.h b/src/scripttools/debugging/qscriptdebuggerlocalsmodel_p.h deleted file mode 100644 index ec01cdee8..000000000 --- a/src/scripttools/debugging/qscriptdebuggerlocalsmodel_p.h +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERLOCALSMODEL_P_H -#define QSCRIPTDEBUGGERLOCALSMODEL_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerValue; -class QScriptDebuggerJobSchedulerInterface; -class QScriptDebuggerCommandSchedulerInterface; - -class QScriptDebuggerLocalsModelPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerLocalsModel - : public QAbstractItemModel -{ - Q_OBJECT -public: - QScriptDebuggerLocalsModel(QScriptDebuggerJobSchedulerInterface *jobScheduler, - QScriptDebuggerCommandSchedulerInterface *commandScheduler, - QObject *parent = nullptr); - ~QScriptDebuggerLocalsModel(); - - void init(int frameIndex); - void sync(int frameIndex); - - int frameIndex() const; - - QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; - QModelIndex parent(const QModelIndex &child) const; - int columnCount(const QModelIndex &parent) const; - int rowCount(const QModelIndex &parent) const; - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; - bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); - QVariant headerData(int section, Qt::Orientation, int role = Qt::DisplayRole) const; - Qt::ItemFlags flags(const QModelIndex &index) const; - bool hasChildren(const QModelIndex &parent) const; - bool canFetchMore(const QModelIndex &parent) const; - void fetchMore(const QModelIndex &parent); - -Q_SIGNALS: - void scopeObjectAvailable(const QModelIndex &index); - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerLocalsModel) - Q_DISABLE_COPY(QScriptDebuggerLocalsModel) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp b/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp deleted file mode 100644 index 9ee0153b1..000000000 --- a/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp +++ /dev/null @@ -1,388 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerlocalswidget_p.h" -#include "qscriptdebuggerlocalswidgetinterface_p_p.h" -#include "qscriptdebuggerlocalsmodel_p.h" -#include "qscriptcompletionproviderinterface_p.h" -#include "qscriptcompletiontaskinterface_p.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class CustomProxyModel : public QSortFilterProxyModel -{ -public: - CustomProxyModel(QObject *parent = nullptr) - : QSortFilterProxyModel(parent) {} - - bool hasChildren(const QModelIndex &parent) const - { - if (!sourceModel()) - return false; - QModelIndex sourceParent = mapToSource(parent); - if (parent.isValid() && !sourceParent.isValid()) - return false; - return sourceModel()->hasChildren(sourceParent); - } -}; - -class QScriptDebuggerLocalsWidgetPrivate - : public QScriptDebuggerLocalsWidgetInterfacePrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerLocalsWidget) -public: - QScriptDebuggerLocalsWidgetPrivate(); - ~QScriptDebuggerLocalsWidgetPrivate(); - - void complete(QLineEdit *le); - - // private slots - void _q_onCompletionTaskFinished(); - void _q_insertCompletion(const QString &text); - void _q_expandIndex(const QModelIndex &index); - - QTreeView *view; - QPointer completingEditor; - QCompleter *completer; - CustomProxyModel *proxy; -}; - -QScriptDebuggerLocalsWidgetPrivate::QScriptDebuggerLocalsWidgetPrivate() -{ - completingEditor = 0; - completer = 0; - proxy = 0; -} - -QScriptDebuggerLocalsWidgetPrivate::~QScriptDebuggerLocalsWidgetPrivate() -{ -} - -void QScriptDebuggerLocalsWidgetPrivate::complete(QLineEdit *le) -{ - Q_Q(QScriptDebuggerLocalsWidget); - QScriptCompletionTaskInterface *task = 0; - // ### need to pass the current frame # - task = completionProvider->createCompletionTask( - le->text(), le->cursorPosition(), - q->localsModel()->frameIndex(), /*options=*/0); - QObject::connect(task, SIGNAL(finished()), - q, SLOT(_q_onCompletionTaskFinished())); - completingEditor = le; - task->start(); -} - -void QScriptDebuggerLocalsWidgetPrivate::_q_onCompletionTaskFinished() -{ - Q_Q(QScriptDebuggerLocalsWidget); - QScriptCompletionTaskInterface *task = 0; - task = qobject_cast(q_func()->sender()); - if (!completingEditor) { - task->deleteLater(); - return; - } - - if (task->resultCount() == 1) { - // do the completion right away - QString completion = task->resultAt(0); - completion.append(task->appendix()); - QString tmp = completingEditor->text(); - tmp.remove(task->position(), task->length()); - tmp.insert(task->position(), completion); - completingEditor->setText(tmp); - completingEditor = 0; - } else if (task->resultCount() > 1) { - // popup completion - if (!completer) { - completer = new QCompleter(q); - completer->setCompletionMode(QCompleter::PopupCompletion); - completer->setCaseSensitivity(Qt::CaseSensitive); - completer->setWrapAround(false); - QObject::connect(completer, SIGNAL(activated(QString)), - q, SLOT(_q_insertCompletion(QString))); - } - QStringListModel *model = qobject_cast(completer->model()); - if (!model) { - model = new QStringListModel(q); - completer->setModel(model); - } - QStringList strings; - for (int i = 0; i < task->resultCount(); ++i) - strings.append(task->resultAt(i)); - model->setStringList(strings); - QString prefix = completingEditor->text().mid(task->position(), task->length()); - completer->setCompletionPrefix(prefix); - completingEditor->setCompleter(completer); - // we want to handle the insertion ourselves - QObject::disconnect(completer, 0, completingEditor, 0); - completer->complete(); - } - task->deleteLater(); -} - -void QScriptDebuggerLocalsWidgetPrivate::_q_insertCompletion(const QString &text) -{ - Q_ASSERT(completingEditor != 0); - QString tmp = completingEditor->text(); - tmp.insert(completingEditor->cursorPosition(), text.mid(completer->completionPrefix().length())); - completingEditor->setText(tmp); - completingEditor = 0; -} - -void QScriptDebuggerLocalsWidgetPrivate::_q_expandIndex(const QModelIndex &index) -{ - if (view->model() == index.model()) - view->expand(proxy->mapFromSource(index)); -} - -class QScriptDebuggerLocalsItemDelegate - : public QStyledItemDelegate -{ - Q_OBJECT -public: - QScriptDebuggerLocalsItemDelegate(QObject *parent = nullptr); - - QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const; - void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const; - void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; - - bool eventFilter(QObject *watched, QEvent *event); - -private Q_SLOTS: - void validateInput(const QString &text) - { - QWidget *editor = qobject_cast(sender()); - QPalette pal = editor->palette(); - QColor col; - bool ok = (QScriptEngine::checkSyntax(text).state() == QScriptSyntaxCheckResult::Valid); - if (ok) { - col = Qt::white; - } else { - QScriptSyntaxCheckResult result = QScriptEngine::checkSyntax( - text + QLatin1Char('\n')); - if (result.state() == QScriptSyntaxCheckResult::Intermediate) - col = QColor(255, 240, 192); - else - col = QColor(255, 102, 102); - } - pal.setColor(QPalette::Active, QPalette::Base, col); - editor->setPalette(pal); - } -}; - -QScriptDebuggerLocalsItemDelegate::QScriptDebuggerLocalsItemDelegate( - QObject *parent) - : QStyledItemDelegate(parent) -{ -} - -QWidget *QScriptDebuggerLocalsItemDelegate::createEditor( - QWidget *parent, const QStyleOptionViewItem &option, - const QModelIndex &index) const -{ - QWidget *editor = QStyledItemDelegate::createEditor(parent, option, index); - if (index.column() == 1) { - // value - QLineEdit *le = qobject_cast(editor); - if (le) { - QObject::connect(le, SIGNAL(textEdited(QString)), - this, SLOT(validateInput(QString))); - } - } - return editor; -} - -bool QScriptDebuggerLocalsItemDelegate::eventFilter(QObject *watched, QEvent *event) -{ - QLineEdit *le = qobject_cast(watched); - if (!le) - return QStyledItemDelegate::eventFilter(watched, event); - - QScriptDebuggerLocalsWidget *localsWidget = qobject_cast(parent()); - Q_ASSERT(localsWidget != 0); - QScriptDebuggerLocalsWidgetPrivate *lvp = - reinterpret_cast( - QScriptDebuggerLocalsWidgetPrivate::get(localsWidget)); - - if ((event->type() == QEvent::FocusIn) && lvp->completingEditor) { - // because QLineEdit insists on being difficult... - return true; - } - - if (event->type() != QEvent::KeyPress) - return QStyledItemDelegate::eventFilter(watched, event); - QKeyEvent *ke = static_cast(event); - if ((ke->key() == Qt::Key_Enter) || (ke->key() == Qt::Key_Return)) { - if (QScriptEngine::checkSyntax(le->text()).state() != QScriptSyntaxCheckResult::Valid) { - // ignore when script contains syntax error - return true; - } - } - if (ke->key() != Qt::Key_Tab) - return QStyledItemDelegate::eventFilter(watched, event); - - // trigger completion - lvp->complete(le); - return true; -} - -void QScriptDebuggerLocalsItemDelegate::setModelData( - QWidget *editor, QAbstractItemModel *model, - const QModelIndex &index) const -{ - if (index.column() == 1) { - // check that the syntax is OK - QString expression = qobject_cast(editor)->text(); - if (QScriptEngine::checkSyntax(expression).state() != QScriptSyntaxCheckResult::Valid) - return; - } - QStyledItemDelegate::setModelData(editor, model, index); -} - -void QScriptDebuggerLocalsItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, - const QModelIndex &index) const -{ - QStyledItemDelegate::paint(painter, option, index); -#if 0 - QModelIndex parent = index.parent(); - if (parent.isValid()) { - QStyledItemDelegate::paint(painter, option, index); - } else { - // this is a top-level item. - const QTreeView *view = qobject_cast(option.widget)); - Q_ASSERT(view != 0); - - QStyleOptionButton buttonOption; - - buttonOption.state = option.state; - buttonOption.state &= ~QStyle::State_HasFocus; - - buttonOption.rect = option.rect; - buttonOption.palette = option.palette; - buttonOption.features = QStyleOptionButton::None; - view->style()->drawControl(QStyle::CE_PushButton, &buttonOption, painter, view); - - QStyleOption branchOption; - static const int i = 9; // ### hardcoded in qcommonstyle.cpp - QRect r = option.rect; - branchOption.rect = QRect(r.left() + i/2, r.top() + (r.height() - i)/2, i, i); - branchOption.palette = option.palette; - branchOption.state = QStyle::State_Children; - - if (view->isExpanded(index)) - branchOption.state |= QStyle::State_Open; - - view->style()->drawPrimitive(QStyle::PE_IndicatorBranch, &branchOption, painter, view); - - // draw text - QRect textrect = QRect(r.left() + i*2, r.top(), r.width() - ((5*i)/2), r.height()); - QString text = elidedText(option.fontMetrics, textrect.width(), Qt::ElideMiddle, - index.data(Qt::DisplayRole).toString()); - view->style()->drawItemText(painter, textrect, Qt::AlignCenter, - option.palette, view->isEnabled(), text); - } -#endif -} - -QScriptDebuggerLocalsWidget::QScriptDebuggerLocalsWidget(QWidget *parent) - : QScriptDebuggerLocalsWidgetInterface(*new QScriptDebuggerLocalsWidgetPrivate, parent, 0) -{ - Q_D(QScriptDebuggerLocalsWidget); - d->view = new QTreeView(); - d->view->setItemDelegate(new QScriptDebuggerLocalsItemDelegate(this)); - d->view->setEditTriggers(QAbstractItemView::DoubleClicked); -// d->view->setEditTriggers(QAbstractItemView::NoEditTriggers); - d->view->setEditTriggers(QAbstractItemView::DoubleClicked | QAbstractItemView::SelectedClicked); - d->view->setAlternatingRowColors(true); - d->view->setSelectionBehavior(QAbstractItemView::SelectRows); - d->view->setSortingEnabled(true); - d->view->header()->setDefaultAlignment(Qt::AlignLeft); -// d->view->header()->setSortIndicatorShown(true); -// d->view->header()->setResizeMode(QHeaderView::ResizeToContents); - - QVBoxLayout *vbox = new QVBoxLayout(this); - vbox->setMargin(0); - vbox->addWidget(d->view); -} - -QScriptDebuggerLocalsWidget::~QScriptDebuggerLocalsWidget() -{ -} - -/*! - \reimp -*/ -QScriptDebuggerLocalsModel *QScriptDebuggerLocalsWidget::localsModel() const -{ - Q_D(const QScriptDebuggerLocalsWidget); - if (!d->proxy) - return 0; - return qobject_cast(d->proxy->sourceModel()); -} - -/*! - \reimp -*/ -void QScriptDebuggerLocalsWidget::setLocalsModel(QScriptDebuggerLocalsModel *model) -{ - Q_D(QScriptDebuggerLocalsWidget); - if (localsModel()) { - QObject::disconnect(localsModel(), 0, d->view, 0); - } - if (model) { - QObject::connect(model, SIGNAL(scopeObjectAvailable(QModelIndex)), - this, SLOT(_q_expandIndex(QModelIndex))); - } - if (!d->proxy) { - d->proxy = new CustomProxyModel(this); - d->view->sortByColumn(0, Qt::AscendingOrder); - } - d->proxy->setSourceModel(model); - d->view->setModel(d->proxy); -} - -/*! - \reimp -*/ -void QScriptDebuggerLocalsWidget::expand(const QModelIndex &index) -{ - Q_D(QScriptDebuggerLocalsWidget); - d->view->expand(index); - d->view->setFirstColumnSpanned(index.row(), QModelIndex(), true); -} - -QT_END_NAMESPACE - -#include "moc_qscriptdebuggerlocalswidget.cpp" -#include "moc_qscriptdebuggerlocalswidget_p.h" diff --git a/src/scripttools/debugging/qscriptdebuggerlocalswidget_p.h b/src/scripttools/debugging/qscriptdebuggerlocalswidget_p.h deleted file mode 100644 index 36284aa17..000000000 --- a/src/scripttools/debugging/qscriptdebuggerlocalswidget_p.h +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERLOCALSWIDGET_P_H -#define QSCRIPTDEBUGGERLOCALSWIDGET_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qscriptdebuggerlocalswidgetinterface_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerLocalsWidgetPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerLocalsWidget: - public QScriptDebuggerLocalsWidgetInterface -{ - Q_OBJECT -public: - QScriptDebuggerLocalsWidget(QWidget *parent = nullptr); - ~QScriptDebuggerLocalsWidget(); - - QScriptDebuggerLocalsModel *localsModel() const; - void setLocalsModel(QScriptDebuggerLocalsModel *model); - - void expand(const QModelIndex &index); - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerLocalsWidget) - Q_DISABLE_COPY(QScriptDebuggerLocalsWidget) - - Q_PRIVATE_SLOT(d_func(), void _q_onCompletionTaskFinished()) - Q_PRIVATE_SLOT(d_func(), void _q_insertCompletion(const QString &)) - Q_PRIVATE_SLOT(d_func(), void _q_expandIndex(const QModelIndex &)) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerlocalswidgetinterface.cpp b/src/scripttools/debugging/qscriptdebuggerlocalswidgetinterface.cpp deleted file mode 100644 index f7df99f7d..000000000 --- a/src/scripttools/debugging/qscriptdebuggerlocalswidgetinterface.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerlocalswidgetinterface_p.h" -#include "qscriptdebuggerlocalswidgetinterface_p_p.h" - -QT_BEGIN_NAMESPACE - -QScriptDebuggerLocalsWidgetInterfacePrivate::QScriptDebuggerLocalsWidgetInterfacePrivate() -{ - completionProvider = 0; -} - -QScriptDebuggerLocalsWidgetInterfacePrivate::~QScriptDebuggerLocalsWidgetInterfacePrivate() -{ -} - -QScriptDebuggerLocalsWidgetInterface::~QScriptDebuggerLocalsWidgetInterface() -{ -} - -QScriptDebuggerLocalsWidgetInterface::QScriptDebuggerLocalsWidgetInterface( - QScriptDebuggerLocalsWidgetInterfacePrivate &dd, - QWidget *parent, Qt::WindowFlags flags) - : QWidget(dd, parent, flags) -{ -} - -QScriptCompletionProviderInterface *QScriptDebuggerLocalsWidgetInterface::completionProvider() const -{ - Q_D(const QScriptDebuggerLocalsWidgetInterface); - return d->completionProvider; -} - -void QScriptDebuggerLocalsWidgetInterface::setCompletionProvider(QScriptCompletionProviderInterface *completionProvider) -{ - Q_D(QScriptDebuggerLocalsWidgetInterface); - d->completionProvider = completionProvider; -} - -QT_END_NAMESPACE -#include "moc_qscriptdebuggerlocalswidgetinterface_p.h" diff --git a/src/scripttools/debugging/qscriptdebuggerlocalswidgetinterface_p.h b/src/scripttools/debugging/qscriptdebuggerlocalswidgetinterface_p.h deleted file mode 100644 index 053d21837..000000000 --- a/src/scripttools/debugging/qscriptdebuggerlocalswidgetinterface_p.h +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERLOCALSWIDGETINTERFACE_P_H -#define QSCRIPTDEBUGGERLOCALSWIDGETINTERFACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerLocalsModel; -class QModelIndex; -class QScriptCompletionProviderInterface; - -class QScriptDebuggerLocalsWidgetInterfacePrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerLocalsWidgetInterface: - public QWidget -{ - Q_OBJECT -public: - ~QScriptDebuggerLocalsWidgetInterface(); - - QScriptCompletionProviderInterface *completionProvider() const; - void setCompletionProvider(QScriptCompletionProviderInterface *completionProvider); - - virtual QScriptDebuggerLocalsModel *localsModel() const = 0; - virtual void setLocalsModel(QScriptDebuggerLocalsModel *model) = 0; - - virtual void expand(const QModelIndex &index) = 0; - -protected: - QScriptDebuggerLocalsWidgetInterface( - QScriptDebuggerLocalsWidgetInterfacePrivate &dd, - QWidget *parent, Qt::WindowFlags flags); - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerLocalsWidgetInterface) - Q_DISABLE_COPY(QScriptDebuggerLocalsWidgetInterface) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerlocalswidgetinterface_p_p.h b/src/scripttools/debugging/qscriptdebuggerlocalswidgetinterface_p_p.h deleted file mode 100644 index 17741b427..000000000 --- a/src/scripttools/debugging/qscriptdebuggerlocalswidgetinterface_p_p.h +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERLOCALSWIDGETINTERFACE_P_P_H -#define QSCRIPTDEBUGGERLOCALSWIDGETINTERFACE_P_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qwidget_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptCompletionProviderInterface; - -class QScriptDebuggerLocalsWidgetInterface; -class QScriptDebuggerLocalsWidgetInterfacePrivate - : public QWidgetPrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerLocalsWidgetInterface) -public: - QScriptDebuggerLocalsWidgetInterfacePrivate(); - ~QScriptDebuggerLocalsWidgetInterfacePrivate(); - - QScriptCompletionProviderInterface *completionProvider; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerobjectsnapshotdelta_p.h b/src/scripttools/debugging/qscriptdebuggerobjectsnapshotdelta_p.h deleted file mode 100644 index 02c10532b..000000000 --- a/src/scripttools/debugging/qscriptdebuggerobjectsnapshotdelta_p.h +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGEROBJECTSNAPSHOTDELTA_P_H -#define QSCRIPTDEBUGGEROBJECTSNAPSHOTDELTA_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include -#include "qscriptdebuggervalueproperty_p.h" - -QT_BEGIN_NAMESPACE - -class QDataStream; - -class Q_AUTOTEST_EXPORT QScriptDebuggerObjectSnapshotDelta -{ -public: - QStringList removedProperties; - QScriptDebuggerValuePropertyList changedProperties; - QScriptDebuggerValuePropertyList addedProperties; -}; - -Q_AUTOTEST_EXPORT QDataStream &operator<<(QDataStream &, const QScriptDebuggerObjectSnapshotDelta &); -Q_AUTOTEST_EXPORT QDataStream &operator>>(QDataStream &, QScriptDebuggerObjectSnapshotDelta &); - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerresponse.cpp b/src/scripttools/debugging/qscriptdebuggerresponse.cpp deleted file mode 100644 index 0844ea057..000000000 --- a/src/scripttools/debugging/qscriptdebuggerresponse.cpp +++ /dev/null @@ -1,320 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerresponse_p.h" -#include "qscriptdebuggervalue_p.h" -#include "qscripttoolscommon_p.h" - -#include -#include - -QT_BEGIN_NAMESPACE - -/*! - \since 4.5 - \class QScriptDebuggerResponse - \internal - - \brief The QScriptDebuggerResponse class represents a front-end's response to a QScriptDebuggerCommand. - - A response contains an error code and result. -*/ - -class QScriptDebuggerResponsePrivate -{ -public: - QScriptDebuggerResponsePrivate(); - ~QScriptDebuggerResponsePrivate(); - - QScriptDebuggerResponse::Error error; - QVariant result; - bool async; -}; - -QScriptDebuggerResponsePrivate::QScriptDebuggerResponsePrivate() -{ - error = QScriptDebuggerResponse::NoError; - async = false; -} - -QScriptDebuggerResponsePrivate::~QScriptDebuggerResponsePrivate() -{ -} - -QScriptDebuggerResponse::QScriptDebuggerResponse() - : d_ptr(new QScriptDebuggerResponsePrivate) -{ -} - -QScriptDebuggerResponse::QScriptDebuggerResponse(const QScriptDebuggerResponse &other) - : d_ptr(new QScriptDebuggerResponsePrivate) -{ - *d_ptr = *other.d_ptr; -} - -QScriptDebuggerResponse::~QScriptDebuggerResponse() -{ -} - -QScriptDebuggerResponse &QScriptDebuggerResponse::operator=(const QScriptDebuggerResponse &other) -{ - *d_ptr = *other.d_ptr; - return *this; -} - -/*! - Returns the error code of this response. -*/ -QScriptDebuggerResponse::Error QScriptDebuggerResponse::error() const -{ - Q_D(const QScriptDebuggerResponse); - return d->error; -} - -/*! - Sets the \a error code of this response. -*/ -void QScriptDebuggerResponse::setError(Error error) -{ - Q_D(QScriptDebuggerResponse); - d->error = error; -} - -/*! - Returns the result of this response. This function is provided for - convenience. -*/ -QVariant QScriptDebuggerResponse::result() const -{ - Q_D(const QScriptDebuggerResponse); - return d->result; -} - -/*! - Sets the Result attribute of this response to the given \a - value. This function is provided for convenience. -*/ -void QScriptDebuggerResponse::setResult(const QVariant &value) -{ - Q_D(QScriptDebuggerResponse); - d->result = value; -} - -void QScriptDebuggerResponse::setResult(int value) -{ - Q_D(QScriptDebuggerResponse); - d->result = value; -} - -void QScriptDebuggerResponse::setResult(const QString &value) -{ - Q_D(QScriptDebuggerResponse); - d->result = value; -} - -void QScriptDebuggerResponse::setResult(const QScriptBreakpointData &data) -{ - Q_D(QScriptDebuggerResponse); - d->result = QVariant::fromValue(data); -} - -void QScriptDebuggerResponse::setResult(const QScriptBreakpointMap &breakpoints) -{ - Q_D(QScriptDebuggerResponse); - d->result = QVariant::fromValue(breakpoints); -} - -void QScriptDebuggerResponse::setResult(const QScriptScriptMap &scripts) -{ - Q_D(QScriptDebuggerResponse); - d->result = QVariant::fromValue(scripts); -} - -void QScriptDebuggerResponse::setResult(const QScriptScriptData &data) -{ - Q_D(QScriptDebuggerResponse); - d->result = QVariant::fromValue(data); -} - -void QScriptDebuggerResponse::setResult(const QScriptDebuggerValue &value) -{ - Q_D(QScriptDebuggerResponse); - d->result = QVariant::fromValue(value); -} - -void QScriptDebuggerResponse::setResult(const QScriptDebuggerValueList &values) -{ - Q_D(QScriptDebuggerResponse); - d->result = QVariant::fromValue(values); -} - -void QScriptDebuggerResponse::setResult(const QScriptDebuggerValuePropertyList &props) -{ - Q_D(QScriptDebuggerResponse); - d->result = QVariant::fromValue(props); -} - -void QScriptDebuggerResponse::setResult(const QScriptContextInfo &info) -{ - Q_D(QScriptDebuggerResponse); - d->result = QVariant::fromValue(info); -} - -int QScriptDebuggerResponse::resultAsInt() const -{ - Q_D(const QScriptDebuggerResponse); - return d->result.toInt(); -} - -qint64 QScriptDebuggerResponse::resultAsLongLong() const -{ - Q_D(const QScriptDebuggerResponse); - return d->result.toLongLong(); -} - -QString QScriptDebuggerResponse::resultAsString() const -{ - Q_D(const QScriptDebuggerResponse); - return d->result.toString(); -} - -QScriptBreakpointData QScriptDebuggerResponse::resultAsBreakpointData() const -{ - Q_D(const QScriptDebuggerResponse); - return qvariant_cast(d->result); -} - -QScriptBreakpointMap QScriptDebuggerResponse::resultAsBreakpoints() const -{ - Q_D(const QScriptDebuggerResponse); - return qvariant_cast(d->result); -} - -QScriptScriptMap QScriptDebuggerResponse::resultAsScripts() const -{ - Q_D(const QScriptDebuggerResponse); - return qvariant_cast(d->result); -} - -QScriptScriptData QScriptDebuggerResponse::resultAsScriptData() const -{ - Q_D(const QScriptDebuggerResponse); - return qvariant_cast(d->result); -} - -QScriptDebuggerValue QScriptDebuggerResponse::resultAsScriptValue() const -{ - Q_D(const QScriptDebuggerResponse); - return qvariant_cast(d->result); -} - -QScriptDebuggerValueList QScriptDebuggerResponse::resultAsScriptValueList() const -{ - Q_D(const QScriptDebuggerResponse); - return qvariant_cast(d->result); -} - -QScriptDebuggerValuePropertyList QScriptDebuggerResponse::resultAsScriptValuePropertyList() const -{ - Q_D(const QScriptDebuggerResponse); - return qvariant_cast(d->result); -} - -QScriptContextInfo QScriptDebuggerResponse::resultAsContextInfo() const -{ - Q_D(const QScriptDebuggerResponse); - return qvariant_cast(d->result); -} - -bool QScriptDebuggerResponse::async() const -{ - Q_D(const QScriptDebuggerResponse); - return d->async; -} - -void QScriptDebuggerResponse::setAsync(bool async) -{ - Q_D(QScriptDebuggerResponse); - d->async = async; -} - -/*! - Returns true if this QScriptDebuggerResponse is equal to the \a other - response, otherwise returns false. -*/ -bool QScriptDebuggerResponse::operator==(const QScriptDebuggerResponse &other) const -{ - Q_D(const QScriptDebuggerResponse); - const QScriptDebuggerResponsePrivate *od = other.d_func(); - if (d == od) - return true; - if (!d || !od) - return false; - return ((d->error == od->error) - && (d->result == od->result) - && (d->async == od->async)); -} - -/*! - Returns true if this QScriptDebuggerResponse is not equal to the \a - other response, otherwise returns false. -*/ -bool QScriptDebuggerResponse::operator!=(const QScriptDebuggerResponse &other) const -{ - return !(*this == other); -} - -/*! - \fn QDataStream &operator<<(QDataStream &stream, const QScriptDebuggerResponse &response) - \relates QScriptDebuggerResponse - - Writes the given \a response to the specified \a stream. -*/ -QDataStream &operator<<(QDataStream &out, const QScriptDebuggerResponse &response) -{ - const QScriptDebuggerResponsePrivate *d = response.d_ptr.data(); - out << (quint32)d->error; - out << d->result; - out << d->async; - return out; -} - -/*! - \fn QDataStream &operator>>(QDataStream &stream, QScriptDebuggerResponse &response) - \relates QScriptDebuggerResponse - - Reads a QScriptDebuggerResponse from the specified \a stream into the - given \a response. -*/ -QDataStream &operator>>(QDataStream &in, QScriptDebuggerResponse &response) -{ - QScriptDebuggerResponsePrivate *d = response.d_ptr.data(); - - quint32 error; - in >> error; - d->error = QScriptDebuggerResponse::Error(error); - in >> d->result; - in >> d->async; - - return in; -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptdebuggerresponse_p.h b/src/scripttools/debugging/qscriptdebuggerresponse_p.h deleted file mode 100644 index 279482554..000000000 --- a/src/scripttools/debugging/qscriptdebuggerresponse_p.h +++ /dev/null @@ -1,120 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERRESPONSE_P_H -#define QSCRIPTDEBUGGERRESPONSE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include -#include -#include - -#include "qscriptbreakpointdata_p.h" -#include "qscriptscriptdata_p.h" -#include "qscriptdebuggervalue_p.h" -#include "qscriptdebuggervalueproperty_p.h" - -QT_BEGIN_NAMESPACE - -class QDataStream; -class QScriptContextInfo; - -class QScriptDebuggerResponsePrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerResponse -{ -public: - friend Q_AUTOTEST_EXPORT QDataStream &operator<<(QDataStream &, const QScriptDebuggerResponse &); - friend Q_AUTOTEST_EXPORT QDataStream &operator>>(QDataStream &, QScriptDebuggerResponse &); - - enum Error { - NoError, - InvalidContextIndex, - InvalidArgumentIndex, - InvalidScriptID, - InvalidBreakpointID, - UserError = 1000, - MaxUserError = 32767 - }; - - QScriptDebuggerResponse(); - QScriptDebuggerResponse(const QScriptDebuggerResponse &other); - ~QScriptDebuggerResponse(); - - Error error() const; - void setError(Error error); - - QVariant result() const; - void setResult(const QVariant &value); - - void setResult(int value); - void setResult(const QString &value); - void setResult(const QScriptBreakpointData &data); - void setResult(const QScriptBreakpointMap &breakpoints); - void setResult(const QScriptScriptMap &scripts); - void setResult(const QScriptScriptData &data); - void setResult(const QScriptDebuggerValue &value); - void setResult(const QScriptDebuggerValueList &value); - void setResult(const QScriptDebuggerValuePropertyList &props); - void setResult(const QScriptContextInfo &info); - - int resultAsInt() const; - qint64 resultAsLongLong() const; - QString resultAsString() const; - QScriptBreakpointData resultAsBreakpointData() const; - QScriptBreakpointMap resultAsBreakpoints() const; - QScriptScriptMap resultAsScripts() const; - QScriptScriptData resultAsScriptData() const; - QScriptDebuggerValue resultAsScriptValue() const; - QScriptDebuggerValueList resultAsScriptValueList() const; - QScriptDebuggerValuePropertyList resultAsScriptValuePropertyList() const; - QScriptContextInfo resultAsContextInfo() const; - - bool async() const; - void setAsync(bool async); - - QScriptDebuggerResponse &operator=(const QScriptDebuggerResponse &other); - - bool operator==(const QScriptDebuggerResponse &other) const; - bool operator!=(const QScriptDebuggerResponse &other) const; - -private: - QScopedPointer d_ptr; - - Q_DECLARE_PRIVATE(QScriptDebuggerResponse) -}; - -Q_AUTOTEST_EXPORT QDataStream &operator<<(QDataStream &, const QScriptDebuggerResponse &); -Q_AUTOTEST_EXPORT QDataStream &operator>>(QDataStream &, QScriptDebuggerResponse &); - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerresponsehandlerinterface_p.h b/src/scripttools/debugging/qscriptdebuggerresponsehandlerinterface_p.h deleted file mode 100644 index f3597dcbb..000000000 --- a/src/scripttools/debugging/qscriptdebuggerresponsehandlerinterface_p.h +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERRESPONSEHANDLERINTERFACE_P_H -#define QSCRIPTDEBUGGERRESPONSEHANDLERINTERFACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerResponse; - -class Q_AUTOTEST_EXPORT QScriptDebuggerResponseHandlerInterface -{ -public: - virtual ~QScriptDebuggerResponseHandlerInterface() {} - - virtual void handleResponse(const QScriptDebuggerResponse &response, - int commandId) = 0; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp b/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp deleted file mode 100644 index 8be18f43c..000000000 --- a/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp +++ /dev/null @@ -1,408 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerscriptedconsolecommand_p.h" -#include "qscriptdebuggerconsolecommand_p_p.h" -#include "qscriptdebuggerconsolecommandjob_p.h" -#include "qscriptdebuggerconsolecommandjob_p_p.h" -#include "qscriptmessagehandlerinterface_p.h" -#include "qscriptdebuggerconsoleglobalobject_p.h" -#include "qscriptdebuggerresponse_p.h" -#include "qscriptdebuggercommandschedulerinterface_p.h" -#include "qscripttoolscommon_p.h" - -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -/*! - \since 4.5 - \class QScriptDebuggerScriptedConsoleCommand - \internal - - \brief The QScriptDebuggerScriptedConsoleCommand class encapsulates a command defined in a script. -*/ - -class QScriptDebuggerScriptedConsoleCommandPrivate - : public QScriptDebuggerConsoleCommandPrivate -{ -public: - QScriptDebuggerScriptedConsoleCommandPrivate(); - ~QScriptDebuggerScriptedConsoleCommandPrivate(); - - QString name; - QString group; - QString shortDescription; - QString longDescription; - QStringList aliases; - QStringList seeAlso; - QStringList argumentTypes; - QStringList subCommands; - QScriptValue globalObject; - QScriptValue execFunction; - QScriptValue responseFunction; -}; - -QScriptDebuggerScriptedConsoleCommandPrivate::QScriptDebuggerScriptedConsoleCommandPrivate() -{ -} - -QScriptDebuggerScriptedConsoleCommandPrivate::~QScriptDebuggerScriptedConsoleCommandPrivate() -{ -} - -QScriptDebuggerScriptedConsoleCommand::QScriptDebuggerScriptedConsoleCommand( - const QString &name, const QString &group, - const QString &shortDescription, const QString &longDescription, - const QStringList &aliases, const QStringList &seeAlso, - const QStringList &argumentTypes, const QStringList &subCommands, - const QScriptValue &globalObject, - const QScriptValue &execFunction, const QScriptValue &responseFunction) - : QScriptDebuggerConsoleCommand(*new QScriptDebuggerScriptedConsoleCommandPrivate) -{ - Q_D(QScriptDebuggerScriptedConsoleCommand); - d->name = name; - d->group = group; - d->shortDescription = shortDescription; - d->longDescription = longDescription; - d->aliases = aliases; - d->seeAlso = seeAlso; - d->argumentTypes = argumentTypes; - d->subCommands = subCommands; - d->globalObject = globalObject; - d->execFunction = execFunction; - d->responseFunction = responseFunction; -} - -QScriptDebuggerScriptedConsoleCommand::~QScriptDebuggerScriptedConsoleCommand() -{ -} - -class QScriptDebuggerScriptedConsoleCommandJobPrivate; -class QScriptDebuggerScriptedConsoleCommandJob - : public QScriptDebuggerConsoleCommandJob, - public QScriptDebuggerCommandSchedulerInterface -{ -public: - QScriptDebuggerScriptedConsoleCommandJob( - QScriptDebuggerScriptedConsoleCommandPrivate *command, - const QStringList &arguments, - QScriptDebuggerConsole *console, - QScriptMessageHandlerInterface *messageHandler, - QScriptDebuggerCommandSchedulerInterface *commandScheduler); - ~QScriptDebuggerScriptedConsoleCommandJob(); - - int scheduleCommand( - const QScriptDebuggerCommand &command, - QScriptDebuggerResponseHandlerInterface *responseHandler); - - void start(); - void handleResponse(const QScriptDebuggerResponse &response, - int commandId); - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerScriptedConsoleCommandJob) - Q_DISABLE_COPY(QScriptDebuggerScriptedConsoleCommandJob) -}; - -class QScriptDebuggerScriptedConsoleCommandJobPrivate - : public QScriptDebuggerConsoleCommandJobPrivate -{ -public: - QScriptDebuggerScriptedConsoleCommandJobPrivate() : command(0), commandCount(0) {} - ~QScriptDebuggerScriptedConsoleCommandJobPrivate() {} - - QScriptDebuggerScriptedConsoleCommandPrivate *command; - QStringList arguments; - int commandCount; -}; - -QScriptDebuggerScriptedConsoleCommandJob::QScriptDebuggerScriptedConsoleCommandJob( - QScriptDebuggerScriptedConsoleCommandPrivate *command, - const QStringList &arguments, - QScriptDebuggerConsole *console, - QScriptMessageHandlerInterface *messageHandler, - QScriptDebuggerCommandSchedulerInterface *commandScheduler) - : QScriptDebuggerConsoleCommandJob(*new QScriptDebuggerScriptedConsoleCommandJobPrivate, - console, messageHandler, commandScheduler) -{ - Q_D(QScriptDebuggerScriptedConsoleCommandJob); - d->command = command; - d->arguments = arguments; -} - -QScriptDebuggerScriptedConsoleCommandJob::~QScriptDebuggerScriptedConsoleCommandJob() -{ -} - -int QScriptDebuggerScriptedConsoleCommandJob::scheduleCommand( - const QScriptDebuggerCommand &command, - QScriptDebuggerResponseHandlerInterface *responseHandler) -{ - Q_D(QScriptDebuggerScriptedConsoleCommandJob); - ++d->commandCount; - return commandScheduler()->scheduleCommand(command, responseHandler); -} - -void QScriptDebuggerScriptedConsoleCommandJob::start() -{ - Q_D(QScriptDebuggerScriptedConsoleCommandJob); - QScriptEngine *engine = d->command->globalObject.engine(); - engine->setGlobalObject(d->command->globalObject); - QScriptValueList args; - for (int i = 0; i < d->arguments.size(); ++i) - args.append(QScriptValue(engine, d->arguments.at(i))); - QScriptDebuggerConsoleGlobalObject *global; - global = qobject_cast(engine->globalObject().toQObject()); - Q_ASSERT(global != 0); - global->setScheduler(this); - global->setResponseHandler(this); - global->setMessageHandler(d->messageHandler); - global->setConsole(d->console); - d->commandCount = 0; - QScriptValue ret = d->command->execFunction.call(QScriptValue(), args); - global->setScheduler(0); - global->setResponseHandler(0); - global->setMessageHandler(0); - global->setConsole(0); - if (Q_UNLIKELY(ret.isError())) { - qWarning("*** internal error: %s", qPrintable(ret.toString())); - } - if (d->commandCount == 0) - finish(); -} - -void QScriptDebuggerScriptedConsoleCommandJob::handleResponse( - const QScriptDebuggerResponse &response, - int commandId) -{ - Q_D(QScriptDebuggerScriptedConsoleCommandJob); - // ### generalize - QScriptEngine *engine = d->command->globalObject.engine(); - engine->setGlobalObject(d->command->globalObject); - QScriptValueList args; - args.append(engine->toScriptValue(response)); - args.append(QScriptValue(engine, commandId)); - QScriptDebuggerConsoleGlobalObject *global; - global = qobject_cast(d->command->globalObject.toQObject()); - Q_ASSERT(global != 0); - global->setScheduler(this); - global->setResponseHandler(this); - global->setMessageHandler(d->messageHandler); - global->setConsole(d->console); - d->commandCount = 0; - QScriptValue ret = d->command->responseFunction.call(QScriptValue(), args); - global->setScheduler(0); - global->setResponseHandler(0); - global->setMessageHandler(0); - global->setConsole(0); - if (Q_UNLIKELY(ret.isError())) { - qWarning("*** internal error: %s", qPrintable(ret.toString())); - } - if (d->commandCount == 0) - finish(); -} - -/*! - \internal -*/ -QString QScriptDebuggerScriptedConsoleCommand::name() const -{ - Q_D(const QScriptDebuggerScriptedConsoleCommand); - return d->name; -} - -/*! - \internal -*/ -QString QScriptDebuggerScriptedConsoleCommand::group() const -{ - Q_D(const QScriptDebuggerScriptedConsoleCommand); - return d->group; -} - -/*! - \internal -*/ -QString QScriptDebuggerScriptedConsoleCommand::shortDescription() const -{ - Q_D(const QScriptDebuggerScriptedConsoleCommand); - return d->shortDescription; -} - -/*! - \internal -*/ -QString QScriptDebuggerScriptedConsoleCommand::longDescription() const -{ - Q_D(const QScriptDebuggerScriptedConsoleCommand); - return d->longDescription; -} - -/*! - \internal -*/ -QStringList QScriptDebuggerScriptedConsoleCommand::aliases() const -{ - Q_D(const QScriptDebuggerScriptedConsoleCommand); - return d->aliases; -} - -/*! - \internal -*/ -QStringList QScriptDebuggerScriptedConsoleCommand::seeAlso() const -{ - Q_D(const QScriptDebuggerScriptedConsoleCommand); - return d->seeAlso; -} - -/*! - \internal -*/ -QStringList QScriptDebuggerScriptedConsoleCommand::argumentTypes() const -{ - Q_D(const QScriptDebuggerScriptedConsoleCommand); - return d->argumentTypes; -} - -/*! - \internal -*/ -QStringList QScriptDebuggerScriptedConsoleCommand::subCommands() const -{ - Q_D(const QScriptDebuggerScriptedConsoleCommand); - return d->subCommands; -} - -/*! - \internal -*/ -QScriptDebuggerConsoleCommandJob *QScriptDebuggerScriptedConsoleCommand::createJob( - const QStringList &arguments, - QScriptDebuggerConsole *console, - QScriptMessageHandlerInterface *messageHandler, - QScriptDebuggerCommandSchedulerInterface *commandScheduler) -{ - Q_D(QScriptDebuggerScriptedConsoleCommand); - return new QScriptDebuggerScriptedConsoleCommandJob( - d, arguments, console, messageHandler, commandScheduler); -} - -/*! - Parses a command defined by the given \a program. - Returns an object that encapsulates the command, or 0 if parsing failed. -*/ -QScriptDebuggerScriptedConsoleCommand *QScriptDebuggerScriptedConsoleCommand::parse( - const QString &program, const QString &fileName, - QScriptEngine *engine, QScriptMessageHandlerInterface *messageHandler) -{ - // create a custom global object - QScriptDebuggerConsoleGlobalObject *cppGlobal = new QScriptDebuggerConsoleGlobalObject(); - QScriptValue global = engine->newQObject(cppGlobal, - QScriptEngine::ScriptOwnership, - QScriptEngine::ExcludeSuperClassContents); - { - QScriptValueIterator it(engine->globalObject()); - while (it.hasNext()) { - it.next(); - global.setProperty(it.scriptName(), it.value(), it.flags()); - } - } - engine->setGlobalObject(global); - - cppGlobal->setMessageHandler(messageHandler); - QScriptValue ret = engine->evaluate(program, fileName); - cppGlobal->setMessageHandler(0); - if (engine->hasUncaughtException()) { - messageHandler->message(QtCriticalMsg, ret.toString(), fileName, - engine->uncaughtExceptionLineNumber()); - return 0; - } - - QScriptValue name = global.property(QLatin1String("name")); - if (!name.isString()) { - messageHandler->message(QtCriticalMsg, QLatin1String("command definition lacks a name"), fileName); - return 0; - } - QString nameStr = name.toString(); - - QScriptValue group = global.property(QLatin1String("group")); - if (!group.isString()) { - messageHandler->message(QtCriticalMsg, QString::fromLatin1("definition of command \"%0\" lacks a group name") - .arg(nameStr), fileName); - return 0; - } - QString groupStr = group.toString(); - - QScriptValue shortDesc = global.property(QLatin1String("shortDescription")); - if (!shortDesc.isString()) { - messageHandler->message(QtCriticalMsg, QString::fromLatin1("definition of command \"%0\" lacks shortDescription") - .arg(nameStr), fileName); - return 0; - } - QString shortDescStr = shortDesc.toString(); - - QScriptValue longDesc = global.property(QLatin1String("longDescription")); - if (!longDesc.isString()) { - messageHandler->message(QtCriticalMsg, QString::fromLatin1("definition of command \"%0\" lacks longDescription") - .arg(nameStr), fileName); - return 0; - } - QString longDescStr = longDesc.toString(); - - QStringList aliases; - qScriptValueToSequence(global.property(QLatin1String("aliases")), aliases); - - QStringList seeAlso; - qScriptValueToSequence(global.property(QLatin1String("seeAlso")), seeAlso); - - QStringList argTypes; - qScriptValueToSequence(global.property(QLatin1String("argumentTypes")), argTypes); - - QStringList subCommands; - qScriptValueToSequence(global.property(QLatin1String("subCommands")), subCommands); - - QScriptValue execFunction = global.property(QLatin1String("execute")); - if (!execFunction.isFunction()) { - messageHandler->message(QtCriticalMsg, QString::fromLatin1("definition of command \"%0\" lacks execute() function") - .arg(nameStr), fileName); - return 0; - } - - QScriptValue responseFunction = global.property(QLatin1String("handleResponse")); - - QScriptDebuggerScriptedConsoleCommand *result = new QScriptDebuggerScriptedConsoleCommand( - nameStr, groupStr, - shortDescStr, longDescStr, - aliases, seeAlso, - argTypes, subCommands, - global, execFunction, responseFunction); - return result; -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand_p.h b/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand_p.h deleted file mode 100644 index 50662dae1..000000000 --- a/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand_p.h +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERSCRIPTEDCONSOLECOMMAND_P_H -#define QSCRIPTDEBUGGERSCRIPTEDCONSOLECOMMAND_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qscriptdebuggerconsolecommand_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptEngine; -class QScriptValue; - -class QScriptDebuggerScriptedConsoleCommandPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerScriptedConsoleCommand - : public QScriptDebuggerConsoleCommand -{ -protected: - QScriptDebuggerScriptedConsoleCommand(const QString &name, - const QString &group, - const QString &shortDescription, - const QString &longDescription, - const QStringList &aliases, - const QStringList &seeAlso, - const QStringList &argumentTypes, - const QStringList &subCommands, - const QScriptValue &globalObject, - const QScriptValue &execFunction, - const QScriptValue &responseFunction); -public: - ~QScriptDebuggerScriptedConsoleCommand(); - - static QScriptDebuggerScriptedConsoleCommand *parse( - const QString &program, const QString &fileName, - QScriptEngine *engine, QScriptMessageHandlerInterface *messageHandler); - - QString name() const; - QString group() const; - QString shortDescription() const; - QString longDescription() const; - QStringList aliases() const; - QStringList seeAlso() const; - QStringList argumentTypes() const; - QStringList subCommands() const; - - QScriptDebuggerConsoleCommandJob *createJob( - const QStringList &arguments, - QScriptDebuggerConsole *console, - QScriptMessageHandlerInterface *messageHandler, - QScriptDebuggerCommandSchedulerInterface *commandScheduler); - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerScriptedConsoleCommand) - Q_DISABLE_COPY(QScriptDebuggerScriptedConsoleCommand) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerscriptsmodel.cpp b/src/scripttools/debugging/qscriptdebuggerscriptsmodel.cpp deleted file mode 100644 index 80dfaf403..000000000 --- a/src/scripttools/debugging/qscriptdebuggerscriptsmodel.cpp +++ /dev/null @@ -1,316 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerscriptsmodel_p.h" -#include "qscriptscriptdata_p.h" - -#include "qabstractitemmodel_p.h" - -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerScriptsModelPrivate - : public QAbstractItemModelPrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerScriptsModel) -public: - struct Node { - Node(qint64 sid, const QScriptScriptData &dt) - : scriptId(sid), data(dt) {} - - qint64 scriptId; - QScriptScriptData data; - QList > functionsInfo; - QSet executableLineNumbers; - }; - - QScriptDebuggerScriptsModelPrivate(); - ~QScriptDebuggerScriptsModelPrivate(); - - Node *findScriptNode(qint64 scriptId) const; - - int nextNodeId; - QMap nodes; -}; - -QScriptDebuggerScriptsModelPrivate::QScriptDebuggerScriptsModelPrivate() -{ - nextNodeId = 0; -} - -QScriptDebuggerScriptsModelPrivate::~QScriptDebuggerScriptsModelPrivate() -{ - qDeleteAll(nodes); -} - -QScriptDebuggerScriptsModelPrivate::Node *QScriptDebuggerScriptsModelPrivate::findScriptNode(qint64 scriptId) const -{ - QMap::const_iterator it; - for (it = nodes.constBegin(); it != nodes.constEnd(); ++it) { - Node *n = it.value(); - if (n->scriptId == scriptId) - return n; - } - return 0; -} - -QScriptDebuggerScriptsModel::QScriptDebuggerScriptsModel(QObject *parent) - : QAbstractItemModel(*new QScriptDebuggerScriptsModelPrivate, parent) -{ -} - -QScriptDebuggerScriptsModel::~QScriptDebuggerScriptsModel() -{ -} - -void QScriptDebuggerScriptsModel::removeScript(qint64 id) -{ - Q_D(QScriptDebuggerScriptsModel); - QMap::iterator it; - for (it = d->nodes.begin(); it != d->nodes.end(); ++it) { - QScriptDebuggerScriptsModelPrivate::Node *n = it.value(); - if (n->scriptId == id) { - d->nodes.erase(it); - delete n; - break; - } - } -} - -void QScriptDebuggerScriptsModel::addScript(qint64 sid, const QScriptScriptData &data) -{ - Q_D(QScriptDebuggerScriptsModel); - int id = d->nextNodeId; - ++d->nextNodeId; - d->nodes.insert(id, new QScriptDebuggerScriptsModelPrivate::Node(sid, data)); -} - -void QScriptDebuggerScriptsModel::addExtraScriptInfo( - qint64 sid, const QMap &functionsInfo, - const QSet &executableLineNumbers) -{ - Q_D(QScriptDebuggerScriptsModel); - QScriptDebuggerScriptsModelPrivate::Node *node = d->findScriptNode(sid); - if (!node) - return; - QList > lst; - QMap::const_iterator it; - for (it = functionsInfo.constBegin(); it != functionsInfo.constEnd(); ++it) - lst.append(qMakePair(it.key(), it.value())); - node->functionsInfo = lst; - node->executableLineNumbers = executableLineNumbers; -} - -void QScriptDebuggerScriptsModel::commit() -{ - layoutAboutToBeChanged(); - layoutChanged(); -} - -QScriptScriptData QScriptDebuggerScriptsModel::scriptData(qint64 sid) const -{ - Q_D(const QScriptDebuggerScriptsModel); - QScriptDebuggerScriptsModelPrivate::Node *node = d->findScriptNode(sid); - if (!node) - return QScriptScriptData(); - return node->data; -} - -QScriptScriptMap QScriptDebuggerScriptsModel::scripts() const -{ - Q_D(const QScriptDebuggerScriptsModel); - QScriptScriptMap result; - QMap::const_iterator it; - for (it = d->nodes.constBegin(); it != d->nodes.constEnd(); ++it) { - QScriptDebuggerScriptsModelPrivate::Node *n = it.value(); - result.insert(n->scriptId, n->data); - } - return result; -} - -qint64 QScriptDebuggerScriptsModel::resolveScript(const QString &fileName) const -{ - Q_D(const QScriptDebuggerScriptsModel); - QMap::const_iterator it; - for (it = d->nodes.constBegin(); it != d->nodes.constEnd(); ++it) { - QScriptDebuggerScriptsModelPrivate::Node *n = it.value(); - if (n->data.fileName() == fileName) - return n->scriptId; - } - return -1; -} - -QSet QScriptDebuggerScriptsModel::executableLineNumbers(qint64 scriptId) const -{ - Q_D(const QScriptDebuggerScriptsModel); - QScriptDebuggerScriptsModelPrivate::Node *node = d->findScriptNode(scriptId); - if (!node) - return QSet(); - return node->executableLineNumbers; -} - -QModelIndex QScriptDebuggerScriptsModel::indexFromScriptId(qint64 sid) const -{ - Q_D(const QScriptDebuggerScriptsModel); - int row = 0; - QMap::const_iterator it; - for (it = d->nodes.constBegin(); it != d->nodes.constEnd(); ++it, ++row) { - QScriptDebuggerScriptsModelPrivate::Node *n = it.value(); - if (n->scriptId == sid) - return createIndex(row, 0, it.key() << 12); - } - return QModelIndex(); -} - -qint64 QScriptDebuggerScriptsModel::scriptIdFromIndex(const QModelIndex &index) const -{ - Q_D(const QScriptDebuggerScriptsModel); - if (!index.isValid()) - return -1; - int id = index.internalId(); - if (id & 1) - return -1; - QScriptDebuggerScriptsModelPrivate::Node *n = d->nodes.value(id >> 12); - if (!n) - return -1; - return n->scriptId; -} - -QPair QScriptDebuggerScriptsModel::scriptFunctionInfoFromIndex(const QModelIndex &index) const -{ - Q_D(const QScriptDebuggerScriptsModel); - QPair result; - if (!index.isValid()) - return result; - int id = index.internalId(); - if (!(id & 1)) - return result; - QScriptDebuggerScriptsModelPrivate::Node *node = d->nodes.value(id >> 12); - if (!node) - return result; - int functionIndex = (id >> 1) & ((1 << 11) - 1); - result = node->functionsInfo.at(functionIndex); - return result; -} - -/*! - \reimp -*/ -QModelIndex QScriptDebuggerScriptsModel::index(int row, int column, const QModelIndex &parent) const -{ - Q_D(const QScriptDebuggerScriptsModel); - if (!parent.isValid()) { - if ((row < 0) || (row >= d->nodes.size())) - return QModelIndex(); - if (column != 0) - return QModelIndex(); - return createIndex(row, column, d->nodes.keys().at(row) << 12); - } - int id = parent.internalId(); - if (id & 1) - return QModelIndex(); - return createIndex(row, column, id | (row << 1) | 1); -} - -/*! - \reimp -*/ -QModelIndex QScriptDebuggerScriptsModel::parent(const QModelIndex &index) const -{ - Q_D(const QScriptDebuggerScriptsModel); - if (!index.isValid()) - return QModelIndex(); - int id = index.internalId(); - if (!(id & 1)) - return QModelIndex(); - QScriptDebuggerScriptsModelPrivate::Node *n = d->nodes.value(id >> 12); - if (!n) - return QModelIndex(); - return indexFromScriptId(n->scriptId); -} - -/*! - \reimp -*/ -int QScriptDebuggerScriptsModel::columnCount(const QModelIndex &) const -{ - return 1; -} - -/*! - \reimp -*/ -int QScriptDebuggerScriptsModel::rowCount(const QModelIndex &parent) const -{ - Q_D(const QScriptDebuggerScriptsModel); - if (!parent.isValid()) - return d->nodes.size(); - int id = parent.internalId(); - if (id & 1) - return 0; - QScriptDebuggerScriptsModelPrivate::Node *n = d->nodes.value(id >> 12); - if (!n) - return 0; - return n->functionsInfo.size(); -} - -/*! - \reimp -*/ -QVariant QScriptDebuggerScriptsModel::data(const QModelIndex &index, int role) const -{ - Q_D(const QScriptDebuggerScriptsModel); - if (!index.isValid()) - return QVariant(); - int id = index.internalId(); - QScriptDebuggerScriptsModelPrivate::Node *node = d->nodes.value(id >> 12); - if (!node) - return QVariant(); - if (!(id & 1)) { - if (role == Qt::DisplayRole) { - QString fn = node->data.fileName(); - if (fn.isEmpty()) - fn = QString::fromLatin1("").arg(node->scriptId); - return fn; - } else if (role == Qt::ToolTipRole) { - QString fn = node->data.fileName(); - if (QFileInfo(fn).fileName() != fn) - return fn; - } else if (role == Qt::UserRole) { - return node->scriptId; - } else if (role == Qt::UserRole+1) { - return node->data.baseLineNumber(); - } else if (role == Qt::UserRole+2) { - return node->data.contents(); - } - } else { - int functionIndex = (id >> 1) & ((1 << 11) - 1); - if (role == Qt::DisplayRole) - return node->functionsInfo[functionIndex].first; - } - return QVariant(); -} - -QT_END_NAMESPACE -#include "moc_qscriptdebuggerscriptsmodel_p.h" diff --git a/src/scripttools/debugging/qscriptdebuggerscriptsmodel_p.h b/src/scripttools/debugging/qscriptdebuggerscriptsmodel_p.h deleted file mode 100644 index 00b2ff5ae..000000000 --- a/src/scripttools/debugging/qscriptdebuggerscriptsmodel_p.h +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERSCRIPTSMODEL_P_H -#define QSCRIPTDEBUGGERSCRIPTSMODEL_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include - -#include "qscriptscriptdata_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerScriptsModelPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerScriptsModel - : public QAbstractItemModel -{ - Q_OBJECT -public: - QScriptDebuggerScriptsModel(QObject *parent = nullptr); - ~QScriptDebuggerScriptsModel(); - - void removeScript(qint64 id); - void addScript(qint64 id, const QScriptScriptData &data); - void addExtraScriptInfo( - qint64 id, const QMap &functionsInfo, - const QSet &executableLineNumbers); - void commit(); - - QScriptScriptData scriptData(qint64 id) const; - QScriptScriptMap scripts() const; - qint64 resolveScript(const QString &fileName) const; - QSet executableLineNumbers(qint64 scriptId) const; - - QModelIndex indexFromScriptId(qint64 id) const; - qint64 scriptIdFromIndex(const QModelIndex &index) const; - QPair scriptFunctionInfoFromIndex(const QModelIndex &index) const; - - QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; - QModelIndex parent(const QModelIndex &child) const; - int columnCount(const QModelIndex &parent = QModelIndex()) const; - int rowCount(const QModelIndex &parent = QModelIndex()) const; - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerScriptsModel) - Q_DISABLE_COPY(QScriptDebuggerScriptsModel) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerscriptswidget.cpp b/src/scripttools/debugging/qscriptdebuggerscriptswidget.cpp deleted file mode 100644 index 63ab058b0..000000000 --- a/src/scripttools/debugging/qscriptdebuggerscriptswidget.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerscriptswidget_p.h" -#include "qscriptdebuggerscriptswidgetinterface_p_p.h" -#include "qscriptdebuggerscriptsmodel_p.h" - -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerScriptsWidgetPrivate - : public QScriptDebuggerScriptsWidgetInterfacePrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerScriptsWidget) -public: - QScriptDebuggerScriptsWidgetPrivate(); - ~QScriptDebuggerScriptsWidgetPrivate(); - - // private slots - void _q_onCurrentChanged(const QModelIndex &index); - - QTreeView *view; - qint64 currentScriptId; -}; - -QScriptDebuggerScriptsWidgetPrivate::QScriptDebuggerScriptsWidgetPrivate() -{ - currentScriptId = -1; -} - -QScriptDebuggerScriptsWidgetPrivate::~QScriptDebuggerScriptsWidgetPrivate() -{ -} - -void QScriptDebuggerScriptsWidgetPrivate::_q_onCurrentChanged(const QModelIndex &index) -{ - Q_Q(QScriptDebuggerScriptsWidget); - if (!index.isValid()) - return; - qint64 sid = q->scriptsModel()->scriptIdFromIndex(index); - if (sid != -1) { - if (currentScriptId != sid) { - currentScriptId = sid; - emit q->currentScriptChanged(sid); - } - } else { - qint64 sid = q->scriptsModel()->scriptIdFromIndex(index.parent()); - Q_ASSERT(sid != -1); - currentScriptId = sid; - emit q->currentScriptChanged(sid); - QPair info = q->scriptsModel()->scriptFunctionInfoFromIndex(index); - emit q->scriptLocationSelected(info.second); - } -} - -QScriptDebuggerScriptsWidget::QScriptDebuggerScriptsWidget(QWidget *parent) - : QScriptDebuggerScriptsWidgetInterface(*new QScriptDebuggerScriptsWidgetPrivate, parent, 0) -{ - Q_D(QScriptDebuggerScriptsWidget); - d->view = new QTreeView(); - d->view->setEditTriggers(QAbstractItemView::NoEditTriggers); -// d->view->setAlternatingRowColors(true); -// d->view->setRootIsDecorated(false); - d->view->setSelectionBehavior(QAbstractItemView::SelectRows); - d->view->header()->hide(); -// d->view->header()->setDefaultAlignment(Qt::AlignLeft); -// d->view->header()->setResizeMode(QHeaderView::ResizeToContents); - - QVBoxLayout *vbox = new QVBoxLayout(this); - vbox->setMargin(0); - vbox->addWidget(d->view); -} - -QScriptDebuggerScriptsWidget::~QScriptDebuggerScriptsWidget() -{ -} - -/*! - \reimp -*/ -QScriptDebuggerScriptsModel *QScriptDebuggerScriptsWidget::scriptsModel() const -{ - Q_D(const QScriptDebuggerScriptsWidget); - return qobject_cast(d->view->model()); -} - -/*! - \reimp -*/ -void QScriptDebuggerScriptsWidget::setScriptsModel(QScriptDebuggerScriptsModel *model) -{ - Q_D(QScriptDebuggerScriptsWidget); - d->view->setModel(model); - QObject::connect(d->view->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), - this, SLOT(_q_onCurrentChanged(QModelIndex))); -} - -qint64 QScriptDebuggerScriptsWidget::currentScriptId() const -{ - Q_D(const QScriptDebuggerScriptsWidget); - return scriptsModel()->scriptIdFromIndex(d->view->currentIndex()); -} - -void QScriptDebuggerScriptsWidget::setCurrentScript(qint64 id) -{ - Q_D(QScriptDebuggerScriptsWidget); - d->view->setCurrentIndex(scriptsModel()->indexFromScriptId(id)); -} - -QT_END_NAMESPACE - -#include "moc_qscriptdebuggerscriptswidget_p.h" diff --git a/src/scripttools/debugging/qscriptdebuggerscriptswidget_p.h b/src/scripttools/debugging/qscriptdebuggerscriptswidget_p.h deleted file mode 100644 index 418135f99..000000000 --- a/src/scripttools/debugging/qscriptdebuggerscriptswidget_p.h +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERSCRIPTSWIDGET_P_H -#define QSCRIPTDEBUGGERSCRIPTSWIDGET_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qscriptdebuggerscriptswidgetinterface_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerScriptsWidgetPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerScriptsWidget: - public QScriptDebuggerScriptsWidgetInterface -{ - Q_OBJECT -public: - QScriptDebuggerScriptsWidget(QWidget *parent = nullptr); - ~QScriptDebuggerScriptsWidget(); - - QScriptDebuggerScriptsModel *scriptsModel() const; - void setScriptsModel(QScriptDebuggerScriptsModel *model); - - qint64 currentScriptId() const; - void setCurrentScript(qint64 id); - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerScriptsWidget) - Q_DISABLE_COPY(QScriptDebuggerScriptsWidget) - - Q_PRIVATE_SLOT(d_func(), void _q_onCurrentChanged(const QModelIndex &)) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerscriptswidgetinterface.cpp b/src/scripttools/debugging/qscriptdebuggerscriptswidgetinterface.cpp deleted file mode 100644 index e24bbc6ee..000000000 --- a/src/scripttools/debugging/qscriptdebuggerscriptswidgetinterface.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerscriptswidgetinterface_p.h" -#include "qscriptdebuggerscriptswidgetinterface_p_p.h" - -QT_BEGIN_NAMESPACE - -QScriptDebuggerScriptsWidgetInterfacePrivate::QScriptDebuggerScriptsWidgetInterfacePrivate() -{ -} - -QScriptDebuggerScriptsWidgetInterfacePrivate::~QScriptDebuggerScriptsWidgetInterfacePrivate() -{ -} - -QScriptDebuggerScriptsWidgetInterface::~QScriptDebuggerScriptsWidgetInterface() -{ -} - -QScriptDebuggerScriptsWidgetInterface::QScriptDebuggerScriptsWidgetInterface( - QScriptDebuggerScriptsWidgetInterfacePrivate &dd, - QWidget *parent, Qt::WindowFlags flags) - : QWidget(dd, parent, flags) -{ -} - -QT_END_NAMESPACE -#include "moc_qscriptdebuggerscriptswidgetinterface_p.h" diff --git a/src/scripttools/debugging/qscriptdebuggerscriptswidgetinterface_p.h b/src/scripttools/debugging/qscriptdebuggerscriptswidgetinterface_p.h deleted file mode 100644 index 6e45cecfd..000000000 --- a/src/scripttools/debugging/qscriptdebuggerscriptswidgetinterface_p.h +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERSCRIPTSWIDGETINTERFACE_P_H -#define QSCRIPTDEBUGGERSCRIPTSWIDGETINTERFACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerScriptsModel; - -class QScriptDebuggerScriptsWidgetInterfacePrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerScriptsWidgetInterface: - public QWidget -{ - Q_OBJECT -public: - ~QScriptDebuggerScriptsWidgetInterface(); - - virtual QScriptDebuggerScriptsModel *scriptsModel() const = 0; - virtual void setScriptsModel(QScriptDebuggerScriptsModel *model) = 0; - - virtual qint64 currentScriptId() const = 0; - virtual void setCurrentScript(qint64 id) = 0; - -Q_SIGNALS: - void currentScriptChanged(qint64 scriptId); - void scriptLocationSelected(int lineNumber); - -protected: - QScriptDebuggerScriptsWidgetInterface( - QScriptDebuggerScriptsWidgetInterfacePrivate &dd, - QWidget *parent, Qt::WindowFlags flags); - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerScriptsWidgetInterface) - Q_DISABLE_COPY(QScriptDebuggerScriptsWidgetInterface) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerscriptswidgetinterface_p_p.h b/src/scripttools/debugging/qscriptdebuggerscriptswidgetinterface_p_p.h deleted file mode 100644 index d1543931d..000000000 --- a/src/scripttools/debugging/qscriptdebuggerscriptswidgetinterface_p_p.h +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERSCRIPTSWIDGETINTERFACE_P_P_H -#define QSCRIPTDEBUGGERSCRIPTSWIDGETINTERFACE_P_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qwidget_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerScriptsWidgetInterface; -class QScriptDebuggerScriptsWidgetInterfacePrivate - : public QWidgetPrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerScriptsWidgetInterface) -public: - QScriptDebuggerScriptsWidgetInterfacePrivate(); - ~QScriptDebuggerScriptsWidgetInterfacePrivate(); -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerstackmodel.cpp b/src/scripttools/debugging/qscriptdebuggerstackmodel.cpp deleted file mode 100644 index d1c985413..000000000 --- a/src/scripttools/debugging/qscriptdebuggerstackmodel.cpp +++ /dev/null @@ -1,150 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerstackmodel_p.h" - -#include "qabstractitemmodel_p.h" - -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerStackModelPrivate - : public QAbstractItemModelPrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerStackModel) -public: - QScriptDebuggerStackModelPrivate(); - ~QScriptDebuggerStackModelPrivate(); - - QList contextInfos; -}; - -QScriptDebuggerStackModelPrivate::QScriptDebuggerStackModelPrivate() -{ -} - -QScriptDebuggerStackModelPrivate::~QScriptDebuggerStackModelPrivate() -{ -} - -QScriptDebuggerStackModel::QScriptDebuggerStackModel(QObject *parent) - : QAbstractTableModel(*new QScriptDebuggerStackModelPrivate, parent) -{ -} - -QScriptDebuggerStackModel::~QScriptDebuggerStackModel() -{ -} - -QList QScriptDebuggerStackModel::contextInfos() const -{ - Q_D(const QScriptDebuggerStackModel); - return d->contextInfos; -} - -void QScriptDebuggerStackModel::setContextInfos(const QList &infos) -{ - Q_D(QScriptDebuggerStackModel); - layoutAboutToBeChanged(); - d->contextInfos = infos; - layoutChanged(); -} - -/*! - \reimp -*/ -int QScriptDebuggerStackModel::columnCount(const QModelIndex &parent) const -{ - if (!parent.isValid()) - return 3; - return 0; -} - -/*! - \reimp -*/ -int QScriptDebuggerStackModel::rowCount(const QModelIndex &parent) const -{ - Q_D(const QScriptDebuggerStackModel); - if (!parent.isValid()) - return d->contextInfos.count(); - return 0; -} - -/*! - \reimp -*/ -QVariant QScriptDebuggerStackModel::data(const QModelIndex &index, int role) const -{ - Q_D(const QScriptDebuggerStackModel); - if (!index.isValid()) - return QVariant(); - if (index.row() >= d->contextInfos.count()) - return QVariant(); - const QScriptContextInfo &info = d->contextInfos.at(index.row()); - if (role == Qt::DisplayRole) { - if (index.column() == 0) { - return index.row(); - } else if (index.column() == 1) { - QString name = info.functionName(); - if (name.isEmpty()) - name = QString::fromLatin1(""); - return name; - } else if (index.column() == 2) { - QString fn = QFileInfo(info.fileName()).fileName(); - if (fn.isEmpty()) { - if (info.functionType() == QScriptContextInfo::ScriptFunction) - fn = QString::fromLatin1("").arg(info.scriptId()); - else - fn = QString::fromLatin1(""); - - } - return QString::fromLatin1("%0:%1").arg(fn).arg(info.lineNumber()); - } - } else if (role == Qt::ToolTipRole) { - if (QFileInfo(info.fileName()).fileName() != info.fileName()) - return info.fileName(); - } - return QVariant(); -} - -/*! - \reimp -*/ -QVariant QScriptDebuggerStackModel::headerData(int section, Qt::Orientation orient, int role) const -{ - if (orient != Qt::Horizontal) - return QVariant(); - if (role == Qt::DisplayRole) { - if (section == 0) - return QCoreApplication::translate("QScriptDebuggerStackModel", "Level"); - else if (section == 1) - return QCoreApplication::translate("QScriptDebuggerStackModel", "Name"); - else if (section == 2) - return QCoreApplication::translate("QScriptDebuggerStackModel", "Location"); - } - return QVariant(); -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptdebuggerstackmodel_p.h b/src/scripttools/debugging/qscriptdebuggerstackmodel_p.h deleted file mode 100644 index e9ad71391..000000000 --- a/src/scripttools/debugging/qscriptdebuggerstackmodel_p.h +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERSTACKMODEL_P_H -#define QSCRIPTDEBUGGERSTACKMODEL_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include - -QT_BEGIN_NAMESPACE - -class QScriptContextInfo; - -class QScriptDebuggerStackModelPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerStackModel - : public QAbstractTableModel -{ -public: - QScriptDebuggerStackModel(QObject *parent = nullptr); - ~QScriptDebuggerStackModel(); - - QList contextInfos() const; - void setContextInfos(const QList &infos); - - int columnCount(const QModelIndex &parent) const; - int rowCount(const QModelIndex &parent) const; - QVariant data(const QModelIndex &index, int role) const; - QVariant headerData(int section, Qt::Orientation, int role) const; - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerStackModel) - Q_DISABLE_COPY(QScriptDebuggerStackModel) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerstackwidget.cpp b/src/scripttools/debugging/qscriptdebuggerstackwidget.cpp deleted file mode 100644 index 574802c02..000000000 --- a/src/scripttools/debugging/qscriptdebuggerstackwidget.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerstackwidget_p.h" -#include "qscriptdebuggerstackwidgetinterface_p_p.h" - -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerStackWidgetPrivate - : public QScriptDebuggerStackWidgetInterfacePrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerStackWidget) -public: - QScriptDebuggerStackWidgetPrivate(); - ~QScriptDebuggerStackWidgetPrivate(); - - // private slots - void _q_onCurrentChanged(const QModelIndex &index); - - QTreeView *view; -}; - -QScriptDebuggerStackWidgetPrivate::QScriptDebuggerStackWidgetPrivate() -{ -} - -QScriptDebuggerStackWidgetPrivate::~QScriptDebuggerStackWidgetPrivate() -{ -} - -void QScriptDebuggerStackWidgetPrivate::_q_onCurrentChanged(const QModelIndex &index) -{ - Q_Q(QScriptDebuggerStackWidget); - emit q->currentFrameChanged(index.row()); -} - -QScriptDebuggerStackWidget::QScriptDebuggerStackWidget(QWidget *parent) - : QScriptDebuggerStackWidgetInterface(*new QScriptDebuggerStackWidgetPrivate, parent, 0) -{ - Q_D(QScriptDebuggerStackWidget); - d->view = new QTreeView(); - d->view->setEditTriggers(QAbstractItemView::NoEditTriggers); - d->view->setAlternatingRowColors(true); - d->view->setRootIsDecorated(false); - d->view->setSelectionBehavior(QAbstractItemView::SelectRows); - d->view->header()->setDefaultAlignment(Qt::AlignLeft); -// d->view->header()->setResizeMode(QHeaderView::ResizeToContents); - - QVBoxLayout *vbox = new QVBoxLayout(this); - vbox->setMargin(0); - vbox->addWidget(d->view); -} - -QScriptDebuggerStackWidget::~QScriptDebuggerStackWidget() -{ -} - -/*! - \reimp -*/ -QAbstractItemModel *QScriptDebuggerStackWidget::stackModel() const -{ - Q_D(const QScriptDebuggerStackWidget); - return d->view->model(); -} - -/*! - \reimp -*/ -void QScriptDebuggerStackWidget::setStackModel(QAbstractItemModel *model) -{ - Q_D(QScriptDebuggerStackWidget); - d->view->setModel(model); - QObject::connect(d->view->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), - this, SLOT(_q_onCurrentChanged(QModelIndex))); - d->view->header()->resizeSection(0, 50); -} - -/*! - \reimp -*/ -int QScriptDebuggerStackWidget::currentFrameIndex() const -{ - Q_D(const QScriptDebuggerStackWidget); - return d->view->currentIndex().row(); -} - -/*! - \reimp -*/ -void QScriptDebuggerStackWidget::setCurrentFrameIndex(int frameIndex) -{ - Q_D(QScriptDebuggerStackWidget); - d->view->setCurrentIndex(d->view->model()->index(frameIndex, 0)); -} - -QT_END_NAMESPACE - -#include "moc_qscriptdebuggerstackwidget_p.h" diff --git a/src/scripttools/debugging/qscriptdebuggerstackwidget_p.h b/src/scripttools/debugging/qscriptdebuggerstackwidget_p.h deleted file mode 100644 index fd7de259d..000000000 --- a/src/scripttools/debugging/qscriptdebuggerstackwidget_p.h +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERSTACKWIDGET_P_H -#define QSCRIPTDEBUGGERSTACKWIDGET_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qscriptdebuggerstackwidgetinterface_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerStackWidgetPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerStackWidget: - public QScriptDebuggerStackWidgetInterface -{ - Q_OBJECT -public: - QScriptDebuggerStackWidget(QWidget *parent = nullptr); - ~QScriptDebuggerStackWidget(); - - QAbstractItemModel *stackModel() const; - void setStackModel(QAbstractItemModel *model); - - int currentFrameIndex() const; - void setCurrentFrameIndex(int frameIndex); - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerStackWidget) - Q_DISABLE_COPY(QScriptDebuggerStackWidget) - - Q_PRIVATE_SLOT(d_func(), void _q_onCurrentChanged(const QModelIndex &)) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerstackwidgetinterface.cpp b/src/scripttools/debugging/qscriptdebuggerstackwidgetinterface.cpp deleted file mode 100644 index 829189da9..000000000 --- a/src/scripttools/debugging/qscriptdebuggerstackwidgetinterface.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerstackwidgetinterface_p.h" -#include "qscriptdebuggerstackwidgetinterface_p_p.h" - -QT_BEGIN_NAMESPACE - -QScriptDebuggerStackWidgetInterfacePrivate::QScriptDebuggerStackWidgetInterfacePrivate() -{ -} - -QScriptDebuggerStackWidgetInterfacePrivate::~QScriptDebuggerStackWidgetInterfacePrivate() -{ -} - -QScriptDebuggerStackWidgetInterface::~QScriptDebuggerStackWidgetInterface() -{ -} - -QScriptDebuggerStackWidgetInterface::QScriptDebuggerStackWidgetInterface( - QScriptDebuggerStackWidgetInterfacePrivate &dd, - QWidget *parent, Qt::WindowFlags flags) - : QWidget(dd, parent, flags) -{ -} - -QT_END_NAMESPACE -#include "moc_qscriptdebuggerstackwidgetinterface_p.h" diff --git a/src/scripttools/debugging/qscriptdebuggerstackwidgetinterface_p.h b/src/scripttools/debugging/qscriptdebuggerstackwidgetinterface_p.h deleted file mode 100644 index 3b3ff945a..000000000 --- a/src/scripttools/debugging/qscriptdebuggerstackwidgetinterface_p.h +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERSTACKWIDGETINTERFACE_P_H -#define QSCRIPTDEBUGGERSTACKWIDGETINTERFACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -QT_BEGIN_NAMESPACE - -class QAbstractItemModel; - -class QScriptDebuggerStackWidgetInterfacePrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerStackWidgetInterface: - public QWidget -{ - Q_OBJECT -public: - ~QScriptDebuggerStackWidgetInterface(); - - virtual QAbstractItemModel *stackModel() const = 0; - virtual void setStackModel(QAbstractItemModel *model) = 0; - - virtual int currentFrameIndex() const = 0; - virtual void setCurrentFrameIndex(int frameIndex) = 0; - -Q_SIGNALS: - void currentFrameChanged(int newFrameIndex); - -protected: - QScriptDebuggerStackWidgetInterface( - QScriptDebuggerStackWidgetInterfacePrivate &dd, - QWidget *parent, Qt::WindowFlags flags); - -private: - Q_DECLARE_PRIVATE(QScriptDebuggerStackWidgetInterface) - Q_DISABLE_COPY(QScriptDebuggerStackWidgetInterface) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerstackwidgetinterface_p_p.h b/src/scripttools/debugging/qscriptdebuggerstackwidgetinterface_p_p.h deleted file mode 100644 index 37b8b30d9..000000000 --- a/src/scripttools/debugging/qscriptdebuggerstackwidgetinterface_p_p.h +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERSTACKWIDGETINTERFACE_P_P_H -#define QSCRIPTDEBUGGERSTACKWIDGETINTERFACE_P_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qwidget_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebuggerStackWidgetInterface; -class QScriptDebuggerStackWidgetInterfacePrivate - : public QWidgetPrivate -{ - Q_DECLARE_PUBLIC(QScriptDebuggerStackWidgetInterface) -public: - QScriptDebuggerStackWidgetInterfacePrivate(); - ~QScriptDebuggerStackWidgetInterfacePrivate(); -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerstandardwidgetfactory.cpp b/src/scripttools/debugging/qscriptdebuggerstandardwidgetfactory.cpp deleted file mode 100644 index 38be4188b..000000000 --- a/src/scripttools/debugging/qscriptdebuggerstandardwidgetfactory.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggerstandardwidgetfactory_p.h" -#include "qscriptdebuggerconsolewidget_p.h" -#include "qscriptdebuggerstackwidget_p.h" -#include "qscriptdebuggerscriptswidget_p.h" -#include "qscriptdebuggerlocalswidget_p.h" -#include "qscriptdebuggercodewidget_p.h" -#include "qscriptdebuggercodefinderwidget_p.h" -#include "qscriptbreakpointswidget_p.h" -#include "qscriptdebugoutputwidget_p.h" -#include "qscripterrorlogwidget_p.h" - -QT_BEGIN_NAMESPACE - -QScriptDebuggerStandardWidgetFactory::QScriptDebuggerStandardWidgetFactory(QObject *parent) - : QObject(parent) -{ -} - -QScriptDebuggerStandardWidgetFactory::~QScriptDebuggerStandardWidgetFactory() -{ -} - -QScriptDebugOutputWidgetInterface *QScriptDebuggerStandardWidgetFactory::createDebugOutputWidget() -{ - return new QScriptDebugOutputWidget(); -} - -QScriptDebuggerConsoleWidgetInterface *QScriptDebuggerStandardWidgetFactory::createConsoleWidget() -{ - return new QScriptDebuggerConsoleWidget(); -} - -QScriptErrorLogWidgetInterface *QScriptDebuggerStandardWidgetFactory::createErrorLogWidget() -{ - return new QScriptErrorLogWidget(); -} - -QScriptDebuggerCodeFinderWidgetInterface *QScriptDebuggerStandardWidgetFactory::createCodeFinderWidget() -{ - return new QScriptDebuggerCodeFinderWidget(); -} - -QScriptDebuggerStackWidgetInterface *QScriptDebuggerStandardWidgetFactory::createStackWidget() -{ - return new QScriptDebuggerStackWidget(); -} - -QScriptDebuggerScriptsWidgetInterface *QScriptDebuggerStandardWidgetFactory::createScriptsWidget() -{ - return new QScriptDebuggerScriptsWidget(); -} - -QScriptDebuggerLocalsWidgetInterface *QScriptDebuggerStandardWidgetFactory::createLocalsWidget() -{ - return new QScriptDebuggerLocalsWidget(); -} - -QScriptDebuggerCodeWidgetInterface *QScriptDebuggerStandardWidgetFactory::createCodeWidget() -{ - return new QScriptDebuggerCodeWidget(); -} - -QScriptBreakpointsWidgetInterface *QScriptDebuggerStandardWidgetFactory::createBreakpointsWidget() -{ - return new QScriptBreakpointsWidget(); -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptdebuggerstandardwidgetfactory_p.h b/src/scripttools/debugging/qscriptdebuggerstandardwidgetfactory_p.h deleted file mode 100644 index 908b2beea..000000000 --- a/src/scripttools/debugging/qscriptdebuggerstandardwidgetfactory_p.h +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERSTANDARDWIDGETFACTORY_P_H -#define QSCRIPTDEBUGGERSTANDARDWIDGETFACTORY_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include "qscriptdebuggerwidgetfactoryinterface_p.h" - -QT_BEGIN_NAMESPACE - -class Q_AUTOTEST_EXPORT QScriptDebuggerStandardWidgetFactory - : public QObject, public QScriptDebuggerWidgetFactoryInterface -{ -public: - QScriptDebuggerStandardWidgetFactory(QObject *parent = nullptr); - virtual ~QScriptDebuggerStandardWidgetFactory(); - - QScriptDebugOutputWidgetInterface *createDebugOutputWidget(); - QScriptDebuggerConsoleWidgetInterface *createConsoleWidget(); - QScriptErrorLogWidgetInterface *createErrorLogWidget(); - QScriptDebuggerCodeFinderWidgetInterface *createCodeFinderWidget(); - QScriptDebuggerStackWidgetInterface *createStackWidget(); - QScriptDebuggerScriptsWidgetInterface *createScriptsWidget(); - QScriptDebuggerLocalsWidgetInterface *createLocalsWidget(); - QScriptDebuggerCodeWidgetInterface *createCodeWidget(); - QScriptBreakpointsWidgetInterface *createBreakpointsWidget(); - -private: - Q_DISABLE_COPY(QScriptDebuggerStandardWidgetFactory) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggervalue.cpp b/src/scripttools/debugging/qscriptdebuggervalue.cpp deleted file mode 100644 index baf90421c..000000000 --- a/src/scripttools/debugging/qscriptdebuggervalue.cpp +++ /dev/null @@ -1,385 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggervalue_p.h" - -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -/*! - \since 4.5 - \class QScriptDebuggerValue - \internal - - \brief The QScriptDebuggerValue class represents a script value. -*/ - -class QScriptDebuggerValuePrivate : public QSharedData -{ -public: - QScriptDebuggerValuePrivate(); - ~QScriptDebuggerValuePrivate(); - - QScriptDebuggerValue::ValueType type; - union { - bool booleanValue; - QString *stringValue; - double numberValue; - qint64 objectId; - }; -}; - -QScriptDebuggerValuePrivate::QScriptDebuggerValuePrivate() - : type(QScriptDebuggerValue::NoValue) -{ -} - -QScriptDebuggerValuePrivate::~QScriptDebuggerValuePrivate() -{ - if (type == QScriptDebuggerValue::StringValue) - delete stringValue; -} - -QScriptDebuggerValue::QScriptDebuggerValue() - : d_ptr(0) -{ -} - -QScriptDebuggerValue::QScriptDebuggerValue(const QScriptValue &value) - : d_ptr(0) -{ - if (value.isValid()) { - d_ptr.reset(new QScriptDebuggerValuePrivate); - if (value.isUndefined()) - d_ptr->type = UndefinedValue; - else if (value.isNull()) - d_ptr->type = NullValue; - else if (value.isNumber()) { - d_ptr->type = NumberValue; - d_ptr->numberValue = value.toNumber(); - } else if (value.isBoolean()) { - d_ptr->type = BooleanValue; - d_ptr->booleanValue = value.toBoolean(); - } else if (value.isString()) { - d_ptr->type = StringValue; - d_ptr->stringValue = new QString(value.toString()); - } else { - Q_ASSERT(value.isObject()); - d_ptr->type = ObjectValue; - d_ptr->objectId = value.objectId(); - } - d_ptr->ref.ref(); - } -} - -QScriptDebuggerValue::QScriptDebuggerValue(double value) - : d_ptr(new QScriptDebuggerValuePrivate) -{ - d_ptr->type = NumberValue; - d_ptr->numberValue = value; - d_ptr->ref.ref(); -} - -QScriptDebuggerValue::QScriptDebuggerValue(bool value) - : d_ptr(new QScriptDebuggerValuePrivate) -{ - d_ptr->type = BooleanValue; - d_ptr->booleanValue = value; - d_ptr->ref.ref(); -} - -QScriptDebuggerValue::QScriptDebuggerValue(const QString &value) - : d_ptr(new QScriptDebuggerValuePrivate) -{ - d_ptr->type = StringValue; - d_ptr->stringValue = new QString(value); - d_ptr->ref.ref(); -} - -QScriptDebuggerValue::QScriptDebuggerValue(qint64 objectId) - : d_ptr(new QScriptDebuggerValuePrivate) -{ - d_ptr->type = ObjectValue; - d_ptr->objectId = objectId; - d_ptr->ref.ref(); -} - -QScriptDebuggerValue::QScriptDebuggerValue(ValueType type) - : d_ptr(new QScriptDebuggerValuePrivate) -{ - d_ptr->type = type; - d_ptr->ref.ref(); -} - -QScriptDebuggerValue::QScriptDebuggerValue(const QScriptDebuggerValue &other) - : d_ptr(other.d_ptr.data()) -{ - if (d_ptr) - d_ptr->ref.ref(); -} - -QScriptDebuggerValue::~QScriptDebuggerValue() -{ -} - -QScriptDebuggerValue &QScriptDebuggerValue::operator=(const QScriptDebuggerValue &other) -{ - d_ptr.assign(other.d_ptr.data()); - return *this; -} - -/*! - Returns the type of this value. -*/ -QScriptDebuggerValue::ValueType QScriptDebuggerValue::type() const -{ - Q_D(const QScriptDebuggerValue); - if (!d) - return NoValue; - return d->type; -} - -/*! - Returns this value as a number. -*/ -double QScriptDebuggerValue::numberValue() const -{ - Q_D(const QScriptDebuggerValue); - if (!d) - return 0; - Q_ASSERT(d->type == NumberValue); - return d->numberValue; -} - -/*! - Returns this value as a boolean. -*/ -bool QScriptDebuggerValue::booleanValue() const -{ - Q_D(const QScriptDebuggerValue); - if (!d) - return false; - Q_ASSERT(d->type == BooleanValue); - return d->booleanValue; -} - -/*! - Returns this value as a string. -*/ -QString QScriptDebuggerValue::stringValue() const -{ - Q_D(const QScriptDebuggerValue); - if (!d) - return QString(); - Q_ASSERT(d->type == StringValue); - return *d->stringValue; -} - -/*! - Returns this value as an object ID. -*/ -qint64 QScriptDebuggerValue::objectId() const -{ - Q_D(const QScriptDebuggerValue); - if (!d) - return -1; - Q_ASSERT(d->type == ObjectValue); - return d->objectId; -} - -/*! - Converts this QScriptDebuggerValue to a QScriptValue in the - given \a engine and returns the resulting value. -*/ -QScriptValue QScriptDebuggerValue::toScriptValue(QScriptEngine *engine) const -{ - Q_D(const QScriptDebuggerValue); - if (!d) - return QScriptValue(); - switch (d->type) { - case NoValue: - return QScriptValue(); - case UndefinedValue: - return engine->undefinedValue(); - case NullValue: - return engine->nullValue(); - case BooleanValue: - return QScriptValue(engine, d->booleanValue); - case StringValue: - return QScriptValue(engine, *d->stringValue); - case NumberValue: - return QScriptValue(engine, d->numberValue); - case ObjectValue: - return engine->objectById(d->objectId); - } - return QScriptValue(); -} - -/*! - Returns a string representation of this value. -*/ -QString QScriptDebuggerValue::toString() const -{ - Q_D(const QScriptDebuggerValue); - if (!d) - return QString(); - switch (d->type) { - case NoValue: - return QString(); - case UndefinedValue: - return QString::fromLatin1("undefined"); - case NullValue: - return QString::fromLatin1("null"); - case BooleanValue: - if (d->booleanValue) - return QString::fromLatin1("true"); - else - return QString::fromLatin1("false"); - case StringValue: - return *d->stringValue; - case NumberValue: - return QString::number(d->numberValue); // ### qScriptNumberToString() - case ObjectValue: - return QString::fromLatin1("[object Object]"); - } - return QString(); -} - -/*! - Returns true if this QScriptDebuggerValue is equal to the \a other - value, otherwise returns false. -*/ -bool QScriptDebuggerValue::operator==(const QScriptDebuggerValue &other) const -{ - Q_D(const QScriptDebuggerValue); - const QScriptDebuggerValuePrivate *od = other.d_func(); - if (d == od) - return true; - if (!d || !od) - return false; - if (d->type != od->type) - return false; - switch (d->type) { - case NoValue: - case UndefinedValue: - case NullValue: - return true; - case BooleanValue: - return d->booleanValue == od->booleanValue; - case StringValue: - return *d->stringValue == *od->stringValue; - case NumberValue: - return d->numberValue == od->numberValue; - case ObjectValue: - return d->objectId == od->objectId; - } - return false; -} - -/*! - Returns true if this QScriptDebuggerValue is not equal to the \a - other value, otherwise returns false. -*/ -bool QScriptDebuggerValue::operator!=(const QScriptDebuggerValue &other) const -{ - return !(*this == other); -} - -/*! - \fn QDataStream &operator<<(QDataStream &stream, const QScriptDebuggerValue &value) - \relates QScriptDebuggerValue - - Writes the given \a value to the specified \a stream. -*/ -QDataStream &operator<<(QDataStream &out, const QScriptDebuggerValue &value) -{ - out << (quint32)value.type(); - switch (value.type()) { - case QScriptDebuggerValue::NoValue: - case QScriptDebuggerValue::UndefinedValue: - case QScriptDebuggerValue::NullValue: - break; - case QScriptDebuggerValue::BooleanValue: - out << value.booleanValue(); - break; - case QScriptDebuggerValue::StringValue: - out << value.stringValue(); - break; - case QScriptDebuggerValue::NumberValue: - out << value.numberValue(); - break; - case QScriptDebuggerValue::ObjectValue: - out << value.objectId(); - break; - } - return out; -} - -/*! - \fn QDataStream &operator>>(QDataStream &stream, QScriptDebuggerValue &value) - \relates QScriptDebuggerValue - - Reads a QScriptDebuggerValue from the specified \a stream into the - given \a value. -*/ -QDataStream &operator>>(QDataStream &in, QScriptDebuggerValue &value) -{ - quint32 type; - in >> type; - switch (QScriptDebuggerValue::ValueType(type)) { - case QScriptDebuggerValue::UndefinedValue: - case QScriptDebuggerValue::NullValue: - value = QScriptDebuggerValue(QScriptDebuggerValue::ValueType(type)); - break; - case QScriptDebuggerValue::BooleanValue: { - bool b; - in >> b; - value = QScriptDebuggerValue(b); - } break; - case QScriptDebuggerValue::StringValue: { - QString s; - in >> s; - value = QScriptDebuggerValue(s); - } break; - case QScriptDebuggerValue::NumberValue: { - double d; - in >> d; - value = QScriptDebuggerValue(d); - } break; - case QScriptDebuggerValue::ObjectValue: { - qint64 id; - in >> id; - value = QScriptDebuggerValue(id); - } break; - case QScriptDebuggerValue::NoValue: - default: - value = QScriptDebuggerValue(); - break; - } - return in; -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptdebuggervalue_p.h b/src/scripttools/debugging/qscriptdebuggervalue_p.h deleted file mode 100644 index 61fa74f78..000000000 --- a/src/scripttools/debugging/qscriptdebuggervalue_p.h +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERVALUE_P_H -#define QSCRIPTDEBUGGERVALUE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qobjectdefs.h" -#include "qscopedpointer_p.h" -#include "qlist.h" - -QT_BEGIN_NAMESPACE - -class QScriptValue; -class QScriptEngine; -class QDataStream; - -class QScriptDebuggerValuePrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerValue -{ -public: - enum ValueType { - NoValue, - UndefinedValue, - NullValue, - BooleanValue, - StringValue, - NumberValue, - ObjectValue - }; - - QScriptDebuggerValue(); - QScriptDebuggerValue(const QScriptValue &value); - QScriptDebuggerValue(double value); - QScriptDebuggerValue(bool value); - QScriptDebuggerValue(const QString &value); - QScriptDebuggerValue(qint64 objectId); - QScriptDebuggerValue(ValueType type); - QScriptDebuggerValue(const QScriptDebuggerValue &other); - ~QScriptDebuggerValue(); - - QScriptDebuggerValue &operator=(const QScriptDebuggerValue &other); - - ValueType type() const; - - double numberValue() const; - bool booleanValue() const; - QString stringValue() const; - qint64 objectId() const; - - QScriptValue toScriptValue(QScriptEngine *engine) const; - QString toString() const; - - bool operator==(const QScriptDebuggerValue &other) const; - bool operator!=(const QScriptDebuggerValue &other) const; - -private: - QScopedSharedPointer d_ptr; - - Q_DECLARE_PRIVATE(QScriptDebuggerValue) -}; - -typedef QList QScriptDebuggerValueList; - -Q_AUTOTEST_EXPORT QDataStream &operator<<(QDataStream &, const QScriptDebuggerValue &); -Q_AUTOTEST_EXPORT QDataStream &operator>>(QDataStream &, QScriptDebuggerValue &); - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggervalueproperty.cpp b/src/scripttools/debugging/qscriptdebuggervalueproperty.cpp deleted file mode 100644 index 736275d03..000000000 --- a/src/scripttools/debugging/qscriptdebuggervalueproperty.cpp +++ /dev/null @@ -1,212 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebuggervalueproperty_p.h" -#include "qscriptdebuggervalue_p.h" -#include "qscriptdebuggerobjectsnapshotdelta_p.h" - -#include -#include -#include - -QT_BEGIN_NAMESPACE - -/*! - \internal - \class QScriptDebuggerValueProperty -*/ - -class QScriptDebuggerValuePropertyPrivate : public QSharedData -{ -public: - QScriptDebuggerValuePropertyPrivate(); - ~QScriptDebuggerValuePropertyPrivate(); - - QString name; - QScriptDebuggerValue value; - QString valueAsString; - QScriptValue::PropertyFlags flags; -}; - -QScriptDebuggerValuePropertyPrivate::QScriptDebuggerValuePropertyPrivate() -{ -} - -QScriptDebuggerValuePropertyPrivate::~QScriptDebuggerValuePropertyPrivate() -{ -} - -/*! - Constructs an invalid QScriptDebuggerValueProperty. -*/ -QScriptDebuggerValueProperty::QScriptDebuggerValueProperty() - : d_ptr(0) -{ -} - -/*! - Constructs a QScriptDebuggerValueProperty with the given \a name, - \a value and \a flags. -*/ -QScriptDebuggerValueProperty::QScriptDebuggerValueProperty(const QString &name, - const QScriptDebuggerValue &value, - const QString &valueAsString, - QScriptValue::PropertyFlags flags) - : d_ptr(new QScriptDebuggerValuePropertyPrivate) -{ - d_ptr->name = name; - d_ptr->value = value; - d_ptr->valueAsString = valueAsString; - d_ptr->flags = flags; - d_ptr->ref.ref(); -} - -/*! - Constructs a QScriptDebuggerValueProperty that is a copy of the \a other property. -*/ -QScriptDebuggerValueProperty::QScriptDebuggerValueProperty(const QScriptDebuggerValueProperty &other) - : d_ptr(other.d_ptr.data()) -{ - if (d_ptr) - d_ptr->ref.ref(); -} - -/*! - Destroys this QScriptDebuggerValueProperty. -*/ -QScriptDebuggerValueProperty::~QScriptDebuggerValueProperty() -{ -} - -/*! - Assigns the \a other property to this QScriptDebuggerValueProperty. -*/ -QScriptDebuggerValueProperty &QScriptDebuggerValueProperty::operator=(const QScriptDebuggerValueProperty &other) -{ - d_ptr.assign(other.d_ptr.data()); - return *this; -} - -/*! - Returns the name of this QScriptDebuggerValueProperty. -*/ -QString QScriptDebuggerValueProperty::name() const -{ - Q_D(const QScriptDebuggerValueProperty); - if (!d) - return QString(); - return d->name; -} - -/*! - Returns the value of this QScriptDebuggerValueProperty. -*/ -QScriptDebuggerValue QScriptDebuggerValueProperty::value() const -{ - Q_D(const QScriptDebuggerValueProperty); - if (!d) - return QScriptDebuggerValue(); - return d->value; -} - -QString QScriptDebuggerValueProperty::valueAsString() const -{ - Q_D(const QScriptDebuggerValueProperty); - if (!d) - return QString(); - return d->valueAsString; -} - -/*! - Returns the flags of this QScriptDebuggerValueProperty. -*/ -QScriptValue::PropertyFlags QScriptDebuggerValueProperty::flags() const -{ - Q_D(const QScriptDebuggerValueProperty); - if (!d) - return 0; - return d->flags; -} - -/*! - Returns true if this QScriptDebuggerValueProperty is valid, otherwise - returns false. -*/ -bool QScriptDebuggerValueProperty::isValid() const -{ - Q_D(const QScriptDebuggerValueProperty); - return (d != 0); -} - -/*! - \fn QDataStream &operator<<(QDataStream &stream, const QScriptDebuggerValueProperty &property) - \relates QScriptDebuggerValueProperty - - Writes the given \a property to the specified \a stream. -*/ -QDataStream &operator<<(QDataStream &out, const QScriptDebuggerValueProperty &property) -{ - out << property.name(); - out << property.value(); - out << property.valueAsString(); - out << (quint32)property.flags(); - return out; -} - -/*! - \fn QDataStream &operator>>(QDataStream &stream, QScriptDebuggerValueProperty &property) - \relates QScriptDebuggerValueProperty - - Reads a QScriptDebuggerValueProperty from the specified \a stream into the - given \a property. -*/ -QDataStream &operator>>(QDataStream &in, QScriptDebuggerValueProperty &property) -{ - QString name; - QScriptDebuggerValue value; - QString valueAsString; - quint32 flags; - in >> name; - in >> value; - in >> valueAsString; - in >> flags; - property = QScriptDebuggerValueProperty( - name, value, valueAsString, QScriptValue::PropertyFlags(flags)); - return in; -} - -QDataStream &operator<<(QDataStream &out, const QScriptDebuggerObjectSnapshotDelta &delta) -{ - out << delta.removedProperties; - out << delta.changedProperties; - out << delta.addedProperties; - return out; -} - -QDataStream &operator>>(QDataStream &in, QScriptDebuggerObjectSnapshotDelta &delta) -{ - in >> delta.removedProperties; - in >> delta.changedProperties; - in >> delta.addedProperties; - return in; -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptdebuggervalueproperty_p.h b/src/scripttools/debugging/qscriptdebuggervalueproperty_p.h deleted file mode 100644 index 18014a6b7..000000000 --- a/src/scripttools/debugging/qscriptdebuggervalueproperty_p.h +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERVALUEPROPERTY_P_H -#define QSCRIPTDEBUGGERVALUEPROPERTY_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qobjectdefs.h" -#include "qlist.h" -#include "qscopedpointer_p.h" -#include "qscriptvalue.h" - -QT_BEGIN_NAMESPACE - -class QDataStream; -class QString; -class QScriptDebuggerValue; - -class QScriptDebuggerValuePropertyPrivate; -class Q_AUTOTEST_EXPORT QScriptDebuggerValueProperty -{ -public: - QScriptDebuggerValueProperty(); - QScriptDebuggerValueProperty(const QString &name, - const QScriptDebuggerValue &value, - const QString &valueAsString, - QScriptValue::PropertyFlags flags); - QScriptDebuggerValueProperty(const QScriptDebuggerValueProperty &other); - ~QScriptDebuggerValueProperty(); - - QScriptDebuggerValueProperty &operator=(const QScriptDebuggerValueProperty &other); - - QString name() const; - QScriptDebuggerValue value() const; - QString valueAsString() const; - QScriptValue::PropertyFlags flags() const; - - bool isValid() const; - -private: - QScopedSharedPointer d_ptr; - - Q_DECLARE_PRIVATE(QScriptDebuggerValueProperty) -}; - -typedef QList QScriptDebuggerValuePropertyList; - -Q_AUTOTEST_EXPORT QDataStream &operator<<(QDataStream &, const QScriptDebuggerValueProperty &); -Q_AUTOTEST_EXPORT QDataStream &operator>>(QDataStream &, QScriptDebuggerValueProperty &); - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebuggerwidgetfactoryinterface_p.h b/src/scripttools/debugging/qscriptdebuggerwidgetfactoryinterface_p.h deleted file mode 100644 index 98ff32005..000000000 --- a/src/scripttools/debugging/qscriptdebuggerwidgetfactoryinterface_p.h +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERWIDGETFACTORYINTERFACE_P_H -#define QSCRIPTDEBUGGERWIDGETFACTORYINTERFACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebugOutputWidgetInterface; -class QScriptDebuggerConsoleWidgetInterface; -class QScriptErrorLogWidgetInterface; -class QScriptDebuggerCodeFinderWidgetInterface; -class QScriptDebuggerStackWidgetInterface; -class QScriptDebuggerScriptsWidgetInterface; -class QScriptDebuggerLocalsWidgetInterface; -class QScriptDebuggerCodeWidgetInterface; -class QScriptBreakpointsWidgetInterface; - -class Q_AUTOTEST_EXPORT QScriptDebuggerWidgetFactoryInterface -{ -public: - virtual ~QScriptDebuggerWidgetFactoryInterface() {} - - virtual QScriptDebugOutputWidgetInterface *createDebugOutputWidget() = 0; - virtual QScriptDebuggerConsoleWidgetInterface *createConsoleWidget() = 0; - virtual QScriptErrorLogWidgetInterface *createErrorLogWidget() = 0; - virtual QScriptDebuggerCodeFinderWidgetInterface *createCodeFinderWidget() = 0; - virtual QScriptDebuggerStackWidgetInterface *createStackWidget() = 0; - virtual QScriptDebuggerScriptsWidgetInterface *createScriptsWidget() = 0; - virtual QScriptDebuggerLocalsWidgetInterface *createLocalsWidget() = 0; - virtual QScriptDebuggerCodeWidgetInterface *createCodeWidget() = 0; - virtual QScriptBreakpointsWidgetInterface *createBreakpointsWidget() = 0; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebugoutputwidget.cpp b/src/scripttools/debugging/qscriptdebugoutputwidget.cpp deleted file mode 100644 index b00297d65..000000000 --- a/src/scripttools/debugging/qscriptdebugoutputwidget.cpp +++ /dev/null @@ -1,137 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebugoutputwidget_p.h" -#include "qscriptdebugoutputwidgetinterface_p_p.h" - -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QScriptDebugOutputWidgetOutputEdit : public QPlainTextEdit -{ -public: - QScriptDebugOutputWidgetOutputEdit(QWidget *parent = nullptr) - : QPlainTextEdit(parent) - { - setReadOnly(true); -// setFocusPolicy(Qt::NoFocus); - setMaximumBlockCount(2500); - } - - void scrollToBottom() - { - QScrollBar *bar = verticalScrollBar(); - bar->setValue(bar->maximum()); - } - - int charactersPerLine() const - { - QFontMetrics fm(font()); - return width() / fm.maxWidth(); - } -}; - -class QScriptDebugOutputWidgetPrivate - : public QScriptDebugOutputWidgetInterfacePrivate -{ - Q_DECLARE_PUBLIC(QScriptDebugOutputWidget) -public: - QScriptDebugOutputWidgetPrivate(); - ~QScriptDebugOutputWidgetPrivate(); - - QScriptDebugOutputWidgetOutputEdit *outputEdit; -}; - -QScriptDebugOutputWidgetPrivate::QScriptDebugOutputWidgetPrivate() -{ -} - -QScriptDebugOutputWidgetPrivate::~QScriptDebugOutputWidgetPrivate() -{ -} - -QScriptDebugOutputWidget::QScriptDebugOutputWidget(QWidget *parent) - : QScriptDebugOutputWidgetInterface(*new QScriptDebugOutputWidgetPrivate, parent, 0) -{ - Q_D(QScriptDebugOutputWidget); - d->outputEdit = new QScriptDebugOutputWidgetOutputEdit(); - QVBoxLayout *vbox = new QVBoxLayout(this); - vbox->setMargin(0); - vbox->setSpacing(0); - vbox->addWidget(d->outputEdit); - -#ifndef QT_NO_STYLE_STYLESHEET - QString sheet = QString::fromLatin1("font-size: 14px; font-family: \"Monospace\";"); - setStyleSheet(sheet); -#endif -} - -QScriptDebugOutputWidget::~QScriptDebugOutputWidget() -{ -} - -void QScriptDebugOutputWidget::message( - QtMsgType type, const QString &text, const QString &fileName, - int lineNumber, int columnNumber, const QVariant &/*data*/) -{ - // ### unify with QScriptDebuggerConsoleWidget::message() - Q_D(QScriptDebugOutputWidget); - QString msg; - if (!fileName.isEmpty() || (lineNumber != -1)) { - if (!fileName.isEmpty()) - msg.append(fileName); - else - msg.append(QLatin1String("")); - if (lineNumber != -1) { - msg.append(QLatin1Char(':')); - msg.append(QString::number(lineNumber)); - if (columnNumber != -1) { - msg.append(QLatin1Char(':')); - msg.append(QString::number(columnNumber)); - } - } - msg.append(QLatin1String(": ")); - } - msg.append(text); - QTextCharFormat oldFmt = d->outputEdit->currentCharFormat(); - QTextCharFormat fmt(oldFmt); - if (type == QtCriticalMsg) { - fmt.setForeground(Qt::red); - d->outputEdit->setCurrentCharFormat(fmt); - } - d->outputEdit->appendPlainText(msg); - d->outputEdit->setCurrentCharFormat(oldFmt); - d->outputEdit->scrollToBottom(); -} - -void QScriptDebugOutputWidget::clear() -{ - Q_D(QScriptDebugOutputWidget); - d->outputEdit->clear(); -} - -QT_END_NAMESPACE - -#include "moc_qscriptdebugoutputwidget_p.h" diff --git a/src/scripttools/debugging/qscriptdebugoutputwidget_p.h b/src/scripttools/debugging/qscriptdebugoutputwidget_p.h deleted file mode 100644 index 8037f64d2..000000000 --- a/src/scripttools/debugging/qscriptdebugoutputwidget_p.h +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGOUTPUTWIDGET_P_H -#define QSCRIPTDEBUGOUTPUTWIDGET_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qscriptdebugoutputwidgetinterface_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebugOutputWidgetPrivate; -class Q_AUTOTEST_EXPORT QScriptDebugOutputWidget: - public QScriptDebugOutputWidgetInterface -{ - Q_OBJECT -public: - QScriptDebugOutputWidget(QWidget *parent = nullptr); - ~QScriptDebugOutputWidget(); - - void message(QtMsgType type, const QString &text, - const QString &fileName = QString(), - int lineNumber = -1, int columnNumber = -1, - const QVariant &data = QVariant()); - - void clear(); - -private: - Q_DECLARE_PRIVATE(QScriptDebugOutputWidget) - Q_DISABLE_COPY(QScriptDebugOutputWidget) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebugoutputwidgetinterface.cpp b/src/scripttools/debugging/qscriptdebugoutputwidgetinterface.cpp deleted file mode 100644 index 8ac856c6e..000000000 --- a/src/scripttools/debugging/qscriptdebugoutputwidgetinterface.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptdebugoutputwidgetinterface_p.h" -#include "qscriptdebugoutputwidgetinterface_p_p.h" - -QT_BEGIN_NAMESPACE - -QScriptDebugOutputWidgetInterfacePrivate::QScriptDebugOutputWidgetInterfacePrivate() -{ -} - -QScriptDebugOutputWidgetInterfacePrivate::~QScriptDebugOutputWidgetInterfacePrivate() -{ -} - -QScriptDebugOutputWidgetInterface::~QScriptDebugOutputWidgetInterface() -{ -} - -QScriptDebugOutputWidgetInterface::QScriptDebugOutputWidgetInterface( - QScriptDebugOutputWidgetInterfacePrivate &dd, - QWidget *parent, Qt::WindowFlags flags) - : QWidget(dd, parent, flags) -{ -} - -QT_END_NAMESPACE -#include "moc_qscriptdebugoutputwidgetinterface_p.h" diff --git a/src/scripttools/debugging/qscriptdebugoutputwidgetinterface_p.h b/src/scripttools/debugging/qscriptdebugoutputwidgetinterface_p.h deleted file mode 100644 index 59b031fdd..000000000 --- a/src/scripttools/debugging/qscriptdebugoutputwidgetinterface_p.h +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGOUTPUTWIDGETINTERFACE_P_H -#define QSCRIPTDEBUGOUTPUTWIDGETINTERFACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include "qscriptmessagehandlerinterface_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebugOutputWidgetInterfacePrivate; -class Q_AUTOTEST_EXPORT QScriptDebugOutputWidgetInterface: - public QWidget, - public QScriptMessageHandlerInterface -{ - Q_OBJECT -public: - ~QScriptDebugOutputWidgetInterface(); - - virtual void clear() = 0; - -protected: - QScriptDebugOutputWidgetInterface(QScriptDebugOutputWidgetInterfacePrivate &dd, - QWidget *parent, Qt::WindowFlags flags); - -private: - Q_DECLARE_PRIVATE(QScriptDebugOutputWidgetInterface) - Q_DISABLE_COPY(QScriptDebugOutputWidgetInterface) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptdebugoutputwidgetinterface_p_p.h b/src/scripttools/debugging/qscriptdebugoutputwidgetinterface_p_p.h deleted file mode 100644 index 1154d4ae2..000000000 --- a/src/scripttools/debugging/qscriptdebugoutputwidgetinterface_p_p.h +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGOUTPUTWIDGETINTERFACE_P_P_H -#define QSCRIPTDEBUGOUTPUTWIDGETINTERFACE_P_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qwidget_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptDebugOutputWidgetInterface; -class QScriptDebugOutputWidgetInterfacePrivate - : public QWidgetPrivate -{ - Q_DECLARE_PUBLIC(QScriptDebugOutputWidgetInterface) -public: - QScriptDebugOutputWidgetInterfacePrivate(); - ~QScriptDebugOutputWidgetInterfacePrivate(); -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptedit.cpp b/src/scripttools/debugging/qscriptedit.cpp deleted file mode 100644 index 80976bd64..000000000 --- a/src/scripttools/debugging/qscriptedit.cpp +++ /dev/null @@ -1,441 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptedit_p.h" -#include "qscriptsyntaxhighlighter_p.h" -#include "qscripttoolsresources_p.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QScriptEditExtraArea : public QWidget -{ -public: - QScriptEditExtraArea(QScriptEdit *edit) - : QWidget(edit) - { - setMouseTracking(true); - } - - QSize sizeHint() const { - return QSize(editor()->extraAreaWidth(), 0); - } - -protected: - void paintEvent(QPaintEvent *event) - { - editor()->extraAreaPaintEvent(event); - } - void mousePressEvent(QMouseEvent *event) - { - editor()->extraAreaMouseEvent(event); - } - void mouseMoveEvent(QMouseEvent *event) - { - editor()->extraAreaMouseEvent(event); - } - void mouseReleaseEvent(QMouseEvent *event) - { - editor()->extraAreaMouseEvent(event); - } - bool event(QEvent *event) - { - if (editor()->extraAreaEvent(event)) - return true; - return QWidget::event(event); - } - -private: - QScriptEdit *editor() const - { - return qobject_cast(parent()); - } -}; - - - -QScriptEdit::QScriptEdit(QWidget *parent) - : QPlainTextEdit(parent) -{ - m_baseLineNumber = 1; - m_executionLineNumber = -1; - - m_extraArea = new QScriptEditExtraArea(this); - - QObject::connect(this, SIGNAL(blockCountChanged(int)), - this, SLOT(updateExtraAreaWidth())); - QObject::connect(this, SIGNAL(updateRequest(QRect,int)), - this, SLOT(updateExtraArea(QRect,int))); - QObject::connect(this, SIGNAL(cursorPositionChanged()), - this, SLOT(highlightCurrentLine())); - - updateExtraAreaWidth(); - -#ifndef QT_NO_SYNTAXHIGHLIGHTER - (void) new QScriptSyntaxHighlighter(document()); -#endif -} - -QScriptEdit::~QScriptEdit() -{ -} - -int QScriptEdit::baseLineNumber() const -{ - return m_baseLineNumber; -} - -void QScriptEdit::setBaseLineNumber(int base) -{ - m_baseLineNumber = base; - m_extraArea->update(); -} - -int QScriptEdit::executionLineNumber() const -{ - return m_executionLineNumber; -} - -void QScriptEdit::setExecutionLineNumber(int lineNumber, bool error) -{ - m_executionLineNumber = lineNumber; - m_executionLineNumberHasError = error; - m_extraArea->update(); - updateExtraSelections(); - gotoLine(lineNumber); -} - -void QScriptEdit::setExecutableLineNumbers(const QSet &lineNumbers) -{ - m_executableLineNumbers = lineNumbers; -} - -bool QScriptEdit::isExecutableLine(int lineNumber) const -{ -#if 0 // ### enable me once we have information about the script again - return m_executableLineNumbers.contains(lineNumber); -#else - Q_UNUSED(lineNumber); - return true; -#endif -} - -int QScriptEdit::currentLineNumber() const -{ - return textCursor().blockNumber() + m_baseLineNumber; -} - -void QScriptEdit::gotoLine(int lineNumber) -{ - int blockNumber = lineNumber - m_baseLineNumber; - const QTextBlock &block = document()->findBlockByNumber(blockNumber); - if (block.isValid()) { - setTextCursor(QTextCursor(block)); - centerCursor(); - } -} - -void QScriptEdit::setBreakpoint(int lineNumber) -{ - m_breakpoints[lineNumber] = BreakpointData(); - m_extraArea->update(); -} - -void QScriptEdit::setBreakpointEnabled(int lineNumber, bool enable) -{ - m_breakpoints[lineNumber].enabled = enable; - m_extraArea->update(); -} - -void QScriptEdit::deleteBreakpoint(int lineNumber) -{ - m_breakpoints.remove(lineNumber); - m_extraArea->update(); -} - -void QScriptEdit::paintEvent(QPaintEvent *e) -{ - QPlainTextEdit::paintEvent(e); -} - -void QScriptEdit::resizeEvent(QResizeEvent *e) -{ - QPlainTextEdit::resizeEvent(e); - - QRect cr = contentsRect(); - int x = isLeftToRight() ? cr.left() : cr.left() + cr.width() - extraAreaWidth(); - m_extraArea->setGeometry(QRect(x, cr.top(), extraAreaWidth(), cr.height())); -} - -void QScriptEdit::updateExtraAreaWidth() -{ - if (isLeftToRight()) - setViewportMargins(extraAreaWidth(), 0, 0, 0); - else - setViewportMargins(0, 0, extraAreaWidth(), 0); -} - -void QScriptEdit::updateExtraArea(const QRect &rect, int dy) -{ - if (dy) - m_extraArea->scroll(0, dy); - else - m_extraArea->update(0, rect.y(), m_extraArea->width(), rect.height()); - - if (rect.contains(viewport()->rect())) - updateExtraAreaWidth(); -} - -void QScriptEdit::highlightCurrentLine() -{ - updateExtraSelections(); -} - -void QScriptEdit::updateExtraSelections() -{ - QList extraSelections; - - { - QTextEdit::ExtraSelection selection; - QColor lineColor = QColor(Qt::yellow).lighter(160); - selection.format.setBackground(lineColor); - selection.format.setProperty(QTextFormat::FullWidthSelection, true); - selection.cursor = textCursor(); - selection.cursor.clearSelection(); - extraSelections.append(selection); - } - if (m_executionLineNumber != -1) { - QTextEdit::ExtraSelection selection; - QColor lineColor; - if (m_executionLineNumberHasError) - lineColor = QColor(Qt::red); - else - lineColor = QColor(Qt::green).lighter(160); - selection.format.setBackground(lineColor); - selection.format.setProperty(QTextFormat::FullWidthSelection, true); - int blockNumber = m_executionLineNumber - m_baseLineNumber; - selection.cursor = QTextCursor(document()->findBlockByNumber(blockNumber)); - selection.cursor.clearSelection(); - extraSelections.append(selection); - } - - setExtraSelections(extraSelections); -} - -int QScriptEdit::extraAreaWidth() const -{ - int space = 0; - const QFontMetrics fm(fontMetrics()); - - int digits = 1; - int max = qMax(1, blockCount() + m_baseLineNumber); - while (max >= 10) { - max /= 10; - ++digits; - } - space += fm.width(QLatin1Char('9')) * digits; - - int markWidth = fm.lineSpacing(); - space += markWidth; - - space += 4; - - return space; -} - -void QScriptEdit::extraAreaPaintEvent(QPaintEvent *e) -{ - QRect rect = e->rect(); - QPalette pal = palette(); - pal.setCurrentColorGroup(QPalette::Active); - QPainter painter(m_extraArea); - painter.fillRect(rect, Qt::lightGray); - const QFontMetrics fm(fontMetrics()); - - int markWidth = fm.lineSpacing(); - int extraAreaWidth = m_extraArea->width(); - - QLinearGradient gradient(QPointF(extraAreaWidth - 10, 0), QPointF(extraAreaWidth, 0)); - gradient.setColorAt(0, pal.color(QPalette::Background)); - gradient.setColorAt(1, pal.color(QPalette::Base)); - painter.fillRect(rect, gradient); - - QLinearGradient gradient2(QPointF(0, 0), QPointF(markWidth, 0)); - gradient2.setColorAt(0, pal.color(QPalette::Dark)); - gradient2.setColorAt(1, pal.color(QPalette::Background)); - painter.fillRect(rect.intersected(QRect(rect.x(), rect.y(), markWidth, rect.height())), gradient2); - - painter.setPen(QPen(pal.color(QPalette::Background), 2)); - if (isLeftToRight()) - painter.drawLine(rect.x() + extraAreaWidth-1, rect.top(), rect.x() + extraAreaWidth-1, rect.bottom()); - else - painter.drawLine(rect.x(), rect.top(), rect.x(), rect.bottom()); - painter.setRenderHint(QPainter::Antialiasing); - - QTextBlock block = firstVisibleBlock(); - int blockNumber = block.blockNumber(); - qreal top = blockBoundingGeometry(block).translated(contentOffset()).top(); - qreal bottom = top + blockBoundingRect(block).height(); - - while (block.isValid() && top <= rect.bottom()) { - if (block.isVisible() && bottom >= rect.top()) { - - int lineNumber = blockNumber + m_baseLineNumber; - if (m_breakpoints.contains(lineNumber)) { - int radius = fm.lineSpacing() - 1; - QRect r(rect.x(), (int)top, radius, radius); - QPixmap pix; - if (m_breakpoints[lineNumber].enabled) { - pix.loadFromData( - scripttools_breakpoint_png, scripttools_breakpoint_png_len, - qt_images_format - ); - } else { - pix.loadFromData( - scripttools_d_breakpoint_png, scripttools_d_breakpoint_png_len, - qt_images_format - ); - } - QIcon icon(pix); - icon.paint(&painter, r, Qt::AlignCenter); - } - if (m_executionLineNumber == lineNumber) { - int radius = fm.lineSpacing() - 1; - QRect r(rect.x(), (int)top, radius, radius); - QPixmap pix; - pix.loadFromData( - scripttools_location_png, scripttools_location_png_len, - qt_images_format - ); - QIcon icon(pix); - icon.paint(&painter, r, Qt::AlignCenter); - } - - if (!isExecutableLine(lineNumber)) - painter.setPen(pal.color(QPalette::Mid)); - else - painter.setPen(QColor(Qt::darkCyan)); - QString number = QString::number(lineNumber); - painter.drawText(rect.x() + markWidth, (int)top, rect.x() + extraAreaWidth - markWidth - 4, - fm.height(), Qt::AlignRight, number); - } - - block = block.next(); - top = bottom; - bottom = top + blockBoundingRect(block).height(); - ++blockNumber; - } -} - -void QScriptEdit::extraAreaMouseEvent(QMouseEvent *e) -{ - QTextCursor cursor = cursorForPosition(QPoint(0, e->pos().y())); - cursor.setPosition(cursor.block().position()); - - QFontMetrics fm(font()); - int markWidth = fm.lineSpacing(); - - if (e->type() == QEvent::MouseMove && e->buttons() == 0) { // mouse tracking - bool hand = (e->pos().x() <= markWidth); - int lineNumber = cursor.blockNumber() + m_baseLineNumber; - hand = hand && isExecutableLine(lineNumber); -#ifndef QT_NO_CURSOR - if (hand != (m_extraArea->cursor().shape() == Qt::PointingHandCursor)) - m_extraArea->setCursor(hand ? Qt::PointingHandCursor : Qt::ArrowCursor); -#endif - } - - if (e->type() == QEvent::MouseButtonPress) { - if (e->button() == Qt::LeftButton) { - int lineNumber = cursor.blockNumber() + m_baseLineNumber; - bool executable = isExecutableLine(lineNumber); - if ((e->pos().x() <= markWidth) && executable) - m_extraAreaToggleBlockNumber = cursor.blockNumber(); - else - m_extraAreaToggleBlockNumber = -1; - } - } else if (e->type() == QEvent::MouseButtonRelease) { - if (e->button() == Qt::LeftButton) { - if ((m_extraAreaToggleBlockNumber != -1) && (e->pos().x() <= markWidth)) { - int lineNumber = m_extraAreaToggleBlockNumber + m_baseLineNumber; - bool on = !m_breakpoints.contains(lineNumber); - emit breakpointToggleRequest(lineNumber, on); - } - } else if (e->button() == Qt::RightButton) { - int lineNumber = cursor.blockNumber() + m_baseLineNumber; - if (!isExecutableLine(lineNumber)) - return; - bool has = m_breakpoints.contains(lineNumber); - QMenu *popup = new QMenu(); - QAction *toggleAct = new QAction(tr("Toggle Breakpoint"), popup); - popup->addAction(toggleAct); - QAction *disableAct = new QAction(tr("Disable Breakpoint"), popup); - QAction *enableAct = new QAction(tr("Enable Breakpoint"), popup); - QWidget *conditionWidget = new QWidget(); - { - QHBoxLayout *hbox = new QHBoxLayout(conditionWidget); - hbox->addWidget(new QLabel(tr("Breakpoint Condition:"))); - hbox->addWidget(new QLineEdit()); - } -// QWidgetAction *conditionAct = new QWidgetAction(popup); -// conditionAct->setDefaultWidget(conditionWidget); - if (has) { - popup->addSeparator(); - popup->addAction(m_breakpoints[lineNumber].enabled ? disableAct : enableAct); -// popup->addAction(conditionAct); - } - QAction *ret = popup->exec(e->globalPos()); - if (ret) { - if (ret == toggleAct) { - emit breakpointToggleRequest(lineNumber, !has); - } else if (ret == disableAct) { - emit breakpointEnableRequest(lineNumber, false); - } else if (ret == enableAct) { - emit breakpointEnableRequest(lineNumber, true); - }// else if (ret == conditionAct) { - //} - } - popup->deleteLater(); - } - } -} - -bool QScriptEdit::extraAreaEvent(QEvent *e) -{ - if (e->type() == QEvent::ToolTip) { - // ### show the breakpoint's condition, if any - return true; - } - return false; -} - -QT_END_NAMESPACE -#include "moc_qscriptedit_p.h" diff --git a/src/scripttools/debugging/qscriptedit_p.h b/src/scripttools/debugging/qscriptedit_p.h deleted file mode 100644 index 383fab337..000000000 --- a/src/scripttools/debugging/qscriptedit_p.h +++ /dev/null @@ -1,112 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTEDIT_P_H -#define QSCRIPTEDIT_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include -#include - -QT_BEGIN_NAMESPACE - -class QScriptEditExtraArea; - -class Q_AUTOTEST_EXPORT QScriptEdit : public QPlainTextEdit -{ - Q_OBJECT -public: - QScriptEdit(QWidget *parent = nullptr); - ~QScriptEdit(); - - int baseLineNumber() const; - void setBaseLineNumber(int base); - - int executionLineNumber() const; - void setExecutionLineNumber(int lineNumber, bool error); - void setExecutableLineNumbers(const QSet &lineNumbers); - bool isExecutableLine(int lineNumber) const; - - int currentLineNumber() const; - void gotoLine(int lineNumber); - - void setBreakpoint(int lineNumber); - void setBreakpointEnabled(int lineNumber, bool enable); - void deleteBreakpoint(int lineNumber); - - int extraAreaWidth() const; - -signals: - void breakpointToggleRequest(int lineNumber, bool on); - void breakpointEnableRequest(int lineNumber, bool enable); - -protected: - void paintEvent(QPaintEvent *e); - void resizeEvent(QResizeEvent *e); - - void extraAreaPaintEvent(QPaintEvent *e); - void extraAreaMouseEvent(QMouseEvent *e); - bool extraAreaEvent(QEvent *e); - -private slots: - void updateExtraAreaWidth(); - void updateExtraArea(const QRect &, int); - void highlightCurrentLine(); - -private: - QTextEdit::ExtraSelection currentLineSelection() const; - QTextEdit::ExtraSelection currentExecutionLineSelection() const; - void updateExtraSelections(); - -private: - QScriptEditExtraArea *m_extraArea; - int m_baseLineNumber; - int m_executionLineNumber; - QSet m_executableLineNumbers; - bool m_executionLineNumberHasError; - int m_extraAreaToggleBlockNumber; - - struct BreakpointData { - BreakpointData() : enabled(true) {} - bool enabled; - }; - QHash m_breakpoints; - -private: - Q_DISABLE_COPY(QScriptEdit) - friend class QScriptEditExtraArea; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptenginedebugger.cpp b/src/scripttools/debugging/qscriptenginedebugger.cpp deleted file mode 100644 index 9de24b912..000000000 --- a/src/scripttools/debugging/qscriptenginedebugger.cpp +++ /dev/null @@ -1,628 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptenginedebugger.h" -#include "qscriptdebugger_p.h" -#include "qscriptenginedebuggerfrontend_p.h" -#include "qscriptdebuggerstandardwidgetfactory_p.h" -#include "qobject_p.h" -#include "qcoreapplication_p.h" - -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -/*! - \since 4.5 - \class QScriptEngineDebugger - - \brief The QScriptEngineDebugger class provides a QScriptEngine debugger. - - \ingroup script - - - The QScriptEngineDebugger class provides a debugger that can be - embedded into Qt applications that use Qt Script. The debugger - enables the application user to inspect the state of the script - environment and control script execution. - - To attach the debugger to a script engine, call the attachTo() - function. - - \snippet doc/src/snippets/code/src.scripttools.qscriptenginedebugger.cpp 0 - - Once the debugger has been attached to a script engine, you can - proceed to evaluate scripts as usual, e.g. by calling - QScriptEngine::evaluate(). The debugger will be triggered when an - uncaught exception occurs, or when a \c{debugger} statement is - encountered in a script. It is also possible to interrupt script - evaluation at an arbitrary time by triggering the InterruptAction. - For instance, to start the debugger when script evaluation starts, - you trigger the action before you begin to \l{QScriptEngine::}{evaluate()} - the script. - - \snippet doc/src/snippets/scriptdebugger.cpp 2 - - By default, the \l{standardWindow()}{standard debugger window} is shown when - evaluation is suspended. This can be changed by calling the - setAutoShowStandardWindow() function. - - The debugger defines a set of \l{DebuggerAction}{actions} that are - available, such as stopping execution or printing the contents of a - variable. It also provides a set of widgets (components) that - display the information available from the debugger and that trigger - the actions on request. The actions available are identified by the - DebuggerAction enum, and the widgets are identified by the - DebuggerWidget enum. - - Access to the individual debugger widgets is provided by the - widget() function. This makes it possible to arrange the widgets in - a custom manner. Similarly, the action() function provides access - to the various debugger actions. - - The createStandardToolBar() function creates a standard toolbar, and the - createStandardMenu() function creates a standard menu; these functions can - be useful if you are creating a custom debugger configuration. - - The evaluationSuspended() signal is emitted when the debugger has - suspended script evaluation and entered interactive mode, i.e., the - mode in which it accepts input from the user. The - evaluationResumed() signal is emitted when script evaluation is - resumed, i.e, when execution control is given back to the script - engine. The state() function returns the debugger's current state. - - When calling QScriptEngine::evaluate() it is useful to pass a - descriptive script name (file name) as second argument, as this is - the name that will be displayed by the debugger in the - ScriptsWidget; if a name is not passed, the script will be labelled - "anonymous". - - When evaluation is suspended, the debugger will also suspend the - event loop of the script. In the following snippet, the call to - QScriptEngine::evaluate() causes the debugger to be triggered, and - the function call does not return until the user has finished - interacting with the debugger. - - \snippet doc/src/snippets/code/src.scripttools.qscriptenginedebugger.cpp 1 - - When the Qt Script debugger is running, the C++ application itself - is not "frozen". This means that it is possible that more scripts - are evaluated, even though the debugger has suspended evaluation of - the \bold{current} script evaluation. For example, a C++ timer might - trigger that causes a script function to be called, or the user - might click on a button in the main application user interface whose - clicked() signal is connected to a script function. This kind of - nested evaluation is permitted. The debugger will enter interactive - mode for the new script if an exception is thrown or a breakpoint is - reached. Note that it will not stop when encountering \c{debugger} - statements. \omit The effects are similar to those achieved by - typing a program into the debugger's console and evaluating - it. \endomit - - Nested evaluation requires some thought when deciding - how the debugger is presented to the user; for example, whether a - modal dialog is suitable, or whether some parts of the main - application user interface should be disabled while the debugger is - running. \omit Seems unfinished somehow \endomit - - Debugging inside of a \l{QWidget::paintEvent()}{paintEvent}() is - currently not supported. If you need to debug painting-related - script code, that code should be evaluated outside of the C++ - paintEvent(), e.g. by rendering to an image, like the Context2D and - Tetrix QtScript examples do. This will make the code safe for - debugging. - - The debugger adds some special properties to the script engine: - \c{__FILE__} holds the name of the script in which the current - evaluation occurs, and \c{__LINE__} holds the current line - number. These are useful when doing print()-style debugging (the - messages appear in the debugger's debug output widget). - - The \l{Qt Script Debugger Manual} describes how to use the debugger. - The \l{Context2D Example}{Context2D example} shows how to integrate - the debugger in applications. - - \sa QScriptEngine, {Context2D Example} -*/ - -/*! - \enum QScriptEngineDebugger::DebuggerWidget - - This enum decides the widget that the widget() function should - retrieve. We treat these widgets in more detail in the \l{Qt - Script Debugger Manual}. - - \value ConsoleWidget Provides a command-line interface to the debugger. - \value StackWidget Shows a backtrace of the script's execution state. - \value ScriptsWidget Displays a list of currently loaded scripts. - \value LocalsWidget Shows the local variables of the current stack frame. - \value CodeWidget Displays the code of the current script. - \value CodeFinderWidget Provides a widget that can search for text in the script shown in the - CodeWidget. - \value BreakpointsWidget Shows breakpoints that have been set. - \value DebugOutputWidget Contains output from the \c print() script function. - \value ErrorLogWidget Shows error messages that have been generated. -*/ - -/*! - \enum QScriptEngineDebugger::DebuggerAction - - This enum specifies the action that the action() function should - retrieve. The actions retrieved can be connected to any slot and - connected to any widget. Please see the \l{Qt Script Debugger Manual}'s - \l{Console Command Reference} for a detailed description of these actions. - - \value InterruptAction Suspends script execution as soon as the next script statement is reached. - \value ContinueAction Gives the execution control back to the script engine. - \value StepIntoAction Performs a step action. - \value StepOverAction Performs a next action. - \value StepOutAction Executes the script until the current function returns. - \value RunToCursorAction Continues execution to the selected line (which contains the cursor) in the CodeWidget. - \value RunToNewScriptAction Returns control to the script engine until a new script is executed. - \value ToggleBreakpointAction Toggles a breakpoint at the selected line in the CodeWidget. - \value ClearDebugOutputAction Clears the contents of the DebugOutputWidget. - \value ClearErrorLogAction Clears the contents of the ErrorLogWidget. - \value ClearConsoleAction Clears the contents of the ConsoleWidget. - \value FindInScriptAction Displays the CodeFinderWidget. - \value FindNextInScriptAction Finds next occurrence in the CodeWidget. - \value FindPreviousInScriptAction Finds previous occurrence in the CodeWidget. - \value GoToLineAction Shows the "Go to Line" dialog. -*/ - -/*! - \enum QScriptEngineDebugger::DebuggerState - \since 4.6 - - This enum specifies the current state of the debugger. - - \value RunningState The debugger is running. (Script evaluation is allowed.) - \value SuspendedState The debugger has suspended script evaluation. -*/ - -class QScriptEngineDebuggerPrivate - : public QObjectPrivate -{ - Q_DECLARE_PUBLIC(QScriptEngineDebugger) -public: - QScriptEngineDebuggerPrivate(); - ~QScriptEngineDebuggerPrivate(); - - // private slots - void _q_showStandardWindow(); - - void createDebugger(); - - QScriptDebugger *debugger; - QScriptEngineDebuggerFrontend *frontend; -#ifndef QT_NO_MAINWINDOW - QMainWindow *standardWindow; -#endif - bool autoShow; -}; - -namespace { - -class WidgetClosedNotifier : public QObject -{ - Q_OBJECT -public: - WidgetClosedNotifier(QWidget *w, QObject *parent = nullptr) - : QObject(parent), widget(w) - { - w->installEventFilter(this); - } - - bool eventFilter(QObject *watched, QEvent *e) - { - if (watched != widget) - return false; - if (e->type() != QEvent::Close) - return false; - emit widgetClosed(); - return true; - } - -Q_SIGNALS: - void widgetClosed(); - -private: - QWidget *widget; -}; - -} // namespace - -QScriptEngineDebuggerPrivate::QScriptEngineDebuggerPrivate() -{ - debugger = 0; - frontend = 0; -#ifndef QT_NO_MAINWINDOW - standardWindow = 0; -#endif - autoShow = true; -} - -QScriptEngineDebuggerPrivate::~QScriptEngineDebuggerPrivate() -{ - delete debugger; - delete frontend; -#ifndef QT_NO_MAINWINDOW - if (standardWindow) { - QSettings settings(QString::fromLatin1("Katie"), QSettings::NativeFormat); - QByteArray geometry = standardWindow->saveGeometry(); - settings.setValue(QLatin1String("Qt/scripttools/debugging/mainWindowGeometry"), geometry); - QByteArray state = standardWindow->saveState(); - settings.setValue(QLatin1String("Qt/scripttools/debugging/mainWindowState"), state); - if (standardWindow->parent() == 0) - delete standardWindow; - } -#endif -} - -#ifndef QT_NO_MAINWINDOW -void QScriptEngineDebuggerPrivate::_q_showStandardWindow() -{ - Q_Q(QScriptEngineDebugger); - (void)q->standardWindow(); // ensure it's created - standardWindow->show(); -} -#endif - -void QScriptEngineDebuggerPrivate::createDebugger() -{ - Q_Q(QScriptEngineDebugger); - if (!debugger) { - debugger = new QScriptDebugger(); - debugger->setWidgetFactory(new QScriptDebuggerStandardWidgetFactory(q)); - QObject::connect(debugger, SIGNAL(started()), - q, SIGNAL(evaluationResumed())); - QObject::connect(debugger, SIGNAL(stopped()), - q, SIGNAL(evaluationSuspended())); - if (autoShow) { - QObject::connect(q, SIGNAL(evaluationSuspended()), - q, SLOT(_q_showStandardWindow())); - } - } -} - -/*! - Constructs a new QScriptEngineDebugger object with the given \a - parent. - - To attach a QScriptEngine to the debugger, use attachTo() - function. - -*/ -QScriptEngineDebugger::QScriptEngineDebugger(QObject *parent) - : QObject(*new QScriptEngineDebuggerPrivate, parent) -{ -} - -/*! - Destroys this QScriptEngineDebugger. -*/ -QScriptEngineDebugger::~QScriptEngineDebugger() -{ -} - -/*! - Attaches to the given \a engine. - - The debugger will install a custom agent (using - QScriptEngine::setAgent()) to monitor the engine. While the debugger - is attached, you should not change the agent; however, if you do - have to perform additional monitoring, you must set a proxy agent - that forwards all events to the debugger's agent. - - \sa detach() -*/ -void QScriptEngineDebugger::attachTo(QScriptEngine *engine) -{ - Q_D(QScriptEngineDebugger); - if (!engine) { - detach(); - return; - } - d->createDebugger(); - if (!d->frontend) - d->frontend = new QScriptEngineDebuggerFrontend(); - d->frontend->attachTo(engine); - d->debugger->setFrontend(d->frontend); -} - -/*! - Detaches from the current script engine, if any. - - \sa attachTo() -*/ -void QScriptEngineDebugger::detach() -{ - Q_D(QScriptEngineDebugger); - if (d->frontend) - d->frontend->detach(); - if (d->debugger) - d->debugger->setFrontend(0); -} - -/*! - \since 4.6 - - Returns the current state of the debugger. - - \sa evaluationResumed() - \sa evaluationSuspended() -*/ -QScriptEngineDebugger::DebuggerState QScriptEngineDebugger::state() const -{ - Q_D(const QScriptEngineDebugger); - return !d->debugger || !d->debugger->isInteractive() ? SuspendedState : RunningState; -} - -/*! - - Returns a pointer to the instance of the specified standard \a - widget. The widgets available are defined by the DebuggerWidget - enum. - - A main window containing all widgets is returned by - standardWindow(). If you do not want to use this window, you can - fetch the individual widgets with this function. For instance, the - code example below shows how to set up a layout containing a - \l{QScriptEngineDebugger::CodeWidget}{code window} and a - \l{QScriptEngineDebugger::StackWidget}{stack widget}. - - \snippet doc/src/snippets/scriptdebugger.cpp 0 - - Note that you need to set setAutoShowStandardWindow() to false; if - not, the standard window will be shown regardless. - - \sa action(), standardWindow(), setAutoShowStandardWindow() -*/ -QWidget *QScriptEngineDebugger::widget(DebuggerWidget widget) const -{ - Q_D(const QScriptEngineDebugger); - const_cast(d)->createDebugger(); - return d->debugger->widget(static_cast(static_cast(widget))); -} - -/*! - Returns a pointer to the specified \a action. The actions available - are given by the DebuggerAction enum. - - With this function, you can add the actions to your own widgets, - toolbars, and menus. It is also convenient if you, for example, - wish to spice things up with your own groovy icons. The code - example below shows how to add actions to a QToolBar. - - \snippet doc/src/snippets/scriptdebugger.cpp 1 - - Note that QScriptEngineDebugger has already added the actions to - its \l{DebuggerWidget}{standard widgets} and \l{standardWindow()}{standard window}. - - \sa widget(), createStandardMenu(), createStandardToolBar(), standardWindow() -*/ -QAction *QScriptEngineDebugger::action(DebuggerAction action) const -{ - Q_D(const QScriptEngineDebugger); - QScriptEngineDebugger *that = const_cast(this); - that->d_func()->createDebugger(); - return d->debugger->action(static_cast(static_cast(action)), that); -} - -/*! - Returns whether the standard debugger window is automatically shown when - evaluation is suspended. - - The default is true. -*/ -bool QScriptEngineDebugger::autoShowStandardWindow() const -{ - Q_D(const QScriptEngineDebugger); - return d->autoShow; -} - -/*! - Sets whether the standard debugger window is automatically shown when - evaluation is suspended. If \a autoShow is true, the window will be - automatically shown, otherwise it will not. -*/ -void QScriptEngineDebugger::setAutoShowStandardWindow(bool autoShow) -{ - Q_D(QScriptEngineDebugger); - if (autoShow == d->autoShow) - return; - if (autoShow) { - QObject::connect(this, SIGNAL(evaluationSuspended()), - this, SLOT(_q_showStandardWindow())); - } else { - QObject::disconnect(this, SIGNAL(evaluationSuspended()), - this, SLOT(_q_showStandardWindow())); - } - d->autoShow = autoShow; -} - -/*! - Returns a main window with a standard configuration of the debugger's - components. - - \sa createStandardMenu(), createStandardToolBar() -*/ -#ifndef QT_NO_MAINWINDOW -QMainWindow *QScriptEngineDebugger::standardWindow() const -{ - Q_D(const QScriptEngineDebugger); - if (d->standardWindow) - return d->standardWindow; - if (!QApplication::instance()) - return 0; - QScriptEngineDebugger *that = const_cast(this); - - QMainWindow *win = new QMainWindow(); - QDockWidget *scriptsDock = new QDockWidget(win); - scriptsDock->setObjectName(QLatin1String("qtscriptdebugger_scriptsDockWidget")); - scriptsDock->setWindowTitle(tr("Loaded Scripts")); - scriptsDock->setWidget(widget(ScriptsWidget)); - win->addDockWidget(Qt::LeftDockWidgetArea, scriptsDock); - - QDockWidget *breakpointsDock = new QDockWidget(win); - breakpointsDock->setObjectName(QLatin1String("qtscriptdebugger_breakpointsDockWidget")); - breakpointsDock->setWindowTitle(tr("Breakpoints")); - breakpointsDock->setWidget(widget(BreakpointsWidget)); - win->addDockWidget(Qt::LeftDockWidgetArea, breakpointsDock); - - QDockWidget *stackDock = new QDockWidget(win); - stackDock->setObjectName(QLatin1String("qtscriptdebugger_stackDockWidget")); - stackDock->setWindowTitle(tr("Stack")); - stackDock->setWidget(widget(StackWidget)); - win->addDockWidget(Qt::RightDockWidgetArea, stackDock); - - QDockWidget *localsDock = new QDockWidget(win); - localsDock->setObjectName(QLatin1String("qtscriptdebugger_localsDockWidget")); - localsDock->setWindowTitle(tr("Locals")); - localsDock->setWidget(widget(LocalsWidget)); - win->addDockWidget(Qt::RightDockWidgetArea, localsDock); - - QDockWidget *consoleDock = new QDockWidget(win); - consoleDock->setObjectName(QLatin1String("qtscriptdebugger_consoleDockWidget")); - consoleDock->setWindowTitle(tr("Console")); - consoleDock->setWidget(widget(ConsoleWidget)); - win->addDockWidget(Qt::BottomDockWidgetArea, consoleDock); - - QDockWidget *debugOutputDock = new QDockWidget(win); - debugOutputDock->setObjectName(QLatin1String("qtscriptdebugger_debugOutputDockWidget")); - debugOutputDock->setWindowTitle(tr("Debug Output")); - debugOutputDock->setWidget(widget(DebugOutputWidget)); - win->addDockWidget(Qt::BottomDockWidgetArea, debugOutputDock); - - QDockWidget *errorLogDock = new QDockWidget(win); - errorLogDock->setObjectName(QLatin1String("qtscriptdebugger_errorLogDockWidget")); - errorLogDock->setWindowTitle(tr("Error Log")); - errorLogDock->setWidget(widget(ErrorLogWidget)); - win->addDockWidget(Qt::BottomDockWidgetArea, errorLogDock); - - win->tabifyDockWidget(errorLogDock, debugOutputDock); - win->tabifyDockWidget(debugOutputDock, consoleDock); - - win->addToolBar(Qt::TopToolBarArea, that->createStandardToolBar()); - -#ifndef QT_NO_MENUBAR - win->menuBar()->addMenu(that->createStandardMenu(win)); - - QMenu *editMenu = win->menuBar()->addMenu(tr("Search")); - editMenu->addAction(action(FindInScriptAction)); - editMenu->addAction(action(FindNextInScriptAction)); - editMenu->addAction(action(FindPreviousInScriptAction)); - editMenu->addSeparator(); - editMenu->addAction(action(GoToLineAction)); - - QMenu *viewMenu = win->menuBar()->addMenu(tr("View")); - viewMenu->addAction(scriptsDock->toggleViewAction()); - viewMenu->addAction(breakpointsDock->toggleViewAction()); - viewMenu->addAction(stackDock->toggleViewAction()); - viewMenu->addAction(localsDock->toggleViewAction()); - viewMenu->addAction(consoleDock->toggleViewAction()); - viewMenu->addAction(debugOutputDock->toggleViewAction()); - viewMenu->addAction(errorLogDock->toggleViewAction()); -#endif - - QWidget *central = new QWidget(); - QVBoxLayout *vbox = new QVBoxLayout(central); - vbox->setMargin(0); - vbox->addWidget(widget(CodeWidget)); - vbox->addWidget(widget(CodeFinderWidget)); - widget(CodeFinderWidget)->hide(); - win->setCentralWidget(central); - - win->setWindowTitle(tr("Katie Script Debugger")); - - QSettings settings(QString::fromLatin1("Katie"), QSettings::NativeFormat); - QVariant geometry = settings.value(QLatin1String("Qt/scripttools/debugging/mainWindowGeometry")); - if (geometry.isValid()) - win->restoreGeometry(geometry.toByteArray()); - QVariant state = settings.value(QLatin1String("Qt/scripttools/debugging/mainWindowState")); - if (state.isValid()) - win->restoreState(state.toByteArray()); - - WidgetClosedNotifier *closedNotifier = new WidgetClosedNotifier(win, that); - QObject::connect(closedNotifier, SIGNAL(widgetClosed()), - action(ContinueAction), SLOT(trigger())); - - const_cast(d)->standardWindow = win; - return win; -} -#endif // QT_NO_MAINWINDOW - -/*! - Creates a standard debugger menu with the given \a parent. - Returns the new menu object. - - \sa createStandardToolBar() -*/ -QMenu *QScriptEngineDebugger::createStandardMenu(QWidget *parent) -{ - Q_D(QScriptEngineDebugger); - d->createDebugger(); - return d->debugger->createStandardMenu(parent, this); -} - -/*! - Creates a standard debugger toolbar with the given \a parent. - Returns the new toolbar object. - - \sa createStandardMenu() -*/ -#ifndef QT_NO_TOOLBAR -QToolBar *QScriptEngineDebugger::createStandardToolBar(QWidget *parent) -{ - Q_D(QScriptEngineDebugger); - d->createDebugger(); - return d->debugger->createStandardToolBar(parent, this); -} -#endif - -/*! - \fn QScriptEngineDebugger::evaluationSuspended() - - This signal is emitted when the debugger has suspended script - evaluation for whatever reason (e.g. due to an uncaught script - exception, or due to a breakpoint being triggered). - - \sa evaluationResumed() -*/ - -/*! - \fn QScriptEngineDebugger::evaluationResumed() - - This signal is emitted when the debugger has resumed script - evaluation (e.g. the user gave the "continue" command). - - \sa evaluationSuspended() -*/ - -QT_END_NAMESPACE - -#include "moc_qscriptenginedebugger.h" -#include "moc_qscriptenginedebugger.cpp" - diff --git a/src/scripttools/debugging/qscriptenginedebugger.h b/src/scripttools/debugging/qscriptenginedebugger.h deleted file mode 100644 index 7c6acc2b2..000000000 --- a/src/scripttools/debugging/qscriptenginedebugger.h +++ /dev/null @@ -1,114 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTENGINEDEBUGGER_H -#define QSCRIPTENGINEDEBUGGER_H - -#include - - -QT_BEGIN_NAMESPACE - - -class QAction; -class QScriptEngine; -class QWidget; -#ifndef QT_NO_MAINWINDOW -class QMainWindow; -#endif -class QMenu; -class QToolBar; - -class QScriptEngineDebuggerPrivate; -class Q_SCRIPTTOOLS_EXPORT QScriptEngineDebugger : public QObject -{ - Q_OBJECT -public: - enum DebuggerWidget { - ConsoleWidget, - StackWidget, - ScriptsWidget, - LocalsWidget, - CodeWidget, - CodeFinderWidget, - BreakpointsWidget, - DebugOutputWidget, - ErrorLogWidget - }; - - enum DebuggerAction { - InterruptAction, - ContinueAction, - StepIntoAction, - StepOverAction, - StepOutAction, - RunToCursorAction, - RunToNewScriptAction, - ToggleBreakpointAction, - ClearDebugOutputAction, - ClearErrorLogAction, - ClearConsoleAction, - FindInScriptAction, - FindNextInScriptAction, - FindPreviousInScriptAction, - GoToLineAction - }; - - enum DebuggerState { - RunningState, - SuspendedState - }; - - QScriptEngineDebugger(QObject *parent = nullptr); - ~QScriptEngineDebugger(); - - void attachTo(QScriptEngine *engine); - void detach(); - - bool autoShowStandardWindow() const; - void setAutoShowStandardWindow(bool autoShow); - -#ifndef QT_NO_MAINWINDOW - QMainWindow *standardWindow() const; -#endif - QToolBar *createStandardToolBar(QWidget *parent = nullptr); - QMenu *createStandardMenu(QWidget *parent = nullptr); - - QWidget *widget(DebuggerWidget widget) const; - QAction *action(DebuggerAction action) const; - - DebuggerState state() const; - -Q_SIGNALS: - void evaluationSuspended(); - void evaluationResumed(); - -private: - Q_DECLARE_PRIVATE(QScriptEngineDebugger) - Q_DISABLE_COPY(QScriptEngineDebugger) - - Q_PRIVATE_SLOT(d_func(), void _q_showStandardWindow()) -}; - -QT_END_NAMESPACE - - -#endif diff --git a/src/scripttools/debugging/qscriptenginedebuggerfrontend.cpp b/src/scripttools/debugging/qscriptenginedebuggerfrontend.cpp deleted file mode 100644 index ce1347dd7..000000000 --- a/src/scripttools/debugging/qscriptenginedebuggerfrontend.cpp +++ /dev/null @@ -1,316 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptenginedebuggerfrontend_p.h" -#include "qscriptdebuggerfrontend_p_p.h" -#include "qscriptdebuggerbackend_p.h" -#include "qscriptdebuggerbackend_p_p.h" -#include "qscriptdebuggerevent_p.h" -#include "qscriptdebuggercommandexecutor_p.h" -#include "qscriptdebuggerresponse_p.h" - -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -/*! - \class QScriptEngineDebuggerFrontend - \since 4.5 - \internal - - \brief The QScriptEngineDebuggerFrontend class provides an in-process debugger frontend. - - This type of frontend is used when the QScriptEngine being debugged - lives in the same process as the debugger. - - Call the attachTo() function to attach to an engine. -*/ - -class QScriptDebuggerCommandEvent : public QEvent -{ -public: - QScriptDebuggerCommandEvent(int id, const QScriptDebuggerCommand &command) - : QEvent(QEvent::Type(QEvent::User+3)), m_id(id), m_command(command) {} - ~QScriptDebuggerCommandEvent() {} - int id() const - { return m_id; } - const QScriptDebuggerCommand &command() const - { return m_command; } -private: - int m_id; - QScriptDebuggerCommand m_command; -}; - -class QScriptDebuggerCommandFinishedEvent : public QEvent -{ -public: - QScriptDebuggerCommandFinishedEvent(int id, const QScriptDebuggerResponse &response) - : QEvent(QEvent::Type(QEvent::User+4)), m_id(id), m_response(response) {} - ~QScriptDebuggerCommandFinishedEvent() {} - int id() const - { return m_id; } - const QScriptDebuggerResponse &response() const - { return m_response; } -private: - int m_id; - QScriptDebuggerResponse m_response; -}; - -class QScriptEngineDebuggerBackendPrivate; -class QScriptEngineDebuggerBackend : public QScriptDebuggerBackend -{ -public: - QScriptEngineDebuggerBackend(QScriptEngineDebuggerFrontendPrivate *frontend); - ~QScriptEngineDebuggerBackend(); - - void processCommand(int id, const QScriptDebuggerCommand &command); - void resume(); - -protected: - void event(const QScriptDebuggerEvent &event); - -private: - Q_DECLARE_PRIVATE(QScriptEngineDebuggerBackend) - Q_DISABLE_COPY(QScriptEngineDebuggerBackend) -}; - -class QScriptEngineDebuggerBackendPrivate - : public QScriptDebuggerBackendPrivate -{ - Q_DECLARE_PUBLIC(QScriptEngineDebuggerBackend) -public: - QScriptEngineDebuggerBackendPrivate(); - ~QScriptEngineDebuggerBackendPrivate(); - - bool event(QEvent *e); - - QScriptEngineDebuggerFrontendPrivate *frontend; - QList eventLoopPool; - QList eventLoopStack; -}; - -class QScriptEngineDebuggerFrontendPrivate - : public QScriptDebuggerFrontendPrivate -{ - Q_DECLARE_PUBLIC(QScriptEngineDebuggerFrontend) -public: - QScriptEngineDebuggerFrontendPrivate(); - ~QScriptEngineDebuggerFrontendPrivate(); - - void postCommandFinished(int id, const QScriptDebuggerResponse &response); - bool event(QEvent *e); - - QScriptEngineDebuggerBackend *backend; -}; - -QScriptEngineDebuggerBackendPrivate::QScriptEngineDebuggerBackendPrivate() -{ - frontend = 0; -} - -QScriptEngineDebuggerBackendPrivate::~QScriptEngineDebuggerBackendPrivate() -{ - eventLoopPool << eventLoopStack; - eventLoopStack.clear(); - while (!eventLoopPool.isEmpty()) { - QEventLoop *eventLoop = eventLoopPool.takeFirst(); - if (eventLoop->isRunning()) { - eventLoop->quit(); - eventLoop->deleteLater(); - } else { - delete eventLoop; - } - } -} - -/*! - \reimp -*/ -bool QScriptEngineDebuggerBackendPrivate::event(QEvent *e) -{ - Q_Q(QScriptEngineDebuggerBackend); - if (e->type() == QEvent::User+3) { - QScriptDebuggerCommandEvent *ce = static_cast(e); - QScriptDebuggerCommandExecutor *executor = q->commandExecutor(); - QScriptDebuggerResponse response = executor->execute(q, ce->command()); - frontend->postCommandFinished(ce->id(), response); - return true; - } - return QScriptDebuggerBackendPrivate::event(e); -} - -/*! - \internal - - Creates a new QScriptEngineDebuggerBackend object for the given \a - engine. The back-end will forward events to the given \a frontend. -*/ -QScriptEngineDebuggerBackend::QScriptEngineDebuggerBackend( - QScriptEngineDebuggerFrontendPrivate *frontend) - : QScriptDebuggerBackend(*new QScriptEngineDebuggerBackendPrivate) -{ - Q_D(QScriptEngineDebuggerBackend); - d->frontend = frontend; -} - -QScriptEngineDebuggerBackend::~QScriptEngineDebuggerBackend() -{ -} - -void QScriptEngineDebuggerBackend::processCommand(int id, const QScriptDebuggerCommand &command) -{ - Q_D(QScriptEngineDebuggerBackend); - if (d->agent) - d->postEvent(new QScriptDebuggerCommandEvent(id, command)); -} - -/*! - \reimp -*/ -void QScriptEngineDebuggerBackend::event(const QScriptDebuggerEvent &event) -{ - Q_D(QScriptEngineDebuggerBackend); - if (d->eventLoopPool.isEmpty()) - d->eventLoopPool.append(new QEventLoop()); - QEventLoop *eventLoop = d->eventLoopPool.takeFirst(); - Q_ASSERT(!eventLoop->isRunning()); - d->eventLoopStack.prepend(eventLoop); - - d->frontend->postEvent(new QScriptDebuggerEventEvent(event)); - - // Run an event loop until resume() is called. - // This effectively stalls script execution and makes it possible - // for the debugger to inspect the execution state in the meantime. - eventLoop->exec(); - - if (!d->eventLoopStack.isEmpty()) { - // the event loop was quit directly (i.e. not via resume()) - d->eventLoopStack.takeFirst(); - } - d->eventLoopPool.append(eventLoop); - doPendingEvaluate(/*postEvent=*/false); -} - -/*! - \reimp -*/ -void QScriptEngineDebuggerBackend::resume() -{ - Q_D(QScriptEngineDebuggerBackend); - // quitting the event loops will cause event() to return (see above) - while (!d->eventLoopStack.isEmpty()) { - QEventLoop *eventLoop = d->eventLoopStack.takeFirst(); - if (eventLoop->isRunning()) - eventLoop->quit(); - } -} - -QScriptEngineDebuggerFrontendPrivate::QScriptEngineDebuggerFrontendPrivate() -{ - backend = 0; -} - -QScriptEngineDebuggerFrontendPrivate::~QScriptEngineDebuggerFrontendPrivate() -{ - delete backend; -} - -void QScriptEngineDebuggerFrontendPrivate::postCommandFinished( - int id, const QScriptDebuggerResponse &response) -{ - postEvent(new QScriptDebuggerCommandFinishedEvent(id, response)); -} - -/*! - \reimp -*/ -bool QScriptEngineDebuggerFrontendPrivate::event(QEvent *e) -{ - Q_Q(QScriptEngineDebuggerFrontend); - if (e->type() == QEvent::User+4) { - QScriptDebuggerCommandFinishedEvent *fe = static_cast(e); - q->notifyCommandFinished(fe->id(), fe->response()); - return true; - } - return QScriptDebuggerFrontendPrivate::event(e); -} - -QScriptEngineDebuggerFrontend::QScriptEngineDebuggerFrontend() - : QScriptDebuggerFrontend(*new QScriptEngineDebuggerFrontendPrivate) -{ -} - -QScriptEngineDebuggerFrontend::~QScriptEngineDebuggerFrontend() -{ - detach(); -} - -/*! - Attaches this front-end to the given \a engine. -*/ -void QScriptEngineDebuggerFrontend::attachTo(QScriptEngine *engine) -{ - Q_D(QScriptEngineDebuggerFrontend); - if (d->backend) - d->backend->detach(); - else - d->backend = new QScriptEngineDebuggerBackend(d); - d->backend->attachTo(engine); -} - -/*! - Detaches this front-end from the current script engine. -*/ -void QScriptEngineDebuggerFrontend::detach() -{ - Q_D(QScriptEngineDebuggerFrontend); - if (d->backend) - d->backend->detach(); -} - -QScriptValue QScriptEngineDebuggerFrontend::traceFunction() const -{ - Q_D(const QScriptEngineDebuggerFrontend); - if (d->backend) - d->backend->traceFunction(); - return QScriptValue(); -} - -QScriptDebuggerBackend *QScriptEngineDebuggerFrontend::backend() const -{ - Q_D(const QScriptEngineDebuggerFrontend); - return d->backend; -} - -/*! - \internal -*/ -void QScriptEngineDebuggerFrontend::processCommand(int id, const QScriptDebuggerCommand &command) -{ - Q_D(QScriptEngineDebuggerFrontend); - Q_ASSERT(d->backend != 0); - d->backend->processCommand(id, command); -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptenginedebuggerfrontend_p.h b/src/scripttools/debugging/qscriptenginedebuggerfrontend_p.h deleted file mode 100644 index 65316692f..000000000 --- a/src/scripttools/debugging/qscriptenginedebuggerfrontend_p.h +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTENGINEDEBUGGERFRONTEND_P_H -#define QSCRIPTENGINEDEBUGGERFRONTEND_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qscriptdebuggerfrontend_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptEngine; -class QScriptValue; -class QScriptDebuggerBackend; - -class QScriptEngineDebuggerFrontendPrivate; -class Q_AUTOTEST_EXPORT QScriptEngineDebuggerFrontend - : public QScriptDebuggerFrontend -{ -public: - QScriptEngineDebuggerFrontend(); - ~QScriptEngineDebuggerFrontend(); - - void attachTo(QScriptEngine *engine); - void detach(); - - QScriptValue traceFunction() const; - - QScriptDebuggerBackend *backend() const; - -protected: - void processCommand(int id, const QScriptDebuggerCommand &command); - -private: - Q_DECLARE_PRIVATE(QScriptEngineDebuggerFrontend) - Q_DISABLE_COPY(QScriptEngineDebuggerFrontend) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscripterrorlogwidget.cpp b/src/scripttools/debugging/qscripterrorlogwidget.cpp deleted file mode 100644 index b6cb39523..000000000 --- a/src/scripttools/debugging/qscripterrorlogwidget.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscripterrorlogwidget_p.h" -#include "qscripterrorlogwidgetinterface_p_p.h" - -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QScriptErrorLogWidgetOutputEdit : public QTextEdit -{ -public: - QScriptErrorLogWidgetOutputEdit(QWidget *parent = nullptr) - : QTextEdit(parent) - { - setReadOnly(true); -// setFocusPolicy(Qt::NoFocus); - document()->setMaximumBlockCount(255); - } - - void scrollToBottom() - { - QScrollBar *bar = verticalScrollBar(); - bar->setValue(bar->maximum()); - } -}; - -class QScriptErrorLogWidgetPrivate - : public QScriptErrorLogWidgetInterfacePrivate -{ - Q_DECLARE_PUBLIC(QScriptErrorLogWidget) -public: - QScriptErrorLogWidgetPrivate(); - ~QScriptErrorLogWidgetPrivate(); - - QScriptErrorLogWidgetOutputEdit *outputEdit; -}; - -QScriptErrorLogWidgetPrivate::QScriptErrorLogWidgetPrivate() -{ -} - -QScriptErrorLogWidgetPrivate::~QScriptErrorLogWidgetPrivate() -{ -} - -QScriptErrorLogWidget::QScriptErrorLogWidget(QWidget *parent) - : QScriptErrorLogWidgetInterface(*new QScriptErrorLogWidgetPrivate, parent, 0) -{ - Q_D(QScriptErrorLogWidget); - d->outputEdit = new QScriptErrorLogWidgetOutputEdit(); - QVBoxLayout *vbox = new QVBoxLayout(this); - vbox->setMargin(0); - vbox->setSpacing(0); - vbox->addWidget(d->outputEdit); - -// QString sheet = QString::fromLatin1("font-size: 14px; font-family: \"Monospace\";"); -// setStyleSheet(sheet); -} - -QScriptErrorLogWidget::~QScriptErrorLogWidget() -{ -} - -void QScriptErrorLogWidget::message( - QtMsgType type, const QString &text, const QString &fileName, - int lineNumber, int columnNumber, const QVariant &/*data*/) -{ - // ### we need the error message rather than Error.toString() - Q_UNUSED(type); - Q_UNUSED(fileName); - Q_UNUSED(lineNumber); - Q_UNUSED(columnNumber); - Q_D(QScriptErrorLogWidget); - QString html; - html.append(QString::fromLatin1("%0 %1
") - .arg(QDateTime::currentDateTime().toString()).arg(Qt::escape(text))); - d->outputEdit->insertHtml(html); - d->outputEdit->scrollToBottom(); -} - -void QScriptErrorLogWidget::clear() -{ - Q_D(QScriptErrorLogWidget); - d->outputEdit->clear(); -} - -QT_END_NAMESPACE - -#include "moc_qscripterrorlogwidget_p.h" diff --git a/src/scripttools/debugging/qscripterrorlogwidget_p.h b/src/scripttools/debugging/qscripterrorlogwidget_p.h deleted file mode 100644 index 23951fa81..000000000 --- a/src/scripttools/debugging/qscripterrorlogwidget_p.h +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTERRORLOGWIDGET_P_H -#define QSCRIPTERRORLOGWIDGET_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qscripterrorlogwidgetinterface_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptErrorLogWidgetPrivate; -class Q_AUTOTEST_EXPORT QScriptErrorLogWidget: - public QScriptErrorLogWidgetInterface -{ - Q_OBJECT -public: - QScriptErrorLogWidget(QWidget *parent = nullptr); - ~QScriptErrorLogWidget(); - - void message(QtMsgType type, const QString &text, - const QString &fileName = QString(), - int lineNumber = -1, int columnNumber = -1, - const QVariant &data = QVariant()); - - void clear(); - -private: - Q_DECLARE_PRIVATE(QScriptErrorLogWidget) - Q_DISABLE_COPY(QScriptErrorLogWidget) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscripterrorlogwidgetinterface.cpp b/src/scripttools/debugging/qscripterrorlogwidgetinterface.cpp deleted file mode 100644 index 7fb4442d7..000000000 --- a/src/scripttools/debugging/qscripterrorlogwidgetinterface.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscripterrorlogwidgetinterface_p.h" -#include "qscripterrorlogwidgetinterface_p_p.h" - -QT_BEGIN_NAMESPACE - -QScriptErrorLogWidgetInterfacePrivate::QScriptErrorLogWidgetInterfacePrivate() -{ -} - -QScriptErrorLogWidgetInterfacePrivate::~QScriptErrorLogWidgetInterfacePrivate() -{ -} - -QScriptErrorLogWidgetInterface::~QScriptErrorLogWidgetInterface() -{ -} - -QScriptErrorLogWidgetInterface::QScriptErrorLogWidgetInterface( - QScriptErrorLogWidgetInterfacePrivate &dd, - QWidget *parent, Qt::WindowFlags flags) - : QWidget(dd, parent, flags) -{ -} - -QT_END_NAMESPACE -#include "moc_qscripterrorlogwidgetinterface_p.h" diff --git a/src/scripttools/debugging/qscripterrorlogwidgetinterface_p.h b/src/scripttools/debugging/qscripterrorlogwidgetinterface_p.h deleted file mode 100644 index ad98a5b8b..000000000 --- a/src/scripttools/debugging/qscripterrorlogwidgetinterface_p.h +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTERRORLOGWIDGETINTERFACE_P_H -#define QSCRIPTERRORLOGWIDGETINTERFACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include "qscriptmessagehandlerinterface_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptErrorLogWidgetInterfacePrivate; -class Q_AUTOTEST_EXPORT QScriptErrorLogWidgetInterface: - public QWidget, - public QScriptMessageHandlerInterface -{ - Q_OBJECT -public: - ~QScriptErrorLogWidgetInterface(); - - virtual void clear() = 0; - -protected: - QScriptErrorLogWidgetInterface(QScriptErrorLogWidgetInterfacePrivate &dd, - QWidget *parent, Qt::WindowFlags flags); - -private: - Q_DECLARE_PRIVATE(QScriptErrorLogWidgetInterface) - Q_DISABLE_COPY(QScriptErrorLogWidgetInterface) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscripterrorlogwidgetinterface_p_p.h b/src/scripttools/debugging/qscripterrorlogwidgetinterface_p_p.h deleted file mode 100644 index cffd3cc3a..000000000 --- a/src/scripttools/debugging/qscripterrorlogwidgetinterface_p_p.h +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTERRORLOGWIDGETINTERFACE_P_P_H -#define QSCRIPTERRORLOGWIDGETINTERFACE_P_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qwidget_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptErrorLogWidgetInterface; -class QScriptErrorLogWidgetInterfacePrivate - : public QWidgetPrivate -{ - Q_DECLARE_PUBLIC(QScriptErrorLogWidgetInterface) -public: - QScriptErrorLogWidgetInterfacePrivate(); - ~QScriptErrorLogWidgetInterfacePrivate(); -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptmessagehandlerinterface_p.h b/src/scripttools/debugging/qscriptmessagehandlerinterface_p.h deleted file mode 100644 index 55b195b88..000000000 --- a/src/scripttools/debugging/qscriptmessagehandlerinterface_p.h +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTMESSAGEHANDLERINTERFACE_P_H -#define QSCRIPTMESSAGEHANDLERINTERFACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include - -QT_BEGIN_NAMESPACE - -class Q_AUTOTEST_EXPORT QScriptMessageHandlerInterface -{ -public: - virtual ~QScriptMessageHandlerInterface() {} - - virtual void message(QtMsgType type, const QString &text, - const QString &fileName = QString(), - int lineNumber = -1, int columnNumber = -1, - const QVariant &data = QVariant()) = 0; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptobjectsnapshot.cpp b/src/scripttools/debugging/qscriptobjectsnapshot.cpp deleted file mode 100644 index 4079e85e2..000000000 --- a/src/scripttools/debugging/qscriptobjectsnapshot.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptobjectsnapshot_p.h" - -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -QScriptObjectSnapshot::QScriptObjectSnapshot() -{ -} - -QScriptObjectSnapshot::~QScriptObjectSnapshot() -{ -} - -static bool _q_equal(const QScriptValue &v1, const QScriptValue &v2) -{ - if (v1.strictlyEquals(v2)) - return true; - if (v1.isNumber() && v2.isNumber() && qIsNaN(v1.toNumber()) && qIsNaN(v2.toNumber())) - return true; - return false; -} - -QScriptObjectSnapshot::Delta QScriptObjectSnapshot::capture(const QScriptValue &object) -{ - Delta result; - QMap currProps; - QHash propertyNameToIndex; - { - int i = 0; - QScriptValueIterator it(object); - while (it.hasNext()) { - it.next(); - QScriptValueProperty prop(it.name(), it.value(), it.flags()); - currProps.insert(it.name(), prop); - propertyNameToIndex.insert(it.name(), i); - ++i; - } - if (object.prototype().isValid()) { - QString __proto__ = QString::fromLatin1("__proto__"); - QScriptValueProperty protoProp( - __proto__, object.prototype(), - QScriptValue::Undeletable | QScriptValue::ReadOnly); - currProps.insert(__proto__, protoProp); - propertyNameToIndex.insert(__proto__, i); - ++i; - } - } - - QSet prevSet; - for (int i = 0; i < m_properties.size(); ++i) - prevSet.insert(m_properties.at(i).name()); - QSet currSet = currProps.keys().toSet(); - QSet removedProperties = prevSet - currSet; - QSet addedProperties = currSet - prevSet; - QSet maybeChangedProperties = currSet & prevSet; - - { - QMap am; - QSet::const_iterator it; - for (it = addedProperties.constBegin(); it != addedProperties.constEnd(); ++it) { - int idx = propertyNameToIndex[*it]; - am[idx] = currProps[*it]; - } - result.addedProperties = am.values(); - } - - { - QSet::const_iterator it; - for (it = maybeChangedProperties.constBegin(); it != maybeChangedProperties.constEnd(); ++it) { - const QScriptValueProperty &p1 = currProps[*it]; - const QScriptValueProperty &p2 = findProperty(*it); - if (!_q_equal(p1.value(), p2.value()) - || (p1.flags() != p2.flags())) { - result.changedProperties.append(p1); - } - } - } - - result.removedProperties = removedProperties.toList(); - - m_properties = currProps.values(); - - return result; -} - -QScriptValueProperty QScriptObjectSnapshot::findProperty(const QString &name) const -{ - for (int i = 0; i < m_properties.size(); ++i) { - if (m_properties.at(i).name() == name) - return m_properties.at(i); - } - return QScriptValueProperty(); -} - -QScriptValuePropertyList QScriptObjectSnapshot::properties() const -{ - return m_properties; -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptobjectsnapshot_p.h b/src/scripttools/debugging/qscriptobjectsnapshot_p.h deleted file mode 100644 index e7f6dbe14..000000000 --- a/src/scripttools/debugging/qscriptobjectsnapshot_p.h +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTOBJECTSNAPSHOT_P_H -#define QSCRIPTOBJECTSNAPSHOT_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include -#include "qscriptvalueproperty_p.h" - -QT_BEGIN_NAMESPACE - -class Q_AUTOTEST_EXPORT QScriptObjectSnapshot -{ -public: - struct Delta { - QStringList removedProperties; - QScriptValuePropertyList changedProperties; - QScriptValuePropertyList addedProperties; - }; - - QScriptObjectSnapshot(); - ~QScriptObjectSnapshot(); - - Delta capture(const QScriptValue &object); - QScriptValuePropertyList properties() const; - - QScriptValueProperty findProperty(const QString &name) const; - -private: - QScriptValuePropertyList m_properties; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptscriptdata.cpp b/src/scripttools/debugging/qscriptscriptdata.cpp deleted file mode 100644 index 43d7ae2c7..000000000 --- a/src/scripttools/debugging/qscriptscriptdata.cpp +++ /dev/null @@ -1,190 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptscriptdata_p.h" - -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -/*! - \since 4.5 - \class QScriptScriptData - \internal - - \brief The QScriptScriptData class holds data associated with a script. -*/ - -class QScriptScriptDataPrivate : public QSharedData -{ -public: - QScriptScriptDataPrivate(); - ~QScriptScriptDataPrivate(); - - QString contents; - QString fileName; - int baseLineNumber; - QDateTime timeStamp; -}; - -QScriptScriptDataPrivate::QScriptScriptDataPrivate() -{ -} - -QScriptScriptDataPrivate::~QScriptScriptDataPrivate() -{ -} - -QScriptScriptData::QScriptScriptData() - : d_ptr(0) -{ -} - -QScriptScriptData::QScriptScriptData(const QString &contents, const QString &fileName, - int baseLineNumber, const QDateTime &timeStamp) - : d_ptr(new QScriptScriptDataPrivate) -{ - d_ptr->contents = contents; - d_ptr->fileName = fileName; - d_ptr->baseLineNumber = baseLineNumber; - if (timeStamp.isValid()) - d_ptr->timeStamp = timeStamp; - else - d_ptr->timeStamp = QDateTime::currentDateTime(); - d_ptr->ref.ref(); -} - -QScriptScriptData::QScriptScriptData(const QScriptScriptData &other) - : d_ptr(other.d_ptr.data()) -{ - if (d_ptr) - d_ptr->ref.ref(); -} - -QScriptScriptData::~QScriptScriptData() -{ -} - -QScriptScriptData &QScriptScriptData::operator=(const QScriptScriptData &other) -{ - d_ptr.assign(other.d_ptr.data()); - return *this; -} - -QString QScriptScriptData::contents() const -{ - Q_D(const QScriptScriptData); - if (!d) - return QString(); - return d->contents; -} - -QStringList QScriptScriptData::lines(int startLineNumber, int count) const -{ - Q_D(const QScriptScriptData); - if (!d) - return QStringList(); - QStringList allLines = d->contents.split(QLatin1Char('\n')); - return allLines.mid(qMax(0, startLineNumber - d->baseLineNumber), count); -} - -QString QScriptScriptData::fileName() const -{ - Q_D(const QScriptScriptData); - if (!d) - return QString(); - return d->fileName; -} - -int QScriptScriptData::baseLineNumber() const -{ - Q_D(const QScriptScriptData); - if (!d) - return -1; - return d->baseLineNumber; -} - -QDateTime QScriptScriptData::timeStamp() const -{ - Q_D(const QScriptScriptData); - if (!d) - return QDateTime(); - return d->timeStamp; -} - -bool QScriptScriptData::isValid() const -{ - Q_D(const QScriptScriptData); - return (d != 0); -} - -bool QScriptScriptData::operator==(const QScriptScriptData &other) const -{ - Q_D(const QScriptScriptData); - const QScriptScriptDataPrivate *od = other.d_func(); - if (d == od) - return true; - if (!d || !od) - return false; - return ((d->contents == od->contents) - && (d->fileName == od->fileName) - && (d->baseLineNumber == od->baseLineNumber)); -} - -bool QScriptScriptData::operator!=(const QScriptScriptData &other) const -{ - return !(*this == other); -} - -QDataStream &operator<<(QDataStream &out, const QScriptScriptData &data) -{ - const QScriptScriptDataPrivate *d = data.d_ptr.data(); - if (d) { - out << d->contents; - out << d->fileName; - out << qint32(d->baseLineNumber); - } else { - out << QString(); - out << QString(); - out << qint32(0); - } - return out; -} - -QDataStream &operator>>(QDataStream &in, QScriptScriptData &data) -{ - if (!data.d_ptr) { - data.d_ptr.reset(new QScriptScriptDataPrivate()); - data.d_ptr->ref.ref(); - } - QScriptScriptDataPrivate *d = data.d_ptr.data(); - in >> d->contents; - in >> d->fileName; - qint32 ln; - in >> ln; - d->baseLineNumber = ln; - return in; -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptscriptdata_p.h b/src/scripttools/debugging/qscriptscriptdata_p.h deleted file mode 100644 index 1e377a0bb..000000000 --- a/src/scripttools/debugging/qscriptscriptdata_p.h +++ /dev/null @@ -1,86 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTSCRIPTDATA_P_H -#define QSCRIPTSCRIPTDATA_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qobjectdefs.h" -#include "qscopedpointer_p.h" -#include "qdatetime.h" -#include "qmap.h" - -QT_BEGIN_NAMESPACE - -class QDataStream; -class QString; -class QStringList; - -class QScriptScriptDataPrivate; -class Q_AUTOTEST_EXPORT QScriptScriptData -{ -public: - friend Q_AUTOTEST_EXPORT QDataStream &operator<<(QDataStream &, const QScriptScriptData &); - friend Q_AUTOTEST_EXPORT QDataStream &operator>>(QDataStream &, QScriptScriptData &); - - QScriptScriptData(); - QScriptScriptData(const QString &contents, const QString &fileName, - int baseLineNumber, const QDateTime &timeStamp = QDateTime()); - QScriptScriptData(const QScriptScriptData &other); - ~QScriptScriptData(); - - QString contents() const; - QStringList lines(int startLineNumber, int count) const; - QString fileName() const; - int baseLineNumber() const; - QDateTime timeStamp() const; - - bool isValid() const; - - QScriptScriptData &operator=(const QScriptScriptData &other); - - bool operator==(const QScriptScriptData &other) const; - bool operator!=(const QScriptScriptData &other) const; - -private: - QScopedSharedPointer d_ptr; - - Q_DECLARE_PRIVATE(QScriptScriptData) -}; - -typedef QMap QScriptScriptMap; - -Q_AUTOTEST_EXPORT QDataStream &operator<<(QDataStream &, const QScriptScriptData &); -Q_AUTOTEST_EXPORT QDataStream &operator>>(QDataStream &, QScriptScriptData &); - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptstdmessagehandler.cpp b/src/scripttools/debugging/qscriptstdmessagehandler.cpp deleted file mode 100644 index 119e7b30e..000000000 --- a/src/scripttools/debugging/qscriptstdmessagehandler.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptstdmessagehandler_p.h" -#include - -QT_BEGIN_NAMESPACE - -/*! - \since 4.5 - \class QScriptStdMessageHandler - \internal - - \brief The QScriptStdMessageHandler class implements a message handler that writes to standard output. -*/ - -class QScriptStdMessageHandlerPrivate -{ -public: - QScriptStdMessageHandlerPrivate() {} - ~QScriptStdMessageHandlerPrivate() {} -}; - -QScriptStdMessageHandler::QScriptStdMessageHandler() - : d_ptr(new QScriptStdMessageHandlerPrivate) -{ -} - -QScriptStdMessageHandler::~QScriptStdMessageHandler() -{ -} - -void QScriptStdMessageHandler::message(QtMsgType type, const QString &text, - const QString &fileName, - int lineNumber, int columnNumber, - const QVariant &/*data*/) -{ - QString msg; - if (!fileName.isEmpty() || (lineNumber != -1)) { - if (!fileName.isEmpty()) - msg.append(fileName); - else - msg.append(QLatin1String("")); - if (lineNumber != -1) { - msg.append(QLatin1Char(':')); - msg.append(QString::number(lineNumber)); - if (columnNumber != -1) { - msg.append(QLatin1Char(':')); - msg.append(QString::number(columnNumber)); - } - } - msg.append(QLatin1String(": ")); - } - msg.append(text); - - FILE *fp = (type == QtDebugMsg) ? stdout : stderr; - fprintf(fp, "%s\n", msg.toLatin1().constData()); - fflush(fp); -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptstdmessagehandler_p.h b/src/scripttools/debugging/qscriptstdmessagehandler_p.h deleted file mode 100644 index ec88d7384..000000000 --- a/src/scripttools/debugging/qscriptstdmessagehandler_p.h +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTSTDMESSAGEHANDLER_P_H -#define QSCRIPTSTDMESSAGEHANDLER_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include "qscriptmessagehandlerinterface_p.h" - -QT_BEGIN_NAMESPACE - -class QScriptStdMessageHandlerPrivate; -class Q_AUTOTEST_EXPORT QScriptStdMessageHandler - : public QScriptMessageHandlerInterface -{ -public: - QScriptStdMessageHandler(); - ~QScriptStdMessageHandler(); - - void message(QtMsgType type, const QString &text, - const QString &fileName = QString(), - int lineNumber = -1, int columnNumber = -1, - const QVariant &data = QVariant()); - -private: - QScopedPointer d_ptr; - -private: - Q_DECLARE_PRIVATE(QScriptStdMessageHandler) - Q_DISABLE_COPY(QScriptStdMessageHandler) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptsyntaxhighlighter.cpp b/src/scripttools/debugging/qscriptsyntaxhighlighter.cpp deleted file mode 100644 index c63d06799..000000000 --- a/src/scripttools/debugging/qscriptsyntaxhighlighter.cpp +++ /dev/null @@ -1,519 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptsyntaxhighlighter_p.h" - -#ifndef QT_NO_SYNTAXHIGHLIGHTER - -QT_BEGIN_NAMESPACE - -enum ScriptIds { - Comment = 1, - Number, - String, - Type, - Keyword, - PreProcessor, - Label -}; - -#define MAX_KEYWORD 63 -static const char *const keywords[MAX_KEYWORD] = { - "Infinity", - "NaN", - "abstract", - "boolean", - "break", - "byte", - "case", - "catch", - "char", - "class", - "const", - "constructor", - "continue", - "debugger", - "default", - "delete", - "do", - "double", - "else", - "enum", - "export", - "extends", - "false", - "final", - "finally", - "float", - "for", - "function", - "goto", - "if", - "implements", - "import", - "in", - "instanceof", - "int", - "interface", - "long", - "native", - "new", - "package", - "private", - "protected", - "public", - "return", - "short", - "static", - "super", - "switch", - "synchronized", - "this", - "throw", - "throws", - "transient", - "true", - "try", - "typeof", - "undefined", - "var", - "void", - "volatile", - "while", - "with", // end of array - 0 -}; - -struct KeywordHelper -{ - inline KeywordHelper(const QString &word) : needle(word) {} - const QString needle; -}; - -static inline bool operator<(const KeywordHelper &helper, const char *kw) -{ - return helper.needle < QLatin1String(kw); -} - -static inline bool operator<(const char *kw, const KeywordHelper &helper) -{ - return QLatin1String(kw) < helper.needle; -} - -static bool isKeyword(const QString &word) -{ - const char * const *start = &keywords[0]; - const char * const *end = &keywords[MAX_KEYWORD - 1]; - const char * const *kw = qBinaryFind(start, end, KeywordHelper(word)); - - return kw != end; -} - -QScriptSyntaxHighlighter::QScriptSyntaxHighlighter(QTextDocument *document) - : QSyntaxHighlighter(document) -{ - - m_formats[ScriptNumberFormat].setForeground(Qt::darkBlue); - m_formats[ScriptStringFormat].setForeground(Qt::darkGreen); - m_formats[ScriptTypeFormat].setForeground(Qt::darkMagenta); - m_formats[ScriptKeywordFormat].setForeground(Qt::darkYellow); - m_formats[ScriptPreprocessorFormat].setForeground(Qt::darkBlue); - m_formats[ScriptLabelFormat].setForeground(Qt::darkRed); - m_formats[ScriptCommentFormat].setForeground(Qt::darkGreen); - m_formats[ScriptCommentFormat].setFontItalic(true); -} - -QScriptSyntaxHighlighter::~QScriptSyntaxHighlighter() -{ -} - -void QScriptSyntaxHighlighter::highlightBlock(const QString &text) -{ - - // states - enum States { StateStandard, StateCommentStart1, StateCCommentStart2, - StateScriptCommentStart2, StateCComment, StateScriptComment, StateCCommentEnd1, - StateCCommentEnd2, StateStringStart, StateString, StateStringEnd, - StateString2Start, StateString2, StateString2End, - StateNumber, StatePreProcessor, NumStates }; - - // tokens - enum Tokens { InputAlpha, InputNumber, InputAsterix, InputSlash, InputParen, - InputSpace, InputHash, InputQuotation, InputApostrophe, InputSep, NumTokens }; - - static uchar table[NumStates][NumTokens] = { - { StateStandard, StateNumber, StateStandard, StateCommentStart1, StateStandard, StateStandard, StatePreProcessor, StateStringStart, StateString2Start, StateStandard }, // StateStandard - { StateStandard, StateNumber, StateCCommentStart2, StateScriptCommentStart2, StateStandard, StateStandard, StatePreProcessor, StateStringStart, StateString2Start, StateStandard }, // StateCommentStart1 - { StateCComment, StateCComment, StateCCommentEnd1, StateCComment, StateCComment, StateCComment, StateCComment, StateCComment, StateCComment, StateCComment }, // StateCCommentStart2 - { StateScriptComment, StateScriptComment, StateScriptComment, StateScriptComment, StateScriptComment, StateScriptComment, StateScriptComment, StateScriptComment, StateScriptComment, StateScriptComment }, // ScriptCommentStart2 - { StateCComment, StateCComment, StateCCommentEnd1, StateCComment, StateCComment, StateCComment, StateCComment, StateCComment, StateCComment, StateCComment }, // StateCComment - { StateScriptComment, StateScriptComment, StateScriptComment, StateScriptComment, StateScriptComment, StateScriptComment, StateScriptComment, StateScriptComment, StateScriptComment, StateScriptComment }, // StateScriptComment - { StateCComment, StateCComment, StateCCommentEnd1, StateCCommentEnd2, StateCComment, StateCComment, StateCComment, StateCComment, StateCComment, StateCComment }, // StateCCommentEnd1 - { StateStandard, StateNumber, StateStandard, StateCommentStart1, StateStandard, StateStandard, StatePreProcessor, StateStringStart, StateString2Start, StateStandard }, // StateCCommentEnd2 - { StateString, StateString, StateString, StateString, StateString, StateString, StateString, StateStringEnd, StateString, StateString }, // StateStringStart - { StateString, StateString, StateString, StateString, StateString, StateString, StateString, StateStringEnd, StateString, StateString }, // StateString - { StateStandard, StateStandard, StateStandard, StateCommentStart1, StateStandard, StateStandard, StatePreProcessor, StateStringStart, StateString2Start, StateStandard }, // StateStringEnd - { StateString2, StateString2, StateString2, StateString2, StateString2, StateString2, StateString2, StateString2, StateString2End, StateString2 }, // StateString2Start - { StateString2, StateString2, StateString2, StateString2, StateString2, StateString2, StateString2, StateString2, StateString2End, StateString2 }, // StateString2 - { StateStandard, StateStandard, StateStandard, StateCommentStart1, StateStandard, StateStandard, StatePreProcessor, StateStringStart, StateString2Start, StateStandard }, // StateString2End - { StateNumber, StateNumber, StateStandard, StateCommentStart1, StateStandard, StateStandard, StatePreProcessor, StateStringStart, StateString2Start, StateStandard }, // StateNumber - { StatePreProcessor, StateStandard, StateStandard, StateCommentStart1, StateStandard, StateStandard, StatePreProcessor, StateStringStart, StateString2Start, StateStandard } // StatePreProcessor - }; - - QString buffer; - buffer.reserve(text.length()); - - QTextCharFormat emptyFormat; - - int state = StateStandard; - int braceDepth = 0; - const int previousState = previousBlockState(); - if (previousState != -1) { - state = previousState & 0xff; - braceDepth = previousState >> 8; - } - - if (text.isEmpty()) { - setCurrentBlockState(previousState); -#if 0 - TextEditDocumentLayout::clearParentheses(currentBlock()); -#endif - return; - } -#if 0 - Parentheses parentheses; - parentheses.reserve(20); // assume wizard level ;-) -#endif - int input = -1; - int i = 0; - bool lastWasBackSlash = false; - bool makeLastStandard = false; - - static const QString alphabeth = QLatin1String("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); - static const QString mathChars = QLatin1String("xXeE"); - static const QString numbers = QLatin1String("0123456789"); - bool questionMark = false; - QChar lastChar; - - int firstNonSpace = -1; - - for (;;) { - const QChar c = text.at(i); - - if (lastWasBackSlash) { - input = InputSep; - } else { - switch (c.toAscii()) { - case '*': - input = InputAsterix; - break; - case '/': - input = InputSlash; - break; - case '{': - braceDepth++; - // fall through - case '(': case '[': - input = InputParen; - switch (state) { - case StateStandard: - case StateNumber: - case StatePreProcessor: - case StateCCommentEnd2: - case StateCCommentEnd1: - case StateString2End: - case StateStringEnd: -// parentheses.push_back(Parenthesis(Parenthesis::Opened, c, i)); - break; - default: - break; - } - break; - case '}': - if (--braceDepth < 0) - braceDepth = 0; - // fall through - case ')': case ']': - input = InputParen; - switch (state) { - case StateStandard: - case StateNumber: - case StatePreProcessor: - case StateCCommentEnd2: - case StateCCommentEnd1: - case StateString2End: - case StateStringEnd: -// parentheses.push_back(Parenthesis(Parenthesis::Closed, c, i)); - break; - default: - break; - } - break; - case '#': - input = InputHash; - break; - case '"': - input = InputQuotation; - break; - case '\'': - input = InputApostrophe; - break; - case ' ': - input = InputSpace; - break; - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': case '0': - if (alphabeth.contains(lastChar) - && (!mathChars.contains(lastChar) || !numbers.contains(text.at(i - 1))) - ) { - input = InputAlpha; - } else { - if (input == InputAlpha && numbers.contains(lastChar)) - input = InputAlpha; - else - input = InputNumber; - } - break; - case ':': { - input = InputAlpha; - const QChar colon = QLatin1Char(':'); - if (state == StateStandard && !questionMark && lastChar != colon) { - const QChar nextChar = i < text.length() - 1 ? text.at(i + 1) : QLatin1Char(' '); - if (nextChar != colon) - for (int j = 0; j < i; ++j) { - if (format(j) == emptyFormat ) - setFormat(j, 1, m_formats[ScriptLabelFormat]); - } - } - } break; - default: - if (!questionMark && c == QLatin1Char('?')) - questionMark = true; - if (c.isLetter() || c == QLatin1Char('_')) - input = InputAlpha; - else - input = InputSep; - break; - } - } - - if (input != InputSpace && firstNonSpace < 0) - firstNonSpace = i; - - lastWasBackSlash = !lastWasBackSlash && c == QLatin1Char('\\'); - - if (input == InputAlpha) - buffer += c; - - state = table[state][input]; - - switch (state) { - case StateStandard: { - setFormat(i, 1, emptyFormat); - if (makeLastStandard) - setFormat(i - 1, 1, emptyFormat); - makeLastStandard = false; - if (input != InputAlpha) { - highlightWord(i, buffer); - buffer = QString(); - } - } break; - case StateCommentStart1: - if (makeLastStandard) - setFormat(i - 1, 1, emptyFormat); - makeLastStandard = true; - buffer = QString(); - break; - case StateCCommentStart2: - setFormat(i - 1, 2, m_formats[ScriptCommentFormat]); - makeLastStandard = false; -// parentheses.push_back(Parenthesis(Parenthesis::Opened, QLatin1Char('/'), i-1)); - buffer = QString(); - break; - case StateScriptCommentStart2: - setFormat(i - 1, 2, m_formats[ScriptCommentFormat]); - makeLastStandard = false; - buffer = QString(); - break; - case StateCComment: - if (makeLastStandard) - setFormat(i - 1, 1, emptyFormat); - makeLastStandard = false; - setFormat(i, 1, m_formats[ScriptCommentFormat]); - buffer = QString(); - break; - case StateScriptComment: - if (makeLastStandard) - setFormat(i - 1, 1, emptyFormat); - makeLastStandard = false; - setFormat(i, 1, m_formats[ScriptCommentFormat]); - buffer = QString(); - break; - case StateCCommentEnd1: - if (makeLastStandard) - setFormat(i - 1, 1, emptyFormat); - makeLastStandard = false; - setFormat(i, 1, m_formats[ScriptCommentFormat]); - buffer = QString(); - break; - case StateCCommentEnd2: - if (makeLastStandard) - setFormat(i - 1, 1, emptyFormat); - makeLastStandard = false; - setFormat(i, 1, m_formats[ScriptCommentFormat]); -// parentheses.push_back(Parenthesis(Parenthesis::Closed, QLatin1Char('/'), i)); - buffer = QString(); - break; - case StateStringStart: - if (makeLastStandard) - setFormat(i - 1, 1, emptyFormat); - makeLastStandard = false; - setFormat(i, 1, emptyFormat); - buffer = QString(); - break; - case StateString: - if (makeLastStandard) - setFormat(i - 1, 1, emptyFormat); - makeLastStandard = false; - setFormat(i, 1, m_formats[ScriptStringFormat]); - buffer = QString(); - break; - case StateStringEnd: - if (makeLastStandard) - setFormat(i - 1, 1, emptyFormat); - makeLastStandard = false; - setFormat(i, 1, emptyFormat); - buffer = QString(); - break; - case StateString2Start: - if (makeLastStandard) - setFormat(i - 1, 1, emptyFormat); - makeLastStandard = false; - setFormat(i, 1, emptyFormat); - buffer = QString(); - break; - case StateString2: - if (makeLastStandard) - setFormat(i - 1, 1, emptyFormat); - makeLastStandard = false; - setFormat(i, 1, m_formats[ScriptStringFormat]); - buffer = QString(); - break; - case StateString2End: - if (makeLastStandard) - setFormat(i - 1, 1, emptyFormat); - makeLastStandard = false; - setFormat(i, 1, emptyFormat); - buffer = QString(); - break; - case StateNumber: - if (makeLastStandard) - setFormat(i - 1, 1, emptyFormat); - makeLastStandard = false; - setFormat(i, 1, m_formats[ScriptNumberFormat]); - buffer = QString(); - break; - case StatePreProcessor: - if (makeLastStandard) - setFormat(i - 1, 1, emptyFormat); - makeLastStandard = false; - setFormat(i, 1, m_formats[ScriptPreprocessorFormat]); - buffer = QString(); - break; - } - - lastChar = c; - i++; - if (i >= text.length()) { -#if 0 - if (TextBlockUserData *userData = TextEditDocumentLayout::testUserData(currentBlock())) { - userData->setHasClosingCollapse(false); - userData->setCollapseMode(TextBlockUserData::NoCollapse); - } - int collapse = Parenthesis::collapseAtPos(parentheses); - if (collapse >= 0) { - if (collapse == firstNonSpace) - TextEditDocumentLayout::userData(currentBlock())->setCollapseMode(TextBlockUserData::CollapseThis); - else - TextEditDocumentLayout::userData(currentBlock())->setCollapseMode(TextBlockUserData::CollapseAfter); - } - if (Parenthesis::hasClosingCollapse(parentheses)) { - TextEditDocumentLayout::userData(currentBlock())->setHasClosingCollapse(true); - } -#endif - - break; - } - } - - highlightWord(text.length(), buffer); - - switch (state) { - case StateCComment: - case StateCCommentEnd1: - case StateCCommentStart2: - state = StateCComment; - break; - case StateString: - // quotes cannot span multiple lines, so if somebody starts - // typing a quoted string we don't need to look for the ending - // quote in another line (or highlight until the end of the - // document) and therefore slow down editing. - state = StateStandard; - break; - case StateString2: - state = StateStandard; - break; - default: - state = StateStandard; - break; - } - -#if 0 - TextEditDocumentLayout::setParentheses(currentBlock(), parentheses); -#endif - - setCurrentBlockState((braceDepth << 8) | state); -} - -void QScriptSyntaxHighlighter::highlightWord(int currentPos, const QString &buffer) -{ - if (buffer.isEmpty()) - return; - - // try to highlight Qt 'identifiers' like QObject and Q_PROPERTY - // but don't highlight words like 'Query' - if (buffer.length() > 1 - && buffer.at(0) == QLatin1Char('Q') - && (buffer.at(1).isUpper() - || buffer.at(1) == QLatin1Char('_') - || buffer.at(1) == QLatin1Char('t'))) { - setFormat(currentPos - buffer.length(), buffer.length(), m_formats[ScriptTypeFormat]); - } else { - if (isKeyword(buffer)) - setFormat(currentPos - buffer.length(), buffer.length(), m_formats[ScriptKeywordFormat]); - } -} - -QT_END_NAMESPACE - -#endif // QT_NO_SYNTAXHIGHLIGHTER - diff --git a/src/scripttools/debugging/qscriptsyntaxhighlighter_p.h b/src/scripttools/debugging/qscriptsyntaxhighlighter_p.h deleted file mode 100644 index ee9204837..000000000 --- a/src/scripttools/debugging/qscriptsyntaxhighlighter_p.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTSYNTAXHIGHLIGHTER_P_H -#define QSCRIPTSYNTAXHIGHLIGHTER_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#ifndef QT_NO_SYNTAXHIGHLIGHTER - -#include - -#include - -QT_BEGIN_NAMESPACE - -class Q_AUTOTEST_EXPORT QScriptSyntaxHighlighter : public QSyntaxHighlighter -{ -public: - QScriptSyntaxHighlighter(QTextDocument *document = 0); - ~QScriptSyntaxHighlighter(); - -protected: - void highlightBlock(const QString &text); - -private: - void highlightWord(int currentPos, const QString &buffer); - - enum ScriptFormats { - ScriptTextFormat, ScriptNumberFormat, - ScriptStringFormat, ScriptTypeFormat, - ScriptKeywordFormat, ScriptPreprocessorFormat, - ScriptLabelFormat, ScriptCommentFormat, - NumScriptFormats - }; - QTextCharFormat m_formats[NumScriptFormats]; - -private: - Q_DISABLE_COPY(QScriptSyntaxHighlighter) -}; - -QT_END_NAMESPACE - -#endif // QT_NO_SYNTAXHIGHLIGHTER - -#endif diff --git a/src/scripttools/debugging/qscripttooltipproviderinterface_p.h b/src/scripttools/debugging/qscripttooltipproviderinterface_p.h deleted file mode 100644 index 19f0c1f50..000000000 --- a/src/scripttools/debugging/qscripttooltipproviderinterface_p.h +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTTOOLTIPPROVIDERINTERFACE_P_H -#define QSCRIPTTOOLTIPPROVIDERINTERFACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -QT_BEGIN_NAMESPACE - -class QPoint; -class QStringList; - -class Q_AUTOTEST_EXPORT QScriptToolTipProviderInterface -{ -public: - virtual ~QScriptToolTipProviderInterface() {} - - virtual void showToolTip(const QPoint &pos, int frameIndex, - int lineNumber, const QStringList &path) = 0; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptvalueproperty.cpp b/src/scripttools/debugging/qscriptvalueproperty.cpp deleted file mode 100644 index 2ccdd8926..000000000 --- a/src/scripttools/debugging/qscriptvalueproperty.cpp +++ /dev/null @@ -1,140 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptvalueproperty_p.h" - -#include -#include - -QT_BEGIN_NAMESPACE - -class QScriptValuePropertyPrivate : public QSharedData -{ -public: - QScriptValuePropertyPrivate(); - ~QScriptValuePropertyPrivate(); - - QString name; - QScriptValue value; - QScriptValue::PropertyFlags flags; -}; - -QScriptValuePropertyPrivate::QScriptValuePropertyPrivate() -{ -} - -QScriptValuePropertyPrivate::~QScriptValuePropertyPrivate() -{ -} - -/*! - Constructs an invalid QScriptValueProperty. -*/ -QScriptValueProperty::QScriptValueProperty() - : d_ptr(0) -{ -} - -/*! - Constructs a QScriptValueProperty with the given \a name, - \a value and \a flags. -*/ -QScriptValueProperty::QScriptValueProperty(const QString &name, - const QScriptValue &value, - QScriptValue::PropertyFlags flags) - : d_ptr(new QScriptValuePropertyPrivate) -{ - d_ptr->name = name; - d_ptr->value = value; - d_ptr->flags = flags; - d_ptr->ref.ref(); -} - -/*! - Constructs a QScriptValueProperty that is a copy of the \a other property. -*/ -QScriptValueProperty::QScriptValueProperty(const QScriptValueProperty &other) - : d_ptr(other.d_ptr.data()) -{ - if (d_ptr) - d_ptr->ref.ref(); -} - -/*! - Destroys this QScriptValueProperty. -*/ -QScriptValueProperty::~QScriptValueProperty() -{ -} - -/*! - Assigns the \a other property to this QScriptValueProperty. -*/ -QScriptValueProperty &QScriptValueProperty::operator=(const QScriptValueProperty &other) -{ - d_ptr.assign(other.d_ptr.data()); - return *this; -} - -/*! - Returns the name of this QScriptValueProperty. -*/ -QString QScriptValueProperty::name() const -{ - Q_D(const QScriptValueProperty); - if (!d) - return QString(); - return d->name; -} - -/*! - Returns the value of this QScriptValueProperty. -*/ -QScriptValue QScriptValueProperty::value() const -{ - Q_D(const QScriptValueProperty); - if (!d) - return QScriptValue(); - return d->value; -} - -/*! - Returns the flags of this QScriptValueProperty. -*/ -QScriptValue::PropertyFlags QScriptValueProperty::flags() const -{ - Q_D(const QScriptValueProperty); - if (!d) - return 0; - return d->flags; -} - -/*! - Returns true if this QScriptValueProperty is valid, otherwise - returns false. -*/ -bool QScriptValueProperty::isValid() const -{ - Q_D(const QScriptValueProperty); - return (d != 0); -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptvalueproperty_p.h b/src/scripttools/debugging/qscriptvalueproperty_p.h deleted file mode 100644 index d16e34225..000000000 --- a/src/scripttools/debugging/qscriptvalueproperty_p.h +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTVALUEPROPERTY_P_H -#define QSCRIPTVALUEPROPERTY_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qobjectdefs.h" -#include "qlist.h" -#include "qscopedpointer_p.h" -#include "qscriptvalue.h" - -QT_BEGIN_NAMESPACE - -class QString; - -class QScriptValuePropertyPrivate; -class Q_AUTOTEST_EXPORT QScriptValueProperty -{ -public: - QScriptValueProperty(); - QScriptValueProperty(const QString &name, - const QScriptValue &value, - QScriptValue::PropertyFlags flags); - QScriptValueProperty(const QScriptValueProperty &other); - ~QScriptValueProperty(); - - QScriptValueProperty &operator=(const QScriptValueProperty &other); - - QString name() const; - QScriptValue value() const; - QScriptValue::PropertyFlags flags() const; - - bool isValid() const; - -private: - QScopedSharedPointer d_ptr; - - Q_DECLARE_PRIVATE(QScriptValueProperty) -}; - -typedef QList QScriptValuePropertyList; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/debugging/qscriptxmlparser.cpp b/src/scripttools/debugging/qscriptxmlparser.cpp deleted file mode 100644 index 57f7f6b92..000000000 --- a/src/scripttools/debugging/qscriptxmlparser.cpp +++ /dev/null @@ -1,156 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptxmlparser_p.h" - -#include -#include -#include - -QT_BEGIN_NAMESPACE - -static void tokenUntil(QXmlStreamReader &reader, QXmlStreamReader::TokenType target, - QList &lineNumbers) -{ - int level = 0; - while (!reader.atEnd()) { - QXmlStreamReader::TokenType t = reader.readNext(); - if ((t == target) && (level == 0)) - return; - if (t == QXmlStreamReader::StartElement) { - ++level; - QString line = reader.attributes().value(QLatin1String("line")).toString(); - if (!line.isEmpty()) - lineNumbers.append(line.toInt()); - } else if (t == QXmlStreamReader::EndElement) { - --level; - } - } -// Q_ASSERT_X(false, "QScriptXmlParser", "premature end of file"); -} - -QScriptXmlParser::Result QScriptXmlParser::parse(const QString &xml) -{ - QMap functionsInfo; - QList lineNumbers; - QXmlStreamReader reader(xml); - reader.readNext(); // StartDocument - reader.readNext(); // - reader.readNext(); // - while (reader.readNext() == QXmlStreamReader::StartElement) { -// qDebug() << reader.name().toString(); - int line = reader.attributes().value(QLatin1String("line")).toString().toInt(); - lineNumbers.append(line); - if (reader.name() == QLatin1String("function-declaration")) { - // extract the line number, name and formal parameters - reader.readNext(); // - reader.readNext(); // Characters - QString name = reader.text().toString(); - reader.readNext(); // - reader.readNext(); // - QStringList formalParameters; - while (reader.readNext() == QXmlStreamReader::StartElement) { - reader.readNext(); // Characters - formalParameters.append(reader.text().toString()); - reader.readNext(); // - } - reader.readNext(); // - tokenUntil(reader, QXmlStreamReader::EndElement, lineNumbers); - - QString signature; - signature.append(name); - signature.append(QLatin1Char('(')); - for (int i = 0; i < formalParameters.size(); ++i) { - if (i > 0) - signature.append(QLatin1String(", ")); - signature.append(formalParameters.at(i)); - } - signature.append(QLatin1Char(')')); - functionsInfo.insert(signature, line); - } else if (reader.name() == QLatin1String("expression-statement")) { - reader.readNext(); - if ((reader.name() == QLatin1String("binary-expression")) - && reader.attributes().value(QLatin1String("op")) == QLatin1String("=")) { - // try to match a statement of the form Foo.prototype.bar = function() { ... } - // this can be generalized... - QString first, second, third; - reader.readNext(); // LHS - if (reader.name() == QLatin1String("field-member-expression")) { - reader.readNext(); - if (reader.name() == QLatin1String("field-member-expression")) { - reader.readNext(); - if (reader.name() == QLatin1String("identifier")) { - reader.readNext(); - first = reader.text().toString(); - } - tokenUntil(reader, QXmlStreamReader::EndElement, lineNumbers); - reader.readNext(); - if (reader.name() == QLatin1String("identifier")) { - reader.readNext(); - second = reader.text().toString(); - } - tokenUntil(reader, QXmlStreamReader::EndElement, lineNumbers); - } else if (reader.name() == QLatin1String("identifier")) { - reader.readNext(); - first = reader.text().toString(); - } - tokenUntil(reader, QXmlStreamReader::EndElement, lineNumbers); - reader.readNext(); - if (reader.name() == QLatin1String("identifier")) { - reader.readNext(); - if (second.isEmpty()) - second = reader.text().toString(); - else - third = reader.text().toString(); - } - tokenUntil(reader, QXmlStreamReader::EndElement, lineNumbers); - } - tokenUntil(reader, QXmlStreamReader::EndElement, lineNumbers); - reader.readNext(); // RHS - if (reader.name() == QLatin1String("function-expression")) { - if (!first.isEmpty()) { - QString signature = first; - if (!second.isEmpty()) { - signature.append(QLatin1Char('.')); - signature.append(second); - if (!third.isEmpty()) { - signature.append(QLatin1Char('.')); - signature.append(third); - } - } - signature.append(QLatin1String("()")); - functionsInfo.insert(signature, line); - } - } - tokenUntil(reader, QXmlStreamReader::EndElement, lineNumbers); - } - tokenUntil(reader, QXmlStreamReader::EndElement, lineNumbers); - } - tokenUntil(reader, QXmlStreamReader::EndElement, lineNumbers); - } - reader.readNext(); // - reader.readNext(); // - reader.readNext(); // EndDocument - Q_ASSERT(reader.atEnd()); - return Result(functionsInfo, lineNumbers.toSet()); -} - -QT_END_NAMESPACE diff --git a/src/scripttools/debugging/qscriptxmlparser_p.h b/src/scripttools/debugging/qscriptxmlparser_p.h deleted file mode 100644 index 8e887e866..000000000 --- a/src/scripttools/debugging/qscriptxmlparser_p.h +++ /dev/null @@ -1,61 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016 Ivailo Monev -** -** This file is part of the QtSCriptTools module of the Katie Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSCRIPTXMLPARSER_P_H -#define QSCRIPTXMLPARSER_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Katie API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class Q_AUTOTEST_EXPORT QScriptXmlParser -{ -public: - struct Result - { - Result(const QMap &fi, const QSet &eln) - : functionsInfo(fi), executableLineNumbers(eln) {} - - QMap functionsInfo; - QSet executableLineNumbers; - }; - - static Result parse(const QString &xml); -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/scripttools/qscripttoolscommon_p.h b/src/scripttools/qscripttoolscommon_p.h deleted file mode 100644 index e4b494eb9..000000000 --- a/src/scripttools/qscripttoolscommon_p.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef QSCRIPTTOOLSCOMMON_H -#define QSCRIPTTOOLSCOMMON_H - -#include "qscriptcontextinfo.h" -#include "qscriptscriptdata_p.h" -#include "qscriptdebuggerconsolecommand_p.h" -#include "qscriptdebuggerconsolecommandgroupdata_p.h" -#include "qscriptdebuggervalueproperty_p.h" -#include "qscriptdebuggerobjectsnapshotdelta_p.h" -#include "qscriptdebuggerresponse_p.h" - -QT_BEGIN_NAMESPACE -typedef QPair, QList > QScriptScriptsDelta; -typedef QPair, QList > QScriptContextsDelta; -class QScriptDebuggerBackendPrivate; -class QScriptDebuggerResponse; -QT_END_NAMESPACE - -Q_DECLARE_METATYPE(QScriptScriptsDelta) -Q_DECLARE_METATYPE(QScriptDebuggerValue) -Q_DECLARE_METATYPE(QScriptDebuggerBackendPrivate*) -Q_DECLARE_METATYPE(QScriptBreakpointData) -Q_DECLARE_METATYPE(QScriptDebuggerValueProperty) -Q_DECLARE_METATYPE(QScriptDebuggerValuePropertyList) -Q_DECLARE_METATYPE(QScriptDebuggerObjectSnapshotDelta) -Q_DECLARE_METATYPE(QScriptDebuggerResponse) -Q_DECLARE_METATYPE(QScriptBreakpointMap) -Q_DECLARE_METATYPE(QScriptScriptData) -Q_DECLARE_METATYPE(QScriptScriptMap) -Q_DECLARE_METATYPE(QScriptContextInfo) -Q_DECLARE_METATYPE(QScriptDebuggerConsoleCommand*) -Q_DECLARE_METATYPE(QScriptDebuggerConsoleCommandList) -Q_DECLARE_METATYPE(QScriptDebuggerConsoleCommandGroupData) -Q_DECLARE_METATYPE(QScriptDebuggerConsoleCommandGroupMap) -Q_DECLARE_METATYPE(QScriptDebuggerValueList) - -QT_BEGIN_NAMESPACE - -static inline bool isAlmostIdentChar(const QChar &ch) -{ - static QChar underscore = QLatin1Char('_'); - return ch.isLetterOrNumber() || (ch == underscore); -} - -static inline bool isIdentChar(const QChar &ch) -{ - static QChar underscore = QLatin1Char('_'); - return ch.isLetter() || (ch == underscore); -} - -static inline bool isPrefixOf(const QString &prefix, const QString &what) -{ - return ((what.length() > prefix.length()) && what.startsWith(prefix)); -} - -QT_END_NAMESPACE - -#endif // QSCRIPTTOOLSCOMMON_H diff --git a/src/scripttools/qscripttoolsresources_p.h b/src/scripttools/qscripttoolsresources_p.h deleted file mode 100644 index ad1ecbbec..000000000 --- a/src/scripttools/qscripttoolsresources_p.h +++ /dev/null @@ -1,3056 +0,0 @@ -#ifndef QSCRIPTTOOLSRESOURCES_P_H -#define QSCRIPTTOOLSRESOURCES_P_H - -QT_BEGIN_NAMESPACE - -static const char* qt_images_format = "PNG"; - -// generated via `xxd -i ` -static const unsigned char scripttools_runtonewscript_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x16, - 0x08, 0x06, 0x00, 0x00, 0x00, 0xc0, 0x41, 0xbc, 0x06, 0x00, 0x00, 0x00, - 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00, - 0x00, 0x06, 0x62, 0x4b, 0x47, 0x44, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, - 0xa0, 0xbd, 0xa7, 0x93, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, - 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00, 0x0b, 0x13, 0x01, 0x00, 0x9a, 0x9c, - 0x18, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d, 0x45, 0x07, 0xd8, 0x07, - 0x11, 0x0c, 0x2e, 0x29, 0x28, 0x93, 0xb0, 0x2c, 0x00, 0x00, 0x00, 0x19, - 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, - 0x20, 0x47, 0x49, 0x4d, 0x50, 0x57, 0x81, 0x0e, 0x17, 0x00, 0x00, 0x01, - 0x71, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0xad, 0x94, 0xcd, 0x4e, 0xc2, - 0x40, 0x14, 0x85, 0xbf, 0x5b, 0x0a, 0xa6, 0x6a, 0x22, 0x68, 0x8c, 0x1b, - 0x75, 0x43, 0x02, 0x09, 0x91, 0x85, 0x1b, 0x5e, 0xc4, 0xa5, 0x0b, 0x5e, - 0x82, 0x17, 0x70, 0xe3, 0x7b, 0xf0, 0x04, 0x74, 0xc1, 0xc6, 0xd7, 0x20, - 0x4d, 0x08, 0x10, 0x36, 0xdd, 0x36, 0x92, 0x92, 0x60, 0xaa, 0x11, 0x18, - 0x37, 0x33, 0xa4, 0x36, 0xfc, 0x0c, 0xda, 0x33, 0x69, 0x73, 0xa7, 0x33, - 0x3d, 0x39, 0xf7, 0x9e, 0x99, 0x2b, 0x68, 0xd4, 0x6a, 0x35, 0xfe, 0x8a, - 0xf1, 0x78, 0xbc, 0x89, 0x1d, 0xf2, 0x81, 0xb3, 0x8d, 0x50, 0x1d, 0xf1, - 0xc4, 0x99, 0xf9, 0x25, 0xe0, 0x62, 0x5e, 0x06, 0xa3, 0xd1, 0xc8, 0x56, - 0xd1, 0x85, 0x09, 0xea, 0xf5, 0xba, 0x11, 0x93, 0x4f, 0xca, 0xe9, 0xfa, - 0xe5, 0x59, 0xc3, 0x6f, 0xa3, 0xf2, 0xdf, 0x84, 0xfa, 0x74, 0x7c, 0x02, - 0xeb, 0x3c, 0x15, 0x2e, 0xad, 0x14, 0x8a, 0x88, 0x2d, 0xa1, 0xbd, 0x29, - 0x96, 0xa4, 0x6e, 0x3a, 0x50, 0xc6, 0xad, 0x5d, 0x3f, 0x8b, 0x08, 0x4a, - 0xa9, 0x7d, 0x84, 0x9e, 0xe6, 0x59, 0xba, 0xb6, 0x39, 0x1d, 0x20, 0x2d, - 0x03, 0x2b, 0x63, 0x8c, 0x71, 0x4b, 0x65, 0x91, 0xbe, 0x0d, 0xbb, 0xa0, - 0x0d, 0x79, 0x04, 0xae, 0x81, 0xa2, 0x95, 0xcb, 0x59, 0x65, 0x41, 0x10, - 0x20, 0x22, 0x88, 0x08, 0x9e, 0xe7, 0x15, 0x80, 0x27, 0xe0, 0xdc, 0x8a, - 0x70, 0x5b, 0x9a, 0xcd, 0x66, 0x13, 0x5f, 0xf9, 0xb4, 0xdf, 0xdb, 0x24, - 0x49, 0x02, 0x70, 0x0b, 0x9c, 0x1d, 0x24, 0xdc, 0xa5, 0x0c, 0x20, 0x26, - 0x66, 0x11, 0x2e, 0xcc, 0x52, 0x1b, 0x78, 0x01, 0x4a, 0x92, 0xae, 0xe1, - 0xa1, 0xe6, 0x20, 0x22, 0xf8, 0xca, 0x27, 0xd6, 0x23, 0x58, 0x06, 0x94, - 0xdd, 0x32, 0xd1, 0x2c, 0xa2, 0x7b, 0xd5, 0x05, 0xb8, 0x77, 0x8f, 0xbd, - 0x12, 0xbd, 0x59, 0x8f, 0x45, 0xb8, 0xa0, 0xf2, 0x50, 0x21, 0xec, 0x87, - 0x0c, 0x86, 0x03, 0xe6, 0x93, 0xb9, 0x59, 0x2e, 0xee, 0x75, 0x39, 0x8b, - 0x46, 0xa3, 0xb1, 0x71, 0xbd, 0xa3, 0x3a, 0xaa, 0xf5, 0xda, 0x4a, 0x9f, - 0x84, 0x3e, 0x70, 0xf7, 0x4b, 0xa1, 0xee, 0x6d, 0x38, 0x8e, 0xc3, 0x7a, - 0xbd, 0xde, 0x5a, 0xd3, 0x6a, 0xb5, 0xca, 0x74, 0x3a, 0x25, 0x9a, 0x45, - 0x69, 0x65, 0xcf, 0xc0, 0x10, 0xf8, 0x48, 0xef, 0x9f, 0xe8, 0x0f, 0x36, - 0x1d, 0x7b, 0x95, 0x8a, 0xdf, 0x80, 0x16, 0x70, 0x03, 0x14, 0x8d, 0x29, - 0x02, 0x94, 0x80, 0x53, 0x6d, 0xff, 0x09, 0x50, 0xd8, 0x53, 0xca, 0x82, - 0xde, 0x23, 0x40, 0x02, 0xcc, 0x80, 0x39, 0xf0, 0xf5, 0x03, 0x59, 0x7e, - 0xe5, 0x91, 0x7d, 0xd6, 0x9e, 0xad, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, - 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 -}; -static const unsigned int scripttools_runtonewscript_png_len = 534; - -static const unsigned char scripttools_stepover_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x16, - 0x04, 0x03, 0x00, 0x00, 0x00, 0x36, 0x9a, 0x71, 0x08, 0x00, 0x00, 0x00, - 0x04, 0x67, 0x41, 0x4d, 0x41, 0x00, 0x00, 0xb1, 0x8f, 0x0b, 0xfc, 0x61, - 0x05, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, - 0x1c, 0xe9, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, - 0x0b, 0x13, 0x00, 0x00, 0x0b, 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, - 0x00, 0x00, 0x27, 0x50, 0x4c, 0x54, 0x45, 0x4c, 0x69, 0x71, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x00, 0x2b, 0x5d, - 0x9e, 0x73, 0x00, 0x00, 0x00, 0x0b, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x01, - 0x02, 0x04, 0x0d, 0x11, 0x19, 0x03, 0x16, 0x0b, 0x08, 0xf7, 0xfa, 0x8f, - 0x65, 0x00, 0x00, 0x00, 0x5e, 0x49, 0x44, 0x41, 0x54, 0x18, 0xd3, 0x75, - 0xcf, 0xc1, 0x0d, 0x80, 0x30, 0x08, 0x05, 0xd0, 0x8f, 0xad, 0x27, 0xa6, - 0x71, 0x1d, 0x37, 0x71, 0x01, 0xe7, 0xe9, 0x1d, 0x37, 0x70, 0xa9, 0x82, - 0x48, 0xa5, 0x07, 0x39, 0xfc, 0xbc, 0xa6, 0xe4, 0x27, 0x00, 0xff, 0xc3, - 0x22, 0x92, 0x18, 0x0f, 0x69, 0x11, 0x60, 0x4f, 0xf9, 0x0c, 0x79, 0xc3, - 0xb6, 0xc3, 0xd7, 0x3d, 0x59, 0x9b, 0x9a, 0x79, 0x51, 0x6b, 0x31, 0x85, - 0xb5, 0xb4, 0xd8, 0xd6, 0x63, 0x46, 0x1d, 0x06, 0x56, 0x0b, 0x72, 0xd7, - 0xe4, 0x92, 0x4c, 0xc9, 0x98, 0xac, 0x3f, 0x34, 0x4e, 0xc9, 0x73, 0x9c, - 0xfb, 0xe6, 0xea, 0x15, 0x53, 0x2c, 0x18, 0xa2, 0x98, 0x4f, 0xe0, 0x00, - 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 -}; -static const unsigned int scripttools_stepover_png_len = 275; - -static const unsigned char scripttools_stepout_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x16, - 0x04, 0x03, 0x00, 0x00, 0x00, 0x36, 0x9a, 0x71, 0x08, 0x00, 0x00, 0x00, - 0x04, 0x67, 0x41, 0x4d, 0x41, 0x00, 0x00, 0xb1, 0x8f, 0x0b, 0xfc, 0x61, - 0x05, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, - 0x1c, 0xe9, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, - 0x0b, 0x13, 0x00, 0x00, 0x0b, 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, - 0x00, 0x00, 0x27, 0x50, 0x4c, 0x54, 0x45, 0x4c, 0x69, 0x71, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x96, 0x47, - 0x56, 0xa5, 0x00, 0x00, 0x00, 0x0b, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x01, - 0x02, 0x04, 0x11, 0x0d, 0x08, 0x19, 0x03, 0x16, 0x0b, 0x3d, 0x3c, 0xee, - 0xcb, 0x00, 0x00, 0x00, 0x5c, 0x49, 0x44, 0x41, 0x54, 0x18, 0xd3, 0x5d, - 0xce, 0xc1, 0x11, 0x80, 0x30, 0x08, 0x04, 0x40, 0x48, 0xf4, 0x47, 0x33, - 0x36, 0x61, 0x71, 0x36, 0x60, 0x31, 0xf1, 0xc1, 0x5f, 0x8a, 0x0a, 0x92, - 0x0c, 0x10, 0xef, 0xb5, 0x73, 0xc3, 0x65, 0x02, 0x30, 0x43, 0x10, 0x21, - 0x76, 0x89, 0x08, 0x07, 0x65, 0xd6, 0xda, 0x91, 0xd7, 0xb1, 0xf5, 0x9d, - 0x1e, 0xaa, 0xc9, 0xa6, 0xef, 0x63, 0x6e, 0x3f, 0x17, 0x37, 0x26, 0x57, - 0xf3, 0xf7, 0x54, 0xe3, 0x3d, 0x79, 0x03, 0x4c, 0x7d, 0xb8, 0x26, 0x63, - 0x32, 0x2c, 0x2e, 0xe3, 0xe3, 0x24, 0x0c, 0x6b, 0xae, 0xfb, 0x3c, 0x86, - 0x3a, 0x02, 0x1a, 0x39, 0x00, 0x35, 0xb8, 0xac, 0x86, 0x00, 0x00, 0x00, - 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 -}; -static const unsigned int scripttools_stepout_png_len = 273; - -static const unsigned char scripttools_runtocursor_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x16, - 0x04, 0x03, 0x00, 0x00, 0x00, 0x36, 0x9a, 0x71, 0x08, 0x00, 0x00, 0x00, - 0x04, 0x67, 0x41, 0x4d, 0x41, 0x00, 0x00, 0xb1, 0x8f, 0x0b, 0xfc, 0x61, - 0x05, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, - 0x1c, 0xe9, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, - 0x0b, 0x13, 0x00, 0x00, 0x0b, 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, - 0x00, 0x00, 0x21, 0x50, 0x4c, 0x54, 0x45, 0x4c, 0x69, 0x71, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xbe, 0x9a, 0xb8, 0x66, 0x00, 0x00, 0x00, 0x09, - 0x74, 0x52, 0x4e, 0x53, 0x00, 0x19, 0x04, 0x03, 0x08, 0x11, 0x16, 0x01, - 0x0b, 0x2c, 0xfc, 0xab, 0x2c, 0x00, 0x00, 0x00, 0x46, 0x49, 0x44, 0x41, - 0x54, 0x18, 0xd3, 0x63, 0x60, 0x20, 0x1a, 0x70, 0xce, 0xe4, 0x9c, 0x39, - 0x01, 0xc6, 0x5e, 0x35, 0x73, 0x15, 0x9c, 0x3d, 0x73, 0x15, 0x5c, 0x1c, - 0x28, 0x31, 0x81, 0x01, 0x83, 0xcd, 0x89, 0xcc, 0x9e, 0x00, 0x65, 0xcf, - 0x04, 0x01, 0x64, 0xf6, 0x04, 0x84, 0x9a, 0x99, 0x58, 0xd4, 0xa3, 0x99, - 0xc3, 0x80, 0x93, 0x8d, 0xec, 0x1e, 0x54, 0x77, 0x22, 0xdc, 0x0f, 0x05, - 0x16, 0x89, 0x21, 0xea, 0x10, 0x16, 0x00, 0x84, 0x2a, 0x25, 0x04, 0x44, - 0x0a, 0xa4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, - 0x42, 0x60, 0x82 -}; -static const unsigned int scripttools_runtocursor_png_len = 243; - -static const unsigned char scripttools_location_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x16, - 0x08, 0x03, 0x00, 0x00, 0x00, 0xf3, 0x6a, 0x9c, 0x09, 0x00, 0x00, 0x00, - 0x04, 0x67, 0x41, 0x4d, 0x41, 0x00, 0x00, 0xb1, 0x8f, 0x0b, 0xfc, 0x61, - 0x05, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, - 0x1c, 0xe9, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, - 0x0d, 0xd7, 0x00, 0x00, 0x0d, 0xd7, 0x01, 0x42, 0x28, 0x9b, 0x78, 0x00, - 0x00, 0x01, 0x50, 0x50, 0x4c, 0x54, 0x45, 0x4c, 0x69, 0x71, 0xb1, 0x8a, - 0x1a, 0xbf, 0x80, 0x00, 0xb0, 0x8c, 0x18, 0xb1, 0x8b, 0x1b, 0xb2, 0x8b, - 0x1b, 0xb6, 0x92, 0x12, 0xb1, 0x8b, 0x1b, 0xb4, 0x8f, 0x1e, 0xb6, 0x92, - 0x20, 0xb1, 0x8b, 0x1b, 0xb1, 0x90, 0x16, 0xb3, 0x8b, 0x1b, 0xb3, 0x80, - 0x1a, 0xb1, 0x8b, 0x1c, 0xb0, 0x8b, 0x1a, 0xb1, 0x8a, 0x1b, 0xb1, 0x8b, - 0x1b, 0xb6, 0x92, 0x24, 0xb1, 0x8d, 0x1a, 0xb0, 0x8c, 0x1a, 0xb4, 0x87, - 0x1e, 0xb4, 0x91, 0x23, 0xb1, 0x8c, 0x1c, 0xb3, 0x8e, 0x20, 0xbc, 0x9c, - 0x3c, 0xb3, 0x8f, 0x1d, 0xb2, 0x8b, 0x1a, 0xb1, 0x8c, 0x1c, 0xb1, 0x8a, - 0x1c, 0xdb, 0xca, 0x90, 0xb1, 0x8a, 0x1b, 0xc9, 0xac, 0x42, 0xb0, 0x8c, - 0x1a, 0xb1, 0x8b, 0x1c, 0xe5, 0xd9, 0xae, 0xb4, 0x8f, 0x1f, 0xb1, 0x8b, - 0x1b, 0xb1, 0x8b, 0x1c, 0xae, 0x8b, 0x17, 0xb1, 0x8b, 0x1c, 0xb7, 0x93, - 0x2b, 0xb3, 0x8e, 0x1c, 0xb1, 0x8b, 0x1c, 0xb1, 0x8b, 0x1b, 0xb0, 0x8a, - 0x1a, 0xb1, 0x8b, 0x1a, 0xb2, 0x8d, 0x20, 0xb4, 0x91, 0x1e, 0xf1, 0xea, - 0x9f, 0xe4, 0xd0, 0x42, 0xb1, 0x8b, 0x1b, 0xea, 0xe1, 0xa5, 0xc2, 0xa4, - 0x4b, 0xef, 0xe7, 0x94, 0xe3, 0xd1, 0x3f, 0xf2, 0xed, 0xa9, 0xde, 0xc7, - 0x46, 0xde, 0xce, 0x9f, 0xec, 0xe0, 0x7f, 0xf3, 0xf0, 0xb4, 0xda, 0xc8, - 0x94, 0xd5, 0xbb, 0x49, 0xe9, 0xe1, 0xaf, 0xf2, 0xed, 0xa8, 0xd0, 0xb9, - 0x76, 0xed, 0xe5, 0xa6, 0xec, 0xdf, 0x7a, 0xbf, 0x9e, 0x29, 0xc2, 0xa5, - 0x4e, 0xf3, 0xef, 0xb3, 0xe2, 0xd4, 0x95, 0xc7, 0xac, 0x5b, 0xe6, 0xd7, - 0x6a, 0xeb, 0xde, 0x77, 0xe8, 0xdb, 0x8f, 0xce, 0xb6, 0x6f, 0xb3, 0x8e, - 0x21, 0xb4, 0x90, 0x24, 0xd2, 0xb7, 0x34, 0xf0, 0xe8, 0x9e, 0xda, 0xc2, - 0x42, 0xea, 0xdc, 0x6e, 0xf2, 0xee, 0xbd, 0xca, 0xb0, 0x64, 0xb5, 0x90, - 0x26, 0xf5, 0xf3, 0xbe, 0xf1, 0xec, 0xc9, 0xdb, 0xc9, 0x95, 0xe8, 0xd9, - 0x5f, 0xca, 0xac, 0x3b, 0xbb, 0x98, 0x2c, 0xca, 0xac, 0x49, 0xe5, 0xd5, - 0x50, 0xef, 0xe6, 0x91, 0xb6, 0x92, 0x20, 0xe3, 0xd1, 0x41, 0xe9, 0xde, - 0x6b, 0xed, 0xe3, 0x83, 0xeb, 0xe0, 0x75, 0xe9, 0xdd, 0x69, 0xe8, 0xdc, - 0x65, 0xe9, 0xde, 0x6a, 0xc6, 0xa8, 0x2b, 0xd8, 0xc5, 0x6e, 0xb8, 0x95, - 0x2f, 0xe3, 0xd6, 0x97, 0xbc, 0x9b, 0x3a, 0xb5, 0x91, 0x27, 0xba, 0x99, - 0x37, 0xea, 0xe0, 0x73, 0xc5, 0xa8, 0x2a, 0x9b, 0x62, 0x48, 0x45, 0x00, - 0x00, 0x00, 0x31, 0x74, 0x52, 0x4e, 0x53, 0x00, 0xa4, 0x04, 0x2a, 0x96, - 0x42, 0x0e, 0xbb, 0x22, 0xfd, 0xa3, 0x17, 0x39, 0x0a, 0x8a, 0x88, 0xee, - 0xfd, 0x07, 0x31, 0x7e, 0x11, 0xe7, 0xd5, 0xe2, 0xfe, 0xfd, 0xfb, 0x52, - 0x48, 0xfe, 0x99, 0xfe, 0x92, 0xdc, 0xfe, 0xfc, 0xfe, 0x9c, 0x16, 0xe2, - 0xed, 0x1b, 0x5c, 0xad, 0x57, 0xb8, 0xfd, 0xfd, 0x7b, 0xa6, 0x75, 0x21, - 0x00, 0x00, 0x00, 0xc4, 0x49, 0x44, 0x41, 0x54, 0x18, 0xd3, 0x63, 0x60, - 0xa0, 0x2a, 0xd0, 0xd5, 0xc2, 0x2a, 0xcc, 0x12, 0xaa, 0x8d, 0x4d, 0x98, - 0xd1, 0x2a, 0x44, 0x47, 0x1d, 0x8b, 0x6a, 0xab, 0x70, 0x5b, 0x4d, 0x19, - 0x18, 0x8f, 0x03, 0x06, 0xf4, 0x6c, 0xc3, 0x82, 0x95, 0x5d, 0xb9, 0x44, - 0x21, 0xc2, 0x39, 0xa6, 0x30, 0x10, 0x61, 0x63, 0xe3, 0x66, 0xef, 0x28, - 0x26, 0x0b, 0x16, 0xce, 0xb6, 0x32, 0x81, 0x01, 0x0b, 0x0b, 0x0b, 0x07, - 0x27, 0x39, 0x49, 0x79, 0x36, 0xa0, 0x70, 0x6e, 0x96, 0x21, 0x0a, 0x08, - 0x70, 0xf7, 0x90, 0x60, 0x65, 0x60, 0xc8, 0xcc, 0xc8, 0x4b, 0x4b, 0x4d, - 0x49, 0x4c, 0x4e, 0x8a, 0x33, 0x83, 0x02, 0x6f, 0x1f, 0x3f, 0x3e, 0x06, - 0xe3, 0x7c, 0x73, 0x08, 0x48, 0x88, 0x8d, 0x0c, 0x72, 0xb6, 0xb6, 0xf6, - 0xf2, 0x54, 0xf0, 0x15, 0x60, 0x66, 0x30, 0x4e, 0x37, 0x42, 0x01, 0xfe, - 0x52, 0xd2, 0x22, 0x4c, 0x0c, 0x0c, 0xc6, 0xc6, 0x9c, 0x10, 0x60, 0x10, - 0x6f, 0x69, 0x69, 0x19, 0xe8, 0x62, 0x2c, 0x2e, 0x0c, 0x72, 0x09, 0x3b, - 0x0c, 0x18, 0x1b, 0xdb, 0xd9, 0x45, 0xa9, 0x08, 0xf2, 0x0b, 0xa1, 0xf9, - 0xd2, 0x38, 0x26, 0xda, 0x58, 0x89, 0x07, 0xc3, 0xf3, 0xc6, 0xfa, 0xaa, - 0x8a, 0xbc, 0x98, 0x41, 0x65, 0xac, 0xc1, 0x8a, 0x2d, 0x60, 0xd5, 0xd8, - 0xb0, 0x05, 0x2c, 0x37, 0x11, 0x51, 0x05, 0x00, 0xc4, 0xb6, 0x28, 0x6c, - 0x9a, 0xc6, 0xaf, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, - 0xae, 0x42, 0x60, 0x82 -}; -static const unsigned int scripttools_location_png_len = 712; - -static const unsigned char scripttools_d_breakpoint_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x16, - 0x08, 0x06, 0x00, 0x00, 0x00, 0xc4, 0xb4, 0x6c, 0x3b, 0x00, 0x00, 0x00, - 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00, - 0x00, 0x06, 0x62, 0x4b, 0x47, 0x44, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, - 0xa0, 0xbd, 0xa7, 0x93, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, - 0x00, 0x00, 0x0d, 0xd7, 0x00, 0x00, 0x0d, 0xd7, 0x01, 0x42, 0x28, 0x9b, - 0x78, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d, 0x45, 0x07, 0xd8, 0x07, - 0x1e, 0x0d, 0x0d, 0x04, 0x8a, 0x44, 0xe1, 0x59, 0x00, 0x00, 0x03, 0xa0, - 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0xc5, 0x95, 0x41, 0x68, 0x5c, 0x55, - 0x14, 0x86, 0xbf, 0x73, 0xef, 0x9b, 0x37, 0x93, 0x99, 0x84, 0xb6, 0x62, - 0x2c, 0x95, 0x56, 0x42, 0x09, 0x99, 0x94, 0x6a, 0x41, 0x24, 0x1a, 0xb4, - 0xbb, 0x88, 0x6e, 0x44, 0x11, 0x05, 0x29, 0x34, 0x08, 0x6e, 0xdc, 0x76, - 0x55, 0xaa, 0x1b, 0xb3, 0x6a, 0xe3, 0x22, 0x08, 0x15, 0x11, 0x5d, 0xb8, - 0x17, 0x74, 0x61, 0x70, 0x57, 0x2c, 0xdd, 0x28, 0xc5, 0x12, 0xac, 0x96, - 0x40, 0x29, 0x29, 0xc6, 0x66, 0xd1, 0x46, 0x93, 0xd0, 0x66, 0xfa, 0x66, - 0xe6, 0xdd, 0xf7, 0xee, 0x3d, 0x2e, 0xde, 0xcc, 0x64, 0x26, 0x1a, 0xbb, - 0xf4, 0xc1, 0xe1, 0x3d, 0xee, 0xbd, 0xe7, 0x3f, 0xff, 0x39, 0xe7, 0xbf, - 0xe7, 0x09, 0x7b, 0x3c, 0xf3, 0x13, 0x13, 0x27, 0x11, 0x79, 0x2b, 0x1e, - 0x19, 0x79, 0xb5, 0xb4, 0x7f, 0xff, 0x91, 0xa8, 0x54, 0x8a, 0x5d, 0xa3, - 0xb1, 0xd1, 0xde, 0xdc, 0xfc, 0xd9, 0x87, 0xb0, 0xe8, 0xbc, 0xff, 0x76, - 0x6e, 0x65, 0x65, 0x7b, 0x2f, 0x7f, 0xd9, 0xbd, 0xf0, 0xf1, 0xb1, 0x63, - 0xd3, 0x76, 0x68, 0xe8, 0xe2, 0x91, 0x99, 0x99, 0xa9, 0x27, 0xa6, 0xa6, - 0xa8, 0x1d, 0x3a, 0x34, 0xb0, 0x9f, 0xb7, 0x5a, 0x6c, 0xde, 0xb8, 0xc1, - 0xda, 0xe5, 0xcb, 0xc9, 0x83, 0xdb, 0xb7, 0x3f, 0x4a, 0xad, 0xfd, 0x74, - 0x6e, 0x79, 0xd9, 0xfd, 0x27, 0xf0, 0xf9, 0x7a, 0xfd, 0xcc, 0x81, 0x7a, - 0x7d, 0xa1, 0x7e, 0xea, 0x94, 0x44, 0xb5, 0x9a, 0x88, 0x08, 0xc8, 0xae, - 0xd8, 0xaa, 0xa0, 0x8a, 0xaa, 0x72, 0xef, 0xea, 0x55, 0x56, 0x17, 0x17, - 0x7f, 0xcc, 0xd3, 0xf4, 0xcd, 0x0f, 0x57, 0x56, 0xfe, 0xfa, 0x57, 0xe0, - 0xf3, 0xf5, 0xfa, 0x99, 0xda, 0xc1, 0x83, 0x9f, 0xd4, 0x67, 0x67, 0xb1, - 0xe5, 0x32, 0x18, 0x53, 0x80, 0xee, 0x01, 0x8c, 0x2a, 0x84, 0xc0, 0x9f, - 0xd7, 0xae, 0xe9, 0x9d, 0x4b, 0x97, 0x96, 0xd3, 0xe1, 0xe1, 0x17, 0xe6, - 0x96, 0x96, 0x9a, 0xdd, 0x63, 0x11, 0xc0, 0xfc, 0xe4, 0xe4, 0x8b, 0x41, - 0x75, 0xe1, 0xf1, 0x13, 0x27, 0x34, 0x6b, 0xb5, 0x24, 0x77, 0x6e, 0x10, - 0xb8, 0x0b, 0xae, 0x5a, 0xbc, 0x43, 0x28, 0x58, 0x87, 0xc0, 0xc8, 0xd1, - 0xa3, 0x62, 0xab, 0xd5, 0xa7, 0xcb, 0x49, 0xf2, 0x39, 0xf0, 0x6e, 0x17, - 0xd8, 0x00, 0x68, 0x08, 0x0b, 0x06, 0x94, 0x38, 0x96, 0xb4, 0xd1, 0xa0, - 0xdd, 0x68, 0x90, 0x36, 0x1a, 0xa4, 0x49, 0x42, 0x9a, 0x24, 0xb8, 0x24, - 0xc1, 0x35, 0x9b, 0xa4, 0xcd, 0x66, 0xb1, 0xf6, 0xf0, 0x61, 0xb1, 0xbf, - 0xbd, 0x8d, 0x4b, 0x12, 0xe2, 0x7d, 0xfb, 0x40, 0x75, 0xf6, 0xc2, 0xe4, - 0xe4, 0x73, 0x3d, 0xc6, 0xf3, 0x13, 0x13, 0x27, 0x55, 0x64, 0x5a, 0xe3, - 0x98, 0xe6, 0xd6, 0x16, 0x5a, 0x2a, 0x21, 0x51, 0x04, 0x51, 0x84, 0x58, - 0x0b, 0xd6, 0x22, 0x1d, 0xc6, 0xda, 0x49, 0x5f, 0xbd, 0x07, 0xef, 0x21, - 0xcf, 0xd1, 0x2c, 0x23, 0x6b, 0xb7, 0x01, 0x82, 0xaa, 0x9e, 0x05, 0xde, - 0x01, 0x88, 0x54, 0xe4, 0x6d, 0x20, 0x48, 0x1c, 0x9b, 0xed, 0xb5, 0x35, - 0x4c, 0xb5, 0x8a, 0xc4, 0x31, 0xd2, 0x0d, 0x60, 0xed, 0x4e, 0x59, 0x42, - 0x28, 0x80, 0xb3, 0x0c, 0xed, 0x80, 0xb6, 0xd6, 0xd7, 0xf1, 0xaa, 0x60, - 0xad, 0x15, 0xef, 0x5f, 0x9b, 0x1b, 0x1b, 0xab, 0xcc, 0xad, 0xae, 0xb6, - 0x23, 0x54, 0x5f, 0xc6, 0x18, 0x83, 0xb5, 0xe4, 0x59, 0xc6, 0x83, 0xb5, - 0x35, 0x2a, 0xa3, 0xa3, 0x98, 0xa1, 0x21, 0xa4, 0x54, 0x82, 0x52, 0xa9, - 0x60, 0x2e, 0x52, 0x30, 0xcd, 0x73, 0xc8, 0x32, 0xd4, 0x39, 0xdc, 0xfd, - 0xfb, 0xb4, 0x37, 0x36, 0x10, 0x63, 0xd0, 0x28, 0x02, 0xef, 0xab, 0xe5, - 0x4a, 0x65, 0x1a, 0xb8, 0x12, 0x01, 0x87, 0xfb, 0x1b, 0x95, 0x3b, 0x47, - 0x73, 0x6b, 0x0b, 0x5b, 0xab, 0x61, 0xab, 0x55, 0xa4, 0x5c, 0x86, 0x38, - 0x2e, 0x9c, 0xb3, 0x0c, 0x4d, 0x53, 0x42, 0xbb, 0x8d, 0x4f, 0x12, 0x42, - 0xb3, 0xd9, 0xf3, 0x13, 0x11, 0x14, 0x10, 0xd5, 0xc3, 0x85, 0x2a, 0x44, - 0x86, 0x06, 0xf4, 0xd7, 0xa9, 0x67, 0xf0, 0x1e, 0x75, 0x0e, 0xe9, 0x38, - 0x61, 0x2d, 0xea, 0x5c, 0x61, 0x59, 0x86, 0x86, 0xd0, 0xef, 0x54, 0x94, - 0xab, 0x28, 0xf4, 0x50, 0xa1, 0x0a, 0xd5, 0xf5, 0x7e, 0x6d, 0x6a, 0x08, - 0x83, 0xe6, 0x7d, 0x8f, 0x29, 0x79, 0xde, 0xab, 0xf3, 0x80, 0x9e, 0x3b, - 0x4d, 0x05, 0x30, 0xc6, 0xdc, 0xeb, 0x32, 0xfe, 0x85, 0x10, 0x9e, 0x44, - 0xd5, 0xf6, 0x9c, 0x42, 0xe8, 0x75, 0x1d, 0x91, 0x82, 0x5d, 0xa7, 0x79, - 0x9a, 0x65, 0x45, 0xb0, 0xae, 0xf5, 0x11, 0x00, 0xc0, 0xda, 0x5f, 0xbb, - 0x3a, 0xfe, 0x0e, 0xb0, 0x38, 0x37, 0x20, 0xa1, 0x9e, 0x39, 0x87, 0xa6, - 0xe9, 0x8e, 0x65, 0x19, 0x38, 0x07, 0x59, 0x56, 0x04, 0xce, 0xf3, 0xae, - 0x5f, 0x10, 0xd5, 0xeb, 0xe7, 0x96, 0x97, 0xef, 0x00, 0x98, 0xd4, 0xfb, - 0x6f, 0x54, 0x75, 0x5b, 0x9d, 0x53, 0xcd, 0x73, 0xb4, 0xd3, 0x75, 0x76, - 0x03, 0xb6, 0xdb, 0x3b, 0xdf, 0xdd, 0x3a, 0x77, 0xce, 0x6b, 0x9a, 0x82, - 0xaa, 0x41, 0xe4, 0xcb, 0x6e, 0xd9, 0xed, 0x95, 0xad, 0xad, 0x74, 0x66, - 0x74, 0x34, 0x17, 0xd5, 0x57, 0x28, 0xf4, 0x38, 0x38, 0x17, 0xfa, 0xcb, - 0xd2, 0xc9, 0x86, 0x4e, 0x36, 0x38, 0x07, 0x69, 0x0a, 0xed, 0xb6, 0x57, - 0xd5, 0x3f, 0x1e, 0x1b, 0x19, 0x79, 0xef, 0xfb, 0xbb, 0x77, 0x43, 0x6f, - 0x56, 0x38, 0x6b, 0x2f, 0x56, 0xf2, 0xfc, 0x0d, 0x75, 0xee, 0x25, 0x15, - 0x91, 0x5e, 0x43, 0xf2, 0x7c, 0xe7, 0x82, 0x74, 0x02, 0x69, 0x08, 0x45, - 0x80, 0x3c, 0x2f, 0xb2, 0x6a, 0xb5, 0x54, 0x20, 0x88, 0x31, 0xa7, 0xdf, - 0x5f, 0x5a, 0xca, 0xfe, 0x39, 0xdd, 0xc6, 0xc7, 0x47, 0xc5, 0xda, 0x1f, - 0x14, 0x9e, 0x91, 0x28, 0x82, 0x72, 0xb9, 0xb8, 0x7d, 0xfd, 0xc3, 0xa8, - 0x0b, 0xec, 0x7d, 0x91, 0x7e, 0x9a, 0x7a, 0x20, 0xa0, 0x3a, 0xfb, 0xc1, - 0xad, 0x5b, 0x5f, 0xef, 0x39, 0x8f, 0xe7, 0x8e, 0x1f, 0x1f, 0x2e, 0x7b, - 0xff, 0x19, 0xaa, 0xb3, 0x02, 0x41, 0xad, 0xb5, 0x44, 0x51, 0xa1, 0x63, - 0x63, 0x76, 0xe6, 0x44, 0x9e, 0x07, 0x54, 0x8d, 0xa8, 0xfe, 0x8e, 0x31, - 0xa7, 0xcf, 0xdd, 0xbc, 0xf9, 0xd3, 0x23, 0xff, 0x20, 0x00, 0x17, 0xc6, - 0xc7, 0x9f, 0xd5, 0x28, 0x3a, 0x2b, 0xaa, 0xaf, 0x03, 0xd5, 0x5d, 0xdb, - 0x8a, 0xea, 0x75, 0x31, 0xe6, 0x8b, 0x03, 0xb5, 0xda, 0x57, 0xfd, 0xe9, - 0x3f, 0x12, 0xb8, 0x97, 0xc1, 0xd8, 0x58, 0xa5, 0x52, 0x2a, 0x3d, 0x8f, - 0x31, 0x4f, 0x05, 0x28, 0x23, 0xb2, 0x6e, 0xac, 0xfd, 0xad, 0x2b, 0xa9, - 0xff, 0xe5, 0xf9, 0x1b, 0x7c, 0xdb, 0x6e, 0x63, 0x0c, 0x40, 0xf9, 0x7f, - 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 -}; -static const unsigned int scripttools_d_breakpoint_png_len = 1056; - -static const unsigned char scripttools_closetab_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, - 0x08, 0x03, 0x00, 0x00, 0x00, 0x28, 0x2d, 0x0f, 0x53, 0x00, 0x00, 0x00, - 0x84, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0xfe, 0x38, 0x00, 0xfe, - 0x38, 0x00, 0xff, 0x82, 0x2c, 0xff, 0x88, 0x2e, 0xff, 0xff, 0xff, 0xff, - 0x81, 0x3a, 0xff, 0x78, 0x27, 0xff, 0x83, 0x2c, 0xff, 0x87, 0x2e, 0xff, - 0x7e, 0x2a, 0xff, 0x8a, 0x2f, 0xff, 0x8c, 0x30, 0xff, 0x8e, 0x32, 0xff, - 0x91, 0x33, 0xff, 0x9b, 0x46, 0xff, 0x81, 0x2c, 0xfe, 0x4d, 0x0d, 0xff, - 0x60, 0x1a, 0xff, 0x63, 0x1a, 0xfe, 0x38, 0x00, 0xff, 0x7a, 0x36, 0xff, - 0xae, 0x81, 0xff, 0xba, 0x85, 0xff, 0xba, 0x87, 0xff, 0xbb, 0x89, 0xff, - 0xe8, 0xdd, 0xff, 0xe9, 0xe0, 0xff, 0xea, 0xde, 0xff, 0xea, 0xe0, 0xfe, - 0x48, 0x0a, 0xff, 0x71, 0x23, 0xff, 0x73, 0x24, 0xff, 0x73, 0x25, 0xff, - 0x74, 0x25, 0xff, 0x8e, 0x40, 0xff, 0x8f, 0x40, 0xff, 0x6d, 0x20, 0xff, - 0x97, 0x43, 0xff, 0xeb, 0xe1, 0xff, 0xec, 0xdf, 0xff, 0xed, 0xdf, 0xff, - 0xee, 0xe2, 0xff, 0x70, 0x21, 0x6b, 0xe1, 0xa9, 0x84, 0x00, 0x00, 0x00, - 0x03, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x57, 0xc0, 0x94, 0xe8, 0xcd, 0xfd, - 0x00, 0x00, 0x00, 0x9f, 0x49, 0x44, 0x41, 0x54, 0x78, 0x5e, 0x6d, 0xcf, - 0x47, 0x0e, 0xc3, 0x40, 0x08, 0x05, 0xd0, 0x78, 0x80, 0xe9, 0xcd, 0xbd, - 0x3b, 0xbd, 0xdf, 0xff, 0x7e, 0x89, 0x1d, 0xef, 0x9c, 0xbf, 0x40, 0xe2, - 0x49, 0x20, 0xd8, 0xfd, 0x49, 0xc2, 0x8a, 0x35, 0x2c, 0x59, 0xfa, 0x29, - 0xdb, 0x1f, 0x8e, 0xa7, 0xd3, 0xf1, 0xb0, 0xcf, 0xa6, 0x59, 0x58, 0x2e, - 0x74, 0x04, 0x29, 0x21, 0x6a, 0x91, 0xb3, 0x2f, 0x14, 0x02, 0xb0, 0xbe, - 0x39, 0x77, 0xab, 0x11, 0x44, 0x31, 0x83, 0xc6, 0x86, 0x9e, 0x21, 0x3c, - 0xa9, 0x41, 0xbd, 0x40, 0x34, 0xe7, 0x81, 0x5e, 0x2f, 0x1a, 0xce, 0x26, - 0x2e, 0x00, 0x56, 0xf1, 0x91, 0x68, 0xe4, 0xca, 0xc2, 0x02, 0xd2, 0xf9, - 0xcb, 0x9d, 0xe8, 0x7e, 0xf1, 0x4e, 0xae, 0x10, 0x1e, 0xd4, 0xf7, 0xf4, - 0x08, 0x2b, 0x80, 0x6d, 0xa9, 0x2b, 0xcb, 0x8e, 0xda, 0x75, 0x24, 0x1a, - 0xa8, 0xb8, 0x94, 0xbc, 0x82, 0xdf, 0x52, 0x76, 0x45, 0x05, 0xca, 0xfb, - 0x6f, 0xc1, 0x2b, 0x9b, 0x4f, 0x4f, 0xdf, 0x68, 0xac, 0x73, 0xd6, 0xe0, - 0x3b, 0x4d, 0x36, 0xcf, 0x6d, 0xf3, 0x01, 0x8e, 0x70, 0x0b, 0xdd, 0x09, - 0xe9, 0x3c, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, - 0x42, 0x60, 0x82 -}; -static const unsigned int scripttools_closetab_png_len = 375; - -static const unsigned char scripttools_stepinto_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x16, - 0x04, 0x03, 0x00, 0x00, 0x00, 0x36, 0x9a, 0x71, 0x08, 0x00, 0x00, 0x00, - 0x04, 0x67, 0x41, 0x4d, 0x41, 0x00, 0x00, 0xb1, 0x8f, 0x0b, 0xfc, 0x61, - 0x05, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, - 0x1c, 0xe9, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, - 0x0b, 0x13, 0x00, 0x00, 0x0b, 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, - 0x00, 0x00, 0x27, 0x50, 0x4c, 0x54, 0x45, 0x4c, 0x69, 0x71, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x96, 0x47, - 0x56, 0xa5, 0x00, 0x00, 0x00, 0x0b, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x01, - 0x02, 0x04, 0x11, 0x0d, 0x08, 0x19, 0x03, 0x16, 0x0b, 0x3d, 0x3c, 0xee, - 0xcb, 0x00, 0x00, 0x00, 0x61, 0x49, 0x44, 0x41, 0x54, 0x18, 0xd3, 0x75, - 0xcf, 0xbd, 0x11, 0xc0, 0x20, 0x08, 0x06, 0x50, 0xd0, 0xd8, 0xb9, 0x4c, - 0x96, 0xc8, 0x70, 0x59, 0x20, 0xcb, 0x58, 0xd8, 0xcb, 0x50, 0xf2, 0x41, - 0xce, 0x60, 0x11, 0x0a, 0x7c, 0x77, 0xfc, 0x1c, 0x12, 0xfd, 0x85, 0x88, - 0x44, 0x4b, 0x2c, 0xf5, 0xcf, 0x75, 0x2b, 0xac, 0x7e, 0xb3, 0x0d, 0x8d, - 0x66, 0xc6, 0x83, 0xa4, 0x9b, 0x3a, 0x9c, 0x34, 0x55, 0x6d, 0x18, 0x8d, - 0xcd, 0x58, 0x3a, 0x5a, 0x76, 0x57, 0xb4, 0x16, 0xb7, 0x8d, 0x1d, 0xc4, - 0xcb, 0x25, 0x38, 0x07, 0x73, 0x30, 0x6d, 0x4e, 0xef, 0xf5, 0xdb, 0x27, - 0x10, 0xf7, 0x73, 0x9d, 0xae, 0x09, 0x1a, 0xb2, 0x3a, 0x74, 0x4f, 0x64, - 0xf6, 0x59, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, - 0x60, 0x82 -}; -static const unsigned int scripttools_stepinto_png_len = 278; - -static const unsigned char scripttools_breakpoint_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x16, - 0x08, 0x06, 0x00, 0x00, 0x00, 0xc4, 0xb4, 0x6c, 0x3b, 0x00, 0x00, 0x00, - 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00, - 0x00, 0x06, 0x62, 0x4b, 0x47, 0x44, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, - 0xa0, 0xbd, 0xa7, 0x93, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, - 0x00, 0x00, 0x0d, 0xd7, 0x00, 0x00, 0x0d, 0xd7, 0x01, 0x42, 0x28, 0x9b, - 0x78, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d, 0x45, 0x07, 0xd8, 0x07, - 0x1e, 0x0d, 0x0b, 0x00, 0xdb, 0x73, 0x82, 0xc6, 0x00, 0x00, 0x03, 0x96, - 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0xc5, 0x95, 0xcd, 0x6b, 0x5c, 0x55, - 0x18, 0xc6, 0x7f, 0xe7, 0x9c, 0x3b, 0x77, 0x66, 0x32, 0x26, 0xa3, 0xd3, - 0xa4, 0x1f, 0x92, 0x16, 0x2c, 0x5d, 0xea, 0x42, 0x0c, 0x26, 0x86, 0x56, - 0x28, 0x08, 0x6e, 0x6c, 0x41, 0x14, 0xdc, 0x98, 0xff, 0xa1, 0x22, 0xe4, - 0x1f, 0x70, 0x53, 0x0a, 0x41, 0xba, 0xb0, 0xa2, 0x15, 0xf7, 0xa1, 0xba, - 0xd0, 0xbd, 0x04, 0x04, 0xc3, 0x50, 0x44, 0xab, 0x58, 0xba, 0x28, 0xcd, - 0x50, 0x9b, 0xd6, 0x4c, 0x92, 0xce, 0xd7, 0xcd, 0xdc, 0xb9, 0x77, 0xee, - 0x3d, 0xe7, 0xed, 0xe2, 0xe6, 0x4e, 0x3e, 0x6c, 0xd5, 0x9d, 0x2f, 0x3c, - 0x70, 0x99, 0x33, 0xe7, 0x77, 0xde, 0x79, 0xce, 0x73, 0xdf, 0x51, 0x3c, - 0xa3, 0xea, 0x70, 0x16, 0x78, 0xaf, 0x30, 0x39, 0xf9, 0xb6, 0x77, 0xe2, - 0xc4, 0x49, 0x53, 0x2c, 0xfa, 0x69, 0xbb, 0xbd, 0x1d, 0xad, 0xad, 0xdd, - 0x44, 0xe4, 0x7b, 0xe0, 0xdb, 0x39, 0xe8, 0xf1, 0x5f, 0xab, 0x0e, 0x73, - 0xbf, 0x1c, 0x39, 0x72, 0xf3, 0xfe, 0xe2, 0xa2, 0xf4, 0x56, 0x57, 0x25, - 0x79, 0xfc, 0x58, 0xd2, 0x7d, 0x8a, 0x1a, 0x0d, 0x69, 0x5e, 0xbf, 0x2e, - 0x7f, 0xcc, 0xce, 0xee, 0xd4, 0xe1, 0xe3, 0xdb, 0xe0, 0x3f, 0x8d, 0xa3, - 0x0e, 0x41, 0x2f, 0x4d, 0xcc, 0xcf, 0x2f, 0x4d, 0x5f, 0xbe, 0xac, 0x8a, - 0x53, 0x53, 0x4a, 0x7b, 0x1e, 0x28, 0x75, 0x70, 0x87, 0x08, 0xe2, 0x1c, - 0x36, 0x49, 0xd8, 0x5e, 0x5e, 0xe6, 0xaf, 0x2b, 0x57, 0x7e, 0x8a, 0xe2, - 0xf8, 0xdd, 0x37, 0x61, 0xeb, 0xa9, 0xe0, 0x3a, 0x5c, 0x2a, 0x9e, 0x3e, - 0xfd, 0xe9, 0x4b, 0x57, 0xaf, 0x52, 0xaa, 0xd5, 0xc0, 0x18, 0x94, 0x52, - 0x19, 0x38, 0x87, 0x8b, 0x8c, 0x24, 0x22, 0xa4, 0x51, 0xc4, 0xf6, 0x8d, - 0x1b, 0xd2, 0xbc, 0x76, 0xed, 0xb6, 0x81, 0xd9, 0x19, 0x08, 0x73, 0x9e, - 0x06, 0x58, 0x85, 0x79, 0x05, 0x4b, 0x93, 0x17, 0x2e, 0x88, 0xef, 0x1c, - 0xae, 0xdd, 0xce, 0xd4, 0xe9, 0x64, 0xea, 0x76, 0x0f, 0xaa, 0xd3, 0xc1, - 0xb5, 0xdb, 0xe8, 0x9d, 0x1d, 0x5e, 0x38, 0x77, 0x4e, 0xe9, 0x6a, 0xf5, - 0xe5, 0x14, 0x3e, 0xdf, 0xdf, 0xb1, 0x06, 0x30, 0xb0, 0xa4, 0x3c, 0x4f, - 0xc6, 0x8f, 0x1f, 0x57, 0x39, 0x50, 0xba, 0x5d, 0x5c, 0xaf, 0x87, 0x0b, - 0x02, 0xa4, 0xd7, 0x43, 0x82, 0x00, 0x17, 0x04, 0xd9, 0x67, 0xdd, 0x2e, - 0xb2, 0x0b, 0x37, 0x83, 0x01, 0xd5, 0x33, 0x67, 0x00, 0x16, 0xea, 0xf0, - 0x5a, 0x0e, 0xf6, 0xea, 0x70, 0x56, 0x60, 0xae, 0x36, 0x3d, 0x8d, 0x6b, - 0x36, 0x71, 0xa5, 0x12, 0xf8, 0x3e, 0xca, 0xf3, 0xa0, 0x50, 0xc8, 0x2c, - 0xd1, 0x7a, 0xd7, 0x09, 0x01, 0x6b, 0x21, 0x4d, 0x21, 0x49, 0x90, 0x34, - 0x45, 0xe2, 0x98, 0xf1, 0xb1, 0x31, 0x3a, 0xc6, 0x38, 0xb1, 0x76, 0x11, - 0xf8, 0x00, 0xc0, 0x03, 0xde, 0xd7, 0x4a, 0xb9, 0xca, 0xd1, 0xa3, 0x3a, - 0xbd, 0x77, 0x0f, 0x3d, 0x3e, 0x8e, 0x2a, 0x97, 0x91, 0x62, 0x11, 0xe5, - 0xfb, 0xa0, 0x35, 0x18, 0x73, 0x00, 0x2c, 0x69, 0x0a, 0x71, 0x8c, 0xc4, - 0x31, 0xf6, 0xc1, 0x03, 0x14, 0x30, 0x56, 0xab, 0x99, 0xfe, 0xd6, 0xd6, - 0x3b, 0x2b, 0x50, 0x3a, 0x0f, 0x91, 0x56, 0xf0, 0x96, 0x5f, 0xa9, 0x68, - 0x5d, 0x28, 0x20, 0x71, 0x4c, 0x72, 0xf7, 0x2e, 0xb6, 0xd3, 0xc9, 0x7e, - 0x76, 0x10, 0x20, 0x61, 0x98, 0x69, 0x30, 0x40, 0xfa, 0x7d, 0x64, 0x67, - 0x67, 0x64, 0x8b, 0x7d, 0xf8, 0x10, 0xfb, 0xe8, 0x11, 0xca, 0x18, 0xca, - 0xd5, 0x2a, 0x02, 0x63, 0x25, 0x98, 0xcb, 0x3b, 0x9e, 0x36, 0x79, 0x67, - 0x5a, 0x23, 0x49, 0x82, 0xdb, 0xd8, 0x40, 0x4f, 0x4c, 0x40, 0xa5, 0x02, - 0xa5, 0x12, 0xe2, 0xfb, 0xa8, 0xdd, 0x35, 0x89, 0x63, 0x24, 0x0c, 0xb3, - 0x43, 0x83, 0x20, 0x4b, 0x8c, 0xd6, 0x78, 0xc5, 0x62, 0x1e, 0xb3, 0xe9, - 0x1c, 0x5c, 0xd6, 0x5a, 0x8f, 0x22, 0x95, 0xe7, 0x4f, 0xd2, 0x14, 0xa2, - 0x08, 0x44, 0x50, 0xce, 0x21, 0xc6, 0x64, 0xd0, 0x38, 0x46, 0x86, 0x43, - 0x70, 0xee, 0x40, 0x14, 0x47, 0xf7, 0x00, 0xe5, 0x3c, 0x15, 0x4d, 0x9b, - 0x24, 0x07, 0xf2, 0x29, 0xce, 0xed, 0xc9, 0xda, 0x51, 0xa7, 0xa4, 0x69, - 0x06, 0x3c, 0x2c, 0x11, 0xec, 0x70, 0x98, 0x07, 0x62, 0x03, 0xc0, 0x13, - 0xf8, 0x35, 0x0a, 0xc3, 0x17, 0xb1, 0xd6, 0x8c, 0x6e, 0x3c, 0x97, 0x31, - 0xa0, 0x14, 0x92, 0x77, 0xe7, 0x5c, 0x76, 0x48, 0x9a, 0x66, 0xb2, 0x76, - 0xa4, 0x61, 0xbf, 0x0f, 0x40, 0x01, 0x7e, 0xcb, 0x3b, 0xfe, 0xce, 0x25, - 0x89, 0x89, 0x3b, 0x9d, 0x11, 0x70, 0xe4, 0xe5, 0x70, 0x98, 0x29, 0xb7, - 0x20, 0xb7, 0x21, 0x57, 0x92, 0x64, 0x7b, 0xac, 0x25, 0x6c, 0xb5, 0x9c, - 0x82, 0x5b, 0x33, 0xf0, 0x67, 0x0e, 0xfe, 0x06, 0xe8, 0xb5, 0xd7, 0xd7, - 0x45, 0x92, 0x24, 0xdb, 0x18, 0xc7, 0x59, 0x9c, 0x06, 0x83, 0x4c, 0x51, - 0xb4, 0xf7, 0x9c, 0x2b, 0x3f, 0x28, 0x49, 0xe8, 0x6f, 0x6e, 0x12, 0x87, - 0xa1, 0x76, 0xf0, 0xe5, 0xe8, 0xcd, 0xdb, 0x1d, 0x7d, 0x9f, 0x44, 0xbd, - 0x9e, 0xea, 0xad, 0xaf, 0x67, 0x5f, 0xde, 0x0f, 0x0a, 0xc3, 0x2c, 0x66, - 0xfb, 0x63, 0x17, 0x45, 0x48, 0x14, 0x41, 0x1c, 0x63, 0x83, 0x80, 0x56, - 0xa3, 0x61, 0x81, 0x46, 0x01, 0xbe, 0xca, 0xc1, 0x06, 0xe0, 0x23, 0xf8, - 0x79, 0x08, 0xe7, 0xa3, 0x6e, 0xf7, 0xa4, 0x57, 0x28, 0x28, 0xbf, 0x5c, - 0xce, 0x2e, 0xd3, 0xb9, 0x3d, 0xbf, 0x93, 0x04, 0x76, 0x6d, 0x61, 0xd7, - 0x92, 0x34, 0x08, 0xd8, 0xbc, 0x73, 0x47, 0xd2, 0xe1, 0xd0, 0x3a, 0xb8, - 0x38, 0x0b, 0xf7, 0xff, 0x36, 0xdd, 0x7e, 0x84, 0x29, 0x1f, 0x7e, 0x00, - 0x5e, 0x99, 0x38, 0x76, 0x8c, 0xe7, 0x4f, 0x9d, 0x42, 0x97, 0x4a, 0x28, - 0x63, 0xb2, 0x8c, 0xe7, 0x23, 0xd3, 0x5a, 0xb0, 0x96, 0xfe, 0xd6, 0x16, - 0xad, 0xb5, 0x35, 0x6b, 0xd3, 0xd4, 0x09, 0x2c, 0xbc, 0x01, 0xcb, 0xcf, - 0x9c, 0xc7, 0x2b, 0xf0, 0x5c, 0x19, 0x3e, 0x03, 0x16, 0xb4, 0x31, 0xae, - 0x52, 0xab, 0x99, 0x52, 0xb5, 0x8a, 0x57, 0x2c, 0xa2, 0x8d, 0x21, 0x8d, - 0x63, 0x86, 0xfd, 0x3e, 0x61, 0xab, 0xe5, 0xe2, 0x30, 0xd4, 0x0a, 0x1a, - 0x16, 0x3e, 0x9c, 0x87, 0xd5, 0x7f, 0x1c, 0xf4, 0x79, 0xad, 0xc2, 0xab, - 0x1a, 0x16, 0x15, 0x5c, 0x14, 0x18, 0x3b, 0xb4, 0x2c, 0x0a, 0x6e, 0x01, - 0x5f, 0x18, 0xf8, 0x7a, 0x06, 0x92, 0x7f, 0xfd, 0x07, 0x39, 0x5c, 0x2b, - 0x50, 0xaa, 0xc0, 0xeb, 0x0e, 0x4e, 0x29, 0x28, 0x02, 0x4d, 0x03, 0xbf, - 0xe7, 0x91, 0xfa, 0x5f, 0xea, 0x09, 0x28, 0xeb, 0x81, 0x10, 0x4f, 0x7a, - 0xff, 0x47, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, - 0x60, 0x82 -}; -static const unsigned int scripttools_breakpoint_png_len = 1046; - - -static const unsigned char scripts_next_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x6e, 0x65, 0x78, 0x74, - 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x3d, 0x20, - 0x22, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x3b, 0x0a, 0x0a, - 0x73, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x53, 0x74, 0x65, 0x70, - 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x2c, 0x20, 0x70, 0x72, - 0x6f, 0x63, 0x65, 0x65, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x72, - 0x6f, 0x75, 0x67, 0x68, 0x20, 0x73, 0x75, 0x62, 0x72, 0x6f, 0x75, 0x74, - 0x69, 0x6e, 0x65, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x22, 0x3b, 0x0a, - 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x4c, 0x69, 0x6b, 0x65, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x5c, 0x22, 0x73, 0x74, 0x65, 0x70, 0x5c, - 0x22, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x73, - 0x20, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x61, 0x73, 0x20, 0x73, 0x75, 0x62, - 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x20, 0x63, 0x61, 0x6c, 0x6c, - 0x73, 0x20, 0x64, 0x6f, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x70, - 0x70, 0x65, 0x6e, 0x3b, 0x22, 0x3b, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x2b, - 0x3d, 0x20, 0x22, 0x5c, 0x6e, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, - 0x65, 0x79, 0x20, 0x64, 0x6f, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, - 0x61, 0x6c, 0x6c, 0x20, 0x69, 0x73, 0x20, 0x74, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x69, 0x6e, - 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x22, 0x3b, - 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x2b, 0x3d, 0x20, 0x22, 0x5c, 0x6e, 0x49, - 0x66, 0x20, 0x61, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x4e, - 0x20, 0x69, 0x73, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x61, 0x73, - 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x74, - 0x68, 0x69, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, - 0x64, 0x6f, 0x6e, 0x65, 0x20, 0x4e, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x73, 0x74, 0x6f, - 0x70, 0x70, 0x65, 0x64, 0x2e, 0x22, 0x3b, 0x0a, 0x61, 0x6c, 0x69, 0x61, - 0x73, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x5b, 0x20, 0x22, 0x6e, 0x22, 0x20, - 0x5d, 0x3b, 0x0a, 0x0a, 0x73, 0x65, 0x65, 0x41, 0x6c, 0x73, 0x6f, 0x20, - 0x3d, 0x20, 0x5b, 0x20, 0x22, 0x73, 0x74, 0x65, 0x70, 0x22, 0x2c, 0x20, - 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x22, 0x2c, 0x20, - 0x22, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x22, 0x2c, 0x20, 0x22, 0x61, - 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, - 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x65, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x76, 0x61, 0x72, 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x3d, - 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, - 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x20, 0x21, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x7b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, - 0x20, 0x61, 0x72, 0x67, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x23, 0x23, 0x23, 0x20, - 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, - 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x3f, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x6e, 0x75, - 0x6d, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x49, 0x6e, 0x74, - 0x28, 0x61, 0x72, 0x67, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x21, 0x69, 0x73, 0x4e, 0x61, - 0x4e, 0x28, 0x6e, 0x75, 0x6d, 0x29, 0x20, 0x26, 0x26, 0x20, 0x28, 0x6e, - 0x75, 0x6d, 0x20, 0x3e, 0x3d, 0x20, 0x31, 0x29, 0x29, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x6e, 0x75, 0x6d, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x76, 0x65, - 0x72, 0x28, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x29, 0x3b, 0x0a, 0x7d, 0x3b, - 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x28, 0x72, 0x65, 0x73, 0x70, 0x29, 0x20, 0x7b, 0x0a, 0x7d, 0x0a -}; -static const unsigned int scripts_next_qs_len = 804; - -static const unsigned char scripts_disable_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x64, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x20, 0x3d, 0x20, 0x22, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x73, 0x22, 0x3b, 0x0a, 0x0a, 0x73, 0x68, 0x6f, 0x72, 0x74, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, - 0x3d, 0x20, 0x22, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x62, - 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x28, 0x73, 0x29, - 0x22, 0x3b, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x64, - 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x3c, 0x62, 0x72, 0x65, 0x61, - 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2d, 0x69, 0x64, 0x3e, 0x20, 0x3a, - 0x20, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x69, - 0x76, 0x65, 0x6e, 0x20, 0x69, 0x64, 0x2e, 0x22, 0x3b, 0x0a, 0x0a, 0x73, - 0x65, 0x65, 0x41, 0x6c, 0x73, 0x6f, 0x20, 0x3d, 0x20, 0x5b, 0x20, 0x22, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x2c, 0x20, 0x22, 0x64, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x22, 0x2c, 0x20, 0x22, 0x69, 0x67, 0x6e, 0x6f, - 0x72, 0x65, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, - 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x29, 0x20, - 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, - 0x20, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x61, 0x6c, 0x6c, - 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, - 0x47, 0x65, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x28, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, - 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x69, 0x64, 0x20, 0x3d, 0x20, - 0x70, 0x61, 0x72, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x28, 0x61, 0x72, 0x67, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5b, 0x30, 0x5d, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, - 0x69, 0x73, 0x4e, 0x61, 0x4e, 0x28, 0x69, 0x64, 0x29, 0x29, 0x20, 0x7b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x42, 0x72, - 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x69, 0x64, 0x20, - 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x2e, 0x22, 0x29, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x47, - 0x65, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x44, 0x61, 0x74, 0x61, 0x28, 0x69, 0x64, 0x29, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x64, 0x20, 0x3d, 0x20, 0x69, 0x64, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x7d, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x72, 0x65, 0x73, 0x70, 0x29, 0x20, - 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x29, 0x20, 0x7b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, - 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, - 0x3d, 0x20, 0x72, 0x65, 0x73, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, - 0x66, 0x20, 0x28, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, - 0x6e, 0x65, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, - 0x20, 0x28, 0x76, 0x61, 0x72, 0x20, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x20, - 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x29, - 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, - 0x3d, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x5b, 0x69, 0x64, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x29, - 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x61, - 0x6c, 0x73, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x42, 0x72, 0x65, 0x61, - 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x28, 0x69, - 0x64, 0x2c, 0x20, 0x64, 0x61, 0x74, 0x61, 0x29, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, - 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, - 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x32, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, - 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, - 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x33, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x64, 0x61, - 0x74, 0x61, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x73, 0x70, 0x2e, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x64, 0x61, 0x74, 0x61, 0x20, 0x3d, - 0x3d, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x29, - 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, - 0x4e, 0x6f, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x22, 0x20, 0x2b, - 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x49, - 0x64, 0x20, 0x2b, 0x20, 0x22, 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, - 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20, - 0x28, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, - 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x53, - 0x65, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x44, 0x61, 0x74, 0x61, 0x28, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x49, 0x64, 0x2c, 0x20, 0x64, 0x61, 0x74, 0x61, 0x29, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x34, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, - 0x20, 0x28, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x34, - 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x7d, 0x0a -}; -static const unsigned int scripts_disable_qs_len = 1459; - -static const unsigned char scripts_tbreak_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x74, 0x62, 0x72, 0x65, - 0x61, 0x6b, 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, - 0x3d, 0x20, 0x22, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x22, 0x3b, 0x0a, 0x0a, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, - 0x20, 0x22, 0x53, 0x65, 0x74, 0x20, 0x61, 0x20, 0x74, 0x65, 0x6d, 0x70, - 0x6f, 0x72, 0x61, 0x72, 0x79, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x22, 0x3b, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, - 0x3d, 0x20, 0x22, 0x54, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, - 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x5c, 0x22, 0x62, 0x72, 0x65, - 0x61, 0x6b, 0x5c, 0x22, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x2c, 0x20, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x20, 0x74, 0x68, 0x61, - 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x69, 0x73, 0x20, 0x61, 0x75, 0x74, 0x6f, - 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x64, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x73, 0x6f, 0x6f, - 0x6e, 0x20, 0x61, 0x73, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x74, - 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x64, 0x2e, 0x22, 0x3b, 0x0a, - 0x0a, 0x73, 0x65, 0x65, 0x41, 0x6c, 0x73, 0x6f, 0x20, 0x3d, 0x20, 0x5b, - 0x20, 0x22, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x22, 0x2c, 0x20, 0x22, 0x69, - 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x61, - 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x20, 0x3d, 0x20, 0x5b, 0x20, 0x22, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x2d, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x20, 0x5d, - 0x3b, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x23, 0x23, 0x23, 0x20, 0x6d, 0x65, - 0x72, 0x67, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x62, 0x72, 0x65, - 0x61, 0x6b, 0x2e, 0x71, 0x73, 0x3a, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, - 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x69, - 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x22, 0x73, 0x69, 0x6e, 0x67, 0x6c, - 0x65, 0x53, 0x68, 0x6f, 0x74, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0x22, - 0x20, 0x69, 0x6e, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x20, 0x74, 0x6f, 0x20, - 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x42, - 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x28, 0x29, 0x0a, - 0x2f, 0x2f, 0x20, 0x23, 0x23, 0x23, 0x20, 0x6d, 0x61, 0x79, 0x62, 0x65, - 0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x28, - 0x29, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, - 0x6f, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x63, - 0x61, 0x6e, 0x20, 0x73, 0x68, 0x61, 0x72, 0x65, 0x20, 0x63, 0x6f, 0x64, - 0x65, 0x3f, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x28, 0x29, 0x20, 0x7b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x72, 0x67, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x28, 0x22, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x61, - 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x22, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, - 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x61, 0x72, 0x67, 0x20, 0x3d, 0x20, - 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5b, 0x30, 0x5d, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x63, 0x6f, - 0x6c, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x61, - 0x72, 0x67, 0x2e, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x4f, 0x66, 0x28, 0x27, 0x3a, 0x27, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x69, 0x66, 0x20, 0x28, 0x63, 0x6f, 0x6c, 0x6f, 0x6e, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x20, 0x3d, 0x3d, 0x20, 0x2d, 0x31, 0x29, 0x20, 0x7b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x69, 0x6e, - 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x70, 0x61, - 0x72, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x28, 0x61, 0x72, 0x67, 0x29, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, - 0x28, 0x69, 0x73, 0x4e, 0x61, 0x4e, 0x28, 0x6c, 0x69, 0x6e, 0x65, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x42, 0x72, 0x65, 0x61, 0x6b, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6f, - 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x3c, - 0x66, 0x69, 0x6c, 0x65, 0x3e, 0x3a, 0x3c, 0x6c, 0x69, 0x6e, 0x65, 0x3e, - 0x20, 0x6f, 0x72, 0x20, 0x3c, 0x6c, 0x69, 0x6e, 0x65, 0x3e, 0x2e, 0x22, - 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x73, 0x69, 0x64, - 0x20, 0x3d, 0x20, 0x67, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x49, 0x64, 0x28, 0x29, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, - 0x28, 0x73, 0x69, 0x64, 0x20, 0x3d, 0x3d, 0x20, 0x2d, 0x31, 0x29, 0x20, - 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x4e, - 0x6f, 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2e, 0x22, 0x29, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x47, - 0x65, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x44, 0x61, 0x74, 0x61, - 0x28, 0x73, 0x69, 0x64, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x49, 0x64, 0x20, - 0x3d, 0x20, 0x73, 0x69, 0x64, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x31, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, - 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, - 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x61, 0x72, - 0x67, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x28, 0x30, 0x2c, 0x20, 0x63, - 0x6f, 0x6c, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x69, 0x6e, 0x65, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, - 0x73, 0x65, 0x49, 0x6e, 0x74, 0x28, 0x61, 0x72, 0x67, 0x2e, 0x73, 0x6c, - 0x69, 0x63, 0x65, 0x28, 0x63, 0x6f, 0x6c, 0x6f, 0x6e, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x2b, 0x31, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x23, 0x23, 0x23, 0x20, 0x72, - 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x65, 0x65, - 0x20, 0x69, 0x66, 0x20, 0x69, 0x74, 0x27, 0x73, 0x20, 0x6c, 0x6f, 0x61, - 0x64, 0x65, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x3f, 0x20, - 0x28, 0x65, 0x2e, 0x67, 0x2e, 0x20, 0x73, 0x6f, 0x20, 0x77, 0x65, 0x20, - 0x63, 0x61, 0x6e, 0x20, 0x69, 0x73, 0x73, 0x75, 0x65, 0x20, 0x61, 0x20, - 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x29, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x53, 0x65, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x28, 0x7b, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x3a, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x2c, - 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x3a, - 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2c, - 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x53, 0x68, 0x6f, 0x74, 0x3a, - 0x20, 0x74, 0x72, 0x75, 0x65, 0x20, 0x7d, 0x29, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, - 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x7d, - 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x28, 0x72, 0x65, 0x73, 0x70, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, - 0x3d, 0x3d, 0x20, 0x31, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, - 0x20, 0x3d, 0x20, 0x72, 0x65, 0x73, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, - 0x28, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x2e, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x29, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, - 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x3c, - 0x61, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x20, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x2c, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x20, 0x2b, - 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x49, 0x64, 0x20, 0x2b, 0x20, - 0x22, 0x3e, 0x22, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, - 0x42, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x28, 0x7b, - 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x49, 0x64, 0x3a, 0x20, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x49, 0x64, 0x2c, 0x20, 0x6c, 0x69, 0x6e, - 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x3a, 0x20, 0x6c, 0x69, 0x6e, - 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2c, 0x20, 0x73, 0x69, 0x6e, - 0x67, 0x6c, 0x65, 0x53, 0x68, 0x6f, 0x74, 0x3a, 0x20, 0x74, 0x72, 0x75, - 0x65, 0x20, 0x7d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x32, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, - 0x69, 0x66, 0x20, 0x28, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, - 0x20, 0x32, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x72, 0x65, 0x73, 0x70, 0x2e, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x7b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x76, 0x61, 0x72, 0x20, 0x69, 0x64, 0x20, 0x3d, 0x20, 0x72, 0x65, - 0x73, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x42, 0x72, 0x65, 0x61, - 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x22, 0x20, 0x2b, 0x20, 0x69, - 0x64, 0x20, 0x2b, 0x20, 0x22, 0x3a, 0x20, 0x22, 0x20, 0x2b, 0x20, 0x66, - 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x20, 0x2b, 0x20, 0x22, 0x2c, - 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x22, 0x20, 0x2b, 0x20, 0x6c, 0x69, - 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x2b, 0x20, 0x22, - 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x7d, 0x0a -}; -static const unsigned int scripts_tbreak_qs_len = 1931; - -static const unsigned char scripts_frame_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x66, 0x72, 0x61, 0x6d, - 0x65, 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x3d, - 0x20, 0x22, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x22, 0x3b, 0x0a, 0x0a, 0x73, - 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x53, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x20, - 0x61, 0x20, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x20, 0x66, 0x72, 0x61, 0x6d, - 0x65, 0x22, 0x3b, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, - 0x22, 0x3b, 0x0a, 0x0a, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x20, - 0x3d, 0x20, 0x5b, 0x20, 0x22, 0x66, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, - 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x65, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, 0x3d, - 0x20, 0x30, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x46, 0x72, 0x61, - 0x6d, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x67, 0x65, - 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x72, 0x61, 0x6d, - 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x28, 0x29, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, - 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, - 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x28, 0x61, 0x72, - 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5b, 0x30, 0x5d, 0x29, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x28, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, - 0x64, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x29, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, - 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x66, 0x75, 0x6e, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x72, 0x65, 0x73, - 0x70, 0x2c, 0x20, 0x69, 0x64, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, - 0x3d, 0x20, 0x31, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x20, - 0x3d, 0x20, 0x72, 0x65, 0x73, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, - 0x66, 0x20, 0x28, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x3d, 0x3d, 0x20, 0x75, - 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x29, 0x20, 0x7b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x46, 0x72, 0x61, - 0x6d, 0x65, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x6f, 0x75, 0x74, - 0x20, 0x6f, 0x66, 0x20, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x22, 0x29, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x28, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x46, 0x72, - 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x29, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x74, 0x43, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x49, - 0x64, 0x28, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x49, 0x64, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x73, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x4c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x28, 0x69, - 0x6e, 0x66, 0x6f, 0x2e, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x47, 0x65, 0x74, - 0x42, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x28, 0x29, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x32, 0x29, 0x20, 0x7b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, - 0x20, 0x62, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x20, 0x3d, - 0x20, 0x72, 0x65, 0x73, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x23, 0x22, 0x20, 0x2b, 0x20, - 0x67, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x72, - 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x28, 0x29, 0x20, 0x2b, - 0x20, 0x22, 0x20, 0x20, 0x22, 0x20, 0x2b, 0x20, 0x62, 0x61, 0x63, 0x6b, - 0x74, 0x72, 0x61, 0x63, 0x65, 0x5b, 0x67, 0x65, 0x74, 0x43, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x28, 0x29, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x7d, 0x0a, 0x7d, 0x0a -}; -static const unsigned int scripts_frame_qs_len = 928; - -static const unsigned char scripts_clear_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x63, 0x6c, 0x65, 0x61, - 0x72, 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x3d, - 0x20, 0x22, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x22, 0x3b, 0x0a, 0x0a, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, - 0x22, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x61, 0x74, 0x20, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, - 0x20, 0x22, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x20, 0x3c, 0x66, 0x69, 0x6c, - 0x65, 0x3e, 0x3a, 0x3c, 0x6c, 0x69, 0x6e, 0x65, 0x3e, 0x20, 0x3a, 0x20, - 0x43, 0x6c, 0x65, 0x61, 0x72, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x22, 0x3b, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x2b, - 0x3d, 0x20, 0x22, 0x5c, 0x6e, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x20, 0x3c, - 0x6c, 0x69, 0x6e, 0x65, 0x3e, 0x20, 0x3a, 0x20, 0x43, 0x6c, 0x65, 0x61, - 0x72, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x20, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x69, 0x76, - 0x65, 0x6e, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x2e, 0x22, 0x3b, 0x0a, 0x0a, 0x73, 0x65, - 0x65, 0x41, 0x6c, 0x73, 0x6f, 0x20, 0x3d, 0x20, 0x5b, 0x20, 0x22, 0x64, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x61, - 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x20, 0x3d, 0x20, 0x5b, 0x20, 0x22, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x2d, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x20, 0x5d, - 0x3b, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x28, 0x29, 0x20, 0x7b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x72, 0x67, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x28, 0x22, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x72, - 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, - 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x76, 0x61, 0x72, 0x20, 0x61, 0x72, 0x67, 0x20, 0x3d, 0x20, 0x61, - 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5b, 0x30, 0x5d, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x63, 0x6f, 0x6c, - 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x61, 0x72, - 0x67, 0x2e, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4f, - 0x66, 0x28, 0x27, 0x3a, 0x27, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x69, 0x66, 0x20, 0x28, 0x63, 0x6f, 0x6c, 0x6f, 0x6e, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x20, 0x3d, 0x3d, 0x20, 0x2d, 0x31, 0x29, 0x20, 0x7b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x69, 0x6e, 0x65, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, - 0x73, 0x65, 0x49, 0x6e, 0x74, 0x28, 0x61, 0x72, 0x67, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, - 0x69, 0x73, 0x4e, 0x61, 0x4e, 0x28, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6f, 0x66, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x3c, 0x66, - 0x69, 0x6c, 0x65, 0x3e, 0x3a, 0x3c, 0x6c, 0x69, 0x6e, 0x65, 0x3e, 0x20, - 0x6f, 0x72, 0x20, 0x3c, 0x6c, 0x69, 0x6e, 0x65, 0x3e, 0x2e, 0x22, 0x29, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x73, 0x69, 0x64, 0x20, - 0x3d, 0x20, 0x67, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x49, 0x64, 0x28, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, - 0x73, 0x69, 0x64, 0x20, 0x3d, 0x3d, 0x20, 0x2d, 0x31, 0x29, 0x20, 0x7b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x4e, 0x6f, - 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2e, 0x22, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x49, 0x64, 0x20, 0x3d, - 0x20, 0x73, 0x69, 0x64, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, - 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x20, - 0x3d, 0x20, 0x61, 0x72, 0x67, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x28, - 0x30, 0x2c, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x3d, - 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x28, 0x61, 0x72, - 0x67, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x28, 0x63, 0x6f, 0x6c, 0x6f, - 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2b, 0x31, 0x29, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x42, 0x72, 0x65, - 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x28, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, - 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x72, 0x65, 0x73, 0x70, 0x29, 0x20, - 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x29, 0x20, 0x7b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, - 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, - 0x3d, 0x20, 0x72, 0x65, 0x73, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, - 0x66, 0x20, 0x28, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, - 0x6e, 0x65, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, - 0x20, 0x28, 0x76, 0x61, 0x72, 0x20, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x20, - 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x29, - 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, - 0x3d, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x5b, 0x69, 0x64, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x28, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x20, 0x3d, 0x3d, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x26, - 0x26, 0x20, 0x28, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x66, 0x69, 0x6c, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x66, 0x69, 0x6c, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x7c, 0x7c, 0x20, 0x28, 0x28, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x49, 0x64, 0x20, 0x21, 0x3d, 0x20, - 0x2d, 0x31, 0x29, 0x20, 0x26, 0x26, 0x20, 0x28, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x49, 0x64, 0x20, 0x3d, 0x20, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x49, 0x64, 0x29, 0x29, 0x29, 0x20, - 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x72, 0x65, 0x61, - 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x28, 0x69, 0x64, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, - 0x22, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x20, 0x62, 0x72, 0x65, - 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x22, 0x20, 0x2b, 0x20, - 0x69, 0x64, 0x20, 0x2b, 0x20, 0x22, 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, - 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x32, 0x29, 0x20, 0x7b, 0x0a, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x7d, 0x0a -}; -static const unsigned int scripts_clear_qs_len = 1664; - -static const unsigned char scripts_step_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x73, 0x74, 0x65, 0x70, - 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x3d, 0x20, - 0x22, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x3b, 0x0a, 0x0a, - 0x73, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x53, 0x74, 0x65, 0x70, - 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x75, 0x6e, 0x74, - 0x69, 0x6c, 0x20, 0x61, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x73, 0x20, 0x72, 0x65, - 0x61, 0x63, 0x68, 0x65, 0x64, 0x22, 0x3b, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, - 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x20, 0x3d, 0x20, 0x22, 0x49, 0x66, 0x20, 0x61, 0x20, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x20, 0x4e, 0x20, 0x69, 0x73, 0x20, 0x67, 0x69, 0x76, - 0x65, 0x6e, 0x20, 0x61, 0x73, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x77, 0x69, 0x6c, - 0x6c, 0x20, 0x62, 0x65, 0x20, 0x64, 0x6f, 0x6e, 0x65, 0x20, 0x4e, 0x20, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, - 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, - 0x73, 0x20, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x2e, 0x22, 0x3b, - 0x0a, 0x0a, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x20, 0x3d, 0x20, - 0x5b, 0x20, 0x22, 0x73, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x73, 0x65, - 0x65, 0x41, 0x6c, 0x73, 0x6f, 0x20, 0x3d, 0x20, 0x5b, 0x20, 0x22, 0x6e, - 0x65, 0x78, 0x74, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x66, 0x75, 0x6e, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x65, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, - 0x72, 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x31, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x72, 0x67, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x20, 0x21, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x61, 0x72, - 0x67, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x23, 0x23, 0x23, 0x20, 0x65, 0x76, 0x61, - 0x6c, 0x75, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x78, - 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x20, - 0x66, 0x72, 0x61, 0x6d, 0x65, 0x3f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x6e, 0x75, 0x6d, 0x20, 0x3d, - 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x28, 0x61, 0x72, - 0x67, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x69, 0x66, 0x20, 0x28, 0x21, 0x69, 0x73, 0x4e, 0x61, 0x4e, 0x28, 0x6e, - 0x75, 0x6d, 0x29, 0x20, 0x26, 0x26, 0x20, 0x28, 0x6e, 0x75, 0x6d, 0x20, - 0x3e, 0x3d, 0x20, 0x31, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x20, 0x3d, 0x20, 0x6e, 0x75, 0x6d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x53, 0x74, 0x65, 0x70, 0x49, 0x6e, 0x74, 0x6f, 0x28, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x29, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x66, - 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x72, - 0x65, 0x73, 0x70, 0x29, 0x20, 0x7b, 0x0a, 0x7d, 0x0a -}; -static const unsigned int scripts_step_qs_len = 597; - -static const unsigned char scripts_eval_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x65, 0x76, 0x61, 0x6c, - 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x3d, 0x20, - 0x22, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x3b, 0x0a, 0x0a, - 0x73, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x45, 0x76, 0x61, 0x6c, - 0x75, 0x61, 0x74, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x22, 0x3b, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x22, - 0x3b, 0x0a, 0x0a, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x5b, 0x20, 0x22, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x66, 0x75, - 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, - 0x66, 0x20, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, 0x3d, 0x20, 0x30, - 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x4d, 0x69, 0x73, - 0x73, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x20, 0x28, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x29, 0x2e, - 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x74, 0x45, 0x76, 0x61, - 0x6c, 0x75, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, - 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, - 0x28, 0x67, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, - 0x72, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x28, 0x29, 0x2c, - 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5b, 0x30, - 0x5d, 0x2c, 0x20, 0x22, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x20, - 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x28, 0x22, 0x20, 0x2b, 0x20, 0x44, - 0x61, 0x74, 0x65, 0x28, 0x29, 0x20, 0x2b, 0x20, 0x22, 0x29, 0x22, 0x29, - 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x72, 0x65, 0x73, 0x70, 0x2c, 0x20, - 0x69, 0x64, 0x29, 0x20, 0x7b, 0x0a, 0x7d, 0x0a -}; -static const unsigned int scripts_eval_qs_len = 416; - -static const unsigned char scripts_enable_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, - 0x3d, 0x20, 0x22, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x22, 0x3b, 0x0a, 0x0a, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, - 0x20, 0x22, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x62, 0x72, 0x65, - 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x28, 0x73, 0x29, 0x22, 0x3b, - 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x20, 0x3c, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x2d, 0x69, 0x64, 0x3e, 0x20, 0x3a, 0x20, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x72, 0x65, - 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x69, - 0x64, 0x2e, 0x22, 0x3b, 0x0a, 0x0a, 0x73, 0x65, 0x65, 0x41, 0x6c, 0x73, - 0x6f, 0x20, 0x3d, 0x20, 0x5b, 0x20, 0x22, 0x64, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, - 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x29, 0x20, - 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, - 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x61, 0x6c, 0x6c, 0x20, - 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x47, - 0x65, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x28, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, - 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x69, 0x64, 0x20, 0x3d, 0x20, 0x70, - 0x61, 0x72, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x28, 0x61, 0x72, 0x67, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5b, 0x30, 0x5d, 0x29, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x69, - 0x73, 0x4e, 0x61, 0x4e, 0x28, 0x69, 0x64, 0x29, 0x29, 0x20, 0x7b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x42, 0x72, 0x65, - 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x69, 0x64, 0x20, 0x65, - 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x2e, 0x22, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x47, 0x65, - 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x44, - 0x61, 0x74, 0x61, 0x28, 0x69, 0x64, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x49, 0x64, 0x20, 0x3d, 0x20, 0x69, 0x64, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, - 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x72, 0x65, 0x73, 0x70, 0x29, 0x20, 0x7b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x29, 0x20, 0x7b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x62, - 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x3d, - 0x20, 0x72, 0x65, 0x73, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, - 0x20, 0x28, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, - 0x65, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, - 0x28, 0x76, 0x61, 0x72, 0x20, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x62, - 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x29, 0x20, - 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x3d, - 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x5b, 0x69, 0x64, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x21, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x29, - 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x74, 0x72, - 0x75, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x28, 0x69, 0x64, - 0x2c, 0x20, 0x64, 0x61, 0x74, 0x61, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, - 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, - 0x73, 0x65, 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x20, 0x3d, 0x3d, 0x20, 0x32, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, - 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, - 0x73, 0x65, 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x20, 0x3d, 0x3d, 0x20, 0x33, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x64, 0x61, 0x74, - 0x61, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x73, 0x70, 0x2e, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x69, 0x66, 0x20, 0x28, 0x64, 0x61, 0x74, 0x61, 0x20, 0x3d, 0x3d, - 0x20, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x29, 0x20, - 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x4e, - 0x6f, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x22, 0x20, 0x2b, 0x20, - 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x64, - 0x20, 0x2b, 0x20, 0x22, 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, - 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20, 0x28, - 0x21, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x53, 0x65, - 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x44, - 0x61, 0x74, 0x61, 0x28, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x49, 0x64, 0x2c, 0x20, 0x64, 0x61, 0x74, 0x61, 0x29, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20, - 0x28, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x34, 0x29, - 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x7d, 0x0a, 0x7d, 0x0a -}; -static const unsigned int scripts_enable_qs_len = 1434; - -static const unsigned char scripts_backtrace_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x62, 0x61, 0x63, 0x6b, - 0x74, 0x72, 0x61, 0x63, 0x65, 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x20, 0x3d, 0x20, 0x22, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x22, - 0x3b, 0x0a, 0x0a, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x50, - 0x72, 0x69, 0x6e, 0x74, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x20, - 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x0a, 0x6c, 0x6f, - 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x22, 0x3b, 0x0a, 0x0a, 0x61, 0x6c, 0x69, - 0x61, 0x73, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x5b, 0x20, 0x22, 0x62, 0x74, - 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x73, 0x65, 0x65, 0x41, 0x6c, 0x73, - 0x6f, 0x20, 0x3d, 0x20, 0x5b, 0x20, 0x22, 0x66, 0x72, 0x61, 0x6d, 0x65, - 0x22, 0x2c, 0x20, 0x22, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x20, 0x5d, 0x3b, - 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x47, - 0x65, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x28, - 0x29, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x72, 0x65, 0x73, 0x70, 0x29, - 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x73, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x73, - 0x70, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x6d, 0x73, 0x67, 0x20, 0x3d, 0x20, - 0x22, 0x22, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, - 0x28, 0x76, 0x61, 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x20, - 0x69, 0x20, 0x3c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x2e, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x20, 0x2b, 0x2b, 0x69, 0x29, - 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, - 0x66, 0x20, 0x28, 0x69, 0x20, 0x3e, 0x20, 0x30, 0x29, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x73, - 0x67, 0x20, 0x2b, 0x3d, 0x20, 0x22, 0x5c, 0x6e, 0x22, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x73, 0x67, 0x20, 0x2b, - 0x3d, 0x20, 0x22, 0x23, 0x22, 0x20, 0x2b, 0x20, 0x69, 0x20, 0x2b, 0x20, - 0x22, 0x20, 0x20, 0x22, 0x20, 0x2b, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x73, 0x5b, 0x69, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x28, 0x6d, 0x73, 0x67, 0x29, 0x3b, 0x0a, 0x7d, 0x0a -}; -static const unsigned int scripts_backtrace_qs_len = 465; - -static const unsigned char scripts_ignore_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x69, 0x67, 0x6e, 0x6f, - 0x72, 0x65, 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, - 0x3d, 0x20, 0x22, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x22, 0x3b, 0x0a, 0x0a, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, - 0x20, 0x22, 0x53, 0x65, 0x74, 0x20, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, - 0x2d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, - 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0x3b, - 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x69, 0x67, 0x6e, - 0x6f, 0x72, 0x65, 0x20, 0x3c, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x2d, 0x69, 0x64, 0x3e, 0x20, 0x3c, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x3e, 0x20, 0x3a, 0x20, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, - 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x69, 0x64, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x6e, 0x65, 0x78, 0x74, 0x20, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x20, 0x69, 0x74, 0x20, 0x69, - 0x73, 0x20, 0x68, 0x69, 0x74, 0x2e, 0x22, 0x3b, 0x0a, 0x0a, 0x73, 0x65, - 0x65, 0x41, 0x6c, 0x73, 0x6f, 0x20, 0x3d, 0x20, 0x5b, 0x20, 0x22, 0x63, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x5d, 0x3b, - 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, - 0x3c, 0x20, 0x31, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, - 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x72, 0x67, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x28, 0x62, 0x72, 0x65, 0x61, 0x6b, - 0x70, 0x6f, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x2d, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x29, 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, - 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3c, 0x20, - 0x32, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x4d, 0x69, - 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x20, 0x28, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x2d, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x29, 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x76, 0x61, 0x72, 0x20, 0x69, 0x64, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, - 0x73, 0x65, 0x49, 0x6e, 0x74, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x5b, 0x30, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x69, 0x66, 0x20, 0x28, 0x69, 0x73, 0x4e, 0x61, 0x4e, 0x28, 0x69, - 0x64, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x46, - 0x69, 0x72, 0x73, 0x74, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x20, 0x28, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x20, 0x69, 0x64, 0x29, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, - 0x65, 0x20, 0x61, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x22, - 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x49, 0x6e, - 0x74, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5b, - 0x31, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, - 0x28, 0x69, 0x73, 0x4e, 0x61, 0x4e, 0x28, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x53, 0x65, - 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x20, 0x28, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x2d, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x29, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, - 0x20, 0x61, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x22, 0x29, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, - 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, - 0x47, 0x65, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x44, 0x61, 0x74, 0x61, 0x28, 0x69, 0x64, 0x29, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x49, 0x64, 0x20, 0x3d, 0x20, 0x69, 0x64, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, - 0x3c, 0x20, 0x30, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, - 0x20, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x72, 0x65, 0x73, 0x70, 0x29, - 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x29, 0x20, 0x7b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, - 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x73, 0x70, - 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x64, 0x61, 0x74, - 0x61, 0x20, 0x3d, 0x3d, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, - 0x65, 0x64, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x28, 0x22, 0x4e, 0x6f, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, - 0x22, 0x20, 0x2b, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x49, 0x64, 0x20, 0x2b, 0x20, 0x22, 0x2e, 0x22, 0x29, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x67, 0x6e, 0x6f, - 0x72, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x69, 0x67, - 0x6e, 0x6f, 0x72, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x28, 0x62, 0x72, 0x65, - 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x64, 0x2c, 0x20, 0x64, - 0x61, 0x74, 0x61, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x32, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, - 0x69, 0x66, 0x20, 0x28, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, - 0x20, 0x32, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x42, - 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x22, 0x20, - 0x2b, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x49, 0x64, 0x20, 0x2b, 0x20, 0x22, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, - 0x62, 0x65, 0x20, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x6e, 0x65, 0x78, 0x74, 0x20, 0x22, 0x20, 0x2b, 0x20, - 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x20, - 0x2b, 0x20, 0x22, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x28, 0x73, 0x29, 0x2e, - 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x7d, 0x0a -}; -static const unsigned int scripts_ignore_qs_len = 1428; - -static const unsigned char scripts_down_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x64, 0x6f, 0x77, 0x6e, - 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x3d, 0x20, - 0x22, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x22, 0x3b, 0x0a, 0x0a, 0x73, 0x68, - 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x20, 0x66, 0x72, 0x61, - 0x6d, 0x65, 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x77, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x6e, 0x65, - 0x22, 0x3b, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x22, - 0x3b, 0x0a, 0x0a, 0x73, 0x65, 0x65, 0x41, 0x6c, 0x73, 0x6f, 0x20, 0x3d, - 0x20, 0x5b, 0x20, 0x22, 0x75, 0x70, 0x22, 0x2c, 0x20, 0x22, 0x66, 0x72, - 0x61, 0x6d, 0x65, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x66, 0x75, 0x6e, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x65, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, - 0x72, 0x20, 0x69, 0x64, 0x78, 0x20, 0x3d, 0x20, 0x67, 0x65, 0x74, 0x43, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x28, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x69, 0x66, 0x20, 0x28, 0x69, 0x64, 0x78, 0x20, 0x3d, 0x3d, 0x20, 0x30, - 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x28, 0x22, 0x41, 0x6c, 0x72, - 0x65, 0x61, 0x64, 0x79, 0x20, 0x61, 0x74, 0x20, 0x62, 0x6f, 0x74, 0x74, - 0x6f, 0x6d, 0x20, 0x28, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x6d, 0x6f, 0x73, - 0x74, 0x29, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x2e, 0x22, 0x29, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, - 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x73, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x28, - 0x69, 0x64, 0x78, 0x20, 0x2d, 0x20, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x47, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x6e, 0x66, 0x6f, - 0x28, 0x69, 0x64, 0x78, 0x20, 0x2d, 0x20, 0x31, 0x29, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x31, - 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x72, 0x65, 0x73, 0x70, 0x2c, 0x20, 0x69, - 0x64, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, - 0x28, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x29, - 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, - 0x61, 0x72, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x3d, 0x20, 0x72, 0x65, - 0x73, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x74, 0x43, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x49, - 0x64, 0x28, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x49, 0x64, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x73, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x4c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x28, 0x69, - 0x6e, 0x66, 0x6f, 0x2e, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x47, 0x65, 0x74, - 0x42, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x28, 0x29, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x32, 0x29, 0x20, 0x7b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, - 0x20, 0x62, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x20, 0x3d, - 0x20, 0x72, 0x65, 0x73, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x23, 0x22, 0x20, 0x2b, 0x20, - 0x67, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x72, - 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x28, 0x29, 0x20, 0x2b, - 0x20, 0x22, 0x20, 0x20, 0x22, 0x20, 0x2b, 0x20, 0x62, 0x61, 0x63, 0x6b, - 0x74, 0x72, 0x61, 0x63, 0x65, 0x5b, 0x67, 0x65, 0x74, 0x43, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x28, 0x29, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x7d, 0x0a, 0x7d, 0x0a -}; -static const unsigned int scripts_down_qs_len = 808; - -static const unsigned char scripts_up_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x75, 0x70, 0x22, 0x3b, - 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x3d, 0x20, 0x22, 0x73, - 0x74, 0x61, 0x63, 0x6b, 0x22, 0x3b, 0x0a, 0x0a, 0x73, 0x68, 0x6f, 0x72, - 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x20, 0x3d, 0x20, 0x22, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x20, 0x61, - 0x6e, 0x64, 0x20, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, - 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x6e, 0x65, 0x22, 0x3b, - 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x22, 0x3b, 0x0a, - 0x0a, 0x73, 0x65, 0x65, 0x41, 0x6c, 0x73, 0x6f, 0x20, 0x3d, 0x20, 0x5b, - 0x20, 0x22, 0x64, 0x6f, 0x77, 0x6e, 0x22, 0x2c, 0x20, 0x22, 0x66, 0x72, - 0x61, 0x6d, 0x65, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x66, 0x75, 0x6e, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x65, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x28, 0x29, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, - 0x20, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x72, 0x65, 0x73, 0x70, 0x29, - 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x29, 0x20, 0x7b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, - 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x73, - 0x70, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x69, 0x64, - 0x78, 0x20, 0x3d, 0x20, 0x67, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x28, 0x29, 0x20, 0x2b, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x69, 0x64, 0x78, 0x20, - 0x3d, 0x3d, 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x29, 0x20, 0x7b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x28, 0x22, 0x41, 0x6c, 0x72, - 0x65, 0x61, 0x64, 0x79, 0x20, 0x61, 0x74, 0x20, 0x74, 0x6f, 0x70, 0x20, - 0x28, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x6d, 0x6f, 0x73, 0x74, 0x29, 0x20, - 0x66, 0x72, 0x61, 0x6d, 0x65, 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, - 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x73, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x72, - 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x28, 0x69, 0x64, 0x78, - 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, - 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x28, 0x69, 0x64, - 0x78, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, - 0x20, 0x28, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x32, - 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x76, 0x61, 0x72, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x3d, 0x20, 0x72, - 0x65, 0x73, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x74, 0x43, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x49, 0x64, 0x28, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x49, 0x64, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x73, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x28, - 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x47, 0x65, - 0x74, 0x42, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x28, 0x29, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20, 0x28, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x33, 0x29, 0x20, - 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, - 0x72, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x20, - 0x3d, 0x20, 0x72, 0x65, 0x73, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x23, 0x22, 0x20, 0x2b, - 0x20, 0x67, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, - 0x72, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x28, 0x29, 0x20, - 0x2b, 0x20, 0x22, 0x20, 0x20, 0x22, 0x20, 0x2b, 0x20, 0x62, 0x61, 0x63, - 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5b, 0x67, 0x65, 0x74, 0x43, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x28, 0x29, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x7d, 0x0a, 0x7d, 0x0a -}; -static const unsigned int scripts_up_qs_len = 941; - -static const unsigned char scripts_info_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x69, 0x6e, 0x66, 0x6f, - 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x3d, 0x20, - 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3b, 0x0a, 0x0a, 0x73, - 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x44, 0x69, 0x73, 0x70, 0x6c, - 0x61, 0x79, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x73, 0x6f, 0x6d, - 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x3b, 0x0a, 0x0a, 0x6c, 0x6f, - 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x73, 0x20, 0x3a, 0x20, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, - 0x20, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x65, 0x62, 0x75, 0x67, - 0x67, 0x65, 0x64, 0x22, 0x3b, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x2b, 0x3d, - 0x20, 0x22, 0x5c, 0x6e, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x62, 0x72, 0x65, - 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x3a, 0x20, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x62, 0x72, 0x65, - 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x20, 0x73, 0x65, 0x74, 0x22, 0x3b, - 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x2b, 0x3d, 0x20, 0x22, 0x5c, 0x6e, 0x69, - 0x6e, 0x66, 0x6f, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x73, 0x20, 0x3a, - 0x20, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x76, 0x61, 0x72, 0x69, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x20, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x20, 0x66, 0x72, - 0x61, 0x6d, 0x65, 0x22, 0x3b, 0x0a, 0x0a, 0x61, 0x72, 0x67, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x5b, - 0x20, 0x22, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x2d, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x73, - 0x75, 0x62, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x3d, - 0x20, 0x5b, 0x20, 0x22, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x73, 0x22, 0x2c, 0x20, 0x22, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x73, 0x22, 0x2c, 0x20, 0x22, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, - 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x28, 0x29, - 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x61, - 0x72, 0x67, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, - 0x66, 0x20, 0x28, 0x61, 0x72, 0x67, 0x20, 0x3d, 0x3d, 0x20, 0x75, 0x6e, - 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x29, 0x20, 0x7b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x28, 0x22, 0x5c, 0x22, 0x69, 0x6e, 0x66, 0x6f, 0x5c, 0x22, - 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x66, 0x6f, 0x6c, - 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, - 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20, 0x28, - 0x61, 0x72, 0x67, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x73, 0x22, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, - 0x47, 0x65, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x28, 0x29, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20, 0x28, - 0x61, 0x72, 0x67, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x62, 0x72, 0x65, 0x61, - 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x29, 0x20, 0x7b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, - 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3e, 0x20, 0x31, 0x29, 0x20, 0x7b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x76, 0x61, 0x72, 0x20, 0x69, 0x64, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, - 0x73, 0x65, 0x49, 0x6e, 0x74, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x5b, 0x31, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, - 0x28, 0x69, 0x73, 0x4e, 0x61, 0x4e, 0x28, 0x69, 0x64, 0x29, 0x29, 0x20, - 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x28, 0x22, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x20, 0x69, 0x64, 0x20, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, - 0x64, 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, - 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x28, 0x69, 0x64, - 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x49, 0x64, 0x20, 0x3d, 0x20, 0x69, 0x64, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, - 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x47, 0x65, - 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x28, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, - 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, - 0x69, 0x66, 0x20, 0x28, 0x61, 0x72, 0x67, 0x20, 0x3d, 0x3d, 0x20, 0x22, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x73, 0x22, 0x29, 0x20, 0x7b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x28, 0x67, - 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x72, 0x61, - 0x6d, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x28, 0x29, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, - 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x28, - 0x22, 0x55, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x69, - 0x6e, 0x66, 0x6f, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x20, - 0x5c, 0x22, 0x22, 0x20, 0x2b, 0x20, 0x61, 0x72, 0x67, 0x20, 0x2b, 0x20, - 0x22, 0x5c, 0x22, 0x2e, 0x20, 0x54, 0x72, 0x79, 0x20, 0x5c, 0x22, 0x68, - 0x65, 0x6c, 0x70, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x5c, 0x22, 0x2e, 0x22, - 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x7d, 0x0a, 0x0a, - 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x62, 0x72, 0x65, - 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x28, 0x69, 0x64, 0x2c, 0x20, 0x64, 0x61, 0x74, 0x61, 0x29, 0x20, - 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x66, 0x6e, - 0x20, 0x3d, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x66, 0x69, 0x6c, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, - 0x20, 0x28, 0x66, 0x6e, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, - 0x3d, 0x3d, 0x20, 0x30, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x66, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x3c, 0x61, 0x6e, 0x6f, - 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x2c, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x20, 0x2b, 0x20, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x49, 0x64, 0x20, - 0x2b, 0x20, 0x22, 0x3e, 0x22, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, - 0x61, 0x72, 0x20, 0x72, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x69, 0x64, 0x20, - 0x2b, 0x20, 0x22, 0x5c, 0x74, 0x22, 0x20, 0x2b, 0x20, 0x28, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x20, 0x3f, - 0x20, 0x22, 0x79, 0x65, 0x73, 0x22, 0x20, 0x3a, 0x20, 0x22, 0x6e, 0x6f, - 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2b, - 0x20, 0x22, 0x5c, 0x74, 0x22, 0x20, 0x2b, 0x20, 0x66, 0x6e, 0x20, 0x2b, - 0x20, 0x22, 0x3a, 0x22, 0x20, 0x2b, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x21, 0x3d, 0x20, 0x30, 0x29, 0x20, - 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, - 0x74, 0x20, 0x2b, 0x3d, 0x20, 0x22, 0x5c, 0x6e, 0x5c, 0x74, 0x73, 0x74, - 0x6f, 0x70, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x69, 0x66, 0x20, 0x22, - 0x20, 0x2b, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, - 0x72, 0x65, 0x74, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x72, 0x65, 0x73, 0x70, - 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x29, 0x20, - 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, - 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, - 0x72, 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x20, 0x3d, 0x20, - 0x72, 0x65, 0x73, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, - 0x28, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x20, 0x3d, 0x3d, 0x20, - 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x29, 0x20, 0x7b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x4e, 0x6f, - 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x20, 0x6c, 0x6f, 0x61, - 0x64, 0x65, 0x64, 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, - 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, - 0x72, 0x20, 0x28, 0x76, 0x61, 0x72, 0x20, 0x69, 0x64, 0x20, 0x69, 0x6e, - 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x29, 0x20, 0x7b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x76, 0x61, 0x72, 0x20, 0x66, 0x6e, 0x20, 0x3d, 0x20, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x73, 0x5b, 0x69, 0x64, 0x5d, 0x2e, 0x66, 0x69, 0x6c, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x66, - 0x6e, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, 0x3d, 0x20, - 0x30, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6e, 0x20, 0x3d, 0x20, - 0x22, 0x3c, 0x61, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x20, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2c, 0x20, 0x69, 0x64, 0x3d, 0x22, - 0x20, 0x2b, 0x20, 0x69, 0x64, 0x20, 0x2b, 0x20, 0x22, 0x3e, 0x22, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x5c, 0x74, - 0x22, 0x20, 0x2b, 0x20, 0x66, 0x6e, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, - 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, - 0x66, 0x20, 0x28, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, - 0x32, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x62, 0x72, 0x65, - 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x62, 0x72, 0x65, - 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x3d, 0x20, 0x72, - 0x65, 0x73, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, - 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, - 0x3d, 0x3d, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, - 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, - 0x22, 0x4e, 0x6f, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x73, 0x20, 0x73, 0x65, 0x74, 0x2e, 0x22, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x49, - 0x64, 0x5c, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5c, 0x74, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x76, 0x61, - 0x72, 0x20, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x72, 0x65, 0x61, - 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x29, 0x20, 0x7b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, - 0x61, 0x72, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x3d, 0x20, 0x62, 0x72, - 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x5b, 0x69, 0x64, - 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x62, - 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x28, 0x69, 0x64, 0x2c, 0x20, 0x64, 0x61, 0x74, 0x61, - 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, - 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, - 0x3d, 0x20, 0x33, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x62, - 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x4e, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, - 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x73, 0x70, - 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x64, 0x61, 0x74, - 0x61, 0x20, 0x3d, 0x3d, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, - 0x65, 0x64, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x28, 0x22, 0x4e, 0x6f, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, - 0x22, 0x20, 0x2b, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x49, 0x64, 0x20, 0x2b, 0x20, 0x22, 0x2e, 0x22, 0x29, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, - 0x49, 0x64, 0x5c, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5c, - 0x74, 0x57, 0x68, 0x65, 0x72, 0x65, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x28, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x62, 0x72, 0x65, 0x61, 0x6b, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x64, 0x2c, 0x20, 0x64, 0x61, 0x74, - 0x61, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20, - 0x28, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x34, 0x29, - 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, - 0x2f, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, - 0x72, 0x20, 0x61, 0x63, 0x74, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x73, 0x70, - 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x4e, 0x65, 0x77, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x28, - 0x61, 0x63, 0x74, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x35, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, - 0x69, 0x66, 0x20, 0x28, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, - 0x20, 0x35, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x69, 0x64, 0x20, 0x3d, 0x20, 0x72, - 0x65, 0x73, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x69, 0x65, 0x73, 0x42, 0x79, 0x49, 0x74, 0x65, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x28, 0x69, 0x64, 0x2c, 0x20, 0x31, 0x30, 0x30, 0x29, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x74, - 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x20, 0x3d, 0x20, 0x69, - 0x64, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x36, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20, - 0x28, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x36, 0x29, - 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, - 0x61, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x73, 0x20, 0x3d, 0x20, 0x72, - 0x65, 0x73, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, - 0x70, 0x72, 0x6f, 0x70, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x74, - 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x28, 0x69, 0x74, 0x65, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x49, 0x64, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x20, 0x3d, 0x20, 0x37, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, - 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, - 0x20, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, - 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x66, 0x6f, 0x72, 0x20, 0x28, 0x76, 0x61, 0x72, 0x20, 0x69, 0x20, 0x3d, - 0x20, 0x30, 0x3b, 0x20, 0x69, 0x20, 0x3c, 0x20, 0x70, 0x72, 0x6f, 0x70, - 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x20, 0x2b, 0x2b, - 0x69, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x20, 0x3d, 0x20, 0x4d, 0x61, 0x74, 0x68, 0x2e, 0x6d, 0x61, 0x78, 0x28, - 0x70, 0x72, 0x6f, 0x70, 0x73, 0x5b, 0x69, 0x5d, 0x2e, 0x6e, 0x61, 0x6d, - 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2c, 0x20, 0x6d, 0x61, - 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x29, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x76, - 0x61, 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x20, 0x69, 0x20, - 0x3c, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x3b, 0x20, 0x2b, 0x2b, 0x69, 0x29, 0x20, 0x7b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, - 0x61, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x20, 0x3d, 0x20, 0x70, 0x72, - 0x6f, 0x70, 0x73, 0x5b, 0x69, 0x5d, 0x3b, 0x20, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, - 0x20, 0x6d, 0x73, 0x67, 0x20, 0x3d, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x2e, - 0x6e, 0x61, 0x6d, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x70, 0x61, - 0x64, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x20, 0x2d, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x2e, 0x6e, 0x61, 0x6d, - 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, - 0x72, 0x20, 0x28, 0x76, 0x61, 0x72, 0x20, 0x6a, 0x20, 0x3d, 0x20, 0x30, - 0x3b, 0x20, 0x6a, 0x20, 0x3c, 0x20, 0x70, 0x61, 0x64, 0x3b, 0x20, 0x2b, - 0x2b, 0x6a, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x73, 0x67, 0x20, - 0x2b, 0x3d, 0x20, 0x27, 0x20, 0x27, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x28, 0x6d, 0x73, 0x67, 0x20, 0x2b, 0x20, 0x22, 0x20, - 0x3a, 0x20, 0x22, 0x20, 0x2b, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x2e, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x41, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x42, 0x79, 0x49, 0x74, 0x65, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x28, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x49, 0x64, 0x2c, 0x20, 0x31, 0x30, 0x30, 0x29, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, - 0x20, 0x28, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x37, - 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x2f, 0x2f, 0x20, 0x64, 0x6f, 0x6e, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x7d, 0x0a, 0x7d, 0x0a -}; -static const unsigned int scripts_info_qs_len = 3880; - -static const unsigned char scripts_print_qs[] = { - 0x2f, 0x2f, 0x20, 0x23, 0x23, 0x23, 0x20, 0x65, 0x78, 0x61, 0x63, 0x74, - 0x6c, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, - 0x61, 0x73, 0x20, 0x65, 0x76, 0x61, 0x6c, 0x2c, 0x20, 0x62, 0x75, 0x74, - 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x66, 0x6f, - 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x6e, 0x69, 0x65, 0x6e, 0x63, - 0x65, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x70, - 0x72, 0x69, 0x6e, 0x74, 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x20, 0x3d, 0x20, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, - 0x3b, 0x0a, 0x0a, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x50, - 0x72, 0x69, 0x6e, 0x74, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6f, - 0x66, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, - 0x20, 0x22, 0x22, 0x3b, 0x0a, 0x0a, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x5b, 0x20, - 0x22, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x20, 0x5d, 0x3b, 0x0a, - 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, - 0x3d, 0x20, 0x30, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, - 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x72, 0x67, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x28, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x29, 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x73, 0x65, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x45, 0x76, - 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x28, 0x67, 0x65, 0x74, 0x43, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x28, 0x29, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x5b, 0x30, 0x5d, 0x2c, 0x20, 0x22, 0x63, 0x6f, - 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x20, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, - 0x28, 0x22, 0x20, 0x2b, 0x20, 0x44, 0x61, 0x74, 0x65, 0x28, 0x29, 0x20, - 0x2b, 0x20, 0x22, 0x29, 0x22, 0x29, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, - 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x6e, - 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, - 0x72, 0x65, 0x73, 0x70, 0x2c, 0x20, 0x69, 0x64, 0x29, 0x20, 0x7b, 0x0a, - 0x7d, 0x0a -}; -static const unsigned int scripts_print_qs_len = 494; - -static const unsigned char scripts_finish_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x66, 0x69, 0x6e, 0x69, - 0x73, 0x68, 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, - 0x3d, 0x20, 0x22, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x3b, - 0x0a, 0x0a, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x20, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x20, - 0x73, 0x74, 0x61, 0x63, 0x6b, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x20, - 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x22, 0x3b, 0x0a, 0x0a, 0x6c, - 0x6f, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x55, 0x70, 0x6f, 0x6e, 0x20, 0x72, - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, - 0x64, 0x20, 0x69, 0x73, 0x20, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x64, - 0x2e, 0x22, 0x3b, 0x0a, 0x0a, 0x73, 0x65, 0x65, 0x41, 0x6c, 0x73, 0x6f, - 0x20, 0x3d, 0x20, 0x5b, 0x20, 0x22, 0x6e, 0x65, 0x78, 0x74, 0x22, 0x2c, - 0x20, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x22, 0x20, - 0x5d, 0x3b, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x28, 0x29, 0x20, 0x7b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x75, 0x74, 0x28, 0x29, 0x3b, 0x0a, - 0x7d, 0x3b, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x28, 0x72, 0x65, 0x73, 0x70, 0x29, 0x20, 0x7b, 0x0a, - 0x7d, 0x0a -}; -static const unsigned int scripts_finish_qs_len = 290; - -static const unsigned char scripts_break_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x62, 0x72, 0x65, 0x61, - 0x6b, 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x3d, - 0x20, 0x22, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x22, 0x3b, 0x0a, 0x0a, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, - 0x22, 0x53, 0x65, 0x74, 0x20, 0x61, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x61, 0x74, 0x20, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, - 0x20, 0x22, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x20, 0x3c, 0x66, 0x69, 0x6c, - 0x65, 0x3e, 0x3a, 0x3c, 0x6c, 0x69, 0x6e, 0x65, 0x3e, 0x20, 0x3a, 0x20, - 0x53, 0x65, 0x74, 0x73, 0x20, 0x61, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x22, 0x3b, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x2b, - 0x3d, 0x20, 0x22, 0x5c, 0x6e, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x20, 0x3c, - 0x6c, 0x69, 0x6e, 0x65, 0x3e, 0x20, 0x3a, 0x20, 0x53, 0x65, 0x74, 0x73, - 0x20, 0x61, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x20, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x69, 0x76, - 0x65, 0x6e, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x66, - 0x69, 0x6c, 0x65, 0x2e, 0x22, 0x3b, 0x0a, 0x0a, 0x61, 0x72, 0x67, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x20, 0x3d, 0x20, - 0x5b, 0x20, 0x22, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2d, 0x66, 0x69, - 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, - 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x5b, 0x20, - 0x22, 0x62, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x73, 0x65, 0x65, 0x41, - 0x6c, 0x73, 0x6f, 0x20, 0x3d, 0x20, 0x5b, 0x20, 0x22, 0x63, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0x20, 0x22, 0x64, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x22, 0x2c, 0x20, 0x22, 0x64, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x22, 0x2c, 0x20, 0x22, 0x74, 0x62, 0x72, 0x65, 0x61, - 0x6b, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x28, - 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, - 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x7b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, - 0x67, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x22, - 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x61, 0x72, 0x67, - 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, - 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x20, - 0x3d, 0x20, 0x61, 0x72, 0x67, 0x2e, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x4f, 0x66, 0x28, 0x27, 0x3a, 0x27, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x63, 0x6f, 0x6c, 0x6f, - 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x3d, 0x20, 0x2d, 0x31, - 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x3d, - 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x28, 0x61, 0x72, - 0x67, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x69, 0x66, 0x20, 0x28, 0x69, 0x73, 0x4e, 0x61, 0x4e, 0x28, 0x6c, 0x69, - 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x29, 0x29, 0x20, 0x7b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x42, 0x72, - 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x6c, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, - 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x72, - 0x6d, 0x20, 0x3c, 0x66, 0x69, 0x6c, 0x65, 0x3e, 0x3a, 0x3c, 0x6c, 0x69, - 0x6e, 0x65, 0x3e, 0x20, 0x6f, 0x72, 0x20, 0x3c, 0x6c, 0x69, 0x6e, 0x65, - 0x3e, 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, - 0x73, 0x69, 0x64, 0x20, 0x3d, 0x20, 0x67, 0x65, 0x74, 0x43, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x49, 0x64, - 0x28, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x69, 0x66, 0x20, 0x28, 0x73, 0x69, 0x64, 0x20, 0x3d, 0x3d, 0x20, 0x2d, - 0x31, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x28, 0x22, 0x4e, 0x6f, 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2e, - 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x47, 0x65, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x44, - 0x61, 0x74, 0x61, 0x28, 0x73, 0x69, 0x64, 0x29, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x49, 0x64, 0x20, 0x3d, 0x20, 0x73, 0x69, 0x64, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, - 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, - 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x20, 0x3d, - 0x20, 0x61, 0x72, 0x67, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x28, 0x30, - 0x2c, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, - 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x3d, 0x20, - 0x70, 0x61, 0x72, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x28, 0x61, 0x72, 0x67, - 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x28, 0x63, 0x6f, 0x6c, 0x6f, 0x6e, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2b, 0x31, 0x29, 0x29, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x23, 0x23, - 0x23, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x74, 0x6f, 0x20, - 0x73, 0x65, 0x65, 0x20, 0x69, 0x66, 0x20, 0x69, 0x74, 0x27, 0x73, 0x20, - 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x6e, 0x6f, - 0x74, 0x3f, 0x20, 0x28, 0x65, 0x2e, 0x67, 0x2e, 0x20, 0x73, 0x6f, 0x20, - 0x77, 0x65, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x69, 0x73, 0x73, 0x75, 0x65, - 0x20, 0x61, 0x20, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x29, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x28, 0x7b, 0x20, 0x66, 0x69, 0x6c, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x2c, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x3a, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x7d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x32, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x7d, 0x0a, 0x0a, 0x66, 0x75, - 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x72, 0x65, - 0x73, 0x70, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, - 0x20, 0x28, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x31, - 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x72, - 0x65, 0x73, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x66, - 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x66, 0x69, 0x6c, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x4e, - 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x3c, 0x61, 0x6e, 0x6f, 0x6e, - 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x2c, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x20, 0x2b, 0x20, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x49, 0x64, 0x20, 0x2b, 0x20, 0x22, 0x3e, 0x22, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x42, 0x72, 0x65, 0x61, - 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x28, 0x7b, 0x20, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x49, 0x64, 0x3a, 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x49, 0x64, 0x2c, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x3a, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x7d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x32, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, - 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, - 0x3d, 0x20, 0x32, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x72, 0x65, 0x73, 0x70, 0x2e, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x29, 0x20, - 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x69, 0x64, 0x20, 0x3d, 0x20, 0x72, - 0x65, 0x73, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x42, 0x72, 0x65, - 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x22, 0x20, 0x2b, 0x20, - 0x69, 0x64, 0x20, 0x2b, 0x20, 0x22, 0x3a, 0x20, 0x22, 0x20, 0x2b, 0x20, - 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x20, 0x2b, 0x20, 0x22, - 0x2c, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x22, 0x20, 0x2b, 0x20, 0x6c, - 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x2b, 0x20, - 0x22, 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x7d, 0x0a -}; -static const unsigned int scripts_break_qs_len = 1824; - -static const unsigned char scripts_advance_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x61, 0x64, 0x76, 0x61, - 0x6e, 0x63, 0x65, 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x20, 0x3d, 0x20, 0x22, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x22, - 0x3b, 0x0a, 0x0a, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x43, - 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, - 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x75, 0x70, 0x20, 0x74, - 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, - 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x0a, - 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x54, 0x68, 0x69, 0x73, 0x20, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x20, 0x68, 0x61, 0x73, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x73, 0x79, 0x6e, - 0x74, 0x61, 0x78, 0x20, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x5c, - 0x22, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x5c, 0x22, 0x20, 0x63, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x22, 0x3b, 0x0a, 0x0a, 0x73, 0x65, 0x65, - 0x41, 0x6c, 0x73, 0x6f, 0x20, 0x3d, 0x20, 0x5b, 0x20, 0x22, 0x62, 0x72, - 0x65, 0x61, 0x6b, 0x22, 0x2c, 0x20, 0x22, 0x74, 0x62, 0x72, 0x65, 0x61, - 0x6b, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x61, 0x72, 0x67, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x5b, - 0x20, 0x22, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2d, 0x66, 0x69, 0x6c, - 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x66, - 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x65, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x69, 0x66, 0x20, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, 0x3d, 0x20, - 0x30, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x4d, 0x69, - 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x28, 0x73, 0x29, 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x76, 0x61, 0x72, 0x20, 0x61, 0x72, 0x67, 0x20, 0x3d, 0x20, 0x61, 0x72, - 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x63, 0x6f, 0x6c, 0x6f, - 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, - 0x2e, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, - 0x28, 0x27, 0x3a, 0x27, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, - 0x66, 0x20, 0x28, 0x63, 0x6f, 0x6c, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x20, 0x3d, 0x3d, 0x20, 0x2d, 0x31, 0x29, 0x20, 0x7b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, 0x73, - 0x65, 0x49, 0x6e, 0x74, 0x28, 0x61, 0x72, 0x67, 0x29, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x69, - 0x73, 0x4e, 0x61, 0x4e, 0x28, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x28, 0x22, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6f, 0x66, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x3c, 0x66, - 0x69, 0x6c, 0x65, 0x3e, 0x3a, 0x3c, 0x6c, 0x69, 0x6e, 0x65, 0x3e, 0x20, - 0x6f, 0x72, 0x20, 0x3c, 0x6c, 0x69, 0x6e, 0x65, 0x3e, 0x2e, 0x22, 0x29, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x73, 0x69, 0x64, 0x20, - 0x3d, 0x20, 0x67, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x49, 0x64, 0x28, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, - 0x73, 0x69, 0x64, 0x20, 0x3d, 0x3d, 0x20, 0x2d, 0x31, 0x29, 0x20, 0x7b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x4e, 0x6f, - 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2e, 0x22, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x75, - 0x6e, 0x54, 0x6f, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28, - 0x73, 0x69, 0x64, 0x2c, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, - 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x20, - 0x3d, 0x20, 0x61, 0x72, 0x67, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x28, - 0x30, 0x2c, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x3d, - 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x28, 0x61, 0x72, - 0x67, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x28, 0x63, 0x6f, 0x6c, 0x6f, - 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2b, 0x31, 0x29, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x23, - 0x23, 0x23, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x74, 0x6f, - 0x20, 0x73, 0x65, 0x65, 0x20, 0x69, 0x66, 0x20, 0x69, 0x74, 0x27, 0x73, - 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x6e, - 0x6f, 0x74, 0x3f, 0x20, 0x28, 0x65, 0x2e, 0x67, 0x2e, 0x20, 0x73, 0x6f, - 0x20, 0x77, 0x65, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x69, 0x73, 0x73, 0x75, - 0x65, 0x20, 0x61, 0x20, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x29, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x75, 0x6e, 0x54, 0x6f, 0x4c, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x66, 0x69, 0x6c, 0x65, 0x4e, - 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, - 0x7d, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, - 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x28, 0x72, 0x65, 0x73, 0x70, 0x29, 0x20, 0x7b, 0x0a, 0x7d, - 0x0a -}; -static const unsigned int scripts_advance_qs_len = 1141; - -static const unsigned char scripts_complete_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x63, 0x6f, 0x6d, 0x70, - 0x6c, 0x65, 0x74, 0x65, 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x20, 0x3d, 0x20, 0x22, 0x76, 0x6f, 0x69, 0x64, 0x22, 0x3b, 0x0a, - 0x0a, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x4c, 0x69, 0x73, - 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x72, 0x65, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, 0x3b, 0x0a, 0x0a, 0x6c, - 0x6f, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x22, 0x3b, 0x0a, 0x0a, 0x66, 0x75, - 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, - 0x61, 0x72, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x3d, 0x20, - 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3e, 0x20, 0x30, 0x29, 0x20, 0x3f, - 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5b, 0x30, - 0x5d, 0x20, 0x3a, 0x20, 0x22, 0x22, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x76, 0x61, 0x72, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x20, 0x3d, 0x20, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x28, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x29, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x76, 0x61, - 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x20, 0x69, 0x20, 0x3c, - 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x20, 0x2b, 0x2b, 0x69, - 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5b, 0x69, 0x5d, 0x29, 0x3b, 0x0a, 0x7d, - 0x0a -}; -static const unsigned int scripts_complete_qs_len = 361; - -static const unsigned char scripts_interrupt_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x72, 0x75, 0x70, 0x74, 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x20, 0x3d, 0x20, 0x22, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, - 0x67, 0x22, 0x3b, 0x0a, 0x0a, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, - 0x22, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x20, 0x65, - 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, - 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x72, 0x75, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x69, 0x6c, - 0x6c, 0x20, 0x6f, 0x63, 0x63, 0x75, 0x72, 0x20, 0x61, 0x73, 0x20, 0x73, - 0x6f, 0x6f, 0x6e, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x6e, 0x65, 0x77, - 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x73, 0x20, 0x72, 0x65, 0x61, - 0x63, 0x68, 0x65, 0x64, 0x2e, 0x22, 0x3b, 0x0a, 0x0a, 0x66, 0x75, 0x6e, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x65, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x72, - 0x75, 0x70, 0x74, 0x28, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x66, 0x75, - 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x72, 0x65, - 0x73, 0x70, 0x29, 0x20, 0x7b, 0x0a, 0x7d, 0x0a -}; -static const unsigned int scripts_interrupt_qs_len = 260; - -static const unsigned char scripts_condition_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x63, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x20, 0x3d, 0x20, 0x22, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x3b, 0x0a, 0x0a, 0x73, 0x68, 0x6f, - 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x79, - 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, - 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, - 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x63, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3c, 0x62, 0x72, 0x65, 0x61, 0x6b, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2d, 0x69, 0x64, 0x3e, 0x20, 0x3c, 0x65, - 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x3e, 0x20, 0x3a, - 0x20, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x79, 0x20, 0x74, 0x68, 0x61, - 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x69, 0x64, 0x20, 0x73, - 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x62, - 0x65, 0x20, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x64, 0x20, - 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, - 0x20, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, - 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x73, 0x20, 0x74, 0x6f, - 0x20, 0x74, 0x72, 0x75, 0x65, 0x2e, 0x22, 0x3b, 0x0a, 0x0a, 0x61, 0x72, - 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x20, - 0x3d, 0x20, 0x5b, 0x20, 0x22, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x2d, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x22, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x73, 0x65, - 0x65, 0x41, 0x6c, 0x73, 0x6f, 0x20, 0x3d, 0x20, 0x5b, 0x20, 0x22, 0x69, - 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x66, - 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x65, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x69, 0x66, 0x20, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, 0x3d, 0x20, - 0x30, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x4d, 0x69, - 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x20, 0x28, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x61, - 0x6e, 0x64, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x29, 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, - 0x61, 0x72, 0x67, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x76, 0x61, 0x72, 0x20, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x2e, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x4f, 0x66, 0x28, 0x27, 0x20, 0x27, 0x29, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x3d, 0x20, 0x2d, 0x31, 0x29, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x61, 0x72, - 0x67, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x69, 0x64, 0x20, 0x3d, 0x20, 0x70, - 0x61, 0x72, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x28, 0x61, 0x72, 0x67, 0x2e, - 0x73, 0x6c, 0x69, 0x63, 0x65, 0x28, 0x30, 0x2c, 0x20, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x29, 0x29, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x69, 0x73, 0x4e, 0x61, 0x4e, - 0x28, 0x69, 0x64, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, - 0x22, 0x46, 0x69, 0x72, 0x73, 0x74, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, - 0x61, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x28, 0x62, 0x72, - 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x69, 0x64, 0x29, - 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x63, - 0x6f, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x2e, 0x73, 0x6c, - 0x69, 0x63, 0x65, 0x28, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x2b, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, - 0x66, 0x20, 0x28, 0x28, 0x63, 0x6f, 0x6e, 0x64, 0x2e, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x20, 0x21, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x26, 0x26, - 0x20, 0x21, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x79, 0x6e, 0x74, 0x61, - 0x78, 0x28, 0x63, 0x6f, 0x6e, 0x64, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x28, 0x22, 0x54, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x73, 0x20, 0x61, 0x20, - 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x28, 0x69, 0x64, 0x29, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x64, 0x20, 0x3d, 0x20, 0x69, 0x64, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x31, - 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x72, 0x65, 0x73, 0x70, 0x29, 0x20, 0x7b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x29, 0x20, 0x7b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x64, - 0x61, 0x74, 0x61, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x73, 0x70, 0x2e, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x64, 0x61, 0x74, 0x61, 0x20, - 0x3d, 0x3d, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, - 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, - 0x22, 0x4e, 0x6f, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x22, 0x20, - 0x2b, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x49, 0x64, 0x20, 0x2b, 0x20, 0x22, 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, - 0x42, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x44, 0x61, - 0x74, 0x61, 0x28, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x49, 0x64, 0x2c, 0x20, 0x64, 0x61, 0x74, 0x61, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, - 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x32, 0x29, 0x20, 0x7b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, - 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x29, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x42, 0x72, 0x65, 0x61, - 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x22, 0x20, 0x2b, 0x20, 0x62, - 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x64, 0x20, - 0x2b, 0x20, 0x22, 0x20, 0x6e, 0x6f, 0x77, 0x20, 0x75, 0x6e, 0x63, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2e, 0x22, 0x29, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x7d, 0x0a -}; -static const unsigned int scripts_condition_qs_len = 1522; - -static const unsigned char scripts_delete_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x64, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, - 0x3d, 0x20, 0x22, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x22, 0x3b, 0x0a, 0x0a, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, - 0x20, 0x22, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x62, 0x72, 0x65, - 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x28, 0x73, 0x29, 0x22, 0x3b, - 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x64, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x20, 0x3c, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x2d, 0x69, 0x64, 0x3e, 0x20, 0x3a, 0x20, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x72, - 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x77, 0x69, 0x74, - 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, - 0x69, 0x64, 0x2e, 0x22, 0x3b, 0x0a, 0x0a, 0x73, 0x65, 0x65, 0x41, 0x6c, - 0x73, 0x6f, 0x20, 0x3d, 0x20, 0x5b, 0x20, 0x22, 0x63, 0x6c, 0x65, 0x61, - 0x72, 0x22, 0x2c, 0x20, 0x22, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, - 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x28, 0x29, - 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, - 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x7b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x64, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x62, 0x72, - 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x42, 0x72, 0x65, 0x61, 0x6b, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x28, 0x29, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, - 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, - 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x69, 0x64, 0x20, 0x3d, 0x20, 0x70, - 0x61, 0x72, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x28, 0x61, 0x72, 0x67, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5b, 0x30, 0x5d, 0x29, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x69, - 0x73, 0x4e, 0x61, 0x4e, 0x28, 0x69, 0x64, 0x29, 0x29, 0x20, 0x7b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x42, 0x72, 0x65, - 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x69, 0x64, 0x20, 0x65, - 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x2e, 0x22, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x28, 0x69, 0x64, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x49, 0x64, 0x20, 0x3d, 0x20, 0x69, 0x64, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, - 0x7d, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, - 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x28, 0x72, 0x65, 0x73, 0x70, 0x29, 0x20, 0x7b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20, 0x28, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x32, 0x29, 0x20, - 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, - 0x20, 0x28, 0x72, 0x65, 0x73, 0x70, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x20, 0x21, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x4e, 0x6f, 0x20, 0x62, 0x72, 0x65, - 0x61, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x20, 0x22, 0x20, 0x2b, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x64, 0x20, 0x2b, 0x20, 0x22, 0x2e, - 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x7d, 0x0a, 0x7d, 0x0a -}; -static const unsigned int scripts_delete_qs_len = 822; - -static const unsigned char scripts_list_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x6c, 0x69, 0x73, 0x74, - 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x3d, 0x20, - 0x22, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x0a, 0x73, 0x68, - 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6c, - 0x69, 0x6e, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x22, 0x3b, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, - 0x3d, 0x20, 0x22, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x3c, 0x66, 0x69, 0x6c, - 0x65, 0x3e, 0x3a, 0x3c, 0x6c, 0x69, 0x6e, 0x65, 0x3e, 0x20, 0x3a, 0x20, - 0x4c, 0x69, 0x73, 0x74, 0x73, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x20, - 0x61, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, - 0x69, 0x76, 0x65, 0x6e, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x22, 0x3b, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x2b, 0x3d, 0x20, - 0x22, 0x5c, 0x6e, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x3c, 0x6c, 0x69, 0x6e, - 0x65, 0x3e, 0x20, 0x3a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x20, 0x6c, - 0x69, 0x6e, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, - 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x66, 0x69, 0x6c, 0x65, - 0x2e, 0x22, 0x3b, 0x0a, 0x0a, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x5b, 0x20, 0x22, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2d, 0x66, 0x69, 0x6c, 0x65, 0x6e, - 0x61, 0x6d, 0x65, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x6c, 0x69, 0x73, - 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, - 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x49, 0x64, 0x20, 0x3d, 0x20, 0x2d, 0x31, 0x3b, 0x0a, - 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x20, 0x3d, 0x20, 0x2d, 0x31, 0x3b, 0x0a, 0x6c, 0x61, 0x73, 0x74, - 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, - 0x20, 0x2d, 0x31, 0x3b, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x28, 0x29, - 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, - 0x20, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3e, 0x20, 0x30, 0x29, 0x20, - 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, - 0x72, 0x20, 0x61, 0x72, 0x67, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x63, 0x6f, - 0x6c, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x61, - 0x72, 0x67, 0x2e, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x4f, 0x66, 0x28, 0x27, 0x3a, 0x27, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x66, 0x69, 0x6c, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x63, 0x6f, 0x6c, 0x6f, 0x6e, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x3d, 0x20, 0x2d, 0x31, 0x29, - 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x49, 0x6e, 0x74, - 0x28, 0x61, 0x72, 0x67, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x69, - 0x73, 0x4e, 0x61, 0x4e, 0x28, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x61, - 0x72, 0x67, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x69, 0x6e, 0x65, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, - 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20, 0x28, 0x63, 0x6f, 0x6c, - 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x3d, 0x20, 0x30, - 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, - 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x69, 0x6e, 0x65, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, - 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x2e, 0x73, 0x6c, 0x69, 0x63, - 0x65, 0x28, 0x30, 0x2c, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x6e, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, - 0x49, 0x6e, 0x74, 0x28, 0x61, 0x72, 0x67, 0x2e, 0x73, 0x6c, 0x69, 0x63, - 0x65, 0x28, 0x63, 0x6f, 0x6c, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x2b, 0x31, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x6c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x20, 0x3d, 0x20, 0x4d, 0x61, 0x74, 0x68, 0x2e, 0x6d, 0x61, - 0x78, 0x28, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x2c, 0x20, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x20, 0x21, 0x3d, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, - 0x6e, 0x65, 0x64, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x53, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x28, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, - 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, - 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x74, 0x43, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x28, 0x6c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x6e, - 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x29, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x28, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, - 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x28, 0x67, 0x65, 0x74, - 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x28, 0x29, 0x20, - 0x21, 0x3d, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7c, 0x7c, 0x20, 0x28, 0x67, 0x65, - 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x72, 0x61, 0x6d, - 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x28, 0x29, 0x20, 0x21, 0x3d, 0x20, - 0x6c, 0x61, 0x73, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x7c, 0x7c, 0x20, 0x28, 0x6c, 0x69, 0x73, 0x74, - 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x49, 0x64, 0x20, 0x3d, 0x3d, 0x20, - 0x2d, 0x31, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x53, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x49, 0x64, 0x20, 0x3d, 0x20, 0x67, 0x65, - 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x49, 0x64, 0x28, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x69, 0x73, 0x74, - 0x4c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x3d, - 0x20, 0x67, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4c, - 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x28, 0x29, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x20, 0x3d, 0x20, 0x67, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x28, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x61, 0x73, - 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x20, - 0x3d, 0x20, 0x67, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x28, 0x29, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x44, 0x61, 0x74, 0x61, 0x28, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x49, 0x64, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, - 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x7d, 0x3b, - 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x28, 0x72, 0x65, 0x73, 0x70, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, - 0x3d, 0x3d, 0x20, 0x31, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x69, 0x64, 0x20, 0x3d, - 0x20, 0x72, 0x65, 0x73, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, - 0x20, 0x28, 0x69, 0x64, 0x20, 0x3d, 0x3d, 0x20, 0x2d, 0x31, 0x29, 0x20, - 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x54, - 0x68, 0x61, 0x74, 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x69, - 0x73, 0x6e, 0x27, 0x74, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x2e, - 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, - 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x49, 0x64, 0x20, 0x3d, 0x20, 0x69, 0x64, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x44, 0x61, 0x74, 0x61, 0x28, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x49, 0x64, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, - 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, - 0x73, 0x65, 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x20, 0x3d, 0x3d, 0x20, 0x32, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x64, 0x61, 0x74, - 0x61, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x73, 0x70, 0x2e, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x69, 0x66, 0x20, 0x28, 0x64, 0x61, 0x74, 0x61, 0x20, 0x3d, 0x3d, - 0x20, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x29, 0x20, - 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x4e, - 0x6f, 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2e, 0x22, 0x29, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x62, 0x61, 0x73, 0x65, 0x20, 0x3d, - 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x4c, 0x69, - 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x6c, 0x69, - 0x6e, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x73, 0x70, 0x6c, 0x69, - 0x74, 0x28, 0x27, 0x5c, 0x6e, 0x27, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x20, 0x3d, 0x20, 0x4d, 0x61, 0x74, 0x68, 0x2e, 0x6d, 0x61, - 0x78, 0x28, 0x6c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x20, 0x2d, 0x20, 0x35, 0x2c, 0x20, 0x62, 0x61, - 0x73, 0x65, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x76, 0x61, 0x72, 0x20, 0x69, 0x20, - 0x3d, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x3b, 0x20, 0x69, 0x20, 0x3c, - 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x2b, 0x20, 0x31, 0x30, 0x3b, - 0x20, 0x2b, 0x2b, 0x69, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, - 0x6c, 0x6e, 0x20, 0x3d, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x5b, 0x69, - 0x20, 0x2d, 0x20, 0x62, 0x61, 0x73, 0x65, 0x5d, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, - 0x72, 0x20, 0x6d, 0x73, 0x67, 0x20, 0x3d, 0x20, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x28, 0x69, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6c, - 0x6e, 0x20, 0x21, 0x3d, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, - 0x65, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x73, 0x67, 0x20, - 0x2b, 0x3d, 0x20, 0x22, 0x5c, 0x74, 0x22, 0x20, 0x2b, 0x20, 0x6c, 0x6e, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x6d, 0x73, - 0x67, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x69, - 0x73, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x20, 0x2b, 0x3d, 0x20, 0x31, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, - 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x7d, 0x0a -}; -static const unsigned int scripts_list_qs_len = 2567; - -static const unsigned char scripts_continue_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x63, 0x6f, 0x6e, 0x74, - 0x69, 0x6e, 0x75, 0x65, 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x20, 0x3d, 0x20, 0x22, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, - 0x22, 0x3b, 0x0a, 0x0a, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, - 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x20, 0x65, 0x76, 0x61, - 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x0a, 0x6c, - 0x6f, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x63, 0x6f, - 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x20, 0x75, 0x6e, 0x74, 0x69, 0x6c, - 0x20, 0x61, 0x6e, 0x20, 0x75, 0x6e, 0x63, 0x61, 0x75, 0x67, 0x68, 0x74, - 0x20, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, - 0x63, 0x63, 0x75, 0x72, 0x73, 0x2c, 0x20, 0x22, 0x0a, 0x6c, 0x6f, 0x6e, - 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x20, 0x2b, 0x3d, 0x20, 0x22, 0x61, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x69, 0x73, 0x20, 0x68, 0x69, 0x74, - 0x20, 0x6f, 0x72, 0x20, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, - 0x69, 0x74, 0x6c, 0x79, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, - 0x70, 0x74, 0x65, 0x64, 0x2e, 0x22, 0x3b, 0x0a, 0x0a, 0x61, 0x6c, 0x69, - 0x61, 0x73, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x5b, 0x20, 0x22, 0x63, 0x22, - 0x2c, 0x20, 0x22, 0x66, 0x67, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x73, - 0x65, 0x65, 0x41, 0x6c, 0x73, 0x6f, 0x20, 0x3d, 0x20, 0x5b, 0x20, 0x22, - 0x73, 0x74, 0x65, 0x70, 0x22, 0x2c, 0x20, 0x22, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x72, 0x75, 0x70, 0x74, 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x66, - 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x65, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, - 0x69, 0x6e, 0x75, 0x65, 0x28, 0x29, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, - 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x6e, - 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, - 0x72, 0x65, 0x73, 0x70, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x69, 0x66, 0x20, 0x28, 0x21, 0x72, 0x65, 0x73, 0x70, 0x2e, 0x61, 0x73, - 0x79, 0x6e, 0x63, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, - 0x54, 0x68, 0x65, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x20, 0x69, - 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, - 0x74, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x22, 0x29, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x7d, 0x0a -}; -static const unsigned int scripts_continue_qs_len = 478; - -static const unsigned char scripts_help_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x68, 0x65, 0x6c, 0x70, - 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x3d, 0x20, - 0x22, 0x76, 0x6f, 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x0a, 0x73, 0x68, 0x6f, - 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x20, 0x6c, - 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x73, 0x22, 0x3b, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, - 0x20, 0x22, 0x22, 0x3b, 0x0a, 0x0a, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x5b, 0x20, - 0x22, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2d, 0x6f, 0x72, 0x2d, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2d, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x20, - 0x5d, 0x3b, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x28, 0x29, 0x20, 0x7b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x72, 0x67, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x73, 0x20, 0x3d, 0x20, 0x67, 0x65, 0x74, 0x43, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x28, - 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x4c, 0x69, 0x73, 0x74, - 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x20, - 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x22, - 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x22, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, - 0x28, 0x76, 0x61, 0x72, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x69, 0x6e, - 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x29, 0x20, 0x7b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, - 0x66, 0x20, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x22, - 0x76, 0x6f, 0x69, 0x64, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, - 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, - 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x3d, 0x20, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x73, 0x5b, 0x6e, 0x61, 0x6d, 0x65, 0x5d, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x2b, - 0x20, 0x22, 0x20, 0x3a, 0x3a, 0x20, 0x22, 0x20, 0x2b, 0x20, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, - 0x22, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x54, 0x79, - 0x70, 0x65, 0x20, 0x5c, 0x22, 0x68, 0x65, 0x6c, 0x70, 0x5c, 0x22, 0x20, - 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, - 0x61, 0x20, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x20, 0x6e, - 0x61, 0x6d, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x6c, 0x69, - 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x63, - 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2e, 0x22, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x28, 0x22, 0x54, 0x79, 0x70, 0x65, 0x20, 0x5c, 0x22, - 0x68, 0x65, 0x6c, 0x70, 0x20, 0x61, 0x6c, 0x6c, 0x5c, 0x22, 0x20, 0x66, - 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, - 0x6f, 0x66, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x73, 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, - 0x22, 0x54, 0x79, 0x70, 0x65, 0x20, 0x5c, 0x22, 0x68, 0x65, 0x6c, 0x70, - 0x5c, 0x22, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x20, - 0x62, 0x79, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x66, 0x75, - 0x6c, 0x6c, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x28, 0x22, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x61, - 0x6d, 0x65, 0x20, 0x61, 0x62, 0x62, 0x72, 0x65, 0x76, 0x69, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x65, 0x64, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x79, - 0x20, 0x61, 0x72, 0x65, 0x20, 0x75, 0x6e, 0x61, 0x6d, 0x62, 0x69, 0x67, - 0x75, 0x6f, 0x75, 0x73, 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x61, 0x72, - 0x67, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x72, 0x67, 0x20, 0x3d, 0x3d, - 0x20, 0x22, 0x61, 0x6c, 0x6c, 0x22, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, - 0x72, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x20, 0x3d, 0x20, 0x67, - 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x73, 0x28, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, - 0x76, 0x61, 0x72, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x69, 0x6e, 0x20, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, - 0x3d, 0x20, 0x22, 0x76, 0x6f, 0x69, 0x64, 0x22, 0x29, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, - 0x75, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x28, 0x22, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x20, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x3a, 0x20, 0x22, - 0x20, 0x2b, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x22, - 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x63, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x3d, 0x20, 0x67, 0x65, - 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x49, 0x6e, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x76, 0x61, 0x72, - 0x20, 0x69, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x20, 0x69, 0x20, 0x3c, 0x20, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x3b, 0x20, 0x2b, 0x2b, 0x69, 0x29, 0x20, 0x7b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, - 0x64, 0x61, 0x74, 0x61, 0x20, 0x3d, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x73, 0x5b, 0x69, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x2b, 0x20, - 0x22, 0x20, 0x3a, 0x3a, 0x20, 0x22, 0x20, 0x2b, 0x20, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x28, 0x22, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, - 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, - 0x3d, 0x20, 0x66, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x28, 0x61, 0x72, 0x67, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, - 0x64, 0x61, 0x74, 0x61, 0x20, 0x21, 0x3d, 0x20, 0x75, 0x6e, 0x64, 0x65, - 0x66, 0x69, 0x6e, 0x65, 0x64, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x2b, 0x20, 0x22, 0x2e, 0x22, - 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x20, 0x21, 0x3d, 0x20, 0x30, 0x29, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x28, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x2e, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x20, 0x21, 0x3d, 0x20, 0x30, 0x29, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x28, 0x22, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x3a, 0x20, - 0x22, 0x20, 0x2b, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x6c, 0x69, - 0x61, 0x73, 0x65, 0x73, 0x2e, 0x6a, 0x6f, 0x69, 0x6e, 0x28, 0x22, 0x2c, - 0x20, 0x22, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, - 0x20, 0x28, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x65, 0x41, 0x6c, - 0x73, 0x6f, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x21, 0x3d, - 0x20, 0x30, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x53, 0x65, 0x65, - 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x3a, 0x20, 0x22, 0x20, 0x2b, 0x20, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x65, 0x41, 0x6c, 0x73, 0x6f, 0x2e, - 0x6a, 0x6f, 0x69, 0x6e, 0x28, 0x22, 0x2c, 0x20, 0x22, 0x29, 0x29, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x3d, 0x20, 0x67, 0x65, 0x74, - 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x73, 0x28, 0x29, 0x5b, 0x61, 0x72, 0x67, 0x5d, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x64, 0x61, 0x74, 0x61, 0x20, 0x21, - 0x3d, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x29, - 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x73, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x2b, 0x20, 0x22, 0x2e, 0x22, 0x29, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x28, 0x22, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x3a, 0x22, 0x29, 0x3b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x28, 0x22, 0x22, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x63, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x3d, 0x20, 0x67, 0x65, 0x74, 0x43, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x49, 0x6e, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x28, 0x61, 0x72, 0x67, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x76, 0x61, - 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x20, 0x69, 0x20, 0x3c, - 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x20, 0x2b, 0x2b, 0x69, 0x29, 0x20, 0x7b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x76, 0x61, 0x72, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x3d, 0x20, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x5b, 0x69, 0x5d, 0x3b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x2b, 0x20, 0x22, 0x20, 0x3a, - 0x3a, 0x20, 0x22, 0x20, 0x2b, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x73, - 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, - 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x55, 0x6e, - 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x20, 0x5c, 0x22, 0x22, 0x20, 0x2b, 0x20, 0x61, 0x72, - 0x67, 0x20, 0x2b, 0x20, 0x22, 0x5c, 0x22, 0x2e, 0x20, 0x54, 0x72, 0x79, - 0x20, 0x5c, 0x22, 0x68, 0x65, 0x6c, 0x70, 0x5c, 0x22, 0x2e, 0x22, 0x29, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x7d, 0x0a, 0x7d, 0x3b, 0x0a -}; -static const unsigned int scripts_help_qs_len = 2669; - -static const unsigned char scripts_return_qs[] = { - 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x72, 0x65, 0x74, 0x75, - 0x72, 0x6e, 0x22, 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, - 0x3d, 0x20, 0x22, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x3b, - 0x0a, 0x0a, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x4d, 0x61, - 0x6b, 0x65, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, - 0x73, 0x74, 0x61, 0x63, 0x6b, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x20, - 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x74, - 0x73, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x3b, 0x0a, 0x0a, - 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x22, 0x3b, 0x0a, 0x0a, 0x61, - 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x20, 0x3d, 0x20, 0x5b, 0x20, 0x22, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x22, 0x20, 0x5d, 0x3b, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x28, 0x29, - 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x4f, - 0x44, 0x4f, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x31, - 0x2e, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x20, 0x65, - 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x32, 0x2e, - 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x20, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x2f, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2c, 0x20, 0x73, 0x6f, 0x20, 0x74, 0x68, - 0x61, 0x74, 0x20, 0x77, 0x65, 0x27, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x20, - 0x69, 0x73, 0x20, 0x64, 0x6f, 0x6e, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x20, 0x77, 0x68, 0x61, - 0x74, 0x20, 0x69, 0x66, 0x20, 0x61, 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, - 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x63, 0x63, 0x75, 0x72, - 0x73, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x77, 0x65, 0x20, 0x65, - 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x3f, 0x20, 0x28, 0x65, 0x2e, - 0x67, 0x2e, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, - 0x2f, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, - 0x6e, 0x65, 0x65, 0x64, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x75, 0x6e, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x20, 0x69, 0x74, 0x73, 0x65, 0x6c, - 0x66, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x73, 0x20, 0x74, 0x6f, - 0x20, 0x62, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, - 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x33, 0x2e, 0x20, 0x69, 0x6e, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x68, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x2c, 0x20, 0x73, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x20, - 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x61, - 0x73, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, - 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x31, 0x29, - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x28, 0x67, - 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x72, 0x61, - 0x6d, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x28, 0x29, 0x2c, 0x20, 0x61, - 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5b, 0x30, 0x5d, 0x2c, - 0x20, 0x22, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x20, 0x69, 0x6e, - 0x70, 0x75, 0x74, 0x20, 0x28, 0x22, 0x20, 0x2b, 0x20, 0x44, 0x61, 0x74, - 0x65, 0x28, 0x29, 0x20, 0x2b, 0x20, 0x22, 0x29, 0x22, 0x29, 0x3b, 0x0a, - 0x7d, 0x3b, 0x0a -}; -static const unsigned int scripts_return_qs_len = 735; - -QT_END_NAMESPACE - -#endif // QSCRIPTTOOLSRESOURCES_P_H diff --git a/src/tools/qscript/CMakeLists.txt b/src/tools/qscript/CMakeLists.txt index a5bbb7ac3..8f6fb682c 100644 --- a/src/tools/qscript/CMakeLists.txt +++ b/src/tools/qscript/CMakeLists.txt @@ -1,6 +1,6 @@ # add_definitions() set(EXTRA_QTSCRIPT_LIBS - KtCore KtScript KtGui KtScriptTools + KtCore KtScript KtGui ) include_directories( @@ -9,7 +9,6 @@ include_directories( ${CMAKE_BINARY_DIR}/include/QtCore ${CMAKE_BINARY_DIR}/include/QtScript ${CMAKE_BINARY_DIR}/include/QtGui - ${CMAKE_BINARY_DIR}/include/QtScriptTools ) add_executable(qscript ${CMAKE_CURRENT_SOURCE_DIR}/qscript.cpp) diff --git a/src/tools/qscript/qscript.1 b/src/tools/qscript/qscript.1 index 959e1f644..8edb7efbe 100644 --- a/src/tools/qscript/qscript.1 +++ b/src/tools/qscript/qscript.1 @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "QSCRIPT 1" -.TH QSCRIPT 1 "2022-06-15" "Katie 4.13.0" "Katie Manual" +.TH QSCRIPT 1 "2023-05-19" "Katie 4.13.0" "Katie Manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -84,9 +84,6 @@ qscript [script\-file] .SH "OPTIONS" .IX Header "OPTIONS" .Vb 2 -\& \-d -\& Attach a debugger. -\& \& \-i \& Run interactive. \& diff --git a/src/tools/qscript/qscript.cpp b/src/tools/qscript/qscript.cpp index f6732c850..f6986bb32 100644 --- a/src/tools/qscript/qscript.cpp +++ b/src/tools/qscript/qscript.cpp @@ -42,7 +42,6 @@ #include #include #include -#include #include @@ -137,7 +136,6 @@ int main(int argc, char *argv[]) { QApplication *app = new QApplication(argc, argv); QScriptEngine *eng = new QScriptEngine(app); - QScriptEngineDebugger *debugger = nullptr; QScriptValue globalObject = eng->globalObject(); @@ -159,12 +157,7 @@ int main(int argc, char *argv[]) while (const char *arg = *argv++) { QString fn = QString::fromLocal8Bit(arg); - if (fn == QLatin1String("-d")) { - debugger = new QScriptEngineDebugger(app); - debugger->attachTo(eng); - debugger->setAutoShowStandardWindow(true); - continue; - } else if (fn == QLatin1String("-i")) { + if (fn == QLatin1String("-i")) { interactive(eng); break; } @@ -197,7 +190,7 @@ int main(int argc, char *argv[]) continue; QScriptValue r = eng->evaluate(QString::fromLocal8Bit(contents), fn, lineNumber); - if (!debugger && eng->hasUncaughtException()) { + if (eng->hasUncaughtException()) { QStringList backtrace = eng->uncaughtExceptionBacktrace(); fprintf (stderr, " %s\n%s\n\n", qPrintable(r.toString()), qPrintable(backtrace.join(QLatin1String("\n")))); @@ -205,12 +198,6 @@ int main(int argc, char *argv[]) } } - // do not exit until the debugger has been closed - if (debugger && eng->hasUncaughtException()) { - app->processEvents(); - } - - delete debugger; delete eng; delete app; diff --git a/src/tools/qscript/qscript.pod b/src/tools/qscript/qscript.pod index bfc491093..c0caacdfc 100644 --- a/src/tools/qscript/qscript.pod +++ b/src/tools/qscript/qscript.pod @@ -8,9 +8,6 @@ qscript [script-file] =head1 OPTIONS - -d - Attach a debugger. - -i Run interactive. diff --git a/src/tools/uic/cpp/cppwriteincludes.cpp b/src/tools/uic/cpp/cppwriteincludes.cpp index 93d59e254..c4cded68c 100644 --- a/src/tools/uic/cpp/cppwriteincludes.cpp +++ b/src/tools/uic/cpp/cppwriteincludes.cpp @@ -379,7 +379,6 @@ static const struct ClassTblData { { QLatin1String("QScriptContextInfo"), QLatin1String("QtScript/qscriptcontextinfo.h") }, { QLatin1String("QScriptEngine"), QLatin1String("QtScript/qscriptengine.h") }, { QLatin1String("QScriptEngineAgent"), QLatin1String("QtScript/qscriptengineagent.h") }, - { QLatin1String("QScriptEngineDebugger"), QLatin1String("QtScriptTools/qscriptenginedebugger.h") }, { QLatin1String("QScriptExtensionInterface"), QLatin1String("QtScript/qscriptextensioninterface.h") }, { QLatin1String("QScriptExtensionPlugin"), QLatin1String("QtScript/qscriptextensionplugin.h") }, { QLatin1String("QScriptProgram"), QLatin1String("QtScript/qscriptprogram.h") }, diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3b4c94fc1..6a01dd728 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -13,7 +13,6 @@ include_directories( ${CMAKE_BINARY_DIR}/include/QtSvg ${CMAKE_BINARY_DIR}/include/QtXml ${CMAKE_BINARY_DIR}/include/QtScript - ${CMAKE_BINARY_DIR}/include/QtScriptTools ${CMAKE_BINARY_DIR}/include/QtTest ${CMAKE_BINARY_DIR}/include/QtUiTools ) diff --git a/translations/qt.pot b/translations/qt.pot index fc4653333..28b7a5dbc 100644 --- a/translations/qt.pot +++ b/translations/qt.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-24 20:25+0200\n" +"POT-Creation-Date: 2023-05-19 04:23+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,36 +17,37 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: src/core/plugin/qlibrary.cpp:154 +#: src/core/plugin/qlibrary.cpp:155 msgid "'%1' is not ELF file" msgstr "" -#: src/core/plugin/qlibrary.cpp:157 +#: src/core/plugin/qlibrary.cpp:158 msgid "ELF class mismatch in '%1'" msgstr "" -#: src/core/plugin/qlibrary.cpp:335 src/core/plugin/qlibrary.cpp:345 +#: src/core/plugin/qlibrary.cpp:336 src/core/plugin/qlibrary.cpp:346 msgid "The shared library was not found." msgstr "" -#: src/core/plugin/qlibrary.cpp:347 +#: src/core/plugin/qlibrary.cpp:348 msgid "The file '%1' is not a valid Katie plugin." msgstr "" -#: src/core/plugin/qlibrary.cpp:533 src/core/io/qiodevice.cpp:1500 -#: src/network/socket/qabstractsocketengine.cpp:439 +#: src/core/plugin/qlibrary.cpp:534 src/core/io/qiodevice.cpp:1500 +#: src/network/socket/qtcpserver.cpp:519 +#: src/network/socket/qabstractsocketengine.cpp:408 msgid "Unknown error" msgstr "" -#: src/core/plugin/qlibrary_unix.cpp:52 +#: src/core/plugin/qlibrary_unix.cpp:53 msgid "Cannot load library %1: %2" msgstr "" -#: src/core/plugin/qlibrary_unix.cpp:62 +#: src/core/plugin/qlibrary_unix.cpp:63 msgid "Cannot unload library %1: %2" msgstr "" -#: src/core/plugin/qlibrary_unix.cpp:73 +#: src/core/plugin/qlibrary_unix.cpp:74 msgid "Cannot resolve symbol \"%1\" in %2: %3" msgstr "" @@ -120,7 +121,7 @@ msgctxt "QStandardPaths" msgid "Executable" msgstr "" -#: src/core/io/qfile.cpp:578 +#: src/core/io/qfile.cpp:572 msgid "Destination file exists" msgstr "" @@ -148,12 +149,12 @@ msgstr "" msgid "Could not open output redirection for writing" msgstr "" -#: src/core/io/qprocess_unix.cpp:548 +#: src/core/io/qprocess_unix.cpp:533 msgid "Resource error (fork failure): %1" msgstr "" -#: src/core/io/qprocess_unix.cpp:786 src/core/io/qprocess_unix.cpp:834 -#: src/core/io/qprocess_unix.cpp:904 src/core/io/qprocess_unix.cpp:966 +#: src/core/io/qprocess_unix.cpp:759 src/core/io/qprocess_unix.cpp:807 +#: src/core/io/qprocess_unix.cpp:877 src/core/io/qprocess_unix.cpp:939 msgid "Process operation timed out" msgstr "" @@ -1101,7 +1102,6 @@ msgid "< &Back" msgstr "" #: src/gui/dialogs/qwizard.cpp:581 -#: src/scripttools/debugging/qscriptdebugger.cpp:1650 msgid "Continue" msgstr "" @@ -1670,17 +1670,17 @@ msgstr "" msgid "Date Modified" msgstr "" -#: src/gui/image/qimagewriter.cpp:458 +#: src/gui/image/qimagewriter.cpp:428 msgctxt "QImageWriter" msgid "Unknown error" msgstr "" -#: src/gui/image/qimagewriter.cpp:461 +#: src/gui/image/qimagewriter.cpp:431 msgctxt "QImageWriter" msgid "Device not writable" msgstr "" -#: src/gui/image/qimagewriter.cpp:464 +#: src/gui/image/qimagewriter.cpp:434 msgctxt "QImageWriter" msgid "Unsupported image format" msgstr "" @@ -1714,32 +1714,31 @@ msgstr "" msgid "Close Tab" msgstr "" -#: src/gui/widgets/qlineedit.cpp:1710 src/gui/text/qtextcontrol.cpp:1841 +#: src/gui/widgets/qlineedit.cpp:1710 src/gui/text/qtextcontrol.cpp:1836 msgid "&Undo" msgstr "" -#: src/gui/widgets/qlineedit.cpp:1714 src/gui/text/qtextcontrol.cpp:1843 +#: src/gui/widgets/qlineedit.cpp:1714 src/gui/text/qtextcontrol.cpp:1838 msgid "&Redo" msgstr "" -#: src/gui/widgets/qlineedit.cpp:1723 src/gui/text/qtextcontrol.cpp:1847 +#: src/gui/widgets/qlineedit.cpp:1723 src/gui/text/qtextcontrol.cpp:1842 msgid "Cu&t" msgstr "" -#: src/gui/widgets/qlineedit.cpp:1729 src/gui/text/qtextcontrol.cpp:1852 +#: src/gui/widgets/qlineedit.cpp:1729 src/gui/text/qtextcontrol.cpp:1847 msgid "&Copy" msgstr "" -#: src/gui/widgets/qlineedit.cpp:1735 src/gui/text/qtextcontrol.cpp:1865 +#: src/gui/widgets/qlineedit.cpp:1735 src/gui/text/qtextcontrol.cpp:1860 msgid "&Paste" msgstr "" -#: src/gui/widgets/qlineedit.cpp:1742 src/gui/text/qtextcontrol.cpp:1868 -#: src/scripttools/debugging/qscriptbreakpointswidget.cpp:275 +#: src/gui/widgets/qlineedit.cpp:1742 src/gui/text/qtextcontrol.cpp:1863 msgid "Delete" msgstr "" -#: src/gui/widgets/qlineedit.cpp:1750 src/gui/text/qtextcontrol.cpp:1875 +#: src/gui/widgets/qlineedit.cpp:1750 src/gui/text/qtextcontrol.cpp:1870 msgid "Select All" msgstr "" @@ -1934,8 +1933,6 @@ msgid "Restore" msgstr "" #: src/gui/widgets/qmdisubwindow.cpp:309 -#: src/scripttools/debugging/qscriptbreakpointswidget.cpp:62 -#: src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp:122 msgid "Close" msgstr "" @@ -1988,7 +1985,7 @@ msgstr "" msgid "Step &down" msgstr "" -#: src/gui/kernel/qwidget.cpp:4790 +#: src/gui/kernel/qwidget.cpp:4780 msgid "*" msgstr "" @@ -3439,91 +3436,91 @@ msgstr "" msgid "" msgstr "" -#: src/gui/text/qfontdatabase.cpp:524 +#: src/gui/text/qfontdatabase.cpp:532 msgctxt "QFontDatabase" msgid "Black" msgstr "" -#: src/gui/text/qfontdatabase.cpp:526 +#: src/gui/text/qfontdatabase.cpp:534 msgctxt "QFontDatabase" msgid "Bold" msgstr "" -#: src/gui/text/qfontdatabase.cpp:528 +#: src/gui/text/qfontdatabase.cpp:536 msgctxt "QFontDatabase" msgid "Demi Bold" msgstr "" -#: src/gui/text/qfontdatabase.cpp:530 +#: src/gui/text/qfontdatabase.cpp:538 msgctxt "QFontDatabase" msgid "Light" msgstr "" -#: src/gui/text/qfontdatabase.cpp:534 +#: src/gui/text/qfontdatabase.cpp:542 msgctxt "QFontDatabase" msgid "Italic" msgstr "" -#: src/gui/text/qfontdatabase.cpp:536 +#: src/gui/text/qfontdatabase.cpp:544 msgctxt "QFontDatabase" msgid "Oblique" msgstr "" -#: src/gui/text/qtextcontrol.cpp:1859 +#: src/gui/text/qtextcontrol.cpp:1854 msgid "Copy &Link Location" msgstr "" -#: src/gui/text/qtextcontrol.cpp:2772 +#: src/gui/text/qtextcontrol.cpp:2767 msgctxt "QUnicodeControlCharacterMenu" msgid "LRM Left-to-right mark" msgstr "" -#: src/gui/text/qtextcontrol.cpp:2773 +#: src/gui/text/qtextcontrol.cpp:2768 msgctxt "QUnicodeControlCharacterMenu" msgid "RLM Right-to-left mark" msgstr "" -#: src/gui/text/qtextcontrol.cpp:2774 +#: src/gui/text/qtextcontrol.cpp:2769 msgctxt "QUnicodeControlCharacterMenu" msgid "ZWJ Zero width joiner" msgstr "" -#: src/gui/text/qtextcontrol.cpp:2775 +#: src/gui/text/qtextcontrol.cpp:2770 msgctxt "QUnicodeControlCharacterMenu" msgid "ZWNJ Zero width non-joiner" msgstr "" -#: src/gui/text/qtextcontrol.cpp:2776 +#: src/gui/text/qtextcontrol.cpp:2771 msgctxt "QUnicodeControlCharacterMenu" msgid "ZWSP Zero width space" msgstr "" -#: src/gui/text/qtextcontrol.cpp:2777 +#: src/gui/text/qtextcontrol.cpp:2772 msgctxt "QUnicodeControlCharacterMenu" msgid "LRE Start of left-to-right embedding" msgstr "" -#: src/gui/text/qtextcontrol.cpp:2778 +#: src/gui/text/qtextcontrol.cpp:2773 msgctxt "QUnicodeControlCharacterMenu" msgid "RLE Start of right-to-left embedding" msgstr "" -#: src/gui/text/qtextcontrol.cpp:2779 +#: src/gui/text/qtextcontrol.cpp:2774 msgctxt "QUnicodeControlCharacterMenu" msgid "LRO Start of left-to-right override" msgstr "" -#: src/gui/text/qtextcontrol.cpp:2780 +#: src/gui/text/qtextcontrol.cpp:2775 msgctxt "QUnicodeControlCharacterMenu" msgid "RLO Start of right-to-left override" msgstr "" -#: src/gui/text/qtextcontrol.cpp:2781 +#: src/gui/text/qtextcontrol.cpp:2776 msgctxt "QUnicodeControlCharacterMenu" msgid "PDF Pop directional formatting" msgstr "" -#: src/gui/text/qtextcontrol.cpp:2787 +#: src/gui/text/qtextcontrol.cpp:2782 msgid "Insert Unicode control character" msgstr "" @@ -3554,40 +3551,39 @@ msgctxt "QHostInfo" msgid "Unknown address type" msgstr "" -#: src/network/socket/qtcpserver.cpp:216 -#: src/network/socket/qabstractsocket.cpp:427 -msgid "Operation on socket is not supported" -msgstr "" - -#: src/network/socket/qlocalserver_unix.cpp:186 +#: src/network/socket/qlocalserver_unix.cpp:190 msgid "%1: Permission denied" msgstr "" -#: src/network/socket/qlocalserver_unix.cpp:194 -#: src/network/socket/qlocalserver.cpp:199 +#: src/network/socket/qlocalserver_unix.cpp:198 +#: src/network/socket/qlocalserver.cpp:201 msgid "%1: Name error" msgstr "" -#: src/network/socket/qlocalserver_unix.cpp:198 +#: src/network/socket/qlocalserver_unix.cpp:202 msgid "%1: Address in use" msgstr "" -#: src/network/socket/qlocalserver_unix.cpp:203 +#: src/network/socket/qlocalserver_unix.cpp:207 #: src/network/socket/qlocalsocket_unix.cpp:139 msgid "%1: Unknown error %2" msgstr "" +#: src/network/socket/qabstractsocket.cpp:427 +msgid "Operation on socket is not supported" +msgstr "" + #: src/network/socket/qabstractsocket.cpp:685 msgid "Host not found" msgstr "" #: src/network/socket/qabstractsocket.cpp:727 -#: src/network/socket/qabstractsocketengine.cpp:406 +#: src/network/socket/qabstractsocketengine.cpp:375 msgid "Connection refused" msgstr "" #: src/network/socket/qabstractsocket.cpp:865 -#: src/network/socket/qabstractsocketengine.cpp:403 +#: src/network/socket/qabstractsocketengine.cpp:372 msgid "Connection timed out" msgstr "" @@ -3599,91 +3595,91 @@ msgstr "" msgid "Socket is not connected" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:367 +#: src/network/socket/qabstractsocketengine.cpp:336 msgid "Unable to initialize non-blocking socket" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:370 +#: src/network/socket/qabstractsocketengine.cpp:339 msgid "Unable to initialize broadcast socket" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:373 +#: src/network/socket/qabstractsocketengine.cpp:342 msgid "Attempt to use IPv6 socket on a platform with no IPv6 support" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:376 +#: src/network/socket/qabstractsocketengine.cpp:345 msgid "The remote host closed the connection" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:379 +#: src/network/socket/qabstractsocketengine.cpp:348 msgid "Network operation timed out" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:382 +#: src/network/socket/qabstractsocketengine.cpp:351 msgid "Out of resources" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:385 +#: src/network/socket/qabstractsocketengine.cpp:354 msgid "Unsupported socket operation" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:388 +#: src/network/socket/qabstractsocketengine.cpp:357 msgid "Protocol type not supported" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:391 +#: src/network/socket/qabstractsocketengine.cpp:360 msgid "Invalid socket descriptor" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:394 +#: src/network/socket/qabstractsocketengine.cpp:363 msgid "Host unreachable" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:397 +#: src/network/socket/qabstractsocketengine.cpp:366 msgid "Network unreachable" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:400 +#: src/network/socket/qabstractsocketengine.cpp:369 msgid "Permission denied" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:409 +#: src/network/socket/qabstractsocketengine.cpp:378 msgid "The bound address is already in use" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:412 +#: src/network/socket/qabstractsocketengine.cpp:381 msgid "The address is not available" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:415 +#: src/network/socket/qabstractsocketengine.cpp:384 msgid "The address is protected" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:418 +#: src/network/socket/qabstractsocketengine.cpp:387 msgid "Datagram was too large to send" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:421 +#: src/network/socket/qabstractsocketengine.cpp:390 msgid "Unable to send a message" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:424 +#: src/network/socket/qabstractsocketengine.cpp:393 msgid "Unable to receive a message" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:427 +#: src/network/socket/qabstractsocketengine.cpp:396 msgid "Unable to write" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:430 +#: src/network/socket/qabstractsocketengine.cpp:399 msgid "Network error" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:433 +#: src/network/socket/qabstractsocketengine.cpp:402 msgid "Another socket is already listening on the same port" msgstr "" -#: src/network/socket/qabstractsocketengine.cpp:436 +#: src/network/socket/qabstractsocketengine.cpp:405 msgid "Operation on non-socket" msgstr "" @@ -3727,247 +3723,6 @@ msgstr "" msgid "This platform does not support IPv6" msgstr "" -#: src/scripttools/debugging/qscriptedit.cpp:398 -#: src/scripttools/debugging/qscriptdebugger.cpp:1771 -msgid "Toggle Breakpoint" -msgstr "" - -#: src/scripttools/debugging/qscriptedit.cpp:400 -msgid "Disable Breakpoint" -msgstr "" - -#: src/scripttools/debugging/qscriptedit.cpp:401 -msgid "Enable Breakpoint" -msgstr "" - -#: src/scripttools/debugging/qscriptedit.cpp:405 -msgid "Breakpoint Condition:" -msgstr "" - -#: src/scripttools/debugging/qscriptbreakpointswidget.cpp:271 -msgid "New" -msgstr "" - -#: src/scripttools/debugging/qscriptdebuggerstackmodel.cpp:141 -msgctxt "QScriptDebuggerStackModel" -msgid "Level" -msgstr "" - -#: src/scripttools/debugging/qscriptdebuggerstackmodel.cpp:143 -msgctxt "QScriptDebuggerStackModel" -msgid "Name" -msgstr "" - -#: src/scripttools/debugging/qscriptdebuggerstackmodel.cpp:145 -msgctxt "QScriptDebuggerStackModel" -msgid "Location" -msgstr "" - -#: src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp:876 -msgctxt "QScriptDebuggerLocalsModel" -msgid "Name" -msgstr "" - -#: src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp:878 -msgctxt "QScriptDebuggerLocalsModel" -msgid "Value" -msgstr "" - -#: src/scripttools/debugging/qscriptbreakpointsmodel.cpp:434 -msgctxt "QScriptBreakpointsModel" -msgid "ID" -msgstr "" - -#: src/scripttools/debugging/qscriptbreakpointsmodel.cpp:436 -msgctxt "QScriptBreakpointsModel" -msgid "Location" -msgstr "" - -#: src/scripttools/debugging/qscriptbreakpointsmodel.cpp:438 -msgctxt "QScriptBreakpointsModel" -msgid "Condition" -msgstr "" - -#: src/scripttools/debugging/qscriptbreakpointsmodel.cpp:440 -msgctxt "QScriptBreakpointsModel" -msgid "Ignore-count" -msgstr "" - -#: src/scripttools/debugging/qscriptbreakpointsmodel.cpp:442 -msgctxt "QScriptBreakpointsModel" -msgid "Single-shot" -msgstr "" - -#: src/scripttools/debugging/qscriptbreakpointsmodel.cpp:444 -msgctxt "QScriptBreakpointsModel" -msgid "Hit-count" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:849 -#: src/scripttools/debugging/qscriptdebugger.cpp:1870 -msgid "Go to Line" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:850 -msgid "Line:" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1636 -msgid "Interrupt" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1638 -msgid "Shift+F5" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1652 -msgid "F5" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1671 -msgid "Step Into" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1673 -msgid "F11" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1692 -msgid "Step Over" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1694 -msgid "F10" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1713 -msgid "Step Out" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1715 -msgid "Shift+F11" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1734 -msgid "Run to Cursor" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1736 -msgid "Ctrl+F10" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1756 -msgid "Run to New Script" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1772 -msgid "F9" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1786 -msgid "Clear Debug Output" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1799 -msgid "Clear Error Log" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1812 -msgid "Clear Console" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1824 -msgid "&Find in Script..." -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1825 -msgid "Ctrl+F" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1841 -msgid "Find &Next" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1843 -msgid "F3" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1855 -msgid "Find &Previous" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1857 -msgid "Shift+F3" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1871 -msgid "Ctrl+G" -msgstr "" - -#: src/scripttools/debugging/qscriptdebugger.cpp:1882 -msgid "Debug" -msgstr "" - -#: src/scripttools/debugging/qscriptenginedebugger.cpp:485 -msgid "Loaded Scripts" -msgstr "" - -#: src/scripttools/debugging/qscriptenginedebugger.cpp:491 -msgid "Breakpoints" -msgstr "" - -#: src/scripttools/debugging/qscriptenginedebugger.cpp:497 -msgid "Stack" -msgstr "" - -#: src/scripttools/debugging/qscriptenginedebugger.cpp:503 -msgid "Locals" -msgstr "" - -#: src/scripttools/debugging/qscriptenginedebugger.cpp:509 -msgid "Console" -msgstr "" - -#: src/scripttools/debugging/qscriptenginedebugger.cpp:515 -msgid "Debug Output" -msgstr "" - -#: src/scripttools/debugging/qscriptenginedebugger.cpp:521 -msgid "Error Log" -msgstr "" - -#: src/scripttools/debugging/qscriptenginedebugger.cpp:533 -msgid "Search" -msgstr "" - -#: src/scripttools/debugging/qscriptenginedebugger.cpp:540 -msgid "View" -msgstr "" - -#: src/scripttools/debugging/qscriptenginedebugger.cpp:558 -msgid "Katie Script Debugger" -msgstr "" - -#: src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp:135 -msgid "Previous" -msgstr "" - -#: src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp:142 -msgid "Next" -msgstr "" - -#: src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp:147 -msgid "Case Sensitive" -msgstr "" - -#: src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp:150 -msgid "Whole words" -msgstr "" - -#: src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp:159 -msgid "Search wrapped" -msgstr "" - #: src/uitools/formbuilderextra.cpp:321 msgctxt "FormBuilder" msgid "Invalid stretch value for '%1': '%2'" diff --git a/translations/qt_tools.pot b/translations/qt_tools.pot index 0270728ae..46e425e91 100644 --- a/translations/qt_tools.pot +++ b/translations/qt_tools.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-24 20:25+0200\n" +"POT-Creation-Date: 2023-05-19 04:23+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n"