Compare commits

...

3 Commits

24 changed files with 2119 additions and 1298 deletions

View File

@ -226,7 +226,10 @@ bool QHexDocument::isUndoByteModified() { return m_bytesModFlag > 0; }
void QHexDocument::setDocSaved(bool b) {
if (b) {
m_undostack->setClean();
} else {
m_undostack->resetClean();
}
Q_EMIT documentSaved(b);
}

@ -1 +1 @@
Subproject commit 7cdf84f7c23256032f9bbae44e6a47b439ed66c8
Subproject commit 8875029eb943e6fd36e6b8f07dcf063bc081b0d3

2
3rdparty/cpptrace vendored

@ -1 +1 @@
Subproject commit ce639ebfcec47a7c74233b4bab50017cb34e615b
Subproject commit 74051bb8376a8f546fefd5ad25f77daa80da9799

2
3rdparty/qwindowkit vendored

@ -1 +1 @@
Subproject commit a1c500e1dd254445e7bc153f4e0f049cabab35a0
Subproject commit a4d0b98d40d0f740742e393db774ee53302ec64c

View File

@ -10,9 +10,8 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(PROJECT_VERSION "2.2.3")
find_package(
QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets Network Concurrent
PrintSupport Xml LinguistTools)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Widgets Network Concurrent
PrintSupport Xml LinguistTools)
find_package(
Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets Network Concurrent
PrintSupport Xml LinguistTools)

View File

@ -92,11 +92,7 @@
## 软件编译运行情况
> 对于 Qt 5 版本,建议 5.15.2 或更高版本Qt 6 的话 6.6.2 或更高的版本,其他低版本由于关键库的 API 缺失和自身的一些 Bug所以请不要使用。
另外:
> QT5 版本主动编译支持已停止,我不会再支持和修复相关问题,但接受 PR 。如果因特殊需要 QT5 版本,请咨询我商业合作和付费技术支持。
> Qt 6 请使用 6.6.2 或更高的版本,其他低版本由于关键库的 API 缺失和自身的一些 Bug所以请不要使用。QT5 已停止支持,我不会再修复相关问题,但接受 PR 。如果因特殊需要 QT5 版本,请咨询我商业合作和付费技术支持。
  该仓库代码使用 Qt 6.6.2 在最新版 Windows 和 Ubuntu 编译情况: ![Status](https://github.com/Wing-summer/WingHexExplorer2/actions/workflows/qt-build-test.yml/badge.svg)

View File

@ -92,11 +92,7 @@ Make sure that you follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) while contrib
## Status
> For Qt 5, only version 5.15.2 or higher is suggested, and for Qt 6, only version 6.6.2 or higher is recommended. Other lower versions are wired due to missing APIs of key libraries and some bugs of their own.
And also:
> Support for QT5 had been stopped, and I will no longer fix related issues, but PR will be welcomed. If you need QT5 version for special purposes, please consult me for commercial cooperation and paid technical support.
> For Qt 6, only version 6.6.2 or higher is recommended. Other lower versions are wired due to missing APIs of key libraries and some bugs of their own. Support for QT5 had been stopped, and I will no longer fix related issues, but PR will be welcomed. If you need QT5 version for special purposes, please consult me for commercial cooperation and paid technical support.
The repository code compiles with Qt 5.15.2 and 6.6.2 on the latest versions of Windows and Ubuntu: ![Status](https://github.com/Wing-summer/WingHexExplorer2/actions/workflows/qt-build-test.yml/badge.svg)

View File

@ -306,12 +306,12 @@
<location filename="../testplugin.cpp" line="423"/>
<location filename="../testplugin.cpp" line="430"/>
<location filename="../testplugin.cpp" line="438"/>
<location filename="../testplugin.cpp" line="468"/>
<location filename="../testplugin.cpp" line="476"/>
<location filename="../testplugin.cpp" line="484"/>
<location filename="../testplugin.cpp" line="492"/>
<location filename="../testplugin.cpp" line="501"/>
<location filename="../testplugin.cpp" line="508"/>
<location filename="../testplugin.cpp" line="467"/>
<location filename="../testplugin.cpp" line="475"/>
<location filename="../testplugin.cpp" line="483"/>
<location filename="../testplugin.cpp" line="491"/>
<location filename="../testplugin.cpp" line="500"/>
<location filename="../testplugin.cpp" line="507"/>
<source>InvalidParamsCount</source>
<translation></translation>
</message>
@ -322,7 +322,7 @@
<translation></translation>
</message>
<message>
<location filename="../testplugin.cpp" line="459"/>
<location filename="../testplugin.cpp" line="458"/>
<source>AllocArrayFailed</source>
<translation></translation>
</message>

View File

@ -62,8 +62,8 @@ TestPlugin::TestPlugin() : WingHex::IWingPlugin() {
std::bind(QOverload<const QVariantList &>::of(&TestPlugin::test_c),
this, std::placeholders::_1);
info.ret = MetaType::Void;
info.params.append(qMakePair(MetaType(MetaType::Int | MetaType::Array),
QStringLiteral("c")));
info.params.append(
qMakePair(MetaType::Int | MetaType::Array, QStringLiteral("c")));
_scriptInfo.insert(QStringLiteral("test_c"), info);
}
@ -91,7 +91,7 @@ TestPlugin::TestPlugin() : WingHex::IWingPlugin() {
info.fn =
std::bind(QOverload<const QVariantList &>::of(&TestPlugin::test_f),
this, std::placeholders::_1);
info.ret = MetaType(MetaType::Byte | MetaType::Array);
info.ret = MetaType::Byte | MetaType::Array;
_scriptInfo.insert(QStringLiteral("test_f"), info);
}
@ -438,7 +438,7 @@ TestPlugin::colorTable(const QList<void *> &params) {
return generateScriptCallError(-1, tr("InvalidParamsCount"));
}
void *array;
void *array = nullptr;
QVector<void *> colors;
for (auto &c : colorTable()) {
colors.append(new QColor(c));
@ -446,8 +446,7 @@ TestPlugin::colorTable(const QList<void *> &params) {
auto invoked =
invokeService(QStringLiteral("WingAngelAPI"), "vector2AsArray",
WINGAPI_RETURN_ARG(array), WINGAPI_ARG(MetaType::Color),
WINGAPI_ARG(colors));
qReturnArg(array), MetaType::Color, colors);
if (invoked) {
if (array) {
qDeleteAll(colors);
@ -642,8 +641,7 @@ WingHex::IWingPlugin::RegisteredEvents TestPlugin::registeredEvents() const {
void TestPlugin::eventReady() {
bool ret;
invokeService(
QStringLiteral("WingAngelAPI"), "execCode", Qt::AutoConnection,
WINGAPI_RETURN_ARG(ret),
WINGAPI_ARG(QString(R"(print("Hello, this is TestPlugin!");)")));
invokeService(QStringLiteral("WingAngelAPI"), "execCode",
Qt::AutoConnection, qReturnArg(ret),
QStringLiteral(R"(print("Hello, this is TestPlugin!");)"));
}

@ -1 +1 @@
Subproject commit 1f53c308498e529e5cfbed16c9f7f68c77a3e8e5
Subproject commit 2c7f2af9d42211d9c2a7eaaa47b10bcfe86adfbd

View File

@ -470,12 +470,12 @@
<translation></translation>
</message>
<message>
<location filename="../../src/control/editorview.cpp" line="295"/>
<location filename="../../src/control/editorview.cpp" line="300"/>
<source>Untitled</source>
<translation></translation>
</message>
<message>
<location filename="../../src/control/editorview.cpp" line="879"/>
<location filename="../../src/control/editorview.cpp" line="884"/>
<source>Not allowed operation in non-UI thread</source>
<translation> UI 线</translation>
</message>
@ -1022,8 +1022,8 @@
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="1123"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3267"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3308"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3272"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3313"/>
<source>Reload</source>
<translation></translation>
</message>
@ -1285,7 +1285,7 @@
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3702"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3707"/>
<source>NothingToSave</source>
<translation></translation>
</message>
@ -1607,10 +1607,10 @@
<location filename="../../src/dialog/mainwindow.cpp" line="3107"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3125"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3133"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3255"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3423"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3740"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3749"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3256"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3428"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3745"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3754"/>
<source>Error</source>
<translation></translation>
</message>
@ -1624,8 +1624,8 @@
<location filename="../../src/dialog/mainwindow.cpp" line="1790"/>
<location filename="../../src/dialog/mainwindow.cpp" line="1824"/>
<location filename="../../src/dialog/mainwindow.cpp" line="1884"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3740"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3749"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3745"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3754"/>
<source>FilePermission</source>
<translation></translation>
</message>
@ -1648,7 +1648,7 @@
<location filename="../../src/dialog/mainwindow.cpp" line="1952"/>
<location filename="../../src/dialog/mainwindow.cpp" line="2019"/>
<location filename="../../src/dialog/mainwindow.cpp" line="2606"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3708"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3713"/>
<source>ChooseSaveFile</source>
<translation></translation>
</message>
@ -1688,55 +1688,55 @@
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3256"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3257"/>
<source>FileCloseBigFile</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3268"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3309"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3272"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3314"/>
<source>ReloadNeededYesOrNo</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3695"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3700"/>
<source>SaveWorkSpace</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3696"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3701"/>
<source>WingHexWorkSpace (*.wingpro)</source>
<translation> (*.wingpro)</translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3811"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3816"/>
<source>ConfirmSave</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3860"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3865"/>
<source>[Info]</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3874"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3879"/>
<source>[Warn]</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3888"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3893"/>
<source>[Error]</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3946"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3951"/>
<source>ConfirmAPPSave</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="1899"/>
<location filename="../../src/dialog/mainwindow.cpp" line="1963"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3780"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3785"/>
<source>SaveSuccessfully</source>
<translation></translation>
</message>
@ -2049,12 +2049,12 @@
<translation>退</translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3340"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3345"/>
<source>CopyLimit</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3424"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3429"/>
<source>ErrOpenFileBelow</source>
<translation></translation>
</message>
@ -2285,200 +2285,200 @@
<context>
<name>PluginSystem</name>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2260"/>
<location filename="../../src/class/pluginsystem.cpp" line="3089"/>
<source>LoadingPlugin</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2278"/>
<location filename="../../src/class/pluginsystem.cpp" line="3107"/>
<source>InvalidPluginBrokenInfo</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2711"/>
<location filename="../../src/class/pluginsystem.cpp" line="3540"/>
<source>AppClosingCanceled:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2788"/>
<location filename="../../src/class/pluginsystem.cpp" line="3617"/>
<source>- PluginID:</source>
<translation>- ID</translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2810"/>
<location filename="../../src/class/pluginsystem.cpp" line="3639"/>
<source>FoundDrvPluginCount</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2875"/>
<location filename="../../src/class/pluginsystem.cpp" line="3680"/>
<source>PluginManagerNeedSingleton</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3738"/>
<source>RegisterScriptFnUnSupportedTypes:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2885"/>
<location filename="../../src/class/pluginsystem.cpp" line="2953"/>
<location filename="../../src/class/pluginsystem.cpp" line="3748"/>
<location filename="../../src/class/pluginsystem.cpp" line="3816"/>
<source>RegisterScriptFnInvalidSig:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2893"/>
<location filename="../../src/class/pluginsystem.cpp" line="2961"/>
<location filename="../../src/class/pluginsystem.cpp" line="3756"/>
<location filename="../../src/class/pluginsystem.cpp" line="3824"/>
<source>RegisterScriptFnConflitSig:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3012"/>
<location filename="../../src/class/pluginsystem.cpp" line="3875"/>
<source>InvalidEnumName:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3022"/>
<location filename="../../src/class/pluginsystem.cpp" line="3885"/>
<source>InvalidEnumValue:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3057"/>
<location filename="../../src/class/pluginsystem.cpp" line="3920"/>
<source>InvalidMarcosRegister:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3302"/>
<location filename="../../src/class/pluginsystem.cpp" line="4164"/>
<source>ErrLoadPluginSDKVersion</source>
<translation> SDK </translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3306"/>
<location filename="../../src/class/pluginsystem.cpp" line="4168"/>
<source>ErrLoadPluginNoName</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3327"/>
<location filename="../../src/class/pluginsystem.cpp" line="4189"/>
<source>ErrLoadInitPlugin</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3334"/>
<location filename="../../src/class/pluginsystem.cpp" line="4196"/>
<source>PluginName :</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3335"/>
<location filename="../../src/class/pluginsystem.cpp" line="4197"/>
<source>PluginAuthor :</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3336"/>
<location filename="../../src/class/pluginsystem.cpp" line="4198"/>
<source>PluginWidgetRegister</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3440"/>
<location filename="../../src/class/pluginsystem.cpp" line="4302"/>
<source>ErrLoadExtPluginSDKVersion</source>
<translation> SDK </translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3443"/>
<location filename="../../src/class/pluginsystem.cpp" line="4305"/>
<source>ExtPluginAuthor :</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3444"/>
<location filename="../../src/class/pluginsystem.cpp" line="4306"/>
<source>ExtPluginWidgetRegister</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3460"/>
<location filename="../../src/class/pluginsystem.cpp" line="4322"/>
<source>ErrLoadInitExtPlugin</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3485"/>
<location filename="../../src/class/pluginsystem.cpp" line="4347"/>
<source>ChooseFile</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3492"/>
<location filename="../../src/class/pluginsystem.cpp" line="3497"/>
<location filename="../../src/class/pluginsystem.cpp" line="4354"/>
<location filename="../../src/class/pluginsystem.cpp" line="4359"/>
<source>Error</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3493"/>
<location filename="../../src/class/pluginsystem.cpp" line="4355"/>
<source>FileNotExist</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3498"/>
<location filename="../../src/class/pluginsystem.cpp" line="4360"/>
<source>FilePermission</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3528"/>
<location filename="../../src/class/pluginsystem.cpp" line="4390"/>
<source>EmptyNameDockWidget:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3538"/>
<location filename="../../src/class/pluginsystem.cpp" line="4400"/>
<source>InvalidNameDockWidget:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3546"/>
<location filename="../../src/class/pluginsystem.cpp" line="4408"/>
<source>InvalidNullDockWidget:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3613"/>
<location filename="../../src/class/pluginsystem.cpp" line="4475"/>
<source>Not allowed operation in non-UI thread</source>
<translation> UI 线</translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2836"/>
<location filename="../../src/class/pluginsystem.cpp" line="3665"/>
<source>UnsafePluginDir</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="437"/>
<source>[EvilCall]</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2285"/>
<location filename="../../src/class/pluginsystem.cpp" line="3114"/>
<source>InvalidPluginID</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2288"/>
<location filename="../../src/class/pluginsystem.cpp" line="3117"/>
<source>InvalidDupPlugin</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2753"/>
<location filename="../../src/class/pluginsystem.cpp" line="3582"/>
<source>FoundPluginCount</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2784"/>
<location filename="../../src/class/pluginsystem.cpp" line="3613"/>
<source>PluginLoadingFailedSummary</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2789"/>
<location filename="../../src/class/pluginsystem.cpp" line="3618"/>
<source>- Dependencies:</source>
<translation>- </translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2791"/>
<location filename="../../src/class/pluginsystem.cpp" line="3620"/>
<source>PUID:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2792"/>
<location filename="../../src/class/pluginsystem.cpp" line="3621"/>
<source>Version:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2799"/>
<location filename="../../src/class/pluginsystem.cpp" line="3628"/>
<source>PluginLoadingFinished</source>
<translation></translation>
</message>
@ -4658,8 +4658,7 @@
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="328"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="809"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="897"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1149"/>
<source>Reload</source>
<translation></translation>
</message>
@ -4832,11 +4831,11 @@
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="700"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="981"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1185"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1222"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1242"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1270"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="971"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1188"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1225"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1245"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1273"/>
<source>Error</source>
<translation></translation>
</message>
@ -4856,84 +4855,83 @@
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="810"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="898"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1150"/>
<source>ReloadNeededYesOrNo</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="941"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="931"/>
<source>Debuging...</source>
<translation>...</translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="944"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="934"/>
<source>Running...</source>
<translation>...</translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1145"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1135"/>
<source>Line %1, Col %2</source>
<translation> %1, %2</translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1147"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1137"/>
<source> (Selected: %1)</source>
<translation> (: %1)</translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1159"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1201"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1162"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1204"/>
<source>ChooseFile</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="981"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1185"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1242"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="971"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1188"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1245"/>
<source>FilePermission</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1220"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1223"/>
<source>ReloadSuccessfully</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1222"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1225"/>
<source>ReloadUnSuccessfully</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1259"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1262"/>
<source>ChooseSaveFile</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1240"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1268"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1243"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1271"/>
<source>SaveSuccessfully</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1270"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1273"/>
<source>SaveUnSuccessfully</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1346"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1349"/>
<source>FormatCodeFailed</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1395"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1414"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1398"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1417"/>
<source>CannotSave2RunScript</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="748"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1474"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1477"/>
<source>ScriptStillRunning</source>
<translation>退</translation>
</message>
@ -5254,18 +5252,18 @@
<translation> AngelScript API </translation>
</message>
<message>
<location filename="../../src/class/wingangelapi.cpp" line="1415"/>
<location filename="../../src/class/wingangelapi.cpp" line="1433"/>
<source>NotSupportedQMetaType:</source>
<translation> QT </translation>
</message>
<message>
<location filename="../../src/class/wingangelapi.cpp" line="1759"/>
<location filename="../../src/class/wingangelapi.cpp" line="1843"/>
<location filename="../../src/class/wingangelapi.cpp" line="1777"/>
<location filename="../../src/class/wingangelapi.cpp" line="1861"/>
<source>Get Exception While ScriptCall: (%1) %2</source>
<translation>%1%2</translation>
</message>
<message>
<location filename="../../src/class/wingangelapi.cpp" line="1785"/>
<location filename="../../src/class/wingangelapi.cpp" line="1803"/>
<source>InvalidRetType: need </source>
<translation> </translation>
</message>

View File

@ -470,12 +470,12 @@
<translation></translation>
</message>
<message>
<location filename="../../src/control/editorview.cpp" line="295"/>
<location filename="../../src/control/editorview.cpp" line="300"/>
<source>Untitled</source>
<translation></translation>
</message>
<message>
<location filename="../../src/control/editorview.cpp" line="879"/>
<location filename="../../src/control/editorview.cpp" line="884"/>
<source>Not allowed operation in non-UI thread</source>
<translation> UI </translation>
</message>
@ -1022,8 +1022,8 @@
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="1123"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3267"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3308"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3272"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3313"/>
<source>Reload</source>
<translation></translation>
</message>
@ -1285,7 +1285,7 @@
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3702"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3707"/>
<source>NothingToSave</source>
<translation></translation>
</message>
@ -1607,10 +1607,10 @@
<location filename="../../src/dialog/mainwindow.cpp" line="3107"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3125"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3133"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3255"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3423"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3740"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3749"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3256"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3428"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3745"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3754"/>
<source>Error</source>
<translation></translation>
</message>
@ -1624,8 +1624,8 @@
<location filename="../../src/dialog/mainwindow.cpp" line="1790"/>
<location filename="../../src/dialog/mainwindow.cpp" line="1824"/>
<location filename="../../src/dialog/mainwindow.cpp" line="1884"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3740"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3749"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3745"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3754"/>
<source>FilePermission</source>
<translation></translation>
</message>
@ -1648,7 +1648,7 @@
<location filename="../../src/dialog/mainwindow.cpp" line="1952"/>
<location filename="../../src/dialog/mainwindow.cpp" line="2019"/>
<location filename="../../src/dialog/mainwindow.cpp" line="2606"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3708"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3713"/>
<source>ChooseSaveFile</source>
<translation></translation>
</message>
@ -1688,55 +1688,55 @@
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3256"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3257"/>
<source>FileCloseBigFile</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3268"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3309"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3272"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3314"/>
<source>ReloadNeededYesOrNo</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3695"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3700"/>
<source>SaveWorkSpace</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3696"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3701"/>
<source>WingHexWorkSpace (*.wingpro)</source>
<translation> (*.wingpro)</translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3811"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3816"/>
<source>ConfirmSave</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3860"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3865"/>
<source>[Info]</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3874"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3879"/>
<source>[Warn]</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3888"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3893"/>
<source>[Error]</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3946"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3951"/>
<source>ConfirmAPPSave</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="1899"/>
<location filename="../../src/dialog/mainwindow.cpp" line="1963"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3780"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3785"/>
<source>SaveSuccessfully</source>
<translation></translation>
</message>
@ -2049,12 +2049,12 @@
<translation>退</translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3340"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3345"/>
<source>CopyLimit</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/mainwindow.cpp" line="3424"/>
<location filename="../../src/dialog/mainwindow.cpp" line="3429"/>
<source>ErrOpenFileBelow</source>
<translation></translation>
</message>
@ -2285,200 +2285,200 @@
<context>
<name>PluginSystem</name>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2260"/>
<location filename="../../src/class/pluginsystem.cpp" line="3089"/>
<source>LoadingPlugin</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2278"/>
<location filename="../../src/class/pluginsystem.cpp" line="3107"/>
<source>InvalidPluginBrokenInfo</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2711"/>
<location filename="../../src/class/pluginsystem.cpp" line="3540"/>
<source>AppClosingCanceled:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2788"/>
<location filename="../../src/class/pluginsystem.cpp" line="3617"/>
<source>- PluginID:</source>
<translation>- ID</translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2810"/>
<location filename="../../src/class/pluginsystem.cpp" line="3639"/>
<source>FoundDrvPluginCount</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2875"/>
<location filename="../../src/class/pluginsystem.cpp" line="3680"/>
<source>PluginManagerNeedSingleton</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3738"/>
<source>RegisterScriptFnUnSupportedTypes:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2885"/>
<location filename="../../src/class/pluginsystem.cpp" line="2953"/>
<location filename="../../src/class/pluginsystem.cpp" line="3748"/>
<location filename="../../src/class/pluginsystem.cpp" line="3816"/>
<source>RegisterScriptFnInvalidSig:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2893"/>
<location filename="../../src/class/pluginsystem.cpp" line="2961"/>
<location filename="../../src/class/pluginsystem.cpp" line="3756"/>
<location filename="../../src/class/pluginsystem.cpp" line="3824"/>
<source>RegisterScriptFnConflitSig:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3012"/>
<location filename="../../src/class/pluginsystem.cpp" line="3875"/>
<source>InvalidEnumName:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3022"/>
<location filename="../../src/class/pluginsystem.cpp" line="3885"/>
<source>InvalidEnumValue:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3057"/>
<location filename="../../src/class/pluginsystem.cpp" line="3920"/>
<source>InvalidMarcosRegister:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3302"/>
<location filename="../../src/class/pluginsystem.cpp" line="4164"/>
<source>ErrLoadPluginSDKVersion</source>
<translation> SDK </translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3306"/>
<location filename="../../src/class/pluginsystem.cpp" line="4168"/>
<source>ErrLoadPluginNoName</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3327"/>
<location filename="../../src/class/pluginsystem.cpp" line="4189"/>
<source>ErrLoadInitPlugin</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3334"/>
<location filename="../../src/class/pluginsystem.cpp" line="4196"/>
<source>PluginName :</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3335"/>
<location filename="../../src/class/pluginsystem.cpp" line="4197"/>
<source>PluginAuthor :</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3336"/>
<location filename="../../src/class/pluginsystem.cpp" line="4198"/>
<source>PluginWidgetRegister</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3440"/>
<location filename="../../src/class/pluginsystem.cpp" line="4302"/>
<source>ErrLoadExtPluginSDKVersion</source>
<translation> SDK </translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3443"/>
<location filename="../../src/class/pluginsystem.cpp" line="4305"/>
<source>ExtPluginAuthor :</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3444"/>
<location filename="../../src/class/pluginsystem.cpp" line="4306"/>
<source>ExtPluginWidgetRegister</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3460"/>
<location filename="../../src/class/pluginsystem.cpp" line="4322"/>
<source>ErrLoadInitExtPlugin</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3485"/>
<location filename="../../src/class/pluginsystem.cpp" line="4347"/>
<source>ChooseFile</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3492"/>
<location filename="../../src/class/pluginsystem.cpp" line="3497"/>
<location filename="../../src/class/pluginsystem.cpp" line="4354"/>
<location filename="../../src/class/pluginsystem.cpp" line="4359"/>
<source>Error</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3493"/>
<location filename="../../src/class/pluginsystem.cpp" line="4355"/>
<source>FileNotExist</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3498"/>
<location filename="../../src/class/pluginsystem.cpp" line="4360"/>
<source>FilePermission</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3528"/>
<location filename="../../src/class/pluginsystem.cpp" line="4390"/>
<source>EmptyNameDockWidget:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3538"/>
<location filename="../../src/class/pluginsystem.cpp" line="4400"/>
<source>InvalidNameDockWidget:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3546"/>
<location filename="../../src/class/pluginsystem.cpp" line="4408"/>
<source>InvalidNullDockWidget:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="3613"/>
<location filename="../../src/class/pluginsystem.cpp" line="4475"/>
<source>Not allowed operation in non-UI thread</source>
<translation> UI </translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2836"/>
<location filename="../../src/class/pluginsystem.cpp" line="3665"/>
<source>UnsafePluginDir</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="437"/>
<source>[EvilCall]</source>
<translation>調</translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2285"/>
<location filename="../../src/class/pluginsystem.cpp" line="3114"/>
<source>InvalidPluginID</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2288"/>
<location filename="../../src/class/pluginsystem.cpp" line="3117"/>
<source>InvalidDupPlugin</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2753"/>
<location filename="../../src/class/pluginsystem.cpp" line="3582"/>
<source>FoundPluginCount</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2784"/>
<location filename="../../src/class/pluginsystem.cpp" line="3613"/>
<source>PluginLoadingFailedSummary</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2789"/>
<location filename="../../src/class/pluginsystem.cpp" line="3618"/>
<source>- Dependencies:</source>
<translation>- </translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2791"/>
<location filename="../../src/class/pluginsystem.cpp" line="3620"/>
<source>PUID:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2792"/>
<location filename="../../src/class/pluginsystem.cpp" line="3621"/>
<source>Version:</source>
<translation></translation>
</message>
<message>
<location filename="../../src/class/pluginsystem.cpp" line="2799"/>
<location filename="../../src/class/pluginsystem.cpp" line="3628"/>
<source>PluginLoadingFinished</source>
<translation></translation>
</message>
@ -4658,8 +4658,7 @@
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="328"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="809"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="897"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1149"/>
<source>Reload</source>
<translation></translation>
</message>
@ -4832,11 +4831,11 @@
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="700"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="981"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1185"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1222"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1242"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1270"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="971"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1188"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1225"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1245"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1273"/>
<source>Error</source>
<translation></translation>
</message>
@ -4856,84 +4855,83 @@
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="810"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="898"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1150"/>
<source>ReloadNeededYesOrNo</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="941"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="931"/>
<source>Debuging...</source>
<translation>調...</translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="944"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="934"/>
<source>Running...</source>
<translation>...</translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1145"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1135"/>
<source>Line %1, Col %2</source>
<translation> %1, %2</translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1147"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1137"/>
<source> (Selected: %1)</source>
<translation> (: %1)</translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1159"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1201"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1162"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1204"/>
<source>ChooseFile</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="981"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1185"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1242"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="971"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1188"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1245"/>
<source>FilePermission</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1220"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1223"/>
<source>ReloadSuccessfully</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1222"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1225"/>
<source>ReloadUnSuccessfully</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1259"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1262"/>
<source>ChooseSaveFile</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1240"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1268"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1243"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1271"/>
<source>SaveSuccessfully</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1270"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1273"/>
<source>SaveUnSuccessfully</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1346"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1349"/>
<source>FormatCodeFailed</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1395"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1414"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1398"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1417"/>
<source>CannotSave2RunScript</source>
<translation></translation>
</message>
<message>
<location filename="../../src/dialog/scriptingdialog.cpp" line="748"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1474"/>
<location filename="../../src/dialog/scriptingdialog.cpp" line="1477"/>
<source>ScriptStillRunning</source>
<translation>退</translation>
</message>
@ -5254,18 +5252,18 @@
<translation> AngelScript 調 API </translation>
</message>
<message>
<location filename="../../src/class/wingangelapi.cpp" line="1415"/>
<location filename="../../src/class/wingangelapi.cpp" line="1433"/>
<source>NotSupportedQMetaType:</source>
<translation> QT </translation>
</message>
<message>
<location filename="../../src/class/wingangelapi.cpp" line="1759"/>
<location filename="../../src/class/wingangelapi.cpp" line="1843"/>
<location filename="../../src/class/wingangelapi.cpp" line="1777"/>
<location filename="../../src/class/wingangelapi.cpp" line="1861"/>
<source>Get Exception While ScriptCall: (%1) %2</source>
<translation>調%1%2</translation>
</message>
<message>
<location filename="../../src/class/wingangelapi.cpp" line="1785"/>
<location filename="../../src/class/wingangelapi.cpp" line="1803"/>
<source>InvalidRetType: need </source>
<translation> </translation>
</message>

File diff suppressed because it is too large Load Diff

View File

@ -32,6 +32,7 @@
#include <QVariant>
#include "WingPlugin/iwingdevice.h"
#include "WingPlugin/iwingmanager.h"
#include "class/wingangelapi.h"
#include "control/editorview.h"
@ -185,6 +186,8 @@ private:
void checkDirRootSafe(const QDir &dir);
void try2LoadManagerPlugin();
template <typename T>
std::optional<PluginInfo> loadPlugin(const QFileInfo &filename,
const QDir &setdir);
@ -224,7 +227,7 @@ private:
void registerMarcos(IWingPlugin *plg);
void registerEvents(IWingPlugin *plg);
void applyFunctionTables(IWingPluginBase *plg, const CallTable &fns);
void applyFunctionTables(QObject *plg, const CallTable &fns);
static QString getScriptFnSig(const QString &fnName,
const IWingPlugin::ScriptFnInfo &fninfo);
@ -324,411 +327,402 @@ private:
void finalizeCheckingEngine();
// IWingPluginBase API
public:
WING_SERVICE void toast(QObject *sender, const QPixmap &icon,
const QString &message);
public slots:
WING_API void toast(const QObject *sender, const QPixmap &icon,
const QString &message);
// logging
WING_SERVICE void logTrace(QObject *sender, const QString &message);
WING_SERVICE void logDebug(QObject *sender, const QString &message);
WING_SERVICE void logInfo(QObject *sender, const QString &message);
WING_SERVICE void logWarn(QObject *sender, const QString &message);
WING_SERVICE void logError(QObject *sender, const QString &message);
WING_SERVICE bool raiseDockWidget(QObject *sender, QWidget *w);
WING_API void logTrace(const QObject *sender, const QString &message);
WING_API void logDebug(const QObject *sender, const QString &message);
WING_API void logInfo(const QObject *sender, const QString &message);
WING_API void logWarn(const QObject *sender, const QString &message);
WING_API void logError(const QObject *sender, const QString &message);
WING_API bool raiseDockWidget(const QObject *sender, QWidget *w);
WING_SERVICE WingHex::AppTheme currentAppTheme(QObject *sender);
WING_SERVICE QDialog *createDialog(QObject *sender, QWidget *content);
WING_API WingHex::AppTheme currentAppTheme(const QObject *sender);
WING_API QDialog *createDialog(const QObject *sender, QWidget *content);
public:
WING_SERVICE void msgAboutQt(QObject *sender, QWidget *parent,
const QString &title);
WING_SERVICE QMessageBox::StandardButton
msgInformation(QObject *sender, QWidget *parent, const QString &title,
public slots:
WING_API void msgAboutQt(const QObject *sender, QWidget *parent,
const QString &title);
WING_API QMessageBox::StandardButton
msgInformation(const QObject *sender, QWidget *parent, const QString &title,
const QString &text, QMessageBox::StandardButtons buttons,
QMessageBox::StandardButton defaultButton);
WING_SERVICE QMessageBox::StandardButton
msgQuestion(QObject *sender, QWidget *parent, const QString &title,
WING_API QMessageBox::StandardButton
msgQuestion(const QObject *sender, QWidget *parent, const QString &title,
const QString &text, QMessageBox::StandardButtons buttons,
QMessageBox::StandardButton defaultButton);
WING_SERVICE QMessageBox::StandardButton
msgWarning(QObject *sender, QWidget *parent, const QString &title,
WING_API QMessageBox::StandardButton
msgWarning(const QObject *sender, QWidget *parent, const QString &title,
const QString &text, QMessageBox::StandardButtons buttons,
QMessageBox::StandardButton defaultButton);
WING_SERVICE QMessageBox::StandardButton
msgCritical(QObject *sender, QWidget *parent, const QString &title,
WING_API QMessageBox::StandardButton
msgCritical(const QObject *sender, QWidget *parent, const QString &title,
const QString &text, QMessageBox::StandardButtons buttons,
QMessageBox::StandardButton defaultButton);
WING_SERVICE void msgAbout(QObject *sender, QWidget *parent,
const QString &title, const QString &text);
WING_SERVICE QMessageBox::StandardButton
msgbox(QObject *sender, QWidget *parent, QMessageBox::Icon icon,
WING_API void msgAbout(const QObject *sender, QWidget *parent,
const QString &title, const QString &text);
WING_API QMessageBox::StandardButton
msgbox(const QObject *sender, QWidget *parent, QMessageBox::Icon icon,
const QString &title, const QString &text,
QMessageBox::StandardButtons buttons,
QMessageBox::StandardButton defaultButton);
public:
WING_SERVICE QString dlgGetText(QObject *sender, QWidget *parent,
const QString &title, const QString &label,
QLineEdit::EchoMode echo,
const QString &text, bool *ok,
Qt::InputMethodHints inputMethodHints);
WING_SERVICE QString
dlgGetMultiLineText(QObject *sender, QWidget *parent, const QString &title,
const QString &label, const QString &text, bool *ok,
Qt::InputMethodHints inputMethodHints);
WING_SERVICE QString dlgGetItem(QObject *sender, QWidget *parent,
const QString &title, const QString &label,
const QStringList &items, int current,
bool editable, bool *ok,
Qt::InputMethodHints inputMethodHints);
WING_SERVICE int dlgGetInt(QObject *sender, QWidget *parent,
const QString &title, const QString &label,
int value, int minValue, int maxValue, int step,
bool *ok);
WING_SERVICE double dlgGetDouble(QObject *sender, QWidget *parent,
const QString &title, const QString &label,
double value, double minValue,
double maxValue, int decimals, bool *ok,
double step);
public slots:
WING_API QString dlgGetText(const QObject *sender, QWidget *parent,
const QString &title, const QString &label,
QLineEdit::EchoMode echo, const QString &text,
bool *ok,
Qt::InputMethodHints inputMethodHints);
WING_API QString dlgGetMultiLineText(const QObject *sender, QWidget *parent,
const QString &title,
const QString &label,
const QString &text, bool *ok,
Qt::InputMethodHints inputMethodHints);
WING_API QString dlgGetItem(const QObject *sender, QWidget *parent,
const QString &title, const QString &label,
const QStringList &items, int current,
bool editable, bool *ok,
Qt::InputMethodHints inputMethodHints);
WING_API int dlgGetInt(const QObject *sender, QWidget *parent,
const QString &title, const QString &label,
int value, int minValue, int maxValue, int step,
bool *ok);
WING_API double dlgGetDouble(const QObject *sender, QWidget *parent,
const QString &title, const QString &label,
double value, double minValue, double maxValue,
int decimals, bool *ok, double step);
public:
WING_SERVICE QString dlgGetExistingDirectory(QObject *sender,
QWidget *parent,
const QString &caption,
const QString &dir,
QFileDialog::Options options);
WING_SERVICE QString dlgGetOpenFileName(QObject *sender, QWidget *parent,
const QString &caption,
const QString &dir,
const QString &filter,
QString *selectedFilter,
QFileDialog::Options options);
WING_SERVICE QStringList dlgGetOpenFileNames(
QObject *sender, QWidget *parent, const QString &caption,
public slots:
WING_API QString dlgGetExistingDirectory(const QObject *sender,
QWidget *parent,
const QString &caption,
const QString &dir,
QFileDialog::Options options);
WING_API QString dlgGetOpenFileName(const QObject *sender, QWidget *parent,
const QString &caption,
const QString &dir,
const QString &filter,
QString *selectedFilter,
QFileDialog::Options options);
WING_API QStringList dlgGetOpenFileNames(
const QObject *sender, QWidget *parent, const QString &caption,
const QString &dir, const QString &filter, QString *selectedFilter,
QFileDialog::Options options);
WING_SERVICE QString dlgGetSaveFileName(QObject *sender, QWidget *parent,
const QString &caption,
const QString &dir,
const QString &filter,
QString *selectedFilter,
QFileDialog::Options options);
WING_API QString dlgGetSaveFileName(const QObject *sender, QWidget *parent,
const QString &caption,
const QString &dir,
const QString &filter,
QString *selectedFilter,
QFileDialog::Options options);
WING_SERVICE QColor dlgGetColor(QObject *sender, const QString &caption,
QWidget *parent);
WING_API QColor dlgGetColor(const QObject *sender, const QString &caption,
QWidget *parent);
// IWingPlugin API
public:
WING_SERVICE bool existsServiceHost(QObject *sender, const QString &puid);
public slots:
WING_API bool existsServiceHost(const QObject *sender, const QString &puid);
WING_SERVICE bool
invokeService(QObject *sender, const QString &puid, const char *method,
Qt::ConnectionType type, QGenericReturnArgument ret,
QGenericArgument val0, QGenericArgument val1,
QGenericArgument val2, QGenericArgument val3,
QGenericArgument val4);
bool invokeService(QObject *sender, const QString &selfpuid,
const QString &puid, const char *method,
Qt::ConnectionType type, QGenericReturnArgument ret,
QGenericArgument val0, QGenericArgument val1,
QGenericArgument val2, QGenericArgument val3,
QGenericArgument val4);
WING_API bool invokeServiceImpl(const QObject *sender, const QString &puid,
const WingHex::MetaCallInfo &infos);
WING_SERVICE bool isCurrentDocEditing(QObject *sender);
WING_API bool isCurrentDocEditing(const QObject *sender);
WING_SERVICE QString currentDocFilename(QObject *sender);
WING_API QString currentDocFilename(const QObject *sender);
// document
WING_SERVICE bool isReadOnly(QObject *sender);
WING_API bool isReadOnly(const QObject *sender);
WING_SERVICE bool isInsertionMode(QObject *sender);
WING_API bool isInsertionMode(const QObject *sender);
WING_SERVICE bool isKeepSize(QObject *sender);
WING_API bool isKeepSize(const QObject *sender);
WING_SERVICE bool isLocked(QObject *sender);
WING_API bool isLocked(const QObject *sender);
WING_SERVICE qsizetype documentLines(QObject *sender);
WING_API qsizetype documentLines(const QObject *sender);
WING_SERVICE qsizetype documentBytes(QObject *sender);
WING_API qsizetype documentBytes(const QObject *sender);
WING_SERVICE WingHex::HexPosition currentPos(QObject *sender);
WING_API WingHex::HexPosition currentPos(const QObject *sender);
WING_SERVICE qsizetype currentRow(QObject *sender);
WING_API qsizetype currentRow(const QObject *sender);
WING_SERVICE qsizetype currentColumn(QObject *sender);
WING_API qsizetype currentColumn(const QObject *sender);
WING_SERVICE qsizetype currentOffset(QObject *sender);
WING_API qsizetype currentOffset(const QObject *sender);
WING_SERVICE qsizetype selectedLength(QObject *sender);
WING_API qsizetype selectedLength(const QObject *sender);
WING_SERVICE QByteArray selectedBytes(QObject *sender, qsizetype index);
WING_API QByteArray selectedBytes(const QObject *sender, qsizetype index);
WING_SERVICE QByteArrayList selectionBytes(QObject *sender);
WING_API QByteArrayList selectionBytes(const QObject *sender);
WING_SERVICE WingHex::HexPosition selectionStart(QObject *sender,
qsizetype index);
WING_API WingHex::HexPosition selectionStart(const QObject *sender,
qsizetype index);
WING_SERVICE WingHex::HexPosition selectionEnd(QObject *sender,
qsizetype index);
WING_API WingHex::HexPosition selectionEnd(const QObject *sender,
qsizetype index);
WING_SERVICE qsizetype selectionLength(QObject *sender, qsizetype index);
WING_API qsizetype selectionLength(const QObject *sender, qsizetype index);
WING_SERVICE qsizetype selectionCount(QObject *sender);
WING_API qsizetype selectionCount(const QObject *sender);
WING_SERVICE bool stringVisible(QObject *sender);
WING_API bool stringVisible(const QObject *sender);
WING_SERVICE bool addressVisible(QObject *sender);
WING_API bool addressVisible(const QObject *sender);
WING_SERVICE bool headerVisible(QObject *sender);
WING_API bool headerVisible(const QObject *sender);
WING_SERVICE quintptr addressBase(QObject *sender);
WING_API quintptr addressBase(const QObject *sender);
WING_SERVICE bool isModified(QObject *sender);
WING_API bool isModified(const QObject *sender);
WING_SERVICE qint8 readInt8(QObject *sender, qsizetype offset);
WING_API qint8 readInt8(const QObject *sender, qsizetype offset);
WING_SERVICE qint16 readInt16(QObject *sender, qsizetype offset);
WING_API qint16 readInt16(const QObject *sender, qsizetype offset);
WING_SERVICE qint32 readInt32(QObject *sender, qsizetype offset);
WING_API qint32 readInt32(const QObject *sender, qsizetype offset);
WING_SERVICE qint64 readInt64(QObject *sender, qsizetype offset);
WING_API qint64 readInt64(const QObject *sender, qsizetype offset);
WING_SERVICE quint8 readUInt8(QObject *sender, qsizetype offset);
WING_API quint8 readUInt8(const QObject *sender, qsizetype offset);
WING_SERVICE quint16 readUInt16(QObject *sender, qsizetype offset);
WING_API quint16 readUInt16(const QObject *sender, qsizetype offset);
WING_SERVICE quint32 readUInt32(QObject *sender, qsizetype offset);
WING_API quint32 readUInt32(const QObject *sender, qsizetype offset);
WING_SERVICE quint64 readUInt64(QObject *sender, qsizetype offset);
WING_API quint64 readUInt64(const QObject *sender, qsizetype offset);
WING_SERVICE float readFloat(QObject *sender, qsizetype offset);
WING_API float readFloat(const QObject *sender, qsizetype offset);
WING_SERVICE double readDouble(QObject *sender, qsizetype offset);
WING_API double readDouble(const QObject *sender, qsizetype offset);
WING_SERVICE QString readString(QObject *sender, qsizetype offset,
const QString &encoding);
WING_API QString readString(const QObject *sender, qsizetype offset,
const QString &encoding);
WING_SERVICE QByteArray readBytes(QObject *sender, qsizetype offset,
qsizetype count);
WING_API QByteArray readBytes(const QObject *sender, qsizetype offset,
qsizetype count);
WING_SERVICE qsizetype findNext(QObject *sender, qsizetype begin,
WING_API qsizetype findNext(const QObject *sender, qsizetype begin,
const QByteArray &ba);
WING_API qsizetype findPrevious(const QObject *sender, qsizetype begin,
const QByteArray &ba);
WING_SERVICE qsizetype findPrevious(QObject *sender, qsizetype begin,
const QByteArray &ba);
WING_API QString bookMarkComment(const QObject *sender, qsizetype pos);
WING_SERVICE QString bookMarkComment(QObject *sender, qsizetype pos);
WING_SERVICE bool existBookMark(QObject *sender, qsizetype pos);
WING_API bool existBookMark(const QObject *sender, qsizetype pos);
// document
WING_SERVICE bool switchDocument(QObject *sender, int handle);
WING_API bool switchDocument(const QObject *sender, int handle);
WING_SERVICE bool raiseDocument(QObject *sender, int handle);
WING_API bool raiseDocument(const QObject *sender, int handle);
WING_SERVICE bool setLockedFile(QObject *sender, bool b);
WING_API bool setLockedFile(const QObject *sender, bool b);
WING_SERVICE bool setKeepSize(QObject *sender, bool b);
WING_API bool setKeepSize(const QObject *sender, bool b);
WING_SERVICE bool setStringVisible(QObject *sender, bool b);
WING_API bool setStringVisible(const QObject *sender, bool b);
WING_SERVICE bool setAddressVisible(QObject *sender, bool b);
WING_API bool setAddressVisible(const QObject *sender, bool b);
WING_SERVICE bool setHeaderVisible(QObject *sender, bool b);
WING_API bool setHeaderVisible(const QObject *sender, bool b);
WING_SERVICE bool setAddressBase(QObject *sender, quintptr base);
WING_API bool setAddressBase(const QObject *sender, quintptr base);
WING_SERVICE bool beginMarco(QObject *sender, const QString &txt);
WING_API bool beginMarco(const QObject *sender, const QString &txt);
WING_SERVICE bool endMarco(QObject *sender);
WING_API bool endMarco(const QObject *sender);
WING_SERVICE bool writeInt8(QObject *sender, qsizetype offset, qint8 value);
WING_API bool writeInt8(const QObject *sender, qsizetype offset,
qint8 value);
WING_SERVICE bool writeInt16(QObject *sender, qsizetype offset,
qint16 value);
WING_API bool writeInt16(const QObject *sender, qsizetype offset,
qint16 value);
WING_SERVICE bool writeInt32(QObject *sender, qsizetype offset,
qint32 value);
WING_API bool writeInt32(const QObject *sender, qsizetype offset,
qint32 value);
WING_SERVICE bool writeInt64(QObject *sender, qsizetype offset,
qint64 value);
WING_API bool writeInt64(const QObject *sender, qsizetype offset,
qint64 value);
WING_SERVICE bool writeUInt8(QObject *sender, qsizetype offset,
quint8 value);
WING_API bool writeUInt8(const QObject *sender, qsizetype offset,
quint8 value);
WING_SERVICE bool writeUInt16(QObject *sender, qsizetype offset,
quint16 value);
WING_API bool writeUInt16(const QObject *sender, qsizetype offset,
quint16 value);
WING_SERVICE bool writeUInt32(QObject *sender, qsizetype offset,
quint32 value);
WING_API bool writeUInt32(const QObject *sender, qsizetype offset,
quint32 value);
WING_SERVICE bool writeUInt64(QObject *sender, qsizetype offset,
quint64 value);
WING_API bool writeUInt64(const QObject *sender, qsizetype offset,
quint64 value);
WING_SERVICE bool writeFloat(QObject *sender, qsizetype offset,
float value);
WING_API bool writeFloat(const QObject *sender, qsizetype offset,
float value);
WING_SERVICE bool writeDouble(QObject *sender, qsizetype offset,
double value);
WING_API bool writeDouble(const QObject *sender, qsizetype offset,
double value);
WING_SERVICE bool writeString(QObject *sender, qsizetype offset,
const QString &value,
const QString &encoding);
WING_API bool writeString(const QObject *sender, qsizetype offset,
const QString &value, const QString &encoding);
WING_SERVICE bool writeBytes(QObject *sender, qsizetype offset,
const QByteArray &data);
WING_API bool writeBytes(const QObject *sender, qsizetype offset,
const QByteArray &data);
WING_SERVICE bool insertInt8(QObject *sender, qsizetype offset,
qint8 value);
WING_API bool insertInt8(const QObject *sender, qsizetype offset,
qint8 value);
WING_SERVICE bool insertInt16(QObject *sender, qsizetype offset,
qint16 value);
WING_API bool insertInt16(const QObject *sender, qsizetype offset,
qint16 value);
WING_SERVICE bool insertInt32(QObject *sender, qsizetype offset,
qint32 value);
WING_API bool insertInt32(const QObject *sender, qsizetype offset,
qint32 value);
WING_SERVICE bool insertInt64(QObject *sender, qsizetype offset,
qint64 value);
WING_API bool insertInt64(const QObject *sender, qsizetype offset,
qint64 value);
WING_SERVICE bool insertUInt8(QObject *sender, qsizetype offset,
quint8 value);
WING_API bool insertUInt8(const QObject *sender, qsizetype offset,
quint8 value);
WING_SERVICE bool insertUInt16(QObject *sender, qsizetype offset,
quint16 value);
WING_API bool insertUInt16(const QObject *sender, qsizetype offset,
quint16 value);
WING_SERVICE bool insertUInt32(QObject *sender, qsizetype offset,
quint32 value);
WING_API bool insertUInt32(const QObject *sender, qsizetype offset,
quint32 value);
WING_SERVICE bool insertUInt64(QObject *sender, qsizetype offset,
quint64 value);
WING_API bool insertUInt64(const QObject *sender, qsizetype offset,
quint64 value);
WING_SERVICE bool insertFloat(QObject *sender, qsizetype offset,
float value);
WING_API bool insertFloat(const QObject *sender, qsizetype offset,
float value);
WING_SERVICE bool insertDouble(QObject *sender, qsizetype offset,
double value);
WING_API bool insertDouble(const QObject *sender, qsizetype offset,
double value);
WING_SERVICE bool insertString(QObject *sender, qsizetype offset,
const QString &value,
const QString &encoding);
WING_API bool insertString(const QObject *sender, qsizetype offset,
const QString &value, const QString &encoding);
WING_SERVICE bool insertBytes(QObject *sender, qsizetype offset,
const QByteArray &data);
WING_API bool insertBytes(const QObject *sender, qsizetype offset,
const QByteArray &data);
WING_SERVICE bool appendInt8(QObject *sender, qint8 value);
WING_API bool appendInt8(const QObject *sender, qint8 value);
WING_SERVICE bool appendInt16(QObject *sender, qint16 value);
WING_API bool appendInt16(const QObject *sender, qint16 value);
WING_SERVICE bool appendInt32(QObject *sender, qint32 value);
WING_API bool appendInt32(const QObject *sender, qint32 value);
WING_SERVICE bool appendInt64(QObject *sender, qint64 value);
WING_API bool appendInt64(const QObject *sender, qint64 value);
WING_SERVICE bool appendUInt8(QObject *sender, quint8 value);
WING_API bool appendUInt8(const QObject *sender, quint8 value);
WING_SERVICE bool appendUInt16(QObject *sender, quint16 value);
WING_API bool appendUInt16(const QObject *sender, quint16 value);
WING_SERVICE bool appendUInt32(QObject *sender, quint32 value);
WING_API bool appendUInt32(const QObject *sender, quint32 value);
WING_SERVICE bool appendUInt64(QObject *sender, quint64 value);
WING_API bool appendUInt64(const QObject *sender, quint64 value);
WING_SERVICE bool appendFloat(QObject *sender, float value);
WING_API bool appendFloat(const QObject *sender, float value);
WING_SERVICE bool appendDouble(QObject *sender, double value);
WING_API bool appendDouble(const QObject *sender, double value);
WING_SERVICE bool appendString(QObject *sender, const QString &value,
const QString &encoding);
WING_API bool appendString(const QObject *sender, const QString &value,
const QString &encoding);
WING_SERVICE bool appendBytes(QObject *sender, const QByteArray &data);
WING_API bool appendBytes(const QObject *sender, const QByteArray &data);
WING_SERVICE bool removeBytes(QObject *sender, qsizetype offset,
qsizetype len);
WING_API bool removeBytes(const QObject *sender, qsizetype offset,
qsizetype len);
// cursor
WING_SERVICE bool moveTo(QObject *sender, qsizetype line, qsizetype column,
int nibbleindex, bool clearSelection);
WING_API bool moveTo(const QObject *sender, qsizetype line,
qsizetype column, int nibbleindex,
bool clearSelection);
WING_SERVICE bool moveTo(QObject *sender, qsizetype offset,
bool clearSelection);
WING_API bool moveTo(const QObject *sender, qsizetype offset,
bool clearSelection);
WING_SERVICE bool select(QObject *sender, qsizetype offset,
qsizetype length, SelectionMode mode);
WING_API bool select(const QObject *sender, qsizetype offset,
qsizetype length, WingHex::SelectionMode mode);
WING_SERVICE bool setInsertionMode(QObject *sender, bool isinsert);
WING_API bool setInsertionMode(const QObject *sender, bool isinsert);
WING_SERVICE bool metadata(QObject *sender, qsizetype begin,
qsizetype length, const QColor &fgcolor,
const QColor &bgcolor, const QString &comment);
WING_API bool metadata(const QObject *sender, qsizetype begin,
qsizetype length, const QColor &fgcolor,
const QColor &bgcolor, const QString &comment);
WING_SERVICE bool removeMetadata(QObject *sender, qsizetype offset);
WING_API bool removeMetadata(const QObject *sender, qsizetype offset);
WING_SERVICE bool clearMetadata(QObject *sender);
WING_API bool clearMetadata(const QObject *sender);
WING_SERVICE bool setMetaVisible(QObject *sender, bool b);
WING_API bool setMetaVisible(const QObject *sender, bool b);
WING_SERVICE bool setMetafgVisible(QObject *sender, bool b);
WING_API bool setMetafgVisible(const QObject *sender, bool b);
WING_SERVICE bool setMetabgVisible(QObject *sender, bool b);
WING_API bool setMetabgVisible(const QObject *sender, bool b);
WING_SERVICE bool setMetaCommentVisible(QObject *sender, bool b);
WING_API bool setMetaCommentVisible(const QObject *sender, bool b);
// mainwindow
WING_SERVICE WingHex::ErrFile newFile(QObject *sender);
WING_API WingHex::ErrFile newFile(const QObject *sender);
WING_SERVICE WingHex::ErrFile openFile(QObject *sender,
const QString &filename);
WING_API WingHex::ErrFile openFile(const QObject *sender,
const QString &filename);
WING_SERVICE WingHex::ErrFile
openExtFile(QObject *sender, const QString &ext, const QString &file);
WING_API WingHex::ErrFile
openExtFile(const QObject *sender, const QString &ext, const QString &file);
WING_SERVICE WingHex::ErrFile openWorkSpace(QObject *sender,
const QString &filename);
WING_API WingHex::ErrFile openWorkSpace(const QObject *sender,
const QString &filename);
WING_SERVICE WingHex::ErrFile closeHandle(QObject *sender, int handle);
WING_API WingHex::ErrFile closeHandle(const QObject *sender, int handle);
WING_SERVICE WingHex::ErrFile closeFile(QObject *sender, int handle,
bool force);
WING_API WingHex::ErrFile closeFile(const QObject *sender, int handle,
bool force);
WING_SERVICE WingHex::ErrFile saveFile(QObject *sender, int handle);
WING_API WingHex::ErrFile saveFile(const QObject *sender, int handle);
WING_SERVICE WingHex::ErrFile exportFile(QObject *sender, int handle,
const QString &savename);
WING_API WingHex::ErrFile exportFile(const QObject *sender, int handle,
const QString &savename);
WING_SERVICE WingHex::ErrFile saveAsFile(QObject *sender, int handle,
const QString &savename);
WING_API WingHex::ErrFile saveAsFile(const QObject *sender, int handle,
const QString &savename);
WING_SERVICE WingHex::ErrFile openCurrent(QObject *sender);
WING_API WingHex::ErrFile openCurrent(const QObject *sender);
WING_SERVICE WingHex::ErrFile closeCurrent(QObject *sender, bool force);
WING_API WingHex::ErrFile closeCurrent(const QObject *sender, bool force);
WING_SERVICE WingHex::ErrFile saveCurrent(QObject *sender);
WING_API WingHex::ErrFile saveCurrent(const QObject *sender);
WING_SERVICE WingHex::ErrFile exportCurrent(QObject *sender,
const QString &savename);
WING_API WingHex::ErrFile exportCurrent(const QObject *sender,
const QString &savename);
WING_SERVICE WingHex::ErrFile saveAsCurrent(QObject *sender,
const QString &savename);
WING_API WingHex::ErrFile saveAsCurrent(const QObject *sender,
const QString &savename);
// bookmark
WING_SERVICE bool addBookMark(QObject *sender, qsizetype pos,
const QString &comment);
WING_API bool addBookMark(const QObject *sender, qsizetype pos,
const QString &comment);
WING_SERVICE bool modBookMark(QObject *sender, qsizetype pos,
const QString &comment);
WING_API bool modBookMark(const QObject *sender, qsizetype pos,
const QString &comment);
WING_SERVICE bool removeBookMark(QObject *sender, qsizetype pos);
WING_API bool removeBookMark(const QObject *sender, qsizetype pos);
WING_SERVICE bool clearBookMark(QObject *sender);
WING_API bool clearBookMark(const QObject *sender);
// extension
WING_SERVICE bool closeAllFiles(QObject *sender);
WING_API bool closeAllFiles(const QObject *sender);
private:
WingHex::IWingPlugin *checkPluginAndReport(QObject *sender,
WingHex::IWingPlugin *checkPluginAndReport(const QObject *sender,
const char *func);
WingHex::IWingDevice *checkBaseAndReport(QObject *sender, const char *func);
bool passByFailedGuard(const QObject *sender, const char *func,
const QVariantList &params);
bool checkErrAllAllowAndReport(QObject *sender, const char *func);
bool checkErrAllAllowAndReport(const QObject *sender, const char *func);
private:
CallTable _plgFns;
@ -753,6 +747,9 @@ private:
QHash<QString, QHash<QString, WingAngelAPI::ScriptFnInfo>> _scfns;
IWingManager *_manager = nullptr;
std::optional<PluginInfo> _manInfo;
WingAngelAPI *_angelplg = nullptr;
asCScriptEngine *_engine = nullptr;

View File

@ -258,25 +258,30 @@ void WingAngelAPI::installLogAPI(asIScriptEngine *engine) {
Q_ASSERT(r >= 0);
Q_UNUSED(r);
registerAPI(engine,
asMETHODPR(WingAngelAPI, logInfo, (const QString &), void),
"void info(const string &in message)");
registerAPI(
engine,
asMETHODPR(WingAngelAPI, logInfo, (const QString &) const, void),
"void info(const string &in message)");
registerAPI(engine,
asMETHODPR(WingAngelAPI, logTrace, (const QString &), void),
"void trace(const string &in message)");
registerAPI(
engine,
asMETHODPR(WingAngelAPI, logTrace, (const QString &) const, void),
"void trace(const string &in message)");
registerAPI(engine,
asMETHODPR(WingAngelAPI, logDebug, (const QString &), void),
"void debug(const string &in message)");
registerAPI(
engine,
asMETHODPR(WingAngelAPI, logDebug, (const QString &) const, void),
"void debug(const string &in message)");
registerAPI(engine,
asMETHODPR(WingAngelAPI, logWarn, (const QString &), void),
"void warn(const string &in message)");
registerAPI(
engine,
asMETHODPR(WingAngelAPI, logWarn, (const QString &) const, void),
"void warn(const string &in message)");
registerAPI(engine,
asMETHODPR(WingAngelAPI, logError, (const QString &), void),
"void error(const string &in message)");
registerAPI(
engine,
asMETHODPR(WingAngelAPI, logError, (const QString &) const, void),
"void error(const string &in message)");
engine->SetDefaultNamespace("");
}
@ -544,65 +549,73 @@ void WingAngelAPI::installHexReaderAPI(asIScriptEngine *engine) {
Q_ASSERT(r >= 0);
Q_UNUSED(r);
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, isCurrentDocEditing,
(void) const, bool),
"bool isCurrentDocEditing()");
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, currentDocFilename,
(void) const, QString),
"string currentDocFilename()");
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, isCurrentDocEditing, (void), bool),
"bool isCurrentDocEditing()");
asMETHODPR(WingHex::IWingPlugin, isInsertionMode, (void) const, bool),
"bool isInsertionMode()");
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, currentDocFilename, (void), QString),
"string currentDocFilename()");
asMETHODPR(WingHex::IWingPlugin, isReadOnly, (void) const, bool),
"bool isReadOnly()");
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, isKeepSize, (void) const, bool),
"bool isKeepSize()");
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, isInsertionMode, (void), bool),
"bool isInsertionMode()");
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, isReadOnly, (void), bool),
"bool isReadOnly()");
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, isKeepSize, (void), bool),
"bool isKeepSize()");
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, isLocked, (void), bool),
asMETHODPR(WingHex::IWingPlugin, isLocked, (void) const, bool),
"bool isLocked()");
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, currentPos, (void),
asMETHODPR(WingHex::IWingPlugin, currentPos, (void) const,
WingHex::HexPosition),
"HexPosition currentPos()");
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, stringVisible, (void), bool),
"bool stringVisible()");
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, addressVisible, (void), bool),
"bool addressVisible()");
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, headerVisible, (void), bool),
"bool headerVisible()");
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, isModified, (void), bool),
"bool isModified()");
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, documentLines, (void), qsizetype),
QSIZETYPE_WRAP("documentLines()"));
asMETHODPR(WingHex::IWingPlugin, stringVisible, (void) const, bool),
"bool stringVisible()");
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, documentBytes, (void), qsizetype),
QSIZETYPE_WRAP("documentBytes()"));
asMETHODPR(WingHex::IWingPlugin, addressVisible, (void) const, bool),
"bool addressVisible()");
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, headerVisible, (void) const, bool),
"bool headerVisible()");
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, isModified, (void) const, bool),
"bool isModified()");
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, currentRow, (void), qsizetype),
QSIZETYPE_WRAP("currentRow()"));
asMETHODPR(WingHex::IWingPlugin, documentLines, (void) const,
qsizetype),
QSIZETYPE_WRAP("documentLines()"));
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, documentBytes, (void) const,
qsizetype),
QSIZETYPE_WRAP("documentBytes()"));
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, currentColumn, (void), qsizetype),
QSIZETYPE_WRAP("currentColumn()"));
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, currentOffset, (void), qsizetype),
QSIZETYPE_WRAP("currentOffset()"));
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, selectedLength, (void), qsizetype),
QSIZETYPE_WRAP("selectedLength()"));
asMETHODPR(WingHex::IWingPlugin, currentRow, (void) const, qsizetype),
QSIZETYPE_WRAP("currentRow()"));
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, currentColumn, (void) const,
qsizetype),
QSIZETYPE_WRAP("currentColumn()"));
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, currentOffset, (void) const,
qsizetype),
QSIZETYPE_WRAP("currentOffset()"));
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, selectedLength, (void) const,
qsizetype),
QSIZETYPE_WRAP("selectedLength()"));
registerAPI(engine,
asMETHODPR(WingAngelAPI, _HexReader_selectedBytes, (qsizetype),
@ -614,76 +627,80 @@ void WingAngelAPI::installHexReaderAPI(asIScriptEngine *engine) {
"byte[][]@ selectionBytes()");
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, selectionStart, (qsizetype),
WingHex::HexPosition),
asMETHODPR(WingHex::IWingPlugin, selectionStart,
(qsizetype) const, WingHex::HexPosition),
"HexPosition selectionStart(" QSIZETYPE " index)");
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, selectionEnd, (qsizetype),
WingHex::HexPosition),
asMETHODPR(WingHex::IWingPlugin, selectionEnd,
(qsizetype) const, WingHex::HexPosition),
"HexPosition selectionEnd(" QSIZETYPE " index)");
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, selectionLength, (qsizetype),
qsizetype),
asMETHODPR(WingHex::IWingPlugin, selectionLength,
(qsizetype) const, qsizetype),
QSIZETYPE_WRAP("selectionLength(" QSIZETYPE " index)"));
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, selectionCount, (), qsizetype),
QSIZETYPE_WRAP("selectionCount()"));
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, selectionCount, () const, qsizetype),
QSIZETYPE_WRAP("selectionCount()"));
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, addressBase, (void), quintptr),
QPTR_WRAP("addressBase()"));
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, addressBase, (void) const, quintptr),
QPTR_WRAP("addressBase()"));
registerAPI(engine,
asMETHODPR(WingAngelAPI, _HexReader_readBytes,
(qsizetype, qsizetype), CScriptArray *),
"byte[]@ readBytes(" QSIZETYPE " offset," QSIZETYPE " len)");
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, readInt8, (qsizetype), qint8),
"int8 readInt8(" QSIZETYPE " offset)");
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, readUInt8, (qsizetype), quint8),
asMETHODPR(WingHex::IWingPlugin, readInt8, (qsizetype) const, qint8),
"int8 readInt8(" QSIZETYPE " offset)");
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, readUInt8, (qsizetype) const, quint8),
"uint8 readUInt8(" QSIZETYPE " offset)");
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, readInt16, (qsizetype), qint16),
asMETHODPR(WingHex::IWingPlugin, readInt16, (qsizetype) const, qint16),
"int16 readInt16(" QSIZETYPE " offset)");
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, readUInt16, (qsizetype), quint16),
"uint16 readUInt16(" QSIZETYPE " offset)");
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, readInt32, (qsizetype), qint32),
"int readInt32(" QSIZETYPE " offset)");
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, readUInt32, (qsizetype), quint32),
"uint readUInt32(" QSIZETYPE " offset)");
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, readInt64, (qsizetype), qint64),
"int64 readInt64(" QSIZETYPE " offset)");
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, readUInt64, (qsizetype), quint64),
"uint64 readUInt64(" QSIZETYPE " offset)");
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, readFloat, (qsizetype), float),
"float readFloat(" QSIZETYPE " offset)");
asMETHODPR(WingHex::IWingPlugin, readUInt16, (qsizetype) const,
quint16),
"uint16 readUInt16(" QSIZETYPE " offset)");
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, readDouble, (qsizetype), double),
asMETHODPR(WingHex::IWingPlugin, readInt32, (qsizetype) const, qint32),
"int readInt32(" QSIZETYPE " offset)");
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, readUInt32, (qsizetype) const,
quint32),
"uint readUInt32(" QSIZETYPE " offset)");
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, readInt64, (qsizetype) const, qint64),
"int64 readInt64(" QSIZETYPE " offset)");
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, readUInt64, (qsizetype) const,
quint64),
"uint64 readUInt64(" QSIZETYPE " offset)");
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, readFloat, (qsizetype) const, float),
"float readFloat(" QSIZETYPE " offset)");
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, readDouble, (qsizetype) const, double),
"double readDouble(" QSIZETYPE " offset)");
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, readString,
(qsizetype, const QString &), QString),
(qsizetype, const QString &) const, QString),
"string readString(" QSIZETYPE
" offset, string &in encoding = \"\")");
@ -697,15 +714,15 @@ void WingAngelAPI::installHexReaderAPI(asIScriptEngine *engine) {
(qsizetype, const CScriptArray &), qsizetype),
QSIZETYPE_WRAP("findPrevious(" QSIZETYPE " begin, byte[] &in ba)"));
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, bookMarkComment, (qsizetype), QString),
"string bookMarkComment(" QSIZETYPE " pos)");
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, bookMarkComment,
(qsizetype) const, QString),
"string bookMarkComment(" QSIZETYPE " pos)");
registerAPI(
engine,
asMETHODPR(WingHex::IWingPlugin, existBookMark, (qsizetype), bool),
"bool existBookMark(" QSIZETYPE " pos)");
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, existBookMark,
(qsizetype) const, bool),
"bool existBookMark(" QSIZETYPE " pos)");
engine->SetDefaultNamespace("");
}
@ -1060,7 +1077,8 @@ void WingAngelAPI::installHexControllerAPI(asIScriptEngine *engine) {
(const QString &), WingHex::ErrFile),
"ErrFile openWorkSpace(string &in filename)");
registerAPI(engine, asMETHOD(WingHex::IWingPlugin, closeAllFiles),
registerAPI(engine,
asMETHODPR(WingHex::IWingPlugin, closeAllFiles, (), bool),
"bool closeAll()");
engine->SetDefaultNamespace("");
@ -2098,9 +2116,9 @@ CScriptArray *WingAngelAPI::_HexReader_selectionBytes() {
auto array = CScriptArray::Create(arrt, ret.size());
for (qsizetype i = 0; i < ret.size(); ++i) {
auto buffer = ret.at(i);
auto conarr = CScriptArray::Create(t, ret.size());
for (qsizetype i = 0; i < ret.size(); ++i) {
auto v = ret.at(buffer.at(i));
auto conarr = CScriptArray::Create(t, buffer.size());
for (qsizetype i = 0; i < buffer.size(); ++i) {
auto v = buffer.at(i);
conarr->SetValue(i, &v);
}
array->SetValue(i, conarr);

View File

@ -1,6 +1,6 @@
以下组件为该软件所使用的所有第三方组件,标注 **FORK** 表示已经被该软件作者大量魔改,若后续标注箭头和开源协议表示所有修改的文件遵守箭头所指向的开源协议,若不标注则遵守原有的协议。没特殊说明,**APGL-3.0** 只应用到该官方源码仓库的非子模块git-submodule部分。
The following components are all third-party components used by the software. The **FORK** mark indicates that they have been heavily modified by the software author. If there is an arrow and open source license, all modified files comply with the open source agreement pointed by the arrow. If there is no mark, the original agreement is followed. Unless otherwise specified, **APGL-3.0** is only applied to the non-submodule (git-submodule) part of the official source repository.
The following components are all third-party components used by the software. The **FORK** mark indicates that they have been deeply modified by the software author. If there is an arrow and open source license, all modified files comply with the open source license pointed by the arrow. If there is no mark, the original agreement is followed. Unless otherwise specified, **APGL-3.0** is only applied to the non-submodule (git-submodule) part of the official source repository.
* [QHexView](https://github.com/Dax89/QHexView/tree/master) (MIT, **FORK** -> AGPL-3.0)
* [QHexEdit2](https://github.com/Simsys/qhexedit2) (GPL, **FORK**)
@ -9,6 +9,7 @@ The following components are all third-party components used by the software. Th
* [QWingRibbon](https://github.com/martijnkoopman/Qt-Ribbon-Widget) (LGPL, **FORK**)
* [QtSingleApplication](https://github.com/qtproject/qt-solutions/tree/master/qtsingleapplication) (BSD-3-Clause)
* [QWindowKit](https://github.com/stdware/qwindowkit) (Apache v2.0)
* [antlr4](https://github.com/antlr/antlr4) (BSD-3-Clause)
* [AngelScript](https://github.com/codecat/angelscript-mirror) (zlib license)
* [cpptrace](https://github.com/jeremy-rifkin/cpptrace) (MIT)
* [QConsoleWidget](https://github.com/gapost/qconsolewidget) (MIT, **FORK** -> AGPL-3.0)

View File

@ -132,19 +132,24 @@ EditorView::EditorView(QWidget *parent)
auto total = mobj->methodCount();
for (int i = 0; i < total; ++i) {
auto m = mobj->method(i);
if (m.methodType() == QMetaMethod::Method) {
QByteArray msig = m.name();
msig.append('(');
QByteArrayList params;
auto total = m.parameterCount();
for (int i = 1; i < total; ++i) {
auto mt = QMetaType(m.parameterType(i));
params.append(mt.name());
// all private slots
if (m.methodType() == QMetaMethod::Slot &&
m.access() == QMetaMethod::Private) {
if (qstrcmp(m.tag(), "WING_API")) {
continue;
}
WingHex::FunctionSig msig;
msig.fnName = m.name();
auto total = m.parameterCount();
msig.types.reserve(total);
for (int i = 1; i < total; ++i) {
auto mt = m.parameterType(i);
msig.types.append(mt);
}
msig.append(params.join(','));
msig.append(')');
_viewFns.insert(msig, m);
}
}
@ -864,7 +869,7 @@ void EditorView::applyFunctionTables(WingEditorViewWidget *view,
view->setProperty("__CALL_POINTER__", quintptr(this));
}
bool EditorView::checkErrAndReport(QObject *sender, const char *func) {
bool EditorView::checkErrAndReport(const QObject *sender, const char *func) {
for (auto p = m_others.constBegin(); p != m_others.constEnd(); ++p) {
if (*p == sender) {
return true;
@ -886,18 +891,13 @@ bool EditorView::existsServiceHost(QObject *caller, const QString &puid) {
return PluginSystem::instance().existsServiceHost(caller, puid);
}
bool EditorView::invokeService(QObject *caller, const QString &puid,
const char *method, Qt::ConnectionType type,
QGenericReturnArgument ret,
QGenericArgument val0, QGenericArgument val1,
QGenericArgument val2, QGenericArgument val3,
QGenericArgument val4) {
if (checkErrAndReport(caller, __func__)) {
bool EditorView::invokeServiceImpl(const QObject *sender, const QString &puid,
const MetaCallInfo &infos) {
if (checkErrAndReport(sender, __func__)) {
return false;
}
return PluginSystem::instance().invokeService(
this, {}, puid, method, type, ret, val0, val1, val2, val3, val4);
return PluginSystem::instance().invokeServiceImpl(this, puid, infos);
}
QString EditorView::currentDocFilename(QObject *caller) {

View File

@ -231,294 +231,273 @@ private:
const CallTable &fns);
private:
bool checkErrAndReport(QObject *sender, const char *func);
bool checkErrAndReport(const QObject *sender, const char *func);
bool checkThreadAff();
private:
WING_SERVICE bool existsServiceHost(QObject *caller, const QString &puid);
private slots:
WING_API bool existsServiceHost(QObject *caller, const QString &puid);
WING_SERVICE bool
invokeService(QObject *caller, const QString &puid, const char *method,
Qt::ConnectionType type, QGenericReturnArgument ret,
QGenericArgument val0, QGenericArgument val1,
QGenericArgument val2, QGenericArgument val3,
QGenericArgument val4);
WING_API bool invokeServiceImpl(const QObject *sender, const QString &puid,
const MetaCallInfo &infos);
private:
WING_SERVICE QString currentDocFilename(QObject *caller);
private slots:
WING_API QString currentDocFilename(QObject *caller);
// document
WING_SERVICE bool isReadOnly(QObject *caller);
WING_SERVICE bool isInsertionMode(QObject *caller);
WING_SERVICE bool isKeepSize(QObject *caller);
WING_SERVICE bool isLocked(QObject *caller);
WING_SERVICE qsizetype documentLines(QObject *caller);
WING_SERVICE qsizetype documentBytes(QObject *caller);
WING_SERVICE WingHex::HexPosition currentPos(QObject *caller);
WING_SERVICE qsizetype currentRow(QObject *caller);
WING_SERVICE qsizetype currentColumn(QObject *caller);
WING_SERVICE qsizetype currentOffset(QObject *caller);
WING_SERVICE qsizetype selectedLength(QObject *caller);
WING_API bool isReadOnly(QObject *caller);
WING_API bool isInsertionMode(QObject *caller);
WING_API bool isKeepSize(QObject *caller);
WING_API bool isLocked(QObject *caller);
WING_API qsizetype documentLines(QObject *caller);
WING_API qsizetype documentBytes(QObject *caller);
WING_API WingHex::HexPosition currentPos(QObject *caller);
WING_API qsizetype currentRow(QObject *caller);
WING_API qsizetype currentColumn(QObject *caller);
WING_API qsizetype currentOffset(QObject *caller);
WING_API qsizetype selectedLength(QObject *caller);
WING_SERVICE QByteArray selectedBytes(QObject *caller, qsizetype index);
WING_SERVICE QByteArrayList selectionBytes(QObject *caller);
WING_API QByteArray selectedBytes(QObject *caller, qsizetype index);
WING_API QByteArrayList selectionBytes(QObject *caller);
WING_SERVICE WingHex::HexPosition selectionStart(QObject *caller,
qsizetype index);
WING_SERVICE WingHex::HexPosition selectionEnd(QObject *caller,
qsizetype index);
WING_SERVICE qsizetype selectionLength(QObject *caller, qsizetype index);
WING_SERVICE qsizetype selectionCount(QObject *caller);
WING_API WingHex::HexPosition selectionStart(QObject *caller,
qsizetype index);
WING_API WingHex::HexPosition selectionEnd(QObject *caller,
qsizetype index);
WING_API qsizetype selectionLength(QObject *caller, qsizetype index);
WING_API qsizetype selectionCount(QObject *caller);
WING_SERVICE bool stringVisible(QObject *caller);
WING_SERVICE bool addressVisible(QObject *caller);
WING_SERVICE bool headerVisible(QObject *caller);
WING_SERVICE quintptr addressBase(QObject *caller);
WING_SERVICE bool isModified(QObject *caller);
WING_API bool stringVisible(QObject *caller);
WING_API bool addressVisible(QObject *caller);
WING_API bool headerVisible(QObject *caller);
WING_API quintptr addressBase(QObject *caller);
WING_API bool isModified(QObject *caller);
WING_SERVICE qint8 readInt8(QObject *caller, qsizetype offset);
WING_SERVICE qint16 readInt16(QObject *caller, qsizetype offset);
WING_SERVICE qint32 readInt32(QObject *caller, qsizetype offset);
WING_SERVICE qint64 readInt64(QObject *caller, qsizetype offset);
WING_SERVICE quint8 readUInt8(QObject *caller, qsizetype offset);
WING_SERVICE quint16 readUInt16(QObject *caller, qsizetype offset);
WING_SERVICE quint32 readUInt32(QObject *caller, qsizetype offset);
WING_SERVICE quint64 readUInt64(QObject *caller, qsizetype offset);
WING_SERVICE float readFloat(QObject *caller, qsizetype offset);
WING_SERVICE double readDouble(QObject *caller, qsizetype offset);
WING_SERVICE QString readString(QObject *caller, qsizetype offset,
const QString &encoding);
WING_SERVICE QByteArray readBytes(QObject *caller, qsizetype offset,
qsizetype count);
WING_API qint8 readInt8(QObject *caller, qsizetype offset);
WING_API qint16 readInt16(QObject *caller, qsizetype offset);
WING_API qint32 readInt32(QObject *caller, qsizetype offset);
WING_API qint64 readInt64(QObject *caller, qsizetype offset);
WING_API quint8 readUInt8(QObject *caller, qsizetype offset);
WING_API quint16 readUInt16(QObject *caller, qsizetype offset);
WING_API quint32 readUInt32(QObject *caller, qsizetype offset);
WING_API quint64 readUInt64(QObject *caller, qsizetype offset);
WING_API float readFloat(QObject *caller, qsizetype offset);
WING_API double readDouble(QObject *caller, qsizetype offset);
WING_API QString readString(QObject *caller, qsizetype offset,
const QString &encoding);
WING_API QByteArray readBytes(QObject *caller, qsizetype offset,
qsizetype count);
WING_SERVICE qsizetype findNext(QObject *caller, qsizetype begin,
WING_API qsizetype findNext(QObject *caller, qsizetype begin,
const QByteArray &ba);
WING_API qsizetype findPrevious(QObject *caller, qsizetype begin,
const QByteArray &ba);
WING_SERVICE qsizetype findPrevious(QObject *caller, qsizetype begin,
const QByteArray &ba);
WING_SERVICE QString bookMarkComment(QObject *caller, qsizetype pos);
WING_SERVICE bool existBookMark(QObject *caller, qsizetype pos);
WING_API QString bookMarkComment(QObject *caller, qsizetype pos);
WING_API bool existBookMark(QObject *caller, qsizetype pos);
WING_SERVICE bool setLockedFile(QObject *caller, bool b);
WING_SERVICE bool setKeepSize(QObject *caller, bool b);
WING_SERVICE bool setStringVisible(QObject *caller, bool b);
WING_SERVICE bool setAddressVisible(QObject *caller, bool b);
WING_SERVICE bool setHeaderVisible(QObject *caller, bool b);
WING_SERVICE bool setAddressBase(QObject *caller, quintptr base);
WING_API bool setLockedFile(QObject *caller, bool b);
WING_API bool setKeepSize(QObject *caller, bool b);
WING_API bool setStringVisible(QObject *caller, bool b);
WING_API bool setAddressVisible(QObject *caller, bool b);
WING_API bool setHeaderVisible(QObject *caller, bool b);
WING_API bool setAddressBase(QObject *caller, quintptr base);
WING_SERVICE bool beginMarco(QObject *caller, const QString &txt);
WING_API bool beginMarco(QObject *caller, const QString &txt);
bool endMarco(QObject *caller);
WING_SERVICE bool writeInt8(QObject *caller, qsizetype offset, qint8 value);
WING_SERVICE bool writeInt16(QObject *caller, qsizetype offset,
qint16 value);
WING_SERVICE bool writeInt32(QObject *caller, qsizetype offset,
qint32 value);
WING_SERVICE bool writeInt64(QObject *caller, qsizetype offset,
qint64 value);
WING_SERVICE bool writeUInt8(QObject *caller, qsizetype offset,
quint8 value);
WING_SERVICE bool writeUInt16(QObject *caller, qsizetype offset,
quint16 value);
WING_SERVICE bool writeUInt32(QObject *caller, qsizetype offset,
quint32 value);
WING_SERVICE bool writeUInt64(QObject *caller, qsizetype offset,
quint64 value);
WING_SERVICE bool writeFloat(QObject *caller, qsizetype offset,
float value);
WING_SERVICE bool writeDouble(QObject *caller, qsizetype offset,
double value);
WING_SERVICE
WING_API bool writeInt8(QObject *caller, qsizetype offset, qint8 value);
WING_API bool writeInt16(QObject *caller, qsizetype offset, qint16 value);
WING_API bool writeInt32(QObject *caller, qsizetype offset, qint32 value);
WING_API bool writeInt64(QObject *caller, qsizetype offset, qint64 value);
WING_API bool writeUInt8(QObject *caller, qsizetype offset, quint8 value);
WING_API bool writeUInt16(QObject *caller, qsizetype offset, quint16 value);
WING_API bool writeUInt32(QObject *caller, qsizetype offset, quint32 value);
WING_API bool writeUInt64(QObject *caller, qsizetype offset, quint64 value);
WING_API bool writeFloat(QObject *caller, qsizetype offset, float value);
WING_API bool writeDouble(QObject *caller, qsizetype offset, double value);
WING_API
bool writeString(QObject *caller, qsizetype offset, const QString &value,
const QString &encoding);
WING_SERVICE bool writeBytes(QObject *caller, qsizetype offset,
const QByteArray &data);
WING_API bool writeBytes(QObject *caller, qsizetype offset,
const QByteArray &data);
WING_SERVICE bool insertInt8(QObject *caller, qsizetype offset,
qint8 value);
WING_SERVICE bool insertInt16(QObject *caller, qsizetype offset,
qint16 value);
WING_SERVICE bool insertInt32(QObject *caller, qsizetype offset,
qint32 value);
WING_SERVICE bool insertInt64(QObject *caller, qsizetype offset,
qint64 value);
WING_SERVICE bool insertUInt8(QObject *caller, qsizetype offset,
quint8 value);
WING_SERVICE
WING_API bool insertInt8(QObject *caller, qsizetype offset, qint8 value);
WING_API bool insertInt16(QObject *caller, qsizetype offset, qint16 value);
WING_API bool insertInt32(QObject *caller, qsizetype offset, qint32 value);
WING_API bool insertInt64(QObject *caller, qsizetype offset, qint64 value);
WING_API bool insertUInt8(QObject *caller, qsizetype offset, quint8 value);
WING_API
bool insertUInt16(QObject *caller, qsizetype offset, quint16 value);
WING_SERVICE
WING_API
bool insertUInt32(QObject *caller, qsizetype offset, quint32 value);
WING_SERVICE bool insertUInt64(QObject *caller, qsizetype offset,
quint64 value);
WING_SERVICE bool insertFloat(QObject *caller, qsizetype offset,
float value);
WING_SERVICE bool insertDouble(QObject *caller, qsizetype offset,
double value);
WING_SERVICE bool insertString(QObject *caller, qsizetype offset,
const QString &value,
const QString &encoding);
WING_SERVICE bool insertBytes(QObject *caller, qsizetype offset,
const QByteArray &data);
WING_API bool insertUInt64(QObject *caller, qsizetype offset,
quint64 value);
WING_API bool insertFloat(QObject *caller, qsizetype offset, float value);
WING_API bool insertDouble(QObject *caller, qsizetype offset, double value);
WING_API bool insertString(QObject *caller, qsizetype offset,
const QString &value, const QString &encoding);
WING_API bool insertBytes(QObject *caller, qsizetype offset,
const QByteArray &data);
WING_SERVICE bool appendInt8(QObject *caller, qint8 value);
WING_SERVICE bool appendInt16(QObject *caller, qint16 value);
WING_SERVICE bool appendInt32(QObject *caller, qint32 value);
WING_SERVICE bool appendInt64(QObject *caller, qint64 value);
WING_SERVICE bool appendUInt8(QObject *caller, quint8 value);
WING_SERVICE bool appendUInt16(QObject *caller, quint16 value);
WING_SERVICE bool appendUInt32(QObject *caller, quint32 value);
WING_SERVICE bool appendUInt64(QObject *caller, quint64 value);
WING_SERVICE bool appendFloat(QObject *caller, float value);
WING_SERVICE bool appendDouble(QObject *caller, double value);
WING_SERVICE bool appendString(QObject *caller, const QString &value,
const QString &encoding);
WING_SERVICE bool appendBytes(QObject *caller, const QByteArray &data);
WING_API bool appendInt8(QObject *caller, qint8 value);
WING_API bool appendInt16(QObject *caller, qint16 value);
WING_API bool appendInt32(QObject *caller, qint32 value);
WING_API bool appendInt64(QObject *caller, qint64 value);
WING_API bool appendUInt8(QObject *caller, quint8 value);
WING_API bool appendUInt16(QObject *caller, quint16 value);
WING_API bool appendUInt32(QObject *caller, quint32 value);
WING_API bool appendUInt64(QObject *caller, quint64 value);
WING_API bool appendFloat(QObject *caller, float value);
WING_API bool appendDouble(QObject *caller, double value);
WING_API bool appendString(QObject *caller, const QString &value,
const QString &encoding);
WING_API bool appendBytes(QObject *caller, const QByteArray &data);
WING_SERVICE bool removeBytes(QObject *caller, qsizetype offset,
qsizetype len);
WING_API bool removeBytes(QObject *caller, qsizetype offset, qsizetype len);
// cursor
WING_SERVICE bool moveTo(QObject *caller, qsizetype line, qsizetype column,
int nibbleindex, bool clearSelection);
WING_SERVICE bool moveTo(QObject *caller, qsizetype offset,
bool clearSelection);
WING_SERVICE bool select(QObject *caller, qsizetype offset,
qsizetype length, SelectionMode mode);
WING_SERVICE bool setInsertionMode(QObject *caller, bool isinsert);
WING_API bool moveTo(QObject *caller, qsizetype line, qsizetype column,
int nibbleindex, bool clearSelection);
WING_API bool moveTo(QObject *caller, qsizetype offset,
bool clearSelection);
WING_API bool select(QObject *caller, qsizetype offset, qsizetype length,
SelectionMode mode);
WING_API bool setInsertionMode(QObject *caller, bool isinsert);
// metadata
WING_SERVICE bool metadata(QObject *caller, qsizetype begin,
qsizetype length, const QColor &fgcolor,
const QColor &bgcolor, const QString &comment);
WING_API bool metadata(QObject *caller, qsizetype begin, qsizetype length,
const QColor &fgcolor, const QColor &bgcolor,
const QString &comment);
WING_SERVICE bool removeMetadata(QObject *caller, qsizetype offset);
WING_SERVICE bool clearMetadata(QObject *caller);
WING_SERVICE bool setMetaVisible(QObject *caller, bool b);
WING_SERVICE bool setMetafgVisible(QObject *caller, bool b);
WING_SERVICE bool setMetabgVisible(QObject *caller, bool b);
WING_SERVICE bool setMetaCommentVisible(QObject *caller, bool b);
WING_API bool removeMetadata(QObject *caller, qsizetype offset);
WING_API bool clearMetadata(QObject *caller);
WING_API bool setMetaVisible(QObject *caller, bool b);
WING_API bool setMetafgVisible(QObject *caller, bool b);
WING_API bool setMetabgVisible(QObject *caller, bool b);
WING_API bool setMetaCommentVisible(QObject *caller, bool b);
// bookmark
WING_SERVICE bool addBookMark(QObject *caller, qsizetype pos,
const QString &comment);
WING_SERVICE bool modBookMark(QObject *caller, qsizetype pos,
const QString &comment);
WING_SERVICE bool removeBookMark(QObject *caller, qsizetype pos);
WING_SERVICE bool clearBookMark(QObject *caller);
WING_API bool addBookMark(QObject *caller, qsizetype pos,
const QString &comment);
WING_API bool modBookMark(QObject *caller, qsizetype pos,
const QString &comment);
WING_API bool removeBookMark(QObject *caller, qsizetype pos);
WING_API bool clearBookMark(QObject *caller);
private:
WING_SERVICE void toast(QObject *caller, const QPixmap &icon,
const QString &message);
WING_SERVICE void logTrace(QObject *caller, const QString &message);
WING_SERVICE void logDebug(QObject *caller, const QString &message);
WING_SERVICE void logWarn(QObject *caller, const QString &message);
WING_SERVICE void logError(QObject *caller, const QString &message);
WING_SERVICE void logInfo(QObject *caller, const QString &message);
private slots:
WING_API void toast(QObject *caller, const QPixmap &icon,
const QString &message);
WING_API void logTrace(QObject *caller, const QString &message);
WING_API void logDebug(QObject *caller, const QString &message);
WING_API void logWarn(QObject *caller, const QString &message);
WING_API void logError(QObject *caller, const QString &message);
WING_API void logInfo(QObject *caller, const QString &message);
WING_SERVICE bool raiseDockWidget(QObject *caller, QWidget *w);
WING_API bool raiseDockWidget(QObject *caller, QWidget *w);
// theme
WING_SERVICE WingHex::AppTheme currentAppTheme(QObject *caller);
WING_API WingHex::AppTheme currentAppTheme(QObject *caller);
// not available for AngelScript
// only for plugin UI extenstion
WING_SERVICE QDialog *createDialog(QObject *caller, QWidget *content);
WING_API QDialog *createDialog(QObject *caller, QWidget *content);
private:
WING_SERVICE void msgAboutQt(QObject *caller, QWidget *parent = nullptr,
const QString &title = QString());
private slots:
WING_API void msgAboutQt(QObject *caller, QWidget *parent = nullptr,
const QString &title = QString());
WING_SERVICE QMessageBox::StandardButton msgInformation(
WING_API QMessageBox::StandardButton msgInformation(
QObject *caller, QWidget *parent, const QString &title,
const QString &text,
QMessageBox::StandardButtons buttons = QMessageBox::Ok,
QMessageBox::StandardButton defaultButton = QMessageBox::NoButton);
WING_SERVICE QMessageBox::StandardButton msgQuestion(
WING_API QMessageBox::StandardButton msgQuestion(
QObject *caller, QWidget *parent, const QString &title,
const QString &text,
QMessageBox::StandardButtons buttons =
QMessageBox::StandardButtons(QMessageBox::Yes | QMessageBox::No),
QMessageBox::StandardButton defaultButton = QMessageBox::NoButton);
WING_SERVICE QMessageBox::StandardButton msgWarning(
WING_API QMessageBox::StandardButton msgWarning(
QObject *caller, QWidget *parent, const QString &title,
const QString &text,
QMessageBox::StandardButtons buttons = QMessageBox::Ok,
QMessageBox::StandardButton defaultButton = QMessageBox::NoButton);
WING_SERVICE QMessageBox::StandardButton msgCritical(
WING_API QMessageBox::StandardButton msgCritical(
QObject *caller, QWidget *parent, const QString &title,
const QString &text,
QMessageBox::StandardButtons buttons = QMessageBox::Ok,
QMessageBox::StandardButton defaultButton = QMessageBox::NoButton);
WING_SERVICE void msgAbout(QObject *caller, QWidget *parent,
const QString &title, const QString &text);
WING_API void msgAbout(QObject *caller, QWidget *parent,
const QString &title, const QString &text);
WING_SERVICE QMessageBox::StandardButton
WING_API QMessageBox::StandardButton
msgbox(QObject *caller, QWidget *parent, QMessageBox::Icon icon,
const QString &title, const QString &text,
QMessageBox::StandardButtons buttons = QMessageBox::NoButton,
QMessageBox::StandardButton defaultButton = QMessageBox::NoButton);
private:
WING_SERVICE QString dlgGetText(QObject *caller, QWidget *parent,
const QString &title, const QString &label,
QLineEdit::EchoMode echo,
const QString &text, bool *ok,
Qt::InputMethodHints inputMethodHints);
WING_SERVICE QString
dlgGetMultiLineText(QObject *caller, QWidget *parent, const QString &title,
const QString &label, const QString &text, bool *ok,
Qt::InputMethodHints inputMethodHints);
private slots:
WING_API QString dlgGetText(QObject *caller, QWidget *parent,
const QString &title, const QString &label,
QLineEdit::EchoMode echo, const QString &text,
bool *ok,
Qt::InputMethodHints inputMethodHints);
WING_API QString dlgGetMultiLineText(QObject *caller, QWidget *parent,
const QString &title,
const QString &label,
const QString &text, bool *ok,
Qt::InputMethodHints inputMethodHints);
WING_SERVICE QString dlgGetItem(QObject *caller, QWidget *parent,
const QString &title, const QString &label,
const QStringList &items, int current,
bool editable, bool *ok,
Qt::InputMethodHints inputMethodHints);
WING_API QString dlgGetItem(QObject *caller, QWidget *parent,
const QString &title, const QString &label,
const QStringList &items, int current,
bool editable, bool *ok,
Qt::InputMethodHints inputMethodHints);
WING_SERVICE int dlgGetInt(QObject *caller, QWidget *parent,
const QString &title, const QString &label,
int value, int minValue, int maxValue, int step,
bool *ok);
WING_API int dlgGetInt(QObject *caller, QWidget *parent,
const QString &title, const QString &label,
int value, int minValue, int maxValue, int step,
bool *ok);
WING_SERVICE double dlgGetDouble(QObject *caller, QWidget *parent,
const QString &title, const QString &label,
double value, double minValue,
double maxValue, int decimals, bool *ok,
double step);
WING_API double dlgGetDouble(QObject *caller, QWidget *parent,
const QString &title, const QString &label,
double value, double minValue, double maxValue,
int decimals, bool *ok, double step);
private:
WING_SERVICE QString dlgGetExistingDirectory(QObject *caller,
QWidget *parent,
const QString &caption,
const QString &dir,
QFileDialog::Options options);
private slots:
WING_API QString dlgGetExistingDirectory(QObject *caller, QWidget *parent,
const QString &caption,
const QString &dir,
QFileDialog::Options options);
WING_SERVICE QString dlgGetOpenFileName(QObject *caller, QWidget *parent,
const QString &caption,
const QString &dir,
const QString &filter,
QString *selectedFilter,
QFileDialog::Options options);
WING_API QString dlgGetOpenFileName(QObject *caller, QWidget *parent,
const QString &caption,
const QString &dir,
const QString &filter,
QString *selectedFilter,
QFileDialog::Options options);
WING_SERVICE QStringList dlgGetOpenFileNames(
QObject *caller, QWidget *parent, const QString &caption,
const QString &dir, const QString &filter, QString *selectedFilter,
QFileDialog::Options options);
WING_API QStringList dlgGetOpenFileNames(QObject *caller, QWidget *parent,
const QString &caption,
const QString &dir,
const QString &filter,
QString *selectedFilter,
QFileDialog::Options options);
WING_SERVICE QString dlgGetSaveFileName(QObject *caller, QWidget *parent,
const QString &caption,
const QString &dir,
const QString &filter,
QString *selectedFilter,
QFileDialog::Options options);
WING_API QString dlgGetSaveFileName(QObject *caller, QWidget *parent,
const QString &caption,
const QString &dir,
const QString &filter,
QString *selectedFilter,
QFileDialog::Options options);
private:
WING_SERVICE QColor dlgGetColor(QObject *caller, const QString &caption,
QWidget *parent);
private slots:
WING_API QColor dlgGetColor(QObject *caller, const QString &caption,
QWidget *parent);
private:
template <typename Func>

View File

@ -3246,8 +3246,9 @@ void MainWindow::connectEditorView(EditorView *editor) {
editor->setProperty("__RELOAD__", false);
connect(editor, &EditorView::need2Reload, this, [editor, this]() {
auto fileName = editor->fileName();
if (editor->isBigFile()) {
auto fileName = editor->fileName();
if (!QFile::exists(fileName)) {
activateWindow();
raise();
@ -3255,19 +3256,23 @@ void MainWindow::connectEditorView(EditorView *editor) {
WingMessageBox::critical(this, tr("Error"),
tr("FileCloseBigFile"));
closeEditor(editor, true);
}
if (currentEditor() == editor) {
editor->reload();
} else {
editor->setProperty("__RELOAD__", true);
if (currentEditor() == editor) {
editor->reload();
} else {
editor->setProperty("__RELOAD__", true);
}
}
} else {
editor->hexEditor()->document()->setDocSaved(false);
if (currentEditor() == editor) {
auto ret = WingMessageBox::question(this, tr("Reload"),
tr("ReloadNeededYesOrNo"));
if (ret == QMessageBox::Yes) {
editor->reload();
if (QFile::exists(fileName)) {
auto ret = WingMessageBox::question(
this, tr("Reload"), tr("ReloadNeededYesOrNo"));
if (ret == QMessageBox::Yes) {
editor->reload();
}
}
} else {
editor->setProperty("__RELOAD__", true);

View File

@ -802,15 +802,10 @@ void ScriptingDialog::registerEditorView(ScriptEditor *editor) {
});
connect(editor, &ScriptEditor::need2Reload, this, [editor, this]() {
editor->editor()->setContentModified(true);
auto e = editor->editor();
e->setContentModified(true);
if (currentEditor() == editor) {
activateWindow();
raise();
auto ret = WingMessageBox::question(this, tr("Reload"),
tr("ReloadNeededYesOrNo"));
if (ret == QMessageBox::Yes) {
editor->reload();
}
reloadEditor(editor);
} else {
editor->setProperty("__RELOAD__", true);
}
@ -894,12 +889,7 @@ void ScriptingDialog::swapEditor(ScriptEditor *old, ScriptEditor *cur) {
if (cur) {
auto needReload = cur->property("__RELOAD__").toBool();
if (needReload) {
auto ret = WingMessageBox::question(this, tr("Reload"),
tr("ReloadNeededYesOrNo"));
if (ret == QMessageBox::Yes) {
cur->reload();
}
reloadEditor(cur);
cur->setProperty("__RELOAD__", false);
}
}
@ -1151,6 +1141,19 @@ void ScriptingDialog::updateCursorPosition() {
}
}
void ScriptingDialog::reloadEditor(ScriptEditor *editor) {
activateWindow();
raise();
editor->editor()->document()->setModified();
if (QFile::exists(editor->fileName())) {
auto ret = WingMessageBox::question(this, tr("Reload"),
tr("ReloadNeededYesOrNo"));
if (ret == QMessageBox::Yes) {
editor->reload();
}
}
}
void ScriptingDialog::on_newfile() {
if (!newOpenFileSafeCheck()) {
return;

View File

@ -223,6 +223,8 @@ private:
void updateCursorPosition();
void reloadEditor(ScriptEditor *editor);
private slots:
void on_newfile();
void on_openfile();

View File

@ -70,8 +70,8 @@ assignmentExpression
entryExpression
: prefixGoto? IntegerConstant EOF
| (prefixGoto Colon)? assignmentExpression EOF
| (prefixGoto LeftBracket)? assignmentExpression RightBracket EOF
| (prefixGoto LeftParen)? assignmentExpression RightParen EOF
| prefixGoto LeftBracket assignmentExpression RightBracket EOF
| prefixGoto LeftParen assignmentExpression RightParen EOF
;
prefixGoto

View File

@ -68,7 +68,7 @@ void numcalParserInitialize() {
}
);
static const int32_t serializedATNSegment[] = {
4,1,19,133,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,
4,1,19,127,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,
7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,1,0,1,0,1,0,1,0,1,
0,3,0,32,8,0,1,1,1,1,1,1,1,1,3,1,38,8,1,1,2,1,2,1,3,1,3,3,3,44,8,3,1,
4,1,4,1,4,5,4,49,8,4,10,4,12,4,52,9,4,1,5,1,5,1,5,5,5,57,8,5,10,5,12,
@ -76,39 +76,37 @@ void numcalParserInitialize() {
7,10,7,12,7,76,9,7,1,8,1,8,1,8,5,8,81,8,8,10,8,12,8,84,9,8,1,9,1,9,1,
9,5,9,89,8,9,10,9,12,9,92,9,9,1,10,1,10,3,10,96,8,10,1,11,3,11,99,8,11,
1,11,1,11,1,11,1,11,1,11,3,11,106,8,11,1,11,1,11,1,11,1,11,1,11,1,11,
3,11,114,8,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,3,11,123,8,11,1,11,1,
11,1,11,1,11,3,11,129,8,11,1,12,1,12,1,12,0,0,13,0,2,4,6,8,10,12,14,16,
18,20,22,24,0,5,2,0,5,6,13,13,1,0,7,9,1,0,5,6,1,0,3,4,2,0,5,6,14,14,136,
0,31,1,0,0,0,2,37,1,0,0,0,4,39,1,0,0,0,6,43,1,0,0,0,8,45,1,0,0,0,10,53,
1,0,0,0,12,61,1,0,0,0,14,69,1,0,0,0,16,77,1,0,0,0,18,85,1,0,0,0,20,95,
1,0,0,0,22,128,1,0,0,0,24,130,1,0,0,0,26,32,5,18,0,0,27,28,5,1,0,0,28,
29,3,20,10,0,29,30,5,2,0,0,30,32,1,0,0,0,31,26,1,0,0,0,31,27,1,0,0,0,
32,1,1,0,0,0,33,38,3,0,0,0,34,35,3,4,2,0,35,36,3,6,3,0,36,38,1,0,0,0,
37,33,1,0,0,0,37,34,1,0,0,0,38,3,1,0,0,0,39,40,7,0,0,0,40,5,1,0,0,0,41,
44,3,2,1,0,42,44,5,18,0,0,43,41,1,0,0,0,43,42,1,0,0,0,44,7,1,0,0,0,45,
50,3,6,3,0,46,47,7,1,0,0,47,49,3,6,3,0,48,46,1,0,0,0,49,52,1,0,0,0,50,
48,1,0,0,0,50,51,1,0,0,0,51,9,1,0,0,0,52,50,1,0,0,0,53,58,3,8,4,0,54,
55,7,2,0,0,55,57,3,8,4,0,56,54,1,0,0,0,57,60,1,0,0,0,58,56,1,0,0,0,58,
59,1,0,0,0,59,11,1,0,0,0,60,58,1,0,0,0,61,66,3,10,5,0,62,63,7,3,0,0,63,
65,3,10,5,0,64,62,1,0,0,0,65,68,1,0,0,0,66,64,1,0,0,0,66,67,1,0,0,0,67,
13,1,0,0,0,68,66,1,0,0,0,69,74,3,12,6,0,70,71,5,10,0,0,71,73,3,12,6,0,
72,70,1,0,0,0,73,76,1,0,0,0,74,72,1,0,0,0,74,75,1,0,0,0,75,15,1,0,0,0,
76,74,1,0,0,0,77,82,3,14,7,0,78,79,5,12,0,0,79,81,3,14,7,0,80,78,1,0,
0,0,81,84,1,0,0,0,82,80,1,0,0,0,82,83,1,0,0,0,83,17,1,0,0,0,84,82,1,0,
0,0,85,90,3,16,8,0,86,87,5,11,0,0,87,89,3,16,8,0,88,86,1,0,0,0,89,92,
1,0,0,0,90,88,1,0,0,0,90,91,1,0,0,0,91,19,1,0,0,0,92,90,1,0,0,0,93,96,
5,18,0,0,94,96,3,18,9,0,95,93,1,0,0,0,95,94,1,0,0,0,96,21,1,0,0,0,97,
99,3,24,12,0,98,97,1,0,0,0,98,99,1,0,0,0,99,100,1,0,0,0,100,101,5,18,
0,0,101,129,5,0,0,1,102,103,3,24,12,0,103,104,5,15,0,0,104,106,1,0,0,
0,105,102,1,0,0,0,105,106,1,0,0,0,106,107,1,0,0,0,107,108,3,20,10,0,108,
109,5,0,0,1,109,129,1,0,0,0,110,111,3,24,12,0,111,112,5,16,0,0,112,114,
1,0,0,0,113,110,1,0,0,0,113,114,1,0,0,0,114,115,1,0,0,0,115,116,3,20,
10,0,116,117,5,17,0,0,117,118,5,0,0,1,118,129,1,0,0,0,119,120,3,24,12,
0,120,121,5,1,0,0,121,123,1,0,0,0,122,119,1,0,0,0,122,123,1,0,0,0,123,
124,1,0,0,0,124,125,3,20,10,0,125,126,5,2,0,0,126,127,5,0,0,1,127,129,
1,0,0,0,128,98,1,0,0,0,128,105,1,0,0,0,128,113,1,0,0,0,128,122,1,0,0,
0,129,23,1,0,0,0,130,131,7,4,0,0,131,25,1,0,0,0,15,31,37,43,50,58,66,
74,82,90,95,98,105,113,122,128
1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,3,11,123,8,11,1,12,1,12,
1,12,0,0,13,0,2,4,6,8,10,12,14,16,18,20,22,24,0,5,2,0,5,6,13,13,1,0,7,
9,1,0,5,6,1,0,3,4,2,0,5,6,14,14,128,0,31,1,0,0,0,2,37,1,0,0,0,4,39,1,
0,0,0,6,43,1,0,0,0,8,45,1,0,0,0,10,53,1,0,0,0,12,61,1,0,0,0,14,69,1,0,
0,0,16,77,1,0,0,0,18,85,1,0,0,0,20,95,1,0,0,0,22,122,1,0,0,0,24,124,1,
0,0,0,26,32,5,18,0,0,27,28,5,1,0,0,28,29,3,20,10,0,29,30,5,2,0,0,30,32,
1,0,0,0,31,26,1,0,0,0,31,27,1,0,0,0,32,1,1,0,0,0,33,38,3,0,0,0,34,35,
3,4,2,0,35,36,3,6,3,0,36,38,1,0,0,0,37,33,1,0,0,0,37,34,1,0,0,0,38,3,
1,0,0,0,39,40,7,0,0,0,40,5,1,0,0,0,41,44,3,2,1,0,42,44,5,18,0,0,43,41,
1,0,0,0,43,42,1,0,0,0,44,7,1,0,0,0,45,50,3,6,3,0,46,47,7,1,0,0,47,49,
3,6,3,0,48,46,1,0,0,0,49,52,1,0,0,0,50,48,1,0,0,0,50,51,1,0,0,0,51,9,
1,0,0,0,52,50,1,0,0,0,53,58,3,8,4,0,54,55,7,2,0,0,55,57,3,8,4,0,56,54,
1,0,0,0,57,60,1,0,0,0,58,56,1,0,0,0,58,59,1,0,0,0,59,11,1,0,0,0,60,58,
1,0,0,0,61,66,3,10,5,0,62,63,7,3,0,0,63,65,3,10,5,0,64,62,1,0,0,0,65,
68,1,0,0,0,66,64,1,0,0,0,66,67,1,0,0,0,67,13,1,0,0,0,68,66,1,0,0,0,69,
74,3,12,6,0,70,71,5,10,0,0,71,73,3,12,6,0,72,70,1,0,0,0,73,76,1,0,0,0,
74,72,1,0,0,0,74,75,1,0,0,0,75,15,1,0,0,0,76,74,1,0,0,0,77,82,3,14,7,
0,78,79,5,12,0,0,79,81,3,14,7,0,80,78,1,0,0,0,81,84,1,0,0,0,82,80,1,0,
0,0,82,83,1,0,0,0,83,17,1,0,0,0,84,82,1,0,0,0,85,90,3,16,8,0,86,87,5,
11,0,0,87,89,3,16,8,0,88,86,1,0,0,0,89,92,1,0,0,0,90,88,1,0,0,0,90,91,
1,0,0,0,91,19,1,0,0,0,92,90,1,0,0,0,93,96,5,18,0,0,94,96,3,18,9,0,95,
93,1,0,0,0,95,94,1,0,0,0,96,21,1,0,0,0,97,99,3,24,12,0,98,97,1,0,0,0,
98,99,1,0,0,0,99,100,1,0,0,0,100,101,5,18,0,0,101,123,5,0,0,1,102,103,
3,24,12,0,103,104,5,15,0,0,104,106,1,0,0,0,105,102,1,0,0,0,105,106,1,
0,0,0,106,107,1,0,0,0,107,108,3,20,10,0,108,109,5,0,0,1,109,123,1,0,0,
0,110,111,3,24,12,0,111,112,5,16,0,0,112,113,3,20,10,0,113,114,5,17,0,
0,114,115,5,0,0,1,115,123,1,0,0,0,116,117,3,24,12,0,117,118,5,1,0,0,118,
119,3,20,10,0,119,120,5,2,0,0,120,121,5,0,0,1,121,123,1,0,0,0,122,98,
1,0,0,0,122,105,1,0,0,0,122,110,1,0,0,0,122,116,1,0,0,0,123,23,1,0,0,
0,124,125,7,4,0,0,125,25,1,0,0,0,13,31,37,43,50,58,66,74,82,90,95,98,
105,122
};
staticData->serializedATN = antlr4::atn::SerializedATNView(serializedATNSegment, sizeof(serializedATNSegment) / sizeof(serializedATNSegment[0]));
@ -1057,22 +1055,22 @@ tree::TerminalNode* NumCalParser::EntryExpressionContext::Colon() {
return getToken(NumCalParser::Colon, 0);
}
tree::TerminalNode* NumCalParser::EntryExpressionContext::RightBracket() {
return getToken(NumCalParser::RightBracket, 0);
}
tree::TerminalNode* NumCalParser::EntryExpressionContext::LeftBracket() {
return getToken(NumCalParser::LeftBracket, 0);
}
tree::TerminalNode* NumCalParser::EntryExpressionContext::RightParen() {
return getToken(NumCalParser::RightParen, 0);
tree::TerminalNode* NumCalParser::EntryExpressionContext::RightBracket() {
return getToken(NumCalParser::RightBracket, 0);
}
tree::TerminalNode* NumCalParser::EntryExpressionContext::LeftParen() {
return getToken(NumCalParser::LeftParen, 0);
}
tree::TerminalNode* NumCalParser::EntryExpressionContext::RightParen() {
return getToken(NumCalParser::RightParen, 0);
}
size_t NumCalParser::EntryExpressionContext::getRuleIndex() const {
return NumCalParser::RuleEntryExpression;
@ -1099,9 +1097,9 @@ NumCalParser::EntryExpressionContext* NumCalParser::entryExpression() {
exitRule();
});
try {
setState(128);
setState(122);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 14, _ctx)) {
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 12, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(98);
@ -1146,52 +1144,30 @@ NumCalParser::EntryExpressionContext* NumCalParser::entryExpression() {
case 3: {
enterOuterAlt(_localctx, 3);
setState(113);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 12, _ctx)) {
case 1: {
setState(110);
prefixGoto();
setState(111);
match(NumCalParser::LeftBracket);
break;
}
default:
break;
}
setState(115);
setState(110);
prefixGoto();
setState(111);
match(NumCalParser::LeftBracket);
setState(112);
assignmentExpression();
setState(116);
setState(113);
match(NumCalParser::RightBracket);
setState(117);
setState(114);
match(NumCalParser::EOF);
break;
}
case 4: {
enterOuterAlt(_localctx, 4);
setState(122);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 13, _ctx)) {
case 1: {
setState(119);
prefixGoto();
setState(120);
match(NumCalParser::LeftParen);
break;
}
default:
break;
}
setState(124);
setState(116);
prefixGoto();
setState(117);
match(NumCalParser::LeftParen);
setState(118);
assignmentExpression();
setState(125);
setState(119);
match(NumCalParser::RightParen);
setState(126);
setState(120);
match(NumCalParser::EOF);
break;
}
@ -1255,7 +1231,7 @@ NumCalParser::PrefixGotoContext* NumCalParser::prefixGoto() {
});
try {
enterOuterAlt(_localctx, 1);
setState(130);
setState(124);
_la = _input->LA(1);
if (!((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 16480) != 0))) {

View File

@ -244,10 +244,10 @@ public:
PrefixGotoContext *prefixGoto();
AssignmentExpressionContext *assignmentExpression();
antlr4::tree::TerminalNode *Colon();
antlr4::tree::TerminalNode *RightBracket();
antlr4::tree::TerminalNode *LeftBracket();
antlr4::tree::TerminalNode *RightParen();
antlr4::tree::TerminalNode *RightBracket();
antlr4::tree::TerminalNode *LeftParen();
antlr4::tree::TerminalNode *RightParen();
virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override;