From d8069aeddea19220557b492b391cf30a2cd151be Mon Sep 17 00:00:00 2001
From: wingsummer <1326224942@qq.com>
Date: Sun, 27 Apr 2025 23:32:03 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E5=A5=BD=E7=94=A8=E7=9A=84?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=A1=AB=E5=85=85=EF=BC=9B=E6=9B=B4=E5=BC=BA?=
=?UTF-8?q?=E5=A4=A7=E7=9A=84=E6=8E=A7=E5=88=B6=E5=8F=B0=EF=BC=9B=E4=B8=80?=
=?UTF-8?q?=E4=BA=9B=20Bug=20=E4=BF=AE=E5=A4=8D=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
3rdparty/QConsoleWidget/QConsoleWidget.cpp | 4 +-
3rdparty/QConsoleWidget/QConsoleWidget.h | 3 +-
.../qtsingleapplication/src/qtlocalpeer.cpp | 5 +-
.../qtsingleapplication/src/qtlocalpeer.h | 2 +
CMakeLists.txt | 2 +-
lang/zh_CN/winghex_zh_CN.ts | 1241 +++++++++--------
lang/zh_TW/winghex_zh_TW.ts | 1241 +++++++++--------
src/class/WingAngelAPI.json | 2 +-
src/class/WingCStruct.json | 2 +-
src/class/appmanager.cpp | 4 +-
src/class/asconsolecompletion.cpp | 33 +-
src/class/scriptmachine.cpp | 83 +-
src/class/scriptmachine.h | 8 +-
src/class/wingmessagebox.cpp | 8 +-
src/control/scriptingconsole.cpp | 177 ++-
src/control/scriptingconsole.h | 3 +
src/dialog/mainwindow.cpp | 37 +-
src/dialog/scriptingdialog.cpp | 9 +-
18 files changed, 1614 insertions(+), 1250 deletions(-)
diff --git a/3rdparty/QConsoleWidget/QConsoleWidget.cpp b/3rdparty/QConsoleWidget/QConsoleWidget.cpp
index ee0363f..4d2f0bf 100644
--- a/3rdparty/QConsoleWidget/QConsoleWidget.cpp
+++ b/3rdparty/QConsoleWidget/QConsoleWidget.cpp
@@ -365,14 +365,14 @@ void QConsoleWidget::replaceCommandLine(const QString &str) {
}
QString QConsoleWidget::currentCommandLine() const {
- // Select the text after the last command prompt ...
QTextCursor textCursor = this->textCursor();
textCursor.movePosition(QTextCursor::End);
textCursor.setPosition(inpos_, QTextCursor::KeepAnchor);
-
return textCursor.selectedText();
}
+int QConsoleWidget::currentHeaderPos() const { return inpos_; }
+
void QConsoleWidget::write(const QString &message, const QTextCharFormat &fmt) {
QTextCharFormat currfmt = currentCharFormat();
QTextCursor tc = textCursor();
diff --git a/3rdparty/QConsoleWidget/QConsoleWidget.h b/3rdparty/QConsoleWidget/QConsoleWidget.h
index 7463284..860d698 100644
--- a/3rdparty/QConsoleWidget/QConsoleWidget.h
+++ b/3rdparty/QConsoleWidget/QConsoleWidget.h
@@ -79,6 +79,8 @@ public:
virtual void paste();
+ int currentHeaderPos() const;
+
public slots:
// write to StandardOutput
@@ -115,7 +117,6 @@ protected:
static History history_;
ConsoleMode mode_;
int inpos_;
- QString currentMultiLineCode_;
QConsoleIODevice *iodevice_;
QTextCharFormat chanFormat_[nConsoleChannels];
};
diff --git a/3rdparty/qtsingleapplication/src/qtlocalpeer.cpp b/3rdparty/qtsingleapplication/src/qtlocalpeer.cpp
index 4720792..a41813f 100644
--- a/3rdparty/qtsingleapplication/src/qtlocalpeer.cpp
+++ b/3rdparty/qtsingleapplication/src/qtlocalpeer.cpp
@@ -33,7 +33,8 @@ QtLocalPeer::QtLocalPeer(QObject *parent, const QString &appId)
#endif
prefix = id.section(QLatin1Char('/'), -1);
}
- prefix.remove(QRegularExpression("[^a-zA-Z]"));
+ static QRegularExpression regex("[^a-zA-Z]");
+ prefix.remove(regex);
prefix.truncate(6);
QByteArray idc = id.toUtf8();
@@ -69,6 +70,8 @@ QtLocalPeer::QtLocalPeer(QObject *parent, const QString &appId)
lockFile.open(QIODevice::ReadWrite);
}
+QtLocalPeer::~QtLocalPeer() { server->close(); }
+
bool QtLocalPeer::isClient() {
if (lockFile.isLocked())
return false;
diff --git a/3rdparty/qtsingleapplication/src/qtlocalpeer.h b/3rdparty/qtsingleapplication/src/qtlocalpeer.h
index 6bdb303..3d01463 100644
--- a/3rdparty/qtsingleapplication/src/qtlocalpeer.h
+++ b/3rdparty/qtsingleapplication/src/qtlocalpeer.h
@@ -15,6 +15,8 @@ class QtLocalPeer : public QObject {
public:
QtLocalPeer(QObject *parent = nullptr, const QString &appId = QString());
+ ~QtLocalPeer();
+
bool isClient();
bool sendMessage(const QByteArray &uMsg, int timeout);
QString applicationId() const { return id; }
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cbad0e5..8968905 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,7 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
-set(PROJECT_VERSION "2.2.1")
+set(PROJECT_VERSION "2.2.2")
find_package(
QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets Network Concurrent
diff --git a/lang/zh_CN/winghex_zh_CN.ts b/lang/zh_CN/winghex_zh_CN.ts
index c76deda..55c1425 100644
--- a/lang/zh_CN/winghex_zh_CN.ts
+++ b/lang/zh_CN/winghex_zh_CN.ts
@@ -871,7 +871,7 @@
-
+ View视图
@@ -908,8 +908,8 @@
-
-
+
+ Plugin插件
@@ -920,7 +920,7 @@
-
+ Log日志
@@ -944,7 +944,8 @@
-
+
+ Copy复制
@@ -952,8 +953,8 @@
-
-
+
+ CopyToClipBoard数据已拷贝到粘贴板
@@ -974,27 +975,27 @@
-
+ CheckSum校验和
-
+ DeleteBookMark删除书签
-
+ ClearBookMark清空书签
-
-
-
+
+
+ BookMark书签
@@ -1005,119 +1006,119 @@
解码字符串
-
+ ScriptConsole脚本控制台
-
-
+
+ Basic基础
-
+ New新建
-
+ OpenF打开文件
-
+ OpenWorkSpace打开工作区
-
+ RecentFiles最近打开
-
-
-
+
+
+ Reload重新加载
-
-
+
+ Save保存
-
+ SaveAs另存为
-
+ ConvertWS转为工作区
-
+ Export导出
-
+ SaveSel保存选区字节
-
-
-
-
+
+
+
+ General基本
-
+ Undo撤销
-
+ Redo恢复
-
+ Cut剪切
-
+ Paste粘贴
-
+ Delete删除
-
+ Clone克隆
-
+ Lookup查询
-
+ Find查找
-
+ Goto跳转
@@ -1128,48 +1129,48 @@
编码
-
+ FileInfo文件信息
-
-
+
+ Hex十六进制
-
+ CutHex剪切(十六进制)
-
+ CopyHex复制(十六进制)
-
+ PasteHex粘贴(十六进制)
-
-
+
+ Fill填充
-
+ FillZero填充零
-
-
-
-
+
+
+
+ MetaData标注
@@ -1184,32 +1185,32 @@
清空标注
-
+ MetaDataEdit编辑标注
-
+ DeleteMetaData删除标注
-
+ ClearMetaData清空标注
-
+ Display显示
-
+ ViewText文本预览
-
+ Scale缩放
@@ -1300,76 +1301,76 @@
导出结果
-
+ NothingToSave没有保存的数据
-
+ OpenExt打开 - 拓展
-
+ ResetScale重置缩放
-
+ ShowMetafg标注前景色
-
+ ShowMetabg标注背景色
-
+ ShowMetaComment批注
-
+ MetaShowAll显示所有标注
-
+ MetaHideAll隐藏所有标注
-
+ FileStatus文件状态
-
+ InfoSave是否保存
-
+ ReadOnly可读写
-
+ SetLocked启用/禁用锁定编辑
-
+ ErrUnLock锁定编辑失败
-
+ SetOver启用/禁用改变大小
@@ -1389,659 +1390,679 @@
无符号 Hex
-
+
+ BgScriptOutputHere
+ 后台脚本执行将会在这里输出
+
+
+
+ SelectAll
+ 全选
+
+
+
+ Clear
+ 清空
+
+
+
+ AbortScript
+ 终止脚本
+
+
+ BgScriptOutput后台脚本输出
-
+ ErrUnOver锁定文件大小失败
-
+ Window窗体
-
+ Editor编辑器
-
+ Tools工具
-
+ HexEditorLayout编辑器布局
-
+ SetBaseAddr设置基址
-
+ addressBase基址
-
+ inputAddressBase请输入基址
-
+ WarnBigBaseAddress基址过大,你得到的地址将会不正确!
-
+ ErrBaseAddress非法基址输入
-
+ SetColInfo显示/隐藏地址栏
-
+ SetHeaderInfo显示/隐藏表头
-
+ SetAsciiString显示/隐藏解码字符串
-
+ Layout布局
-
+ Fullscreen全屏
-
+ Default默认
-
-
-
+
+
+ LayoutRestoring...恢复布局中...
-
+ RestoreLayout恢复布局
-
-
+
+ SaveLayout保存布局
-
+ ExportLog导出日志
-
+ ClearLog清空日志
-
+ InsepctQt监视 Qt
-
+ ScriptEditor脚本编辑器
-
+ Scripts脚本仓库
-
+ PluginFunctions插件功能
-
+ ScriptSetting脚本设置
-
+ PluginSettings插件设置
-
+ Info信息
-
+ Software软件
-
+ Sponsor赞助
-
+ CheckUpdate检查更新
-
+ Wiki网页 Wiki
-
+ AboutQT关于 QT
-
+ SetPageIDEmptyTryUseName设置页 ID 为空,尝试使用名称作为 ID
-
+ SetPageDupNameIgnored设置页重复的 ID 名称,已忽略加载
-
+ Plugin %1 contains a duplicate ID (%2) that is already registered by plugin %3插件 %1 包含重复 ID (%2),该 ID 已被插件 %3 注册
-
-
+
+ ChooseFile选择文件
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Error错误
-
-
+
+ FileNotExist文件不存在!
-
-
-
-
-
+
+
+
+
+ FilePermission因文件权限无法继续!
-
+ ProjectFile (*.wingpro)项目文件 (*.wingpro)
-
+ ReloadSuccessfully文件重新加载成功!
-
+ ReloadUnSuccessfully文件重新加载失败!
-
-
-
-
+
+
+
+ ChooseSaveFile请选择保存文件路径:
-
+ NoMoreClone克隆已到上限,无法继续操作!
-
+ FindFininishBusy查找任务繁忙,请勿重复查找!
-
+ MayTooMuchFindResult搜索数量已到达上限,结果可能不全,建议请按区段搜索。
-
+ SaveLayoutSuccess保存布局成功
-
+ SaveLayoutError保存布局失败
-
+ HasClonedView该编辑页已被克隆编辑,如果关闭,相关联的页也会被关闭,你确认继续吗?
-
+ FileCloseBigFile大文件读取模式下目标文件被关闭,该标签将会被关闭。
-
-
+
+ ReloadNeededYesOrNo目标文件被修改,是否重新加载?
-
+ SaveWorkSpace保存工作区
-
+ WingHexWorkSpace (*.wingpro)羽云十六进制工作区 (*.wingpro)
-
+ ConfirmSave正在关闭未保存的文件或工作区,你确定保存吗?
-
+ [Info]【信息】
-
+ [Warn]【警告】
-
+ [Error]【错误】
-
+ ConfirmAPPSave你尝试关闭程序,但仍存在未保存的文件或工作区,你确定保存这些更改吗?
-
-
-
+
+
+ SaveSuccessfully保存成功!
-
-
+
+ SaveWSError保存工作区错误!
-
-
+
+ Warn警告
-
+ Opening...打开文件中...
-
+ WorkSpaceOpening...打开工作区中...
-
+ Reloading...重载文件中...
-
+ Saving...保存中...
-
+ SaveNewFirst请首先保存新建的文件
-
+ AlreadyWorkSpace已经是工作区,无需转化
-
+ ConvWorkSpaceFailed转化为工作区失败
-
+ ConvWorkSpaceSuccess转化为工作区成功
-
+ SavingAs...另存为中...
-
+ SaveUnSuccessfully保存失败!
-
+ Exporting...导出中...
-
+ ChooseExportFile请选择导出文件路径:
-
+ ExportSuccessfully导出成功!
-
+ ExportUnSuccessfully导出失败!
-
+ SavingSel...保存选中字节中...
-
+ SaveSelSuccess保存选区字节成功!
-
+ SaveSelError保存选区字节失败,因文件不具有可写权限!
-
-
+
+ CutToClipBoard数据已剪切到粘贴板!
-
-
+
+ UnCutToClipBoard由于保持大小限制,数据剪切到粘贴板失败!
-
-
+
+ UnCopyToClipBoard由于保持大小限制,数据剪切到复制板失败!
-
-
+
+ Finding...查找中...
-
+ DeleteSuccess删除成功
-
+ DeleteFailed删除失败
-
+ FindFininish查找结果完毕!
-
+ PleaseInputFill请输入填充字节值
-
+ FillInputTruncWarn填充输入数值过大,将会被截断填充
-
+ FillInputError填充字节输入错误
-
-
+
+ InputComment请输入批注:
-
-
+
+ BookmarkDelSuccess删除书签成功
-
+ BookmarkDelNoItem无书签可删除
-
+ BookmarkClearSuccess书签清空完毕
-
-
-
+
+
+ NoSelection没有选区,无法继续的操作!
-
+ NoMetaData无可编辑标记
-
+ PleaseClearSel请清空选择
-
+ MetaDelSuccess元数据删除成功
-
+ MetaDelNoItem无元数据可删除
-
+ MetaClearSuccess元数据清空完毕
-
+ FindResultExporting...查找结果导出中...
-
-
+
+ EmptyFindResult没有可导出的搜索结果!
-
+ SaveFindResult导出搜索结果成功!
-
+ SaveFindResultError导出结果失败!
-
+ TooManyBytesDecode超出解码字节限制……
-
+ NoTextFileMayInvalid该文件不是文本文件,以文本方式预览并不是一个好的方式,你确认继续吗?
-
+ LayoutSaving...布局保存中...
-
+ PleaseInput请输入
-
+ LogExporting...日志导出中...
-
+ ExportLogError导出日志失败!
-
+ ExportLogSuccess导出日志成功,路径:
-
+ ClearLogSuccess清空日志成功!
-
+ BadNetwork无法与远程服务器的更新检查建立连接,请检查网络。
-
+ NewestVersion当前软件为最新版本
-
+ OlderVersion你使用的软件为老版本,建议到 Github 和 Gitee 的仓库发行版下载更新。
-
+ CheckingUpdate检查更新中……
-
+ Too much opened files打开的文件过多,无法继续操作!
-
+ FilePermissionSure2Quit因文件权限无法保存,你确认要退出吗?
-
+ UnknownErrorSure2Quit因未知错误无法保存,你确认要退出吗?
-
+ WorkSpaceUnSavedSure2Quit工作区文件无法保存,你确认要退出吗?
-
+ CopyLimit拷贝字节超出限制
-
+ ErrOpenFileBelow打开文件出现错误(由于权限不足),如下为打开错误的文件:
@@ -2622,18 +2643,18 @@
QMessageBox
-
+ <h3>About Qt</h3><p>This program uses Qt version %1.</p><h3>关于 Qt</h3><p>此程序使用 Qt 版本 %1。</p>
-
+ <p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across all major desktop operating systems. It is also available for embedded Linux and other embedded and mobile operating systems.</p><p>Qt is available under multiple licensing options designed to accommodate the needs of our various users.</p><p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of GNU (L)GPL.</p><p>Qt licensed under GNU (L)GPL is appropriate for the development of Qt applications provided you can comply with the terms and conditions of the respective licenses.</p><p>Please see <a href="https://%2/">%2</a> for an overview of Qt licensing.</p><p>Copyright (C) The Qt Company Ltd. and other contributors.</p><p>Qt and the Qt logo are trademarks of The Qt Company Ltd.</p><p>Qt is The Qt Company Ltd. product developed as an open source project. See <a href="https://%3/">%3</a> for more information.</p>Leave this text untranslated or include a verbatim copy of it below and note that it is the authoritative version in case of doubt.
-
+ About Qt关于 QT
@@ -2773,312 +2794,311 @@
— 在 ‘%2’ 中发生异常 ‘%1’
-
+ ExecNotAllowedInRoot在管理员权限执行第三方命令为非法操作
-
-
+
+
+ Script failed to build脚本编译失败
-
+ Cannot find 'int main()' or 'void main()'无法找到程序入口点: "int main()" 或者 "void main()"
-
+ Debugging, waiting for commands.调试中,等待调试命令。
-
+ Failed while initializing global variables初始化全局变量失败
-
-
+
+ The script failed with an exception异常被抛出,脚本执行失败
-
-
+
+ The script was aborted脚本被终止
-
-
+
+ The script terminated unexpectedly脚本异常退出
-
+ The script exited with 脚本退出返回值:
-
+ '%1' is already declared"%1" 已被声明
-
+ Abstract class '%1' cannot be instantiated无法实例化抽象类 "%1"
-
+ Accessing private property '%1' of parent class非法访问父类的私有属性 "%1"
-
+ Attribute '%1' informed multiple times属性 "%1" 已被多次通知
-
+ Can't form arrays of subtype '%1'无法创建子类型 "%1" 的数组
-
+ Can't inherit from class '%1' marked as final无法从标记为 final 的类 "%1" 继承
-
+ Cannot access non-static member '%1' like this无法和像使用 this 一样访问非静态成员 "%1"
-
+ Can't construct handle '%1'. Use ref cast instead无法构造句柄 "%1" 。请改用引用强制转换
-
+ Can't implicitly convert from '%1' to '%2'.无法从 "%1' 隐式转换为 "%2"。
-
+ Compiling %1正在编译 %1
-
+ Compiling auto generated %1编译自动生成的 %1
-
+ Implemented property accessor '%1' does not expect index argument已实现的属性访问器 "%1" 不需要索引参数
-
+ Implemented property accessor '%1' expects index argument已实现的属性访问器 "%1" 需要索引参数
-
+ Data type can't be '%1'数据类型不能为 "%1"
-
+ All subsequent parameters after the first default value must have default values in function '%1'在函数 "%1" 中,第一个默认值之后的所有后续参数都必须具有默认值
-
+ The method in the derived class must have the same return type as in the base class: '%1'派生类中的方法必须具有与基类相同的返回类型:"%1"
-
+ The name of the destructor '%1::~%2' must be the same as the class析构函数 "%1::~%2" 的名称必须与类相同
-
+ Expected '%1'应为 "%1"
-
+ Expected '%1' or '%2'应为 ”%1“ 或 ”%2“
-
+ Expression must be of boolean type, instead found '%1'表达式必须是布尔类型,但实际使用的是 "%1"
-
+ Expression '%1' is a data type表达式 "%1" 是一种数据类型
-
+ External shared entity '%1' not found未找到外部共享实体 "%1"
-
+ External shared entity '%1' cannot redefine the original entity外部共享实体 "%1" 无法重新定义原始实体
-
+ Failed while compiling default arg for parameter %1 in function '%2'为函数 "%2" 中的参数 %1 编译默认参数时失败
-
+ Function '%1' not found未找到函数 "%1"
-
+ The property '%1' has mismatching types for the get and set accessors属性 "%1" 的 get 和 set 访问器类型不匹配
-
+ Variable '%1' hides another variable of same name in outer scope变量 "%1" 隐藏了外部作用域中另一个同名变量
-
+ Identifier '%1' is not a data type标识符 "%1" 不是数据类型
-
+ Identifier '%1' is not a data type in global namespace标识符 "%1" 不是全局命名空间中的数据类型
-
+ Identifier '%1' is not a data type in namespace '%2' or parent标识符 "%1" 不是命名空间 "%2" 或其父级中的数据类型
-
+ Illegal operation on '%1'对 "%1" 的非法操作
-
+ Illegal variable name '%1'.非法变量名 "%1"。
-
+ Illegal access to inherited private property '%1'非法访问继承的私有属性 "%1"
-
+ Initialization lists cannot be used with '%1'初始化列表不能与 "%1" 一起使用
-
+ Attempting to instantiate invalid template type '%1<%2>'尝试实例化无效的模板类型 "%1<%2>"
-
+ Instead found '%1'而是找到了 "%1"
-
+ Instead found identifier '%1'而是找到标识符 "%1"
-
+ Instead found reserved keyword '%1'而是找到了保留关键字 "%1"
-
+ Interface '%1' cannot be instantiated无法实例化接口 "%1"
-
+ Invalid unicode escape sequence, expected %1 hex digits无效的 Unicode 转义序列,预期为 %1 个十六进制数字
-
+ Method '%1' declared as final and cannot be overridden方法 "%1" 已声明为 final,因此无法被覆盖
-
+ Method '%1' marked as override but does not replace any base class or interface method方法 "%1" 标记为覆盖,但并未替换任何基类或接口方法
-
+ Method '%1::%2' is missing the return type, nor is it the same name as object to be a constructor方法 "%1::%2" 缺少返回类型,并且其名称与构造函数对象不同
-
+ Method '%1' is not part of object '%2'方法 "%1" 不是对象 "%2" 的一部分
-
+ Missing implementation of '%1'缺少 "%1" 的实现
-
+ Missing definition of '%1'缺少 "%1" 的定义
-
+ Mixin class cannot be declared as '%1'Mixin 类不能声明为 "%1"
-
+ Multiple matching signatures to '%1'"%1" 有多个匹配的签名
-
+ Found multiple get accessors for property '%1'发现属性 "%1" 的多个 get 访问器
-
+ Found multiple set accessors for property '%1'发现属性 "%1" 的多个集合访问器
-
+ Namespace '%1' doesn't exist.命名空间 "%1" 不存在。
-
-
@@ -3089,1254 +3109,1256 @@
+
+ Name conflict. 名称冲突。
-
+ '%1' is an extended data type."%1" 是扩展数据类型。
-
+ '%1' is a global property."%1" 是全局属性。
-
+ '%1' is a named type."%1" 是被命名的类型。
-
+ '%1' is a funcdef."%1" 是一个函数签名定义。
-
+ '%1' is a global function."%1" 是一个全局函数。
-
+ '%1' is a mixin class."%1" 是一个 Mixin 类。
-
+ '%1' is a virtual property."%1" 是虚拟属性。
-
+ '%1' is a class."%1" 是一个类。
-
+ '%1' is an interface."%1" 是一个接口。
-
+ '%1' is an object property."%1" 是一个对象属性。
-
+ '%1' is a class method."%1" 是一个类方法。
-
+ '%1' is already used.”%1“ 已被使用。
-
+ No appropriate opHndlAssign method found in '%1' for handle assignment在 "%1" 中未找到适当的 opHndlAssign 方法用于句柄分配
-
+ No conversion from '%1' to '%2' available.无法进行从 "%1" 到 "%2" 的转换。
-
+ No conversion from '%1' to math type available.无法将 "%1" 转换为数学类型。
-
+ No default constructor for object of type '%1'."%1" 类型对象没有默认构造函数。
-
+ No appropriate opAssign method found in '%1' for value assignment在 "%1" 中未找到适合赋值的 opAssign 方法
-
+ No copy constructor for object of type '%1'.没有 "%1" 类型对象的复制构造函数。
-
+ No matching signatures to '%1'没有与 "%1" 匹配的签名
-
+ No matching operator that takes the type '%1' found未找到采用类型 "%1" 的匹配运算符
-
+ No matching operator that takes the types '%1' and '%2' found未找到采用类型 "%1" 和 "%2" 的匹配运算符
-
+ No matching symbol '%1'没有匹配的符号 "%1"
-
+ Expression doesn't form a function call. '%1' evaluates to the non-function type '%2'表达式不构成函数调用。"%1" 计算结果为非函数类型 "%2"
-
+ '%1' is not declared"%1" 未被声明
-
+ '%1' is not initialized.”%1“ 未初始化。
-
+ '%1' is not a member of '%2'”%1“ 不是 ”%2“ 的成员
-
+ Type '%1' doesn't support the indexing operator类型 "%1" 不支持索引运算符
-
+ Parameter type can't be '%1', because the type cannot be instantiated.参数类型不能是 "%1",因为该类型无法实例化。
-
+ Previous error occurred while attempting to compile initialization list for type '%1'尝试编译类型 "%1" 的初始化列表时发生先前的错误
-
+ Illegal call to private method '%1'非法调用私有方法 "%1"
-
+ Illegal access to private property '%1'非法访问私有属性 "%1"
-
+ Illegal call to protected method '%1'非法调用受保护的方法 "%1"
-
+ Illegal access to protected property '%1'非法访问受保护的属性 "%1"
-
+ Return type can't be '%1'返回类型不能是 "%1"
-
+ Shared code cannot access non-shared global variable '%1'共享代码无法访问非共享全局变量 "%1"
-
+ Shared code cannot call non-shared function '%1'共享代码无法调用非共享函数 "%1"
-
+ Shared type cannot implement non-shared interface '%1'共享类型无法实现非共享接口 "%1"
-
+ Shared class cannot inherit from non-shared class '%1'共享类不能从非共享类 "%1" 继承
-
+ Shared code cannot use non-shared type '%1'共享代码不能使用非共享类型 "%1"
-
+ Shared type '%1' doesn't match the original declaration in other module共享类型 "%1" 与其他模块中的原始声明不匹配
-
+ Template '%1' expects %2 sub type(s)模板 "%1" 需要 %2 个子类型
-
+ Type '%1' cannot be a reference类型 "%1" 不能是引用
-
+ Type '%1' is not available for this module类型 "%1" 不适用于此模块
-
+ Type '%1' is not a template type类型 "%1" 不是模板类型
-
+ Unexpected token '%1'意外标记 "%1"
-
+ Use of uninitialized global variable '%1'.使用未初始化的全局变量 "%1"。
-
+ Unknown scope '%1'未知作用域 "%1"
-
+ Where '%1' is '%2'其中 "%1" 是 "%2"
-
+ Failed to initialize global variable '%1'无法初始化全局变量 "%1"
-
+ Exception '%1' in '%2'"%2" 中的异常 "%1"
-
+ Type '%1' is missing behaviours类型 "%1" 缺少的行为
-
+ Can't pass type '%1' by value unless the application type is informed in the registration除非在注册时告知应用程序类型,否则无法按值传递类型 "%1"
-
+ Can't return type '%1' by value unless the application type is informed in the registration除非在注册时告知应用程序类型,否则无法按值返回类型 "%1"
-
+ Don't support passing type '%1' by value to application in native calling convention on this platform不支持在此平台上按照本机调用约定将类型 "%1" 按值传递给应用程序
-
+ Don't support returning type '%1' by value from application in native calling convention on this platform不支持在此平台上按照本机调用约定从应用程序返回类型 "%1" 的值
-
+ Object {%1}. GC cannot destroy an object of type '%2' as it doesn't know how many references to there are.对象 {%1}。GC 无法销毁类型为 "%2" 的对象,因为它不知道有多少个引用。
-
+ Object {%1}. GC cannot destroy an object of type '%2' as it can't see all references. Current ref count is %3.对象 {%1}。GC 无法销毁类型为 "%2" 的对象,因为它无法看到所有引用。当前引用计数为 %3。
-
+ Object type '%1' doesn't exist对象类型 "%1" 不存在
-
+ Cannot register. The template type instance '%1' has already been generated.无法注册。模板类型实例 "%1" 已生成。
-
+ Template type '%1' doesn't exist模板类型 "%1" 不存在
-
+ Template subtype '%1' doesn't exist模板子类型 "%1" 不存在
-
+ Failed to read subtype of template type '%1'无法读取模板类型 "%1" 的子类型
-
+ Failed in call to function '%1' (Code: %2, %3)调用函数 "%1" 失败(代码:%2,%3)
-
+ Failed in call to function '%1' with '%2' (Code: %3, %4)使用 "%2" 调用函数 "%1" 失败(代码:%3,%4)
-
+ Failed in call to function '%1' with '%2' and '%3' (Code: %4, %5)使用 "%2" 和 "%3" 调用函数 "%1" 失败(代码:%4,%5)
-
+ Type '%1' is still used by function '%2'类型 "%1" 仍被函数 "%2" 使用
-
+ The builtin type in previous message is named '%1'上一条消息中的内置类型名为 "%1"
-
+ The function in previous message is named '%1'. The func type is %2上一条消息中的函数名为 "%1"。函数类型为 %2
-
+ The script object of type '%1' is being resurrected illegally during destruction类型为 "%1" 的脚本对象在销毁过程中被非法复活
-
+ LoadByteCode failed. The bytecode is invalid. Number of bytes read from stream: %1LoadByteCode 失败。字节码无效。从流中读取的字节数:%1
-
+ Function '%1' appears to have been compiled without JIT entry points函数 "%1" 似乎已在无 JIT 入口点的情况下进行编译
-
+ There is an external reference to an object in module '%1', preventing it from being deleted存在对模块 "%1" 中对象的外部引用,导致无法删除该对象
-
+ Output argument expression is not assignable输出参数表达式不可分配
-
+ Auto is not allowed here这里禁止使用 auto 关键字
-
+ Can't find unambiguous implicit conversion to make both expressions have the same type无法找到明确的隐式转换来使两个表达式具有相同的类型
-
+ Both conditions must call constructor两个条件都必须调用构造函数
-
+ Base class doesn't have default constructor. Make explicit call to base constructor基类没有默认构造函数。明确调用基类构造函数
-
+ Base class doesn't have copy constructor or default constructor and assign operator. Make explicit call to base constructor基类没有复制构造函数或默认构造函数和赋值运算符。明确调用基类构造函数
-
+ Candidates are:候选包括:
-
+ Can't call a constructor in loops无法在循环中调用构造函数
-
+ Can't call a constructor in switch无法在 switch 中调用构造函数
-
+ Can't call a constructor multiple times无法多次调用构造函数
-
+ Can't create delegate无法创建委托
-
+ Can't create delegate for types that do not support handles无法为不支持句柄的类型创建委托
-
+ Cannot flag function that will not be auto generated as deleted无法将不会自动生成的函数标记为已删除
-
+ Conflict with explicit declaration of function and deleted function与函数的显式声明和已删除函数冲突
-
+ Can't implement itself, or another interface that implements this interface无法实现自身,也无法实现此接口的其他接口
-
+ Can't inherit from multiple classes不能从多个类继承
-
+ Can't inherit from itself, or another class that inherits from this class不能从其自身或从该类继承的其他类继承
-
+ Can't pass class method as arg directly. Use a delegate object instead无法直接将类方法作为参数传递。请改用委托对象
-
+ Unable to resolve auto type无法解析自动类型
-
+ Can't return reference to local value.无法返回对本地值的引用。
-
+ Can't return value when return type is 'void'返回类型为 "void" 时无法返回值
-
+ Implicit conversion changed sign of value隐式转换改变了值的符号
-
+ A class cannot be both abstract and final一个类不能同时是 abstract 和 final
-
+ Compound assignments with property accessors on value types are not supported不支持对值类型使用属性访问器的复合赋值
-
+ Compound assignments with indexed property accessors are not supported不支持使用索引属性访问器的复合赋值
-
+ Compound assignments with property accessors require both get and set accessors具有属性访问器的复合赋值需要 get 和 set 访问器
-
+ Variables cannot be declared in switch cases, except inside statement blocks变量不能在 switch 语句中声明,除非在语句块内
-
+ The default case must be the last onedefault 情况必须是最后一个
-
+ The type of the default argument expression doesn't match the function parameter type默认参数表达式的类型与函数参数类型不匹配
-
+ Deleted functions cannot have implementation已删除的函数不能有实现
-
+ The destructor must not have any parameters析构函数不能有任何参数
-
+ Value assignment on reference types is not allowed. Did you mean to do a handle assignment?不允许对引用类型进行值分配。是要进行句柄分配吗?
-
+ Compound assignment on reference types is not allowed不允许对引用类型进行复合赋值
-
+ Duplicate named argument重复命名参数
-
+ Duplicate switch case重复的 switch case
-
+ Else with empty statementelse 中使用空语句
-
+ Empty list element is not allowed不允许空列表元素
-
+ Empty switch statement空的 switch 语句
-
+ Expected constant应为常量
-
+ Expected data type应为数据类型
-
+ Expected expression value应为表达值
-
+ Expected identifier应为标识符
-
+ Expected a list enclosed by { } to match pattern应为用 { } 括起来的列表与模式匹配
-
+ Expected method or property应为方法或属性
-
+ Expected one of: 应为为以下之一:
-
+ Expected operator应为操作符
-
+ Expected post operator应为右操作符
-
+ Expected pre operator应为左操作符
-
+ Expected string应为字符串
-
+ Expression doesn't evaluate to a function表达式无法计算函数值
-
+ Previous error occurred while attempting to create a temporary copy of object尝试创建对象的临时副本时发生上一个错误
-
+ Float value truncated in implicit conversion to integer浮点值在隐式转换为整数时被截断
-
+ Found multiple matching enum values找到多个匹配的枚举值
-
+ A function with the same name and parameters already exists具有相同名称和参数的函数已存在
-
+ Global variables have been disabled by the application全局变量已被应用程序禁用
-
+ It is not allowed to perform a handle assignment on a non-handle property不允许对非句柄属性执行句柄分配
-
+ The operand is implicitly converted to handle in order to compare them操作数被隐式转换为句柄,以便进行比较
-
+ Handle to handle is not allowed不允许使用句柄
-
+ If with empty statement如果带有空语句
-
+ Illegal member type非法成员类型
-
+ Illegal operation on this datatype对该数据类型的非法操作
-
+ Illegal target type for reference cast非法引用转换的目标类型
-
+ Interfaces can only implement other interfaces接口只能实现其他接口
-
+ Invalid 'break'无效的 break 关键字
-
+ Invalid character literal无效的字符
-
+ Invalid 'continue'无效的 continue 关键字
-
+ Invalid escape sequence无效的转义序列
-
+ Invalid expression: ambiguous name无效表达式:二义性名称
-
+ Invalid expression: stand-alone anonymous function无效表达式:独立匿名函数
-
+ Invalid operation on method方法操作无效
-
+ Invalid reference. Property accessors cannot be used in combined read/write operations引用无效。属性访问器不能用于组合读/写操作。
-
+ Invalid scope resolution范围解析无效
-
+ Invalid signature for virtual property虚拟属性签名无效
-
+ Invalid type类型无效
-
+ Invalid unicode code point无效的 Unicode 代码点
-
+ Invalid unicode sequence in source源代码中的 Unicode 序列无效
-
+ Invalid use of named arguments命名参数的使用无效
-
+ The method cannot be named with the class name该方法不能以类名命名
-
+ Mixin classes cannot have constructors or destructorsMixin 类不能有构造函数或析构函数
-
+ Mixin class cannot inherit from classesMixin 类不能从类继承
-
+ Mixin classes cannot have child typesMixin 类不能有子类型
-
+ Found more than one matching operator找到多个匹配的运算符
-
+ Multiline strings are not allowed in this application此应用程序不允许使用多行字符串
-
+ Only objects have constructors只有对象才有构造函数
-
+ Must return a value必须返回一个值
-
+ Detected named argument with old syntax检测到具有旧语法的命名参数
-
+ No appropriate indexing operator found未找到合适的索引运算符
-
+ No appropriate opEquals method found未找到合适的 opEquals 方法
-
+ The application doesn't support the default array type.该应用程序不支持默认数组类型。
-
+ Non-const method call on read-only object reference只读对象引用上的非常量方法调用
-
+ Non-terminated string literal未终止的字符串
-
+ Not all paths return a value并非所有路径都会返回值
-
+ Not enough values to match pattern没有足够的值来模式匹配
-
+ Implicit conversion of value is not exact值的隐式转换并不准确
-
+ Expression is not an l-value表达式不是左值
-
+ Not a valid reference无效引用
-
+ Not a valid lvalue不是有效的左值
-
+ Nothing was built in the module模块中没有构建任何内容
-
+ Object handle is not supported for this type此类型不支持对象句柄
-
+ Only object types that support object handles can use &inout. Use &in or &out instead只有支持对象句柄的对象类型才能使用 &inout。请改用 &in 或 &out
-
+ A cast operator has one argument强制类型转换运算符有一个参数
-
+ The code must contain one and only one function代码必须包含一个且只能包含一个函数
-
+ The code must contain one and only one global variable代码必须包含一个且只能有一个全局变量
-
+ Both operands must be handles when comparing identity比较时,两个操作数都必须是句柄
-
+ The overloaded functions are identical on initial parameters without default arguments重载函数在初始参数上相同,没有默认参数
-
+ Parameter already declared参数已声明
-
+ Positional arguments cannot be passed after named arguments位置参数不能在命名参数之后传递
-
+ Potentially matching non-const method is hidden on read-only object reference可能匹配的非 const 方法隐藏在只读对象引用中
-
+ Property accessor with index must have 1 and only 1 index argument带索引的属性访问器必须有 1 个且只能有 1 个索引参数
-
+ Property accessors have been disabled by the application应用程序已禁用属性访问器
-
+ Property accessor must be implemented必须实现属性访问器
-
+ Class properties cannot be declared as const类属性不能声明为 const
-
+ The property has no get accessor该属性没有 get 访问器
-
+ The property has no set accessor该属性没有设置访问器
-
+ Virtual property must have at least one get or set accessor虚拟属性必须至少有一个 get 或 set 访问器
-
+ Resulting reference cannot be returned. Returned references must not refer to local variables.无法返回结果引用。返回的引用不得引用局部变量。
-
+ Resulting reference cannot be returned. There are deferred arguments that may invalidate it.无法返回结果引用。存在可能使其无效的延迟参数。
-
+ Resulting reference cannot be returned. The expression uses objects that during cleanup may invalidate it.无法返回结果引用。表达式使用的对象在清理过程中可能会使其失效。
-
+ Reference is read-only引用是只读的
-
+ Reference is temporary参考是临时的
-
+ Reference types cannot be passed by value in function parameters引用类型不能在函数参数中按值传递
-
+ Reference types cannot be returned by value from functions引用类型不能通过函数返回值
-
+ The script section is empty脚本节区为空
-
+ Signed/Unsigned mismatch有符号/无符号不匹配
-
+ Strings are not recognized by the application应用程序无法识别字符串
-
+ Case expressions must be literal constantscase 表达式必须是文字常量
-
+ Switch expressions must be integral numbersswitch 表达式必须是整数
-
+ The function has too many jump labels to handle. Split the function into smaller ones.该函数的跳转标签过多,无法处理。请将函数拆分为较小的函数。
-
+ Too many values to match pattern与模式匹配的值过多
-
+ Unexpected end of file意外的文件结束
-
+ Unexpected variable declaration意外的变量声明
-
+ Unreachable code无法访问的代码
-
+ Virtual property contains unrecognized aspect虚拟属性包含未被认可的部分
-
+ Unused script node未使用的脚本节点
-
+ Value is too large for data type对于数据类型来说,值太大
-
+ Void cannot be an operand in expressionsvoid 不能作为表达式中的操作数
-
+ Warnings are treated as errors by the application应用程序将警告视为错误
-
+ While parsing argument list解析参数列表时
-
+ While parsing expression解析表达式时
-
+ While parsing initialization list解析初始化列表时
-
+ While parsing namespace解析命名空间时
-
+ While parsing statement block解析语句块时
-
+ Previous error occurred while including mixin包含 mixin 时发生先前错误
-
+ Autohandles cannot be used with types that have been registered with NOCOUNT自动句柄不能与已使用 NOCOUNT 注册的类型一起使用
-
+ First parameter to template factory must be a reference. This will be used to pass the object type of the template模板工厂的第一个参数必须是引用。这将用于传递模板的对象类型
-
+ Invalid configuration. Verify the registered application interface.配置无效。请验证已注册的应用程序接口。
-
+ A value type must be registered with a non-zero size值类型必须注册为非零大小
-
+ The behaviour is not compatible with the type行为与类型不兼容
-
+ A garbage collected ref type must have the addref, release, and all gc behaviours垃圾收集引用类型必须具有 addref、release 和所有 gc 行为
-
+ A garbage collected value type must have the gc enum references behaviour垃圾收集值类型必须具有 gc 枚举引用行为
-
+ A scoped reference type must have the release behaviour作用域引用类型必须具有释放行为
-
+ A reference type must have the addref and release behaviours引用类型必须具有 addref 和 release 行为
-
+ A non-pod value type must have at least one constructor and the destructor behaviours非 pod 值类型必须至少有一个构造函数和析构函数行为
-
+ Template list factory expects two reference parameters. The last is the pointer to the initialization buffer模板列表工厂需要两个引用参数。最后一个是指向初始化缓冲区的指针
-
+ List factory expects only one reference parameter. The pointer to the initialization buffer will be passed in this parameter列表工厂仅需要一个引用参数。指向初始化缓冲区的指针将在此参数中传递
-
+ AddScriptObjectToGC called with null pointer使用空指针调用 AddScriptObjectToGC
-
+ An exception occurred in a nested call嵌套调用中发生异常
-
+ Uh oh! The engine's reference count is increasing while it is being destroyed. Make sure references needed for clean-up are immediately released哎呀!引擎的引用计数在被销毁时不断增加。确保立即释放清理所需的引用
-
+ The module is still in use and cannot be rebuilt. Discard it and request another module该模块仍在使用中,无法重建。丢弃它并请求另一个模块
-
+ Property属性
-
+ System function系统函数
-
+ Variable declaration变量声明
-
+ Stack overflow栈溢出
-
+ Null pointer access空指针访问
-
+ Divide by zero除以零
-
+ Overflow in integer division整数除法溢出
-
+ Overflow in exponent operation指数运算溢出
-
+ Unrecognized byte code无法识别的字节码
-
+ Invalid calling convention无效调用约定
-
+ Unbound function called未绑定的函数被调用
-
+ Out of range越界
-
+ Caught an exception from the application捕获应用程序异常
-
+ Mismatching types in value assignment值分配中的类型不匹配
-
+ Too many nested calls嵌套调用过多
-
+ Assert failed断言失败
-
- GlobalBadDecl
-
+
+ BadDecl:
+ 错误的声明:
-
- ScriptRunUnsupported
-
+
+ GlobalBadDecl
+ 错误的全局声明
@@ -4428,40 +4450,65 @@
ScriptingConsole
-
+ [Info]【信息】
-
+ [Warn]【警告】
-
+ [Error]【错误】
-
+
+ InvalidDelCmd
+ 无效删除指令
+
+
+
+ NotFoundIgnore:
+ 变量未找到,忽略:
+
+
+ [Console]【控制台】
-
+
+ MultiCodeCanNotUndo
+ 多行代码粘贴后将不能修改
+
+
+ Copy复制
-
+ Cut剪切
-
+ Paste粘贴
+
+
+ Clear
+ 清空
+
+
+
+ AbortScript
+ 终止脚本
+ ScriptingConsoleBase
@@ -4712,11 +4759,11 @@
-
-
-
-
-
+
+
+
+
+ Error错误
@@ -4731,83 +4778,83 @@
正在关闭未保存的脚本文件,你确定保存吗?
-
+ ScriptSaveFailedClose脚本保存失败,你仍确认关闭吗?
-
+ Debuging...调试中...
-
+ Running...运行中...
-
+ Line %1, Col %2行 %1, 列 %2
-
+ (Selected: %1) (选中: %1)
-
-
+
+ ChooseFile选择文件
-
-
-
+
+
+ FilePermission因文件权限无法继续!
-
+ ReloadSuccessfully文件重新加载成功!
-
+ ReloadUnSuccessfully文件重新加载失败!
-
+ ChooseSaveFile请选择保存文件路径:
-
-
+
+ SaveSuccessfully保存成功!
-
+ SaveUnSuccessfully保存失败!
-
+ FormatCodeFailed代码格式化失败
-
-
+
+ CannotSave2RunScript无法保存,故无法继续运行脚本。
-
-
+
+ ScriptStillRunning脚本仍在运行,你确定要退出吗?
diff --git a/lang/zh_TW/winghex_zh_TW.ts b/lang/zh_TW/winghex_zh_TW.ts
index 7c12967..f564ac6 100644
--- a/lang/zh_TW/winghex_zh_TW.ts
+++ b/lang/zh_TW/winghex_zh_TW.ts
@@ -871,7 +871,7 @@
-
+ View視圖
@@ -908,8 +908,8 @@
-
-
+
+ Plugin插件
@@ -920,7 +920,7 @@
-
+ Log日誌
@@ -944,7 +944,8 @@
-
+
+ Copy複製
@@ -952,8 +953,8 @@
-
-
+
+ CopyToClipBoard數據已拷貝到粘貼板
@@ -974,27 +975,27 @@
-
+ CheckSum校驗和
-
+ DeleteBookMark刪除書簽
-
+ ClearBookMark清空書簽
-
-
-
+
+
+ BookMark書簽
@@ -1005,119 +1006,119 @@
解碼字串
-
+ ScriptConsole腳本控制臺
-
-
+
+ Basic基礎
-
+ New新建
-
+ OpenF打開檔
-
+ OpenWorkSpace打開工作區
-
+ RecentFiles最近打開
-
-
-
+
+
+ Reload重新加載
-
-
+
+ Save保存
-
+ SaveAs另存為
-
+ ConvertWS轉為工作區
-
+ Export導出
-
+ SaveSel保存選區位元組
-
-
-
-
+
+
+
+ General基本
-
+ Undo撤銷
-
+ Redo恢復
-
+ Cut剪切
-
+ Paste粘貼
-
+ Delete刪除
-
+ Clone克隆
-
+ Lookup查詢
-
+ Find查找
-
+ Goto跳轉
@@ -1128,48 +1129,48 @@
編碼
-
+ FileInfo檔資訊
-
-
+
+ Hex十六進制
-
+ CutHex剪切(十六進制)
-
+ CopyHex複製(十六進制)
-
+ PasteHex粘貼(十六進制)
-
-
+
+ Fill填充
-
+ FillZero填充零
-
-
-
-
+
+
+
+ MetaData標注
@@ -1184,32 +1185,32 @@
清空標注
-
+ MetaDataEdit編輯標注
-
+ DeleteMetaData刪除標注
-
+ ClearMetaData清空標注
-
+ Display顯示
-
+ ViewText文本預覽
-
+ Scale縮放
@@ -1300,76 +1301,76 @@
導出結果
-
+ NothingToSave沒有保存的數據
-
+ OpenExt打開 - 拓展
-
+ ResetScale重置縮放
-
+ ShowMetafg標注前景色
-
+ ShowMetabg標注背景色
-
+ ShowMetaComment批註
-
+ MetaShowAll顯示所有標注
-
+ MetaHideAll隱藏所有標注
-
+ FileStatus檔狀態
-
+ InfoSave是否保存
-
+ ReadOnly可讀寫
-
+ SetLocked啟用/禁用鎖定編輯
-
+ ErrUnLock鎖定編輯失敗
-
+ SetOver啟用/禁用改變大小
@@ -1389,659 +1390,679 @@
無符號 Hex
-
+
+ BgScriptOutputHere
+ 後臺腳本執行將會在這裏輸出
+
+
+
+ SelectAll
+ 全選
+
+
+
+ Clear
+ 清空
+
+
+
+ AbortScript
+ 終止腳本
+
+
+ BgScriptOutput後臺腳本輸出
-
+ ErrUnOver鎖定檔大小失敗
-
+ Window窗體
-
+ Editor編輯器
-
+ Tools工具
-
+ HexEditorLayout編輯器佈局
-
+ SetBaseAddr設置基址
-
+ addressBase基址
-
+ inputAddressBase請輸入基址
-
+ WarnBigBaseAddress基址過大,你得到的地址將會不正確!
-
+ ErrBaseAddress非法基址輸入
-
+ SetColInfo顯示/隱藏地址欄
-
+ SetHeaderInfo顯示/隱藏表頭
-
+ SetAsciiString顯示/隱藏解碼字串
-
+ Layout佈局
-
+ Fullscreen全屏
-
+ Default默認
-
-
-
+
+
+ LayoutRestoring...恢復佈局中...
-
+ RestoreLayout恢復佈局
-
-
+
+ SaveLayout保存佈局
-
+ ExportLog導出日誌
-
+ ClearLog清空日誌
-
+ InsepctQt監視 Qt
-
+ ScriptEditor腳本編輯器
-
+ Scripts腳本倉庫
-
+ PluginFunctions插件功能
-
+ ScriptSetting腳本設置
-
+ PluginSettings插件設置
-
+ Info資訊
-
+ Software軟體
-
+ Sponsor贊助
-
+ CheckUpdate檢查更新
-
+ Wiki網頁 Wiki
-
+ AboutQT關於 QT
-
+ SetPageIDEmptyTryUseName設置頁 ID 為空,嘗試使用名稱作為 ID
-
+ SetPageDupNameIgnored設置頁重複的 ID 名稱,已忽略加載
-
+ Plugin %1 contains a duplicate ID (%2) that is already registered by plugin %3插件 %1 包含重複 ID (%2),該 ID 已被插件 %3 註冊
-
-
+
+ ChooseFile選擇檔
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Error錯誤
-
-
+
+ FileNotExist檔不存在!
-
-
-
-
-
+
+
+
+
+ FilePermission因檔許可權無法繼續!
-
+ ProjectFile (*.wingpro)專案檔 (*.wingpro)
-
+ ReloadSuccessfully檔重新加載成功!
-
+ ReloadUnSuccessfully檔重新加載失敗!
-
-
-
-
+
+
+
+ ChooseSaveFile請選擇保存檔路徑:
-
+ NoMoreClone克隆已到上限,無法繼續操作!
-
+ FindFininishBusy查找任務繁忙,請勿重複查找!
-
+ MayTooMuchFindResult搜索數量已到達上限,結果可能不全,建議請按區段搜索。
-
+ SaveLayoutSuccess保存佈局成功
-
+ SaveLayoutError保存佈局失敗
-
+ HasClonedView該編輯頁已被克隆編輯,如果關閉,相關聯的頁也會被關閉,你確認繼續嗎?
-
+ FileCloseBigFile大檔讀取模式下目的檔案被關閉,該標籤將會被關閉。
-
-
+
+ ReloadNeededYesOrNo目的檔案被修改,是否重新載入?
-
+ SaveWorkSpace保存工作區
-
+ WingHexWorkSpace (*.wingpro)羽雲十六進制工作區 (*.wingpro)
-
+ ConfirmSave正在關閉未保存的檔或工作區,你確定保存嗎?
-
+ [Info]【資訊】
-
+ [Warn]【警告】
-
+ [Error]【錯誤】
-
+ ConfirmAPPSave你嘗試關閉程式,但仍存在未保存的檔或工作區,你確定保存這些更改嗎?
-
-
-
+
+
+ SaveSuccessfully保存成功!
-
-
+
+ SaveWSError保存工作區錯誤!
-
-
+
+ Warn警告
-
+ Opening...打開檔中...
-
+ WorkSpaceOpening...打開工作區中...
-
+ Reloading...重載檔中...
-
+ Saving...保存中...
-
+ SaveNewFirst請首先保存新建的檔
-
+ AlreadyWorkSpace已經是工作區,無需轉化
-
+ ConvWorkSpaceFailed轉化為工作區失敗
-
+ ConvWorkSpaceSuccess轉化為工作區成功
-
+ SavingAs...另存為中...
-
+ SaveUnSuccessfully保存失敗!
-
+ Exporting...導出中...
-
+ ChooseExportFile請選擇導出檔路徑:
-
+ ExportSuccessfully導出成功!
-
+ ExportUnSuccessfully導出失敗!
-
+ SavingSel...保存選中位元組中...
-
+ SaveSelSuccess保存選區位元組成功!
-
+ SaveSelError保存選區位元組失敗,因檔不具有可寫許可權!
-
-
+
+ CutToClipBoard數據已剪切到粘貼板!
-
-
+
+ UnCutToClipBoard由於保持大小限制,數據剪切到粘貼板失敗!
-
-
+
+ UnCopyToClipBoard由於保持大小限制,數據剪切到複製板失敗!
-
-
+
+ Finding...查找中...
-
+ DeleteSuccess刪除成功
-
+ DeleteFailed刪除失敗
-
+ FindFininish查找結果完畢!
-
+ PleaseInputFill請輸入填充位元組值
-
+ FillInputTruncWarn填充輸入數值過大,將會被截斷填充
-
+ FillInputError填充位元組輸入錯誤
-
-
+
+ InputComment請輸入批註:
-
-
+
+ BookmarkDelSuccess刪除書簽成功
-
+ BookmarkDelNoItem無書簽可刪除
-
+ BookmarkClearSuccess書簽清空完畢
-
-
-
+
+
+ NoSelection沒有選區,無法繼續的操作!
-
+ NoMetaData無可編輯標記
-
+ PleaseClearSel請清空選擇
-
+ MetaDelSuccess元數據刪除成功
-
+ MetaDelNoItem無元數據可刪除
-
+ MetaClearSuccess元數據清空完畢
-
+ FindResultExporting...查找結果導出中...
-
-
+
+ EmptyFindResult沒有可導出的搜索結果!
-
+ SaveFindResult導出搜索結果成功!
-
+ SaveFindResultError導出結果失敗!
-
+ TooManyBytesDecode超出解碼位元組限制……
-
+ NoTextFileMayInvalid該檔不是文本檔,以文本方式預覽並不是一個好的方式,你確認繼續嗎?
-
+ LayoutSaving...佈局保存中...
-
+ PleaseInput請輸入
-
+ LogExporting...日誌導出中...
-
+ ExportLogError導出日誌失敗!
-
+ ExportLogSuccess導出日誌成功,路徑:
-
+ ClearLogSuccess清空日誌成功!
-
+ BadNetwork無法與遠程伺服器的更新檢查建立連接,請檢查網路。
-
+ NewestVersion當前軟體為最新版本
-
+ OlderVersion你使用的軟體為老版本,建議到 Github 和 Gitee 的倉庫發行版下載更新。
-
+ CheckingUpdate檢查更新中……
-
+ Too much opened files打開的檔過多,無法繼續操作!
-
+ FilePermissionSure2Quit因檔許可權無法保存,你確認要退出嗎?
-
+ UnknownErrorSure2Quit因未知錯誤無法保存,你確認要退出嗎?
-
+ WorkSpaceUnSavedSure2Quit工作區檔無法保存,你確認要退出嗎?
-
+ CopyLimit拷貝位元組超出限制
-
+ ErrOpenFileBelow打開檔出現錯誤(由於許可權不足),如下為打開錯誤的檔:
@@ -2622,18 +2643,18 @@
QMessageBox
-
+ <h3>About Qt</h3><p>This program uses Qt version %1.</p><h3>關於 Qt</h3><p>此程式使用 Qt 版本 %1。</p>
-
+ <p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across all major desktop operating systems. It is also available for embedded Linux and other embedded and mobile operating systems.</p><p>Qt is available under multiple licensing options designed to accommodate the needs of our various users.</p><p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of GNU (L)GPL.</p><p>Qt licensed under GNU (L)GPL is appropriate for the development of Qt applications provided you can comply with the terms and conditions of the respective licenses.</p><p>Please see <a href="https://%2/">%2</a> for an overview of Qt licensing.</p><p>Copyright (C) The Qt Company Ltd. and other contributors.</p><p>Qt and the Qt logo are trademarks of The Qt Company Ltd.</p><p>Qt is The Qt Company Ltd. product developed as an open source project. See <a href="https://%3/">%3</a> for more information.</p>Leave this text untranslated or include a verbatim copy of it below and note that it is the authoritative version in case of doubt.
-
+ About Qt關於 QT
@@ -2773,312 +2794,311 @@
— 在 ‘%2’ 中發生異常 ‘%1’
-
+ ExecNotAllowedInRoot在管理員許可權執行第三方命令為非法操作
-
-
+
+
+ Script failed to build腳本編譯失敗
-
+ Cannot find 'int main()' or 'void main()'無法找到程式入口點: "int main()" 或者 "void main()"
-
+ Debugging, waiting for commands.調試中,等待調試命令。
-
+ Failed while initializing global variables初始化全局變數失敗
-
-
+
+ The script failed with an exception異常被拋出,腳本執行失敗
-
-
+
+ The script was aborted腳本被終止
-
-
+
+ The script terminated unexpectedly腳本異常退出
-
+ The script exited with 腳本退出返回值:
-
+ '%1' is already declared"%1" 已被聲明
-
+ Abstract class '%1' cannot be instantiated無法實例化抽象類 "%1"
-
+ Accessing private property '%1' of parent class非法訪問父類的私有屬性 "%1"
-
+ Attribute '%1' informed multiple times屬性 "%1" 已被多次通知
-
+ Can't form arrays of subtype '%1'無法創建子類型 "%1" 的數組
-
+ Can't inherit from class '%1' marked as final無法從標記為 final 的類 "%1" 繼承
-
+ Cannot access non-static member '%1' like this無法和像使用 this 一樣訪問非靜態成員 "%1"
-
+ Can't construct handle '%1'. Use ref cast instead無法構造句柄 "%1" 。請改用引用強制轉換
-
+ Can't implicitly convert from '%1' to '%2'.無法從 "%1' 隱式轉換為 "%2"。
-
+ Compiling %1正在編譯 %1
-
+ Compiling auto generated %1編譯自動生成的 %1
-
+ Implemented property accessor '%1' does not expect index argument已實現的屬性訪問器 "%1" 不需要索引參數
-
+ Implemented property accessor '%1' expects index argument已實現的屬性訪問器 "%1" 需要索引參數
-
+ Data type can't be '%1'數據類型不能為 "%1"
-
+ All subsequent parameters after the first default value must have default values in function '%1'在函數 "%1" 中,第一個默認值之後的所有後續參數都必須具有默認值
-
+ The method in the derived class must have the same return type as in the base class: '%1'派生類中的方法必須具有與基類相同的返回類型:"%1"
-
+ The name of the destructor '%1::~%2' must be the same as the class析構函數 "%1::~%2" 的名稱必須與類相同
-
+ Expected '%1'應為 "%1"
-
+ Expected '%1' or '%2'應為 ”%1“ 或 ”%2“
-
+ Expression must be of boolean type, instead found '%1'運算式必須是布爾類型,但實際使用的是 "%1"
-
+ Expression '%1' is a data type運算式 "%1" 是一種數據類型
-
+ External shared entity '%1' not found未找到外部共用實體 "%1"
-
+ External shared entity '%1' cannot redefine the original entity外部共用實體 "%1" 無法重新定義原始實體
-
+ Failed while compiling default arg for parameter %1 in function '%2'為函數 "%2" 中的參數 %1 編譯默認參數時失敗
-
+ Function '%1' not found未找到函數 "%1"
-
+ The property '%1' has mismatching types for the get and set accessors屬性 "%1" 的 get 和 set 訪問器類型不匹配
-
+ Variable '%1' hides another variable of same name in outer scope變數 "%1" 隱藏了外部作用域中另一個同名變數
-
+ Identifier '%1' is not a data type識別字 "%1" 不是數據類型
-
+ Identifier '%1' is not a data type in global namespace識別字 "%1" 不是全局命名空間中的數據類型
-
+ Identifier '%1' is not a data type in namespace '%2' or parent識別字 "%1" 不是命名空間 "%2" 或其父級中的數據類型
-
+ Illegal operation on '%1'對 "%1" 的非法操作
-
+ Illegal variable name '%1'.非法變數名 "%1"。
-
+ Illegal access to inherited private property '%1'非法訪問繼承的私有屬性 "%1"
-
+ Initialization lists cannot be used with '%1'初始化列表不能與 "%1" 一起使用
-
+ Attempting to instantiate invalid template type '%1<%2>'嘗試實例化無效的範本類型 "%1<%2>"
-
+ Instead found '%1'而是找到了 "%1"
-
+ Instead found identifier '%1'而是找到識別字 "%1"
-
+ Instead found reserved keyword '%1'而是找到了保留關鍵字 "%1"
-
+ Interface '%1' cannot be instantiated無法實例化介面 "%1"
-
+ Invalid unicode escape sequence, expected %1 hex digits無效的 Unicode 轉義序列,預期為 %1 個十六進制數字
-
+ Method '%1' declared as final and cannot be overridden方法 "%1" 已聲明為 final,因此無法被覆蓋
-
+ Method '%1' marked as override but does not replace any base class or interface method方法 "%1" 標記為覆蓋,但並未替換任何基類或介面方法
-
+ Method '%1::%2' is missing the return type, nor is it the same name as object to be a constructor方法 "%1::%2" 缺少返回類型,並且其名稱與構造函數對象不同
-
+ Method '%1' is not part of object '%2'方法 "%1" 不是對象 "%2" 的一部分
-
+ Missing implementation of '%1'缺少 "%1" 的實現
-
+ Missing definition of '%1'缺少 "%1" 的定義
-
+ Mixin class cannot be declared as '%1'Mixin 類不能聲明為 "%1"
-
+ Multiple matching signatures to '%1'"%1" 有多個匹配的簽名
-
+ Found multiple get accessors for property '%1'發現屬性 "%1" 的多個 get 訪問器
-
+ Found multiple set accessors for property '%1'發現屬性 "%1" 的多個集合訪問器
-
+ Namespace '%1' doesn't exist.命名空間 "%1" 不存在。
-
-
@@ -3089,1254 +3109,1256 @@
+
+ Name conflict. 名稱衝突。
-
+ '%1' is an extended data type."%1" 是擴展數據類型。
-
+ '%1' is a global property."%1" 是全局屬性。
-
+ '%1' is a named type."%1" 是被命名的類型。
-
+ '%1' is a funcdef."%1" 是一個函數簽名定義。
-
+ '%1' is a global function."%1" 是一個全局函數。
-
+ '%1' is a mixin class."%1" 是一個 Mixin 類。
-
+ '%1' is a virtual property."%1" 是虛擬屬性。
-
+ '%1' is a class."%1" 是一個類。
-
+ '%1' is an interface."%1" 是一個介面。
-
+ '%1' is an object property."%1" 是一個對象屬性。
-
+ '%1' is a class method."%1" 是一個類方法。
-
+ '%1' is already used.”%1“ 已被使用。
-
+ No appropriate opHndlAssign method found in '%1' for handle assignment在 "%1" 中未找到適當的 opHndlAssign 方法用於句柄分配
-
+ No conversion from '%1' to '%2' available.無法進行從 "%1" 到 "%2" 的轉換。
-
+ No conversion from '%1' to math type available.無法將 "%1" 轉換為數學類型。
-
+ No default constructor for object of type '%1'."%1" 類型對象沒有默認構造函數。
-
+ No appropriate opAssign method found in '%1' for value assignment在 "%1" 中未找到適合賦值的 opAssign 方法
-
+ No copy constructor for object of type '%1'.沒有 "%1" 類型對象的複製構造函數。
-
+ No matching signatures to '%1'沒有與 "%1" 匹配的簽名
-
+ No matching operator that takes the type '%1' found未找到採用類型 "%1" 的匹配運算符
-
+ No matching operator that takes the types '%1' and '%2' found未找到採用類型 "%1" 和 "%2" 的匹配運算符
-
+ No matching symbol '%1'沒有匹配的符號 "%1"
-
+ Expression doesn't form a function call. '%1' evaluates to the non-function type '%2'運算式不構成函數調用。"%1" 計算結果為非函數類型 "%2"
-
+ '%1' is not declared"%1" 未被聲明
-
+ '%1' is not initialized.”%1“ 未初始化。
-
+ '%1' is not a member of '%2'”%1“ 不是 ”%2“ 的成員
-
+ Type '%1' doesn't support the indexing operator類型 "%1" 不支持索引運算符
-
+ Parameter type can't be '%1', because the type cannot be instantiated.參數類型不能是 "%1",因為該類型無法實例化。
-
+ Previous error occurred while attempting to compile initialization list for type '%1'嘗試編譯類型 "%1" 的初始化列表時發生先前的錯誤
-
+ Illegal call to private method '%1'非法調用私有方法 "%1"
-
+ Illegal access to private property '%1'非法訪問私有屬性 "%1"
-
+ Illegal call to protected method '%1'非法調用受保護的方法 "%1"
-
+ Illegal access to protected property '%1'非法訪問受保護的屬性 "%1"
-
+ Return type can't be '%1'返回類型不能是 "%1"
-
+ Shared code cannot access non-shared global variable '%1'共用代碼無法訪問非共用全局變數 "%1"
-
+ Shared code cannot call non-shared function '%1'共用代碼無法調用非共用函數 "%1"
-
+ Shared type cannot implement non-shared interface '%1'共用類型無法實現非共用介面 "%1"
-
+ Shared class cannot inherit from non-shared class '%1'共用類不能從非共用類 "%1" 繼承
-
+ Shared code cannot use non-shared type '%1'共用代碼不能使用非共用類型 "%1"
-
+ Shared type '%1' doesn't match the original declaration in other module共用類型 "%1" 與其他模組中的原始聲明不匹配
-
+ Template '%1' expects %2 sub type(s)範本 "%1" 需要 %2 個子類型
-
+ Type '%1' cannot be a reference類型 "%1" 不能是引用
-
+ Type '%1' is not available for this module類型 "%1" 不適用於此模組
-
+ Type '%1' is not a template type類型 "%1" 不是範本類型
-
+ Unexpected token '%1'意外標記 "%1"
-
+ Use of uninitialized global variable '%1'.使用未初始化的全局變數 "%1"。
-
+ Unknown scope '%1'未知作用域 "%1"
-
+ Where '%1' is '%2'其中 "%1" 是 "%2"
-
+ Failed to initialize global variable '%1'無法初始化全局變數 "%1"
-
+ Exception '%1' in '%2'"%2" 中的異常 "%1"
-
+ Type '%1' is missing behaviours類型 "%1" 缺少的行為
-
+ Can't pass type '%1' by value unless the application type is informed in the registration除非在註冊時告知應用程式類型,否則無法按值傳遞類型 "%1"
-
+ Can't return type '%1' by value unless the application type is informed in the registration除非在註冊時告知應用程式類型,否則無法按值返回類型 "%1"
-
+ Don't support passing type '%1' by value to application in native calling convention on this platform不支持在此平臺上按照本機調用約定將類型 "%1" 按值傳遞給應用程式
-
+ Don't support returning type '%1' by value from application in native calling convention on this platform不支持在此平臺上按照本機調用約定從應用程式返回類型 "%1" 的值
-
+ Object {%1}. GC cannot destroy an object of type '%2' as it doesn't know how many references to there are.對象 {%1}。GC 無法銷毀類型為 "%2" 的對象,因為它不知道有多少個引用。
-
+ Object {%1}. GC cannot destroy an object of type '%2' as it can't see all references. Current ref count is %3.對象 {%1}。GC 無法銷毀類型為 "%2" 的對象,因為它無法看到所有引用。當前引用計數為 %3。
-
+ Object type '%1' doesn't exist對象類型 "%1" 不存在
-
+ Cannot register. The template type instance '%1' has already been generated.無法註冊。範本類型實例 "%1" 已生成。
-
+ Template type '%1' doesn't exist範本類型 "%1" 不存在
-
+ Template subtype '%1' doesn't exist範本子類型 "%1" 不存在
-
+ Failed to read subtype of template type '%1'無法讀取範本類型 "%1" 的子類型
-
+ Failed in call to function '%1' (Code: %2, %3)調用函數 "%1" 失敗(代碼:%2,%3)
-
+ Failed in call to function '%1' with '%2' (Code: %3, %4)使用 "%2" 調用函數 "%1" 失敗(代碼:%3,%4)
-
+ Failed in call to function '%1' with '%2' and '%3' (Code: %4, %5)使用 "%2" 和 "%3" 調用函數 "%1" 失敗(代碼:%4,%5)
-
+ Type '%1' is still used by function '%2'類型 "%1" 仍被函數 "%2" 使用
-
+ The builtin type in previous message is named '%1'上一條消息中的內置類型名為 "%1"
-
+ The function in previous message is named '%1'. The func type is %2上一條消息中的函數名為 "%1"。函數類型為 %2
-
+ The script object of type '%1' is being resurrected illegally during destruction類型為 "%1" 的腳本對象在銷毀過程中被非法復活
-
+ LoadByteCode failed. The bytecode is invalid. Number of bytes read from stream: %1LoadByteCode 失敗。位元組碼無效。從流中讀取的位元組數:%1
-
+ Function '%1' appears to have been compiled without JIT entry points函數 "%1" 似乎已在無 JIT 入口點的情況下進行編譯
-
+ There is an external reference to an object in module '%1', preventing it from being deleted存在對模組 "%1" 中對象的外部引用,導致無法刪除該對象
-
+ Output argument expression is not assignable輸出參數運算式不可分配
-
+ Auto is not allowed here這裏禁止使用 auto 關鍵字
-
+ Can't find unambiguous implicit conversion to make both expressions have the same type無法找到明確的隱式轉換來使兩個運算式具有相同的類型
-
+ Both conditions must call constructor兩個條件都必須調用構造函數
-
+ Base class doesn't have default constructor. Make explicit call to base constructor基類沒有默認構造函數。明確調用基類構造函數
-
+ Base class doesn't have copy constructor or default constructor and assign operator. Make explicit call to base constructor基類沒有複製構造函數或默認構造函數和賦值運算符。明確調用基類構造函數
-
+ Candidates are:候選包括:
-
+ Can't call a constructor in loops無法在迴圈中調用構造函數
-
+ Can't call a constructor in switch無法在 switch 中調用構造函數
-
+ Can't call a constructor multiple times無法多次調用構造函數
-
+ Can't create delegate無法創建委託
-
+ Can't create delegate for types that do not support handles無法為不支持句柄的類型創建委託
-
+ Cannot flag function that will not be auto generated as deleted無法將不會自動生成的函數標記為已刪除
-
+ Conflict with explicit declaration of function and deleted function與函數的顯式聲明和已刪除函數衝突
-
+ Can't implement itself, or another interface that implements this interface無法實現自身,也無法實現此介面的其他介面
-
+ Can't inherit from multiple classes不能從多個類繼承
-
+ Can't inherit from itself, or another class that inherits from this class不能從其自身或從該類繼承的其他類繼承
-
+ Can't pass class method as arg directly. Use a delegate object instead無法直接將類方法作為參數傳遞。請改用委託對象
-
+ Unable to resolve auto type無法解析自動類型
-
+ Can't return reference to local value.無法返回對本地值的引用。
-
+ Can't return value when return type is 'void'返回類型為 "void" 時無法返回值
-
+ Implicit conversion changed sign of value隱式轉換改變了值的符號
-
+ A class cannot be both abstract and final一個類不能同時是 abstract 和 final
-
+ Compound assignments with property accessors on value types are not supported不支持對值類型使用屬性訪問器的複合賦值
-
+ Compound assignments with indexed property accessors are not supported不支持使用索引屬性訪問器的複合賦值
-
+ Compound assignments with property accessors require both get and set accessors具有屬性訪問器的複合賦值需要 get 和 set 訪問器
-
+ Variables cannot be declared in switch cases, except inside statement blocks變數不能在 switch 語句中聲明,除非在語句塊內
-
+ The default case must be the last onedefault 情況必須是最後一個
-
+ The type of the default argument expression doesn't match the function parameter type默認參數運算式的類型與函數參數類型不匹配
-
+ Deleted functions cannot have implementation已刪除的函數不能有實現
-
+ The destructor must not have any parameters析構函數不能有任何參數
-
+ Value assignment on reference types is not allowed. Did you mean to do a handle assignment?不允許對引用類型進行值分配。是要進行句柄分配嗎?
-
+ Compound assignment on reference types is not allowed不允許對引用類型進行複合賦值
-
+ Duplicate named argument重複命名參數
-
+ Duplicate switch case重複的 switch case
-
+ Else with empty statementelse 中使用空語句
-
+ Empty list element is not allowed不允許空列表元素
-
+ Empty switch statement空的 switch 語句
-
+ Expected constant應為常量
-
+ Expected data type應為數據類型
-
+ Expected expression value應為表達值
-
+ Expected identifier應為識別字
-
+ Expected a list enclosed by { } to match pattern應為用 { } 括起來的列表與模式匹配
-
+ Expected method or property應為方法或屬性
-
+ Expected one of: 應為為以下之一:
-
+ Expected operator應為操作符
-
+ Expected post operator應為右操作符
-
+ Expected pre operator應為左操作符
-
+ Expected string應為字串
-
+ Expression doesn't evaluate to a function運算式無法計算函數值
-
+ Previous error occurred while attempting to create a temporary copy of object嘗試創建對象的臨時副本時發生上一個錯誤
-
+ Float value truncated in implicit conversion to integer浮點值在隱式轉換為整數時被截斷
-
+ Found multiple matching enum values找到多個匹配的枚舉值
-
+ A function with the same name and parameters already exists具有相同名稱和參數的函數已存在
-
+ Global variables have been disabled by the application全局變數已被應用程式禁用
-
+ It is not allowed to perform a handle assignment on a non-handle property不允許對非句柄屬性執行句柄分配
-
+ The operand is implicitly converted to handle in order to compare them運算元被隱式轉換為句柄,以便進行比較
-
+ Handle to handle is not allowed不允許使用句柄
-
+ If with empty statement如果帶有空語句
-
+ Illegal member type非法成員類型
-
+ Illegal operation on this datatype對該數據類型的非法操作
-
+ Illegal target type for reference cast非法引用轉換的目標類型
-
+ Interfaces can only implement other interfaces介面只能實現其他介面
-
+ Invalid 'break'無效的 break 關鍵字
-
+ Invalid character literal無效的字元
-
+ Invalid 'continue'無效的 continue 關鍵字
-
+ Invalid escape sequence無效的轉義序列
-
+ Invalid expression: ambiguous name無效運算式:二義性名稱
-
+ Invalid expression: stand-alone anonymous function無效運算式:獨立匿名函數
-
+ Invalid operation on method方法操作無效
-
+ Invalid reference. Property accessors cannot be used in combined read/write operations引用無效。屬性訪問器不能用於組合讀/寫操作。
-
+ Invalid scope resolution範圍解析無效
-
+ Invalid signature for virtual property虛擬屬性簽名無效
-
+ Invalid type類型無效
-
+ Invalid unicode code point無效的 Unicode 代碼點
-
+ Invalid unicode sequence in source源代碼中的 Unicode 序列無效
-
+ Invalid use of named arguments命名參數的使用無效
-
+ The method cannot be named with the class name該方法不能以類名命名
-
+ Mixin classes cannot have constructors or destructorsMixin 類不能有構造函數或析構函數
-
+ Mixin class cannot inherit from classesMixin 類不能從類繼承
-
+ Mixin classes cannot have child typesMixin 類不能有子類型
-
+ Found more than one matching operator找到多個匹配的運算符
-
+ Multiline strings are not allowed in this application此應用程式不允許使用多行字串
-
+ Only objects have constructors只有對象才有構造函數
-
+ Must return a value必須返回一個值
-
+ Detected named argument with old syntax檢測到具有舊語法的命名參數
-
+ No appropriate indexing operator found未找到合適的索引運算符
-
+ No appropriate opEquals method found未找到合適的 opEquals 方法
-
+ The application doesn't support the default array type.該應用程式不支持默認數組類型。
-
+ Non-const method call on read-only object reference只讀對象引用上的非常量方法調用
-
+ Non-terminated string literal未終止的字串
-
+ Not all paths return a value並非所有路徑都會返回值
-
+ Not enough values to match pattern沒有足夠的值來模式匹配
-
+ Implicit conversion of value is not exact值的隱式轉換並不準確
-
+ Expression is not an l-value運算式不是左值
-
+ Not a valid reference無效引用
-
+ Not a valid lvalue不是有效的左值
-
+ Nothing was built in the module模組中沒有構建任何內容
-
+ Object handle is not supported for this type此類型不支持對象句柄
-
+ Only object types that support object handles can use &inout. Use &in or &out instead只有支持對象句柄的對象類型才能使用 &inout。請改用 &in 或 &out
-
+ A cast operator has one argument強制類型轉換運算符有一個參數
-
+ The code must contain one and only one function代碼必須包含一個且只能包含一個函數
-
+ The code must contain one and only one global variable代碼必須包含一個且只能有一個全局變數
-
+ Both operands must be handles when comparing identity比較時,兩個運算元都必須是句柄
-
+ The overloaded functions are identical on initial parameters without default arguments重載函數在初始參數上相同,沒有默認參數
-
+ Parameter already declared參數已聲明
-
+ Positional arguments cannot be passed after named arguments位置參數不能在命名參數之後傳遞
-
+ Potentially matching non-const method is hidden on read-only object reference可能匹配的非 const 方法隱藏在只讀對象引用中
-
+ Property accessor with index must have 1 and only 1 index argument帶索引的屬性訪問器必須有 1 個且只能有 1 個索引參數
-
+ Property accessors have been disabled by the application應用程式已禁用屬性訪問器
-
+ Property accessor must be implemented必須實現屬性訪問器
-
+ Class properties cannot be declared as const類屬性不能聲明為 const
-
+ The property has no get accessor該屬性沒有 get 訪問器
-
+ The property has no set accessor該屬性沒有設置訪問器
-
+ Virtual property must have at least one get or set accessor虛擬屬性必須至少有一個 get 或 set 訪問器
-
+ Resulting reference cannot be returned. Returned references must not refer to local variables.無法返回結果引用。返回的引用不得引用局部變數。
-
+ Resulting reference cannot be returned. There are deferred arguments that may invalidate it.無法返回結果引用。存在可能使其無效的延遲參數。
-
+ Resulting reference cannot be returned. The expression uses objects that during cleanup may invalidate it.無法返回結果引用。運算式使用的對象在清理過程中可能會使其失效。
-
+ Reference is read-only引用是只讀的
-
+ Reference is temporary參考是臨時的
-
+ Reference types cannot be passed by value in function parameters引用類型不能在函數參數中按值傳遞
-
+ Reference types cannot be returned by value from functions引用類型不能通過函數返回值
-
+ The script section is empty腳本節區為空
-
+ Signed/Unsigned mismatch有符號/無符號不匹配
-
+ Strings are not recognized by the application應用程式無法識別字串
-
+ Case expressions must be literal constantscase 運算式必須是文字常量
-
+ Switch expressions must be integral numbersswitch 運算式必須是整數
-
+ The function has too many jump labels to handle. Split the function into smaller ones.該函數的跳轉標籤過多,無法處理。請將函數拆分為較小的函數。
-
+ Too many values to match pattern與模式匹配的值過多
-
+ Unexpected end of file意外的檔結束
-
+ Unexpected variable declaration意外的變數聲明
-
+ Unreachable code無法訪問的代碼
-
+ Virtual property contains unrecognized aspect虛擬屬性包含未被認可的部分
-
+ Unused script node未使用的腳本節點
-
+ Value is too large for data type對於數據類型來說,值太大
-
+ Void cannot be an operand in expressionsvoid 不能作為運算式中的運算元
-
+ Warnings are treated as errors by the application應用程式將警告視為錯誤
-
+ While parsing argument list解析參數列表時
-
+ While parsing expression解析運算式時
-
+ While parsing initialization list解析初始化列表時
-
+ While parsing namespace解析命名空間時
-
+ While parsing statement block解析語句塊時
-
+ Previous error occurred while including mixin包含 mixin 時發生先前錯誤
-
+ Autohandles cannot be used with types that have been registered with NOCOUNT自動句柄不能與已使用 NOCOUNT 註冊的類型一起使用
-
+ First parameter to template factory must be a reference. This will be used to pass the object type of the template範本工廠的第一個參數必須是引用。這將用於傳遞範本的對象類型
-
+ Invalid configuration. Verify the registered application interface.配置無效。請驗證已註冊的應用程式介面。
-
+ A value type must be registered with a non-zero size值類型必須註冊為非零大小
-
+ The behaviour is not compatible with the type行為與類型不相容
-
+ A garbage collected ref type must have the addref, release, and all gc behaviours垃圾收集引用類型必須具有 addref、release 和所有 gc 行為
-
+ A garbage collected value type must have the gc enum references behaviour垃圾收集值類型必須具有 gc 枚舉引用行為
-
+ A scoped reference type must have the release behaviour作用域引用類型必須具有釋放行為
-
+ A reference type must have the addref and release behaviours引用類型必須具有 addref 和 release 行為
-
+ A non-pod value type must have at least one constructor and the destructor behaviours非 pod 值類型必須至少有一個構造函數和析構函數行為
-
+ Template list factory expects two reference parameters. The last is the pointer to the initialization buffer範本列表工廠需要兩個引用參數。最後一個是指向初始化緩衝區的指針
-
+ List factory expects only one reference parameter. The pointer to the initialization buffer will be passed in this parameter列表工廠僅需要一個引用參數。指向初始化緩衝區的指針將在此參數中傳遞
-
+ AddScriptObjectToGC called with null pointer使用空指針調用 AddScriptObjectToGC
-
+ An exception occurred in a nested call嵌套調用中發生異常
-
+ Uh oh! The engine's reference count is increasing while it is being destroyed. Make sure references needed for clean-up are immediately released哎呀!引擎的引用計數在被銷毀時不斷增加。確保立即釋放清理所需的引用
-
+ The module is still in use and cannot be rebuilt. Discard it and request another module該模組仍在使用中,無法重建。丟棄它並請求另一個模組
-
+ Property屬性
-
+ System function系統函數
-
+ Variable declaration變數聲明
-
+ Stack overflow棧溢出
-
+ Null pointer access空指針訪問
-
+ Divide by zero除以零
-
+ Overflow in integer division整數除法溢出
-
+ Overflow in exponent operation指數運算溢出
-
+ Unrecognized byte code無法識別的位元組碼
-
+ Invalid calling convention無效調用約定
-
+ Unbound function called未綁定的函數被調用
-
+ Out of range越界
-
+ Caught an exception from the application捕獲應用程式異常
-
+ Mismatching types in value assignment值分配中的類型不匹配
-
+ Too many nested calls嵌套調用過多
-
+ Assert failed斷言失敗
-
- GlobalBadDecl
-
+
+ BadDecl:
+ 錯誤的聲明:
-
- ScriptRunUnsupported
-
+
+ GlobalBadDecl
+ 錯誤的全局聲明
@@ -4428,40 +4450,65 @@
ScriptingConsole
-
+ [Info]【資訊】
-
+ [Warn]【警告】
-
+ [Error]【錯誤】
-
+
+ InvalidDelCmd
+ 無效刪除指令
+
+
+
+ NotFoundIgnore:
+ 變數未找到,忽略:
+
+
+ [Console]【控制臺】
-
+
+ MultiCodeCanNotUndo
+ 多行代碼粘貼後將不能修改
+
+
+ Copy複製
-
+ Cut剪切
-
+ Paste粘貼
+
+
+ Clear
+ 清空
+
+
+
+ AbortScript
+ 終止腳本
+ ScriptingConsoleBase
@@ -4712,11 +4759,11 @@
-
-
-
-
-
+
+
+
+
+ Error錯誤
@@ -4731,83 +4778,83 @@
正在關閉未保存的腳本檔,你確定保存嗎?
-
+ ScriptSaveFailedClose腳本保存失敗,你仍確認關閉嗎?
-
+ Debuging...調試中...
-
+ Running...運行中...
-
+ Line %1, Col %2行 %1, 列 %2
-
+ (Selected: %1) (選中: %1)
-
-
+
+ ChooseFile選擇檔
-
-
-
+
+
+ FilePermission因檔許可權無法繼續!
-
+ ReloadSuccessfully檔重新加載成功!
-
+ ReloadUnSuccessfully檔重新加載失敗!
-
+ ChooseSaveFile請選擇保存檔路徑:
-
-
+
+ SaveSuccessfully保存成功!
-
+ SaveUnSuccessfully保存失敗!
-
+ FormatCodeFailed代碼格式化失敗
-
-
+
+ CannotSave2RunScript無法保存,故無法繼續運行腳本。
-
-
+
+ ScriptStillRunning腳本仍在運行,你確定要退出嗎?
diff --git a/src/class/WingAngelAPI.json b/src/class/WingAngelAPI.json
index 1d0e74c..f481d7d 100644
--- a/src/class/WingAngelAPI.json
+++ b/src/class/WingAngelAPI.json
@@ -1,7 +1,7 @@
{
"Id": "WingAngelAPI",
"Author": "wingsummer",
- "Version": "2.1.0",
+ "Version": "2.2.2",
"Vendor": "WingCloudStudio",
"License": "AGPL-3.0",
"Url": "https://github.com/Wing-summer/WingHexExplorer2"
diff --git a/src/class/WingCStruct.json b/src/class/WingCStruct.json
index 5120df9..e8cd029 100644
--- a/src/class/WingCStruct.json
+++ b/src/class/WingCStruct.json
@@ -1,6 +1,6 @@
{
"Id" : "WingCStruct",
- "Version" : "0.0.1",
+ "Version" : "0.0.2",
"Vendor" : "WingCloudStudio",
"Author" : "wingsummer",
"License" : "AGPL-v3.0",
diff --git a/src/class/appmanager.cpp b/src/class/appmanager.cpp
index 5beecd6..38c53dd 100644
--- a/src/class/appmanager.cpp
+++ b/src/class/appmanager.cpp
@@ -145,9 +145,9 @@ AppManager::AppManager(int &argc, char *argv[])
AppManager::~AppManager() {
InspectQtLogHelper::instance().destory();
ClangFormatManager::instance().save();
- // CommandHistoryManager::save(QConsoleWidget::history().strings_);
+ CommandHistoryManager::save(QConsoleWidget::history().strings_);
- _w->deleteLater();
+ delete _w;
_w = nullptr;
}
diff --git a/src/class/asconsolecompletion.cpp b/src/class/asconsolecompletion.cpp
index 3e473bf..cba46cf 100644
--- a/src/class/asconsolecompletion.cpp
+++ b/src/class/asconsolecompletion.cpp
@@ -17,6 +17,7 @@
#include "asconsolecompletion.h"
+#include "AngelScript/sdk/angelscript/source/as_module.h"
#include "class/qascodeparser.h"
#include "control/scriptingconsole.h"
@@ -39,7 +40,7 @@ QList AsConsoleCompletion::parseDocument() {
return seg.isValid();
}) == seg.end()) {
// wrap it to let code-completion work
- code.prepend("void main(){").append('}');
+ code.prepend("void f(){").append('}');
}
// first preprocess the code
@@ -52,11 +53,37 @@ QList AsConsoleCompletion::parseDocument() {
return {};
}
+ QList citips;
+ // first, global variables should be added into
+ auto rmod = ScriptMachine::instance().module(ScriptMachine::Interactive);
+ // I think hijack the internal will do the better
+ auto mod = dynamic_cast(rmod);
+ if (mod) {
+ auto it = mod->m_scriptGlobals.List();
+ while (it) {
+ // lamda expression is great!
+ auto CString2ByteArray = [](const asCString &str) -> QByteArray {
+ return QByteArray(str.AddressOf(), str.GetLength());
+ };
+
+ CodeInfoTip tip;
+ tip.type = CodeInfoTip::Type::Variable;
+ tip.addinfo.insert(
+ CodeInfoTip::RetType,
+ CString2ByteArray(it->type.Format(mod->m_defaultNamespace)));
+ tip.nameSpace = CString2ByteArray(it->nameSpace->name);
+ tip.name = CString2ByteArray(it->name);
+ citips.append(tip);
+
+ it++;
+ }
+ }
+
auto data = prepc.scriptData();
if (data.size() == 1) {
auto d = data[0];
- return parseScriptData(d.script.length() - 1, d.script);
+ return citips + parseScriptData(d.script.length() - 1, d.script);
} else {
- return {};
+ return citips;
}
}
diff --git a/src/class/scriptmachine.cpp b/src/class/scriptmachine.cpp
index bbbff08..ae4e82e 100644
--- a/src/class/scriptmachine.cpp
+++ b/src/class/scriptmachine.cpp
@@ -243,11 +243,12 @@ void ScriptMachine::exceptionCallback(asIScriptContext *context) {
const char *section;
MessageInfo msg;
+ msg.mode = mode;
msg.row = context->GetExceptionLineNumber(&msg.col, §ion);
msg.type = MessageType::Error;
msg.message = message;
- outputMessage(mode, msg);
+ outputMessage(msg);
}
}
@@ -258,10 +259,11 @@ void ScriptMachine::print(void *ref, int typeId) {
context->GetUserData(AsUserDataType::UserData_ContextMode)));
MessageInfo info;
+ info.mode = mode;
info.type = MessageType::Print;
info.message = _debugger->toString(ref, typeId, _engine);
- outputMessage(mode, info);
+ outputMessage(info);
}
}
@@ -279,8 +281,8 @@ QString ScriptMachine::getInput() {
return {};
}
-void ScriptMachine::outputMessage(ConsoleMode mode, const MessageInfo &info) {
- auto cbs = _regcalls.value(mode);
+void ScriptMachine::outputMessage(const MessageInfo &info) {
+ auto cbs = _regcalls.value(info.mode);
if (cbs.printMsgFn) {
cbs.printMsgFn(info);
}
@@ -356,12 +358,14 @@ bool ScriptMachine::executeScript(ConsoleMode mode, const QString &script,
return false;
}
+ _curMode = mode;
r = builder.build(mod);
if (r < 0) {
MessageInfo info;
+ info.mode = mode;
info.message = tr("Script failed to build");
info.type = MessageType::Error;
- outputMessage(mode, info);
+ outputMessage(info);
return false;
}
@@ -374,18 +378,20 @@ bool ScriptMachine::executeScript(ConsoleMode mode, const QString &script,
if (func == nullptr) {
MessageInfo info;
+ info.mode = mode;
info.message = tr("Cannot find 'int main()' or 'void main()'");
info.type = MessageType::Error;
- outputMessage(mode, info);
+ outputMessage(info);
return false;
}
if (isInDebug) {
// Allow the user to initialize the debugging before moving on
MessageInfo info;
+ info.mode = mode;
info.message = tr("Debugging, waiting for commands.");
info.type = MessageType::Info;
- outputMessage(mode, info);
+ outputMessage(info);
}
// Once we have the main function, we first need to initialize the
@@ -395,9 +401,10 @@ bool ScriptMachine::executeScript(ConsoleMode mode, const QString &script,
r = mod->ResetGlobalVars(0);
if (r < 0) {
MessageInfo info;
+ info.mode = mode;
info.message = tr("Failed while initializing global variables");
info.type = MessageType::Error;
- outputMessage(mode, info);
+ outputMessage(info);
return false;
}
@@ -434,26 +441,29 @@ bool ScriptMachine::executeScript(ConsoleMode mode, const QString &script,
if (r != asEXECUTION_FINISHED) {
if (r == asEXECUTION_EXCEPTION) {
MessageInfo info;
+ info.mode = mode;
info.message = tr("The script failed with an exception") +
QStringLiteral("\n") +
QString::fromStdString(GetExceptionInfo(ctx, true));
info.type = MessageType::Error;
- outputMessage(mode, info);
+ outputMessage(info);
r = -1;
} else if (r == asEXECUTION_ABORTED) {
MessageInfo info;
+ info.mode = mode;
info.message = tr("The script was aborted");
info.type = MessageType::Error;
- outputMessage(mode, info);
+ outputMessage(info);
r = -1;
} else {
auto e = QMetaEnum::fromType();
MessageInfo info;
+ info.mode = mode;
info.message = tr("The script terminated unexpectedly") +
QStringLiteral(" (") + e.valueToKey(r) +
QStringLiteral(")");
info.type = MessageType::Error;
- outputMessage(mode, info);
+ outputMessage(info);
r = -1;
}
} else {
@@ -465,9 +475,10 @@ bool ScriptMachine::executeScript(ConsoleMode mode, const QString &script,
}
MessageInfo info;
+ info.mode = mode;
info.message = tr("The script exited with ") + QString::number(r);
info.type = MessageType::Info;
- outputMessage(mode, info);
+ outputMessage(info);
// Return the context after retrieving the return value
_ctxMgr->DoneWithContext(ctx);
@@ -523,12 +534,13 @@ void ScriptMachine::messageCallback(const asSMessageInfo *msg, void *param) {
return;
}
MessageInfo info;
+ info.mode = ins->_curMode;
info.row = msg->row;
info.col = msg->col;
info.section = msg->section;
info.message = m;
info.type = t;
- ins->outputMessage(ins->_curMode, info);
+ ins->outputMessage(info);
}
void ScriptMachine::cleanUpDbgContext(asIScriptContext *context) {
@@ -1852,13 +1864,14 @@ bool ScriptMachine::executeCode(ConsoleMode mode, const QString &code) {
// ok, wrap the codes
ccode.prepend("void f(){").append("}");
// start to compile
+ _curMode = mode;
auto cr = mod->CompileFunction(nullptr, ccode, 0, 0, &func);
if (cr < 0) {
MessageInfo info;
info.mode = mode;
info.message = tr("Script failed to build");
info.type = MessageType::Error;
- outputMessage(mode, info);
+ outputMessage(info);
return false;
}
@@ -1901,23 +1914,24 @@ bool ScriptMachine::executeCode(ConsoleMode mode, const QString &code) {
QStringLiteral("\n") +
QString::fromStdString(GetExceptionInfo(ctx, true));
info.type = MessageType::Error;
- outputMessage(mode, info);
+ outputMessage(info);
r = -1;
} else if (r == asEXECUTION_ABORTED) {
MessageInfo info;
info.mode = mode;
info.message = tr("The script was aborted");
info.type = MessageType::Error;
- outputMessage(mode, info);
+ outputMessage(info);
r = -1;
} else {
auto e = QMetaEnum::fromType();
MessageInfo info;
+ info.mode = mode;
info.message = tr("The script terminated unexpectedly") +
QStringLiteral(" (") + e.valueToKey(r) +
QStringLiteral(")");
info.type = MessageType::Error;
- outputMessage(mode, info);
+ outputMessage(info);
r = -1;
}
} else {
@@ -1932,26 +1946,39 @@ bool ScriptMachine::executeCode(ConsoleMode mode, const QString &code) {
return r >= 0;
} else {
- if (ret.length() == 1) {
- auto s = ret.first();
- if (s.type == QAsCodeParser::SymbolType::Variable) {
- auto r = mod->CompileGlobalVar(nullptr, ccode, 0);
- if (r < 0 || mod->ResetGlobalVars() < 0) {
+ if (std::all_of(ret.begin(), ret.end(),
+ [](const QAsCodeParser::CodeSegment &seg) {
+ return seg.type ==
+ QAsCodeParser::SymbolType::Variable;
+ })) {
+ _curMode = mode;
+
+ for (auto &s : ret) {
+ auto r = mod->CompileGlobalVar(nullptr, s.codes, 0);
+ if (r < 0) {
MessageInfo info;
info.mode = mode;
- info.message = tr("GlobalBadDecl");
+ info.message = tr("BadDecl:") + s.codes;
info.type = MessageType::Error;
- outputMessage(mode, info);
- return false;
+ outputMessage(info);
}
- return true;
}
+
+ if (mod->ResetGlobalVars() < 0) {
+ MessageInfo info;
+ info.mode = mode;
+ info.message = tr("GlobalBadDecl");
+ info.type = MessageType::Error;
+ outputMessage(info);
+ }
+ return true;
}
+
MessageInfo info;
info.mode = mode;
- info.message = tr("ScriptRunUnsupported");
+ info.message = tr("Script failed to build");
info.type = MessageType::Error;
- outputMessage(mode, info);
+ outputMessage(info);
}
return false;
}
diff --git a/src/class/scriptmachine.h b/src/class/scriptmachine.h
index ca84464..1c37ffc 100644
--- a/src/class/scriptmachine.h
+++ b/src/class/scriptmachine.h
@@ -102,10 +102,11 @@ private:
private:
asIScriptModule *createModule(ConsoleMode mode);
asIScriptModule *createModuleIfNotExist(ConsoleMode mode);
- asIScriptModule *module(ConsoleMode mode);
bool isModuleExists(ConsoleMode mode);
public:
+ asIScriptModule *module(ConsoleMode mode);
+
static ScriptMachine &instance();
virtual ~ScriptMachine();
@@ -113,7 +114,7 @@ public:
public:
bool init();
bool isInited() const;
- bool isRunning(ConsoleMode mode = Scripting) const;
+ bool isRunning(ConsoleMode mode) const;
static void registerEngineAddon(asIScriptEngine *engine);
static void registerEngineAssert(asIScriptEngine *engine);
@@ -159,7 +160,8 @@ protected:
private:
void print(void *ref, int typeId);
QString getInput();
- void outputMessage(ConsoleMode mode, const MessageInfo &info);
+
+ void outputMessage(const MessageInfo &info);
bool isType(asITypeInfo *tinfo, RegisteredType type);
diff --git a/src/class/wingmessagebox.cpp b/src/class/wingmessagebox.cpp
index a24a257..d22370e 100644
--- a/src/class/wingmessagebox.cpp
+++ b/src/class/wingmessagebox.cpp
@@ -21,6 +21,7 @@
#include "utilities.h"
#include
+#include
#include
WingMessageBox::WingMessageBox() {}
@@ -161,5 +162,10 @@ WingMessageBox::msgbox(QWidget *parent, QMessageBox::Icon icon,
QObject::connect(msgbox, &QMessageBox::finished, &d,
&FramelessDialogBase::done);
- return static_cast(d.exec());
+ auto ret = d.exec();
+ if (ret == 0) {
+ return msgbox->standardButton(msgbox->defaultButton());
+ }
+
+ return static_cast(ret);
}
diff --git a/src/control/scriptingconsole.cpp b/src/control/scriptingconsole.cpp
index bcae3b0..3d199e1 100644
--- a/src/control/scriptingconsole.cpp
+++ b/src/control/scriptingconsole.cpp
@@ -20,13 +20,17 @@
#include "class/scriptmachine.h"
#include "class/scriptsettings.h"
#include "class/skinmanager.h"
+#include "class/wingmessagebox.h"
#include "model/codecompletionmodel.h"
+#include "utilities.h"
#include
+#include
#include
#include
#include
#include
+#include
#include
#include
@@ -102,9 +106,35 @@ void ScriptingConsole::init() {
void ScriptingConsole::clearConsole() {
setMode(Output);
+
+ auto cur = this->textCursor();
+ auto off = cur.position() - this->currentHeaderPos();
+ auto lastCmd = this->currentCommandLine();
+ auto dis = lastCmd.length() - off;
+
clear();
- appendCommandPrompt(lastCommandPrompt());
+
+ if (lastCommandPrompt()) {
+ auto lines = _codes.split('\n');
+ auto pl = lines.begin();
+ appendCommandPrompt(false);
+ writeStdOut(*pl);
+ pl++;
+ for (; pl != lines.end(); pl++) {
+ appendCommandPrompt(true);
+ writeStdOut(*pl);
+ }
+ appendCommandPrompt(true);
+ } else {
+ appendCommandPrompt(false);
+ }
+
setMode(Input);
+ replaceCommandLine(lastCmd);
+ cur = this->textCursor();
+ cur.movePosition(QTextCursor::EndOfBlock);
+ cur.movePosition(QTextCursor::Left, QTextCursor::MoveAnchor, dis);
+ setTextCursor(cur);
}
void ScriptingConsole::processKeyEvent(QKeyEvent *e) { keyPressEvent(e); }
@@ -183,6 +213,13 @@ void ScriptingConsole::onOutput(const ScriptMachine::MessageInfo &message) {
lastInfo.second = qMakePair(message.row, message.col);
}
+void ScriptingConsole::abortCurrentCode() {
+ setMode(Output);
+ _codes.clear();
+ appendCommandPrompt();
+ setMode(Input);
+}
+
void ScriptingConsole::applyScriptSettings() {
auto &set = ScriptSettings::instance();
auto dfont = QFont(set.consoleFontFamily());
@@ -215,13 +252,95 @@ void ScriptingConsole::applyScriptSettings() {
void ScriptingConsole::runConsoleCommand(const QString &code) {
auto exec = code.trimmed();
if (exec == QStringLiteral("#ls")) {
+ auto &ins = ScriptMachine::instance();
+ auto mod = ins.module(ScriptMachine::Interactive);
+ if (mod) {
+ QList> vars;
+ auto total = mod->GetGlobalVarCount();
- } else if (exec == QStringLiteral("#del")) {
+ // generate codes to print
+ QString codes;
+ if (total == 0) {
+ codes = QStringLiteral("print(\"\");");
+ } else {
+ for (asUINT i = 0; i < total; ++i) {
+ const char *name;
+ int typeId;
+ auto decl = mod->GetGlobalVarDeclaration(i);
+ if (decl && mod->GetGlobalVar(i, &name) == asSUCCESS) {
+ vars.emplaceBack(decl, name);
+ }
+ }
+ for (auto &var : vars) {
+ codes.append("print(\"" + var.first + " = \");print(" +
+ var.second + ");print(\";\\n\");");
+ }
+ }
+
+ setMode(Output);
+ ScriptMachine::instance().executeCode(ScriptMachine::Interactive,
+ codes);
+ _codes.clear();
+ appendCommandPrompt();
+ setMode(Input);
+ }
+ } else if (exec.startsWith(QStringLiteral("#del"))) {
+ // this is special command
+ auto &ins = ScriptMachine::instance();
+ auto mod = ins.module(ScriptMachine::Interactive);
+ if (mod) {
+ // first check whether contains \n
+ auto idx = exec.indexOf('\n');
+ if (idx >= 0) {
+ setMode(Output);
+ stdErr(tr("InvalidDelCmd"));
+ } else {
+ // ok, then tokens should be devided by the space
+ exec.remove(0, 4);
+ auto vars = exec.split(' ', Qt::SkipEmptyParts);
+
+ QList indices;
+
+ // then check
+ setMode(Output);
+ for (auto &v : vars) {
+ auto idx = mod->GetGlobalVarIndexByName(v.toUtf8());
+ if (idx >= 0) {
+ indices.append(idx);
+ } else {
+ stdWarn(tr("NotFoundIgnore:") + v);
+ }
+ }
+
+ std::sort(indices.begin(), indices.end(), std::greater());
+
+ // ok, remove
+ for (auto &i : indices) {
+ mod->RemoveGlobalVar(i);
+ }
+ }
+ }
+ _codes.clear();
+ appendCommandPrompt();
+ setMode(Input);
} else if (exec == QStringLiteral("#cls")) {
-
+ auto &ins = ScriptMachine::instance();
+ auto mod = ins.module(ScriptMachine::Interactive);
+ if (mod) {
+ auto total = mod->GetGlobalVarCount();
+ asUINT i = total;
+ do {
+ --i;
+ mod->RemoveGlobalVar(i);
+ } while (i);
+ }
+ _codes.clear();
+ appendCommandPrompt();
+ setMode(Input);
} else if (exec.endsWith('\\')) {
static QRegularExpression ex(QStringLiteral("[\\\\\\s]+$"));
+ _codes.append('\n');
_codes += exec.remove(ex);
setMode(Output);
appendCommandPrompt(true);
@@ -281,8 +400,49 @@ void ScriptingConsole::onCompletion(const QModelIndex &index) {
}
}
+void ScriptingConsole::paste() {
+ if (ScriptMachine::instance().isRunning(ScriptMachine::Interactive)) {
+ return;
+ }
+
+ const QMimeData *const clipboard = QApplication::clipboard()->mimeData();
+ const QString text = clipboard->text();
+ if (!text.isEmpty()) {
+ if (text.indexOf('\n') < 0) {
+ replaceCommandLine(text);
+ } else {
+ auto ret = WingMessageBox::question(
+ nullptr, tr("MultiCodeCanNotUndo"), text);
+ if (ret == QMessageBox::No) {
+ return;
+ }
+ auto lines = text.split('\n');
+ if (lines.isEmpty()) {
+ return;
+ }
+
+ setMode(Output);
+ auto pl = lines.begin();
+ auto pend = std::prev(lines.end());
+ writeStdOut(*pl);
+ pl++;
+ for (; pl != pend; pl++) {
+ appendCommandPrompt(true);
+ writeStdOut(*pl);
+ }
+ appendCommandPrompt(true);
+ setMode(Input);
+ replaceCommandLine(*pl);
+ lines.removeLast();
+ _codes = lines.join('\n');
+ }
+ }
+}
+
QString ScriptingConsole::currentCodes() const {
- return _codes + currentCommandLine();
+ QTextCursor textCursor = this->textCursor();
+ textCursor.setPosition(inpos_, QTextCursor::KeepAnchor);
+ return _codes + textCursor.selectedText();
}
void ScriptingConsole::contextMenuEvent(QContextMenuEvent *event) {
@@ -297,6 +457,15 @@ void ScriptingConsole::contextMenuEvent(QContextMenuEvent *event) {
menu.addAction(QIcon(QStringLiteral(":/qeditor/paste.png")), tr("Paste"),
QKeySequence(QKeySequence::Paste), this,
&ScriptingConsole::paste);
+ menu.addAction(ICONRES(QStringLiteral("del")), tr("Clear"),
+ QKeySequence(Qt::ControlModifier | Qt::Key_L), this,
+ &ScriptingConsole::clearConsole);
+ menu.addSeparator();
+ menu.addAction(ICONRES(QStringLiteral("dbgstop")), tr("AbortScript"),
+ QKeySequence(Qt::ControlModifier | Qt::Key_Q), []() {
+ ScriptMachine::instance().abortScript(
+ ScriptMachine::Background);
+ });
menu.exec(event->globalPos());
}
diff --git a/src/control/scriptingconsole.h b/src/control/scriptingconsole.h
index dad4614..ab22d58 100644
--- a/src/control/scriptingconsole.h
+++ b/src/control/scriptingconsole.h
@@ -49,6 +49,8 @@ public slots:
void onOutput(const ScriptMachine::MessageInfo &message);
+ void abortCurrentCode();
+
private slots:
void applyScriptSettings();
@@ -64,6 +66,7 @@ protected:
protected slots:
virtual void onCompletion(const QModelIndex &index) override;
+ virtual void paste() override;
private:
QString _codes;
diff --git a/src/dialog/mainwindow.cpp b/src/dialog/mainwindow.cpp
index d937e20..75a23c1 100644
--- a/src/dialog/mainwindow.cpp
+++ b/src/dialog/mainwindow.cpp
@@ -1016,10 +1016,15 @@ MainWindow::buildUpScriptConsoleDock(ads::CDockManager *dock,
showStatus(QStringLiteral("") +
content + QStringLiteral(""));
});
- connect(
- m_scriptConsole, &ScriptingConsole::abortEvaluation, this, [this]() {
- ScriptMachine::instance().abortScript(ScriptMachine::Interactive);
- });
+ connect(m_scriptConsole, &ScriptingConsole::abortEvaluation, this,
+ [this]() {
+ auto &sm = ScriptMachine::instance();
+ if (sm.isRunning(ScriptMachine::Interactive)) {
+ sm.abortScript(ScriptMachine::Interactive);
+ } else {
+ m_scriptConsole->abortCurrentCode();
+ }
+ });
auto dw = buildDockWidget(dock, QStringLiteral("ScriptConsole"),
tr("ScriptConsole"), m_scriptConsole);
@@ -1031,8 +1036,32 @@ MainWindow::buildUpScriptBgOutputDock(ads::CDockManager *dock,
ads::DockWidgetArea area,
ads::CDockAreaWidget *areaw) {
m_bgScriptOutput = new QPlainTextEdit(this);
+ m_bgScriptOutput->setPlaceholderText(tr("BgScriptOutputHere"));
m_bgScriptOutput->setReadOnly(true);
+ auto a = newAction(
+ ICONRES(QStringLiteral("mStr")), tr("SelectAll"),
+ [this]() { m_bgScriptOutput->selectAll(); }, QKeySequence::SelectAll);
+ m_bgScriptOutput->addAction(a);
+ a = newAction(
+ ICONRES(QStringLiteral("copy")), tr("Copy"),
+ [this]() { m_bgScriptOutput->copy(); }, QKeySequence::Copy);
+ m_bgScriptOutput->addAction(a);
+ a = newAction(ICONRES(QStringLiteral("del")), tr("Clear"),
+ [this]() { m_bgScriptOutput->clear(); });
+ m_bgScriptOutput->addAction(a);
+ a = new QAction(this);
+ a->setSeparator(true);
+ m_bgScriptOutput->addAction(a);
+ a = newAction(
+ ICONRES(QStringLiteral("dbgstop")), tr("AbortScript"),
+ []() {
+ ScriptMachine::instance().abortScript(ScriptMachine::Background);
+ },
+ QKeySequence(Qt::ControlModifier | Qt::Key_Q));
+ m_bgScriptOutput->addAction(a);
+ m_bgScriptOutput->setContextMenuPolicy(Qt::ActionsContextMenu);
+
auto dw = buildDockWidget(dock, QStringLiteral("BgScriptOutput"),
tr("BgScriptOutput"), m_bgScriptOutput);
return dock->addDockWidget(area, dw, areaw);
diff --git a/src/dialog/scriptingdialog.cpp b/src/dialog/scriptingdialog.cpp
index e2db99b..f67bfd6 100644
--- a/src/dialog/scriptingdialog.cpp
+++ b/src/dialog/scriptingdialog.cpp
@@ -506,7 +506,7 @@ RibbonTabContent *ScriptingDialog::buildDebugPage(RibbonTabContent *tab) {
bool isDbg = false;
bool isPaused = false;
- isRun = runner.isRunning();
+ isRun = runner.isRunning(ScriptMachine::Scripting);
isDbg = runner.isDebugMode();
auto dbg = runner.debugger();
isPaused = dbg->currentState() == asDebugger::PAUSE;
@@ -740,7 +740,8 @@ void ScriptingDialog::registerEditorView(ScriptEditor *editor) {
Q_ASSERT(m_views.contains(editor));
auto &m = ScriptMachine::instance();
- if (m.isRunning() && _DebugingEditor == editor) {
+ if (m.isRunning(ScriptMachine::Scripting) &&
+ _DebugingEditor == editor) {
if (WingMessageBox::warning(
this, this->windowTitle(), tr("ScriptStillRunning"),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) {
@@ -881,7 +882,7 @@ void ScriptingDialog::updateRunDebugMode(bool disable) {
bool isDbg = false;
bool isPaused = false;
- isRun = runner.isRunning();
+ isRun = runner.isRunning(ScriptMachine::Scripting);
isDbg = runner.isDebugMode();
auto dbg = runner.debugger();
isPaused = dbg->currentState() == asDebugger::PAUSE;
@@ -1437,7 +1438,7 @@ void ScriptingDialog::on_removebreakpoint() {
void ScriptingDialog::closeEvent(QCloseEvent *event) {
auto &runner = ScriptMachine::instance();
- if (runner.isRunning()) {
+ if (runner.isRunning(ScriptMachine::Scripting)) {
if (WingMessageBox::warning(
this, this->windowTitle(), tr("ScriptStillRunning"),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) {