feat: 重构插件系统的撤销机制;优化历史记录机制;完善本地化;
This commit is contained in:
parent
3e75b23329
commit
a22e1f8f00
|
@ -176,7 +176,7 @@ QHexView::QHexView(QWidget *parent)
|
||||||
QHexDocument::fromMemory<QMemoryBuffer>(QByteArray(), false)));
|
QHexDocument::fromMemory<QMemoryBuffer>(QByteArray(), false)));
|
||||||
}
|
}
|
||||||
|
|
||||||
QHexView::~QHexView() {}
|
QHexView::~QHexView() { m_blinktimer->stop(); }
|
||||||
|
|
||||||
QSharedPointer<QHexDocument> QHexView::document() { return m_document; }
|
QSharedPointer<QHexDocument> QHexView::document() { return m_document; }
|
||||||
|
|
||||||
|
|
|
@ -121,31 +121,12 @@ void QtSingleApplication::sysInit(const QString &appId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Creates a QtSingleApplication object. The application identifier
|
Creates a QtSingleApplication object.
|
||||||
will be QCoreApplication::applicationFilePath(). \a argc, \a
|
|
||||||
argv, and \a GUIenabled are passed on to the QAppliation constructor.
|
|
||||||
|
|
||||||
If you are creating a console application (i.e. setting \a
|
|
||||||
GUIenabled to false), you may consider using
|
|
||||||
QtSingleCoreApplication instead.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QtSingleApplication::QtSingleApplication(int &argc, char **argv,
|
QtSingleApplication::QtSingleApplication(int &argc, char **argv)
|
||||||
bool GUIenabled)
|
|
||||||
: QApplication(argc, argv, GUIenabled) {
|
|
||||||
sysInit(genBlockServerName());
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
Creates a QtSingleApplication object with the application
|
|
||||||
identifier \a appId. \a argc and \a argv are passed on to the
|
|
||||||
QAppliation constructor.
|
|
||||||
*/
|
|
||||||
|
|
||||||
QtSingleApplication::QtSingleApplication(const QString &appId, int &argc,
|
|
||||||
char **argv)
|
|
||||||
: QApplication(argc, argv) {
|
: QApplication(argc, argv) {
|
||||||
sysInit(appId);
|
sysInit(genBlockServerName());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
@ -12,9 +12,7 @@ class QtSingleApplication : public QApplication {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit QtSingleApplication(int &argc, char **argv,
|
explicit QtSingleApplication(int &argc, char **argv);
|
||||||
bool GUIenabled = true);
|
|
||||||
explicit QtSingleApplication(const QString &id, int &argc, char **argv);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool isRunning();
|
bool isRunning();
|
||||||
|
|
15
README.md
15
README.md
|
@ -14,7 +14,6 @@
|
||||||
- [有关仓库](#有关仓库)
|
- [有关仓库](#有关仓库)
|
||||||
- [WIKI](#wiki)
|
- [WIKI](#wiki)
|
||||||
- [插件库](#插件库)
|
- [插件库](#插件库)
|
||||||
- [应用商店](#应用商店)
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -33,7 +32,6 @@
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://github.com/Wing-summer/WingHexExplorer2/actions/workflows/clang-format-check.yml/badge.svg" />
|
<img src="https://github.com/Wing-summer/WingHexExplorer2/actions/workflows/clang-format-check.yml/badge.svg" />
|
||||||
<img src="https://github.com/Wing-summer/WingHexExplorer2/actions/workflows/cmake-format-check.yml/badge.svg" />
|
<img src="https://github.com/Wing-summer/WingHexExplorer2/actions/workflows/cmake-format-check.yml/badge.svg" />
|
||||||
<img src="https://github.com/Wing-summer/WingHexExplorer2/actions/workflows/conventional-commit-check-push.yml/badge.svg" />
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
- 开源不易,给个 Star 或者 [捐助](#捐助) 吧
|
- 开源不易,给个 Star 或者 [捐助](#捐助) 吧
|
||||||
|
@ -95,6 +93,10 @@
|
||||||
|
|
||||||
> 对于 Qt 5 版本,仅支持 5.15.2 或更高版本,Qt 6 的话 6.6.2 或更高的版本,其他低版本由于关键库的 API 缺失和自身的一些 Bug,所以不提供支持。
|
> 对于 Qt 5 版本,仅支持 5.15.2 或更高版本,Qt 6 的话 6.6.2 或更高的版本,其他低版本由于关键库的 API 缺失和自身的一些 Bug,所以不提供支持。
|
||||||
|
|
||||||
|
另外:
|
||||||
|
|
||||||
|
> QT5 版本主动编译支持将会在 2025/05/26 停止,届时相关 GitAction 自动化测试将会撤销。如果因特殊需要 QT5 版本,请咨询我商业合作和付费技术支持。
|
||||||
|
|
||||||
  该仓库代码使用 Qt 5.15.2 和 6.6.2 在最新版 Windows 和 Ubuntu 编译情况: 
|
  该仓库代码使用 Qt 5.15.2 和 6.6.2 在最新版 Windows 和 Ubuntu 编译情况: 
|
||||||
|
|
||||||
## WingHexExplorer2
|
## WingHexExplorer2
|
||||||
|
@ -107,7 +109,7 @@
|
||||||
|
|
||||||
  如果你想将本软件的代码用于闭源的商业代码,想要解除`GPL`系列的必须开源的限制,请必须亲自咨询我,商讨商业授权相关事宜。
|
  如果你想将本软件的代码用于闭源的商业代码,想要解除`GPL`系列的必须开源的限制,请必须亲自咨询我,商讨商业授权相关事宜。
|
||||||
|
|
||||||
  对于插件开发相关的,对应的开源协议就不一样了。只针对本仓库下的`src/plugin/iwingplugin.h`和`src/plugin/settingpage.h`遵守`BSD 3-Clause`协议,以允许想要做闭源和商业开发。对于本仓库下的`TestPlugin`的代码(除`TranslationUtils.cmake`这一个文件遵守`BSD 3-Clause`)遵守`MIT`协议。
|
  对于插件开发相关的,对应的开源协议就不一样了。只针对本仓库下的`src/plugin/iwingplugin.h`、`src/plugin/iwingpluginbase.h`、`src/plugin/iwingdevice.h`和`src/plugin/settingpage.h`遵守`BSD 3-Clause`协议,以允许想要做闭源和商业开发。对于本仓库下的`TestPlugin`的代码(除`TranslationUtils.cmake`这一个文件遵守`BSD 3-Clause`)遵守`MIT`协议。
|
||||||
|
|
||||||
### 使用声明
|
### 使用声明
|
||||||
|
|
||||||
|
@ -176,8 +178,5 @@
|
||||||
|
|
||||||
## 插件库
|
## 插件库
|
||||||
|
|
||||||
> 敬请期待
|
- [WingAsm](https://github.com/Wing-summer/WingAsm) : 一个提供汇编和反汇编的插件,作者 **寂静的羽夏** ,协议 **APGL-v3.0** 。
|
||||||
|
- [WingCStruct](https://github.com/Wing-summer/WingCStruct) : 一个提供分析文件结构基础支持的插件,作者 **寂静的羽夏** ,协议 **APGL-v3.0** 。
|
||||||
## 应用商店
|
|
||||||
|
|
||||||
> 敬请期待
|
|
||||||
|
|
17
README_en.md
17
README_en.md
|
@ -14,7 +14,6 @@
|
||||||
- [Related Repository](#related-repository)
|
- [Related Repository](#related-repository)
|
||||||
- [WIKI](#wiki)
|
- [WIKI](#wiki)
|
||||||
- [Plugins](#plugins)
|
- [Plugins](#plugins)
|
||||||
- [App Store](#app-store)
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -33,7 +32,6 @@
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://github.com/Wing-summer/WingHexExplorer2/actions/workflows/clang-format-check.yml/badge.svg" />
|
<img src="https://github.com/Wing-summer/WingHexExplorer2/actions/workflows/clang-format-check.yml/badge.svg" />
|
||||||
<img src="https://github.com/Wing-summer/WingHexExplorer2/actions/workflows/cmake-format-check.yml/badge.svg" />
|
<img src="https://github.com/Wing-summer/WingHexExplorer2/actions/workflows/cmake-format-check.yml/badge.svg" />
|
||||||
<img src="https://github.com/Wing-summer/WingHexExplorer2/actions/workflows/conventional-commit-check-push.yml/badge.svg" />
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
- Not easy to open source, please Star or [Donate](#donate)
|
- Not easy to open source, please Star or [Donate](#donate)
|
||||||
|
@ -95,6 +93,10 @@ Make sure that you follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) while contrib
|
||||||
|
|
||||||
> For Qt 5, only version 5.15.2 or higher is supported, and for Qt 6, only version 6.6.2 or higher is supported. Other lower versions are not supported due to missing APIs of key libraries and some bugs of their own.
|
> For Qt 5, only version 5.15.2 or higher is supported, and for Qt 6, only version 6.6.2 or higher is supported. Other lower versions are not supported due to missing APIs of key libraries and some bugs of their own.
|
||||||
|
|
||||||
|
And also:
|
||||||
|
|
||||||
|
> Active compilation support for QT5 will be discontinued on 2025/05/26, and the related GitAction automated tests will be revoked at that time. 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: 
|
The repository code compiles with Qt 5.15.2 and 6.6.2 on the latest versions of Windows and Ubuntu: 
|
||||||
|
|
||||||
## WingHexExplorer2
|
## WingHexExplorer2
|
||||||
|
@ -107,7 +109,7 @@ This software complies with the `AGPL-3.0` agreement. Please do not use it for p
|
||||||
|
|
||||||
If you want to use the code of this software for closed-source commercial code and want to lift the restriction of the `GPL` series that it must be open source, please consult me in person to discuss commercial licensing matters.
|
If you want to use the code of this software for closed-source commercial code and want to lift the restriction of the `GPL` series that it must be open source, please consult me in person to discuss commercial licensing matters.
|
||||||
|
|
||||||
For plugin development, the corresponding open source agreements are different. Only `src/plugin/iwingplugin.h` and `src/plugin/settingpage.h` in this repository comply with the `BSD 3-Clause` agreement to allow closed-source and commercial development. The code of `TestPlugin` in this repository (except the file `TranslationUtils.cmake` which complies with `BSD 3-Clause`) complies with the `MIT` agreement.
|
For plugin development, the corresponding open source agreements are different. Only `src/plugin/iwingplugin.h`, `src/plugin/iwingpluginbase.h`, `src/plugin/iwingdevice.h` and `src/plugin/settingpage.h` in this repository comply with the `BSD 3-Clause` agreement to allow closed-source and commercial development. The code of `TestPlugin` in this repository (except the file `TranslationUtils.cmake` which complies with `BSD 3-Clause`) complies with the `MIT` agreement.
|
||||||
|
|
||||||
### Usage Statement
|
### Usage Statement
|
||||||
|
|
||||||
|
@ -169,7 +171,7 @@ Of course, there are other repositories as mirror for Chinese users (which will
|
||||||
|
|
||||||
- Gitee:<https://gitee.com/wing-cloud/WingHexExplorer2>
|
- Gitee:<https://gitee.com/wing-cloud/WingHexExplorer2>
|
||||||
- Gitlink:<https://www.gitlink.org.cn/wingsummer/WingHexExplorer2>
|
- Gitlink:<https://www.gitlink.org.cn/wingsummer/WingHexExplorer2>
|
||||||
- GitCode:I don't consider it, because "stealing code".
|
- GitCode:I don't consider it, because of "stealing code".
|
||||||
|
|
||||||
## WIKI
|
## WIKI
|
||||||
|
|
||||||
|
@ -177,8 +179,5 @@ Of course, there are other repositories as mirror for Chinese users (which will
|
||||||
|
|
||||||
## Plugins
|
## Plugins
|
||||||
|
|
||||||
> Stay tuned
|
- [WingAsm](https://github.com/Wing-summer/WingAsm) : A plugin that provides assembly and disassembly features. Author: **wingsummer**. License: **APGL-v3.0**.
|
||||||
|
- [WingCStruct](https://github.com/Wing-summer/WingCStruct) : A plugin that provides basic support for analyzing file structures. Author: **wingsummer**. License: **APGL-v3.0**.
|
||||||
## App Store
|
|
||||||
|
|
||||||
> Stay tuned
|
|
||||||
|
|
|
@ -128,7 +128,7 @@
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.ui" line="97"/>
|
<location filename="../testform.ui" line="97"/>
|
||||||
<location filename="../testform.ui" line="194"/>
|
<location filename="../testform.ui" line="194"/>
|
||||||
<location filename="../testform.ui" line="693"/>
|
<location filename="../testform.ui" line="842"/>
|
||||||
<source>Text</source>
|
<source>Text</source>
|
||||||
<translation>文本 </translation>
|
<translation>文本 </translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -143,8 +143,8 @@
|
||||||
<location filename="../testform.ui" line="228"/>
|
<location filename="../testform.ui" line="228"/>
|
||||||
<location filename="../testform.ui" line="293"/>
|
<location filename="../testform.ui" line="293"/>
|
||||||
<location filename="../testform.ui" line="444"/>
|
<location filename="../testform.ui" line="444"/>
|
||||||
<location filename="../testform.ui" line="983"/>
|
<location filename="../testform.ui" line="1132"/>
|
||||||
<location filename="../testform.ui" line="1144"/>
|
<location filename="../testform.ui" line="1293"/>
|
||||||
<source>Clear</source>
|
<source>Clear</source>
|
||||||
<translation>清空</translation>
|
<translation>清空</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -155,7 +155,7 @@
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.ui" line="184"/>
|
<location filename="../testform.ui" line="184"/>
|
||||||
<location filename="../testform.ui" line="730"/>
|
<location filename="../testform.ui" line="879"/>
|
||||||
<source>Icon</source>
|
<source>Icon</source>
|
||||||
<translation>图标</translation>
|
<translation>图标</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -200,48 +200,89 @@
|
||||||
<translation>元数据</translation>
|
<translation>元数据</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.ui" line="626"/>
|
<location filename="../testform.ui" line="635"/>
|
||||||
|
<source>begin</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../testform.ui" line="645"/>
|
||||||
|
<source>length</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../testform.ui" line="655"/>
|
||||||
|
<source>foreground</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../testform.ui" line="665"/>
|
||||||
|
<source>background</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../testform.ui" line="675"/>
|
||||||
|
<source>comment</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../testform.ui" line="693"/>
|
||||||
|
<location filename="../testform.ui" line="759"/>
|
||||||
|
<source>Apply</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../testform.ui" line="714"/>
|
||||||
<source>BookMark</source>
|
<source>BookMark</source>
|
||||||
<translation>书签</translation>
|
<translation>书签</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.ui" line="631"/>
|
<location filename="../testform.ui" line="731"/>
|
||||||
<location filename="../testform.ui" line="662"/>
|
<source>Position</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../testform.ui" line="741"/>
|
||||||
|
<source>Comment</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../testform.ui" line="780"/>
|
||||||
|
<location filename="../testform.ui" line="811"/>
|
||||||
<source>MessageBox</source>
|
<source>MessageBox</source>
|
||||||
<translation>信息框</translation>
|
<translation>信息框</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.ui" line="639"/>
|
<location filename="../testform.ui" line="788"/>
|
||||||
<location filename="../testform.ui" line="676"/>
|
<location filename="../testform.ui" line="825"/>
|
||||||
<location filename="../testform.ui" line="853"/>
|
<location filename="../testform.ui" line="1002"/>
|
||||||
<source>Title</source>
|
<source>Title</source>
|
||||||
<translation>标题</translation>
|
<translation>标题</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.ui" line="710"/>
|
<location filename="../testform.ui" line="859"/>
|
||||||
<source>Buttons</source>
|
<source>Buttons</source>
|
||||||
<translation>按钮组</translation>
|
<translation>按钮组</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.ui" line="720"/>
|
<location filename="../testform.ui" line="869"/>
|
||||||
<source>DefaultButton</source>
|
<source>DefaultButton</source>
|
||||||
<translation>默认按钮</translation>
|
<translation>默认按钮</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.ui" line="831"/>
|
<location filename="../testform.ui" line="980"/>
|
||||||
<source>InputBox</source>
|
<source>InputBox</source>
|
||||||
<translation>输入框</translation>
|
<translation>输入框</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.ui" line="846"/>
|
<location filename="../testform.ui" line="995"/>
|
||||||
<source>Label</source>
|
<source>Label</source>
|
||||||
<translation>标签内容</translation>
|
<translation>标签内容</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.ui" line="311"/>
|
<location filename="../testform.ui" line="311"/>
|
||||||
<location filename="../testform.ui" line="882"/>
|
<location filename="../testform.ui" line="1031"/>
|
||||||
<location filename="../testform.ui" line="1056"/>
|
<location filename="../testform.ui" line="1205"/>
|
||||||
<location filename="../testform.ui" line="1245"/>
|
<location filename="../testform.ui" line="1394"/>
|
||||||
<source>Type</source>
|
<source>Type</source>
|
||||||
<translation>类型</translation>
|
<translation>类型</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -251,64 +292,64 @@
|
||||||
<translation>句柄</translation>
|
<translation>句柄</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.ui" line="995"/>
|
<location filename="../testform.ui" line="1144"/>
|
||||||
<source>FileDialog</source>
|
<source>FileDialog</source>
|
||||||
<translation>文件框</translation>
|
<translation>文件框</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.ui" line="1010"/>
|
<location filename="../testform.ui" line="1159"/>
|
||||||
<source>Filter</source>
|
<source>Filter</source>
|
||||||
<translation>过滤器</translation>
|
<translation>过滤器</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.ui" line="1017"/>
|
<location filename="../testform.ui" line="1166"/>
|
||||||
<location filename="../testform.ui" line="1170"/>
|
<location filename="../testform.ui" line="1319"/>
|
||||||
<source>Caption</source>
|
<source>Caption</source>
|
||||||
<translation>标题</translation>
|
<translation>标题</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.ui" line="1038"/>
|
<location filename="../testform.ui" line="1187"/>
|
||||||
<source>Options</source>
|
<source>Options</source>
|
||||||
<translation>选项组</translation>
|
<translation>选项组</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.ui" line="1156"/>
|
<location filename="../testform.ui" line="1305"/>
|
||||||
<source>ColorDialog</source>
|
<source>ColorDialog</source>
|
||||||
<translation>颜色框</translation>
|
<translation>颜色框</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.ui" line="1184"/>
|
<location filename="../testform.ui" line="1333"/>
|
||||||
<source>Color</source>
|
<source>Color</source>
|
||||||
<translation>颜色</translation>
|
<translation>颜色</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.ui" line="1230"/>
|
<location filename="../testform.ui" line="1379"/>
|
||||||
<source>DataVisual</source>
|
<source>DataVisual</source>
|
||||||
<translation>数据可视化</translation>
|
<translation>数据可视化</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.cpp" line="348"/>
|
<location filename="../testform.cpp" line="350"/>
|
||||||
<location filename="../testform.cpp" line="359"/>
|
<location filename="../testform.cpp" line="361"/>
|
||||||
<source>UpdateTextTreeError</source>
|
<source>UpdateTextTreeError</source>
|
||||||
<translation>更新文本树失败</translation>
|
<translation>更新文本树失败</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.cpp" line="374"/>
|
<location filename="../testform.cpp" line="376"/>
|
||||||
<source>UpdateTextListByModelError</source>
|
<source>UpdateTextListByModelError</source>
|
||||||
<translation>通过模型更新文本列表失败</translation>
|
<translation>通过模型更新文本列表失败</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.cpp" line="384"/>
|
<location filename="../testform.cpp" line="386"/>
|
||||||
<source>UpdateTextTableByModelError</source>
|
<source>UpdateTextTableByModelError</source>
|
||||||
<translation>通过模型更新文本表格失败</translation>
|
<translation>通过模型更新文本表格失败</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.cpp" line="395"/>
|
<location filename="../testform.cpp" line="397"/>
|
||||||
<source>UpdateTextTreeByModelError</source>
|
<source>UpdateTextTreeByModelError</source>
|
||||||
<translation>通过模型更新文本树失败</translation>
|
<translation>通过模型更新文本树失败</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../testform.cpp" line="496"/>
|
<location filename="../testform.cpp" line="498"/>
|
||||||
<source>Choose</source>
|
<source>Choose</source>
|
||||||
<translation>选择</translation>
|
<translation>选择</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -53,6 +53,8 @@ TestForm::TestForm(WingHex::IWingPlugin *plg, QWidget *parent)
|
||||||
initFileDialogOps();
|
initFileDialogOps();
|
||||||
initFileHandleListWidget();
|
initFileHandleListWidget();
|
||||||
|
|
||||||
|
ui->sbposition->setRange(0, INT_MAX);
|
||||||
|
|
||||||
_click = std::bind(&TestForm::onDVClicked, this, std::placeholders::_1);
|
_click = std::bind(&TestForm::onDVClicked, this, std::placeholders::_1);
|
||||||
_dblclick =
|
_dblclick =
|
||||||
std::bind(&TestForm::onDVDoubleClicked, this, std::placeholders::_1);
|
std::bind(&TestForm::onDVDoubleClicked, this, std::placeholders::_1);
|
||||||
|
@ -532,3 +534,13 @@ void TestForm::on_btnCloseFile_clicked() {
|
||||||
e.valueToKey(ret));
|
e.valueToKey(ret));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TestForm::on_btnApplyBookMark_clicked() {
|
||||||
|
if (emit _plg->reader.existBookMark(ui->sbposition->value())) {
|
||||||
|
Q_UNUSED(emit _plg->controller.modBookMark(ui->sbposition->value(),
|
||||||
|
ui->lecomment->text()));
|
||||||
|
} else {
|
||||||
|
Q_UNUSED(emit _plg->controller.addBookMark(ui->sbposition->value(),
|
||||||
|
ui->lecomment->text()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -125,6 +125,8 @@ private slots:
|
||||||
|
|
||||||
void on_btnCloseFile_clicked();
|
void on_btnCloseFile_clicked();
|
||||||
|
|
||||||
|
void on_btnApplyBookMark_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void initLogCombo();
|
void initLogCombo();
|
||||||
|
|
||||||
|
|
|
@ -620,11 +620,160 @@
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Metadata</string>
|
<string>Metadata</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_26">
|
||||||
|
<item>
|
||||||
|
<layout class="QFormLayout" name="formLayout_8">
|
||||||
|
<property name="horizontalSpacing">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="beginLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>begin</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QSpinBox" name="sbbegin"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="lengthLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>length</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QSpinBox" name="sbmlength"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="foregroundLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>foreground</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QWidget" name="wforeground" native="true"/>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="backgroundLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>background</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QWidget" name="wbackground" native="true"/>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="commentLabel_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>comment</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QLineEdit" name="lemcomment"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btnApplyMeta">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Apply</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_6">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>169</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tab_11">
|
<widget class="QWidget" name="tab_11">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>BookMark</string>
|
<string>BookMark</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_25">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<layout class="QFormLayout" name="formLayout_4">
|
||||||
|
<property name="horizontalSpacing">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="positionLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Position</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QSpinBox" name="sbposition"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="commentLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Comment</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="lecomment"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btnApplyBookMark">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Apply</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_5">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>245</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tab_4">
|
<widget class="QWidget" name="tab_4">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 6.6 KiB |
|
@ -76,20 +76,30 @@
|
||||||
<context>
|
<context>
|
||||||
<name>AppManager</name>
|
<name>AppManager</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/appmanager.cpp" line="66"/>
|
<location filename="../../src/class/appmanager.cpp" line="67"/>
|
||||||
<source>GenericCallNotFullySupported</source>
|
<source>GenericCallNotFullySupported</source>
|
||||||
<translation>该软件脚本系统不完全支持通用调用,故软件将会退出。</translation>
|
<translation>该软件脚本系统不完全支持通用调用,故软件将会退出。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/appmanager.cpp" line="84"/>
|
<location filename="../../src/class/appmanager.cpp" line="85"/>
|
||||||
<source>SetupClang</source>
|
<source>SetupClang</source>
|
||||||
<translation>启动 Clang 服务</translation>
|
<translation>启动 Clang 服务</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/appmanager.cpp" line="115"/>
|
<location filename="../../src/class/appmanager.cpp" line="116"/>
|
||||||
<source>OpeningFiles</source>
|
<source>OpeningFiles</source>
|
||||||
<translation>打开文件</translation>
|
<translation>打开文件</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/class/appmanager.cpp" line="163"/>
|
||||||
|
<location filename="../../src/class/appmanager.cpp" line="173"/>
|
||||||
|
<location filename="../../src/class/appmanager.cpp" line="190"/>
|
||||||
|
<location filename="../../src/class/appmanager.cpp" line="206"/>
|
||||||
|
<location filename="../../src/class/appmanager.cpp" line="224"/>
|
||||||
|
<location filename="../../src/class/appmanager.cpp" line="240"/>
|
||||||
|
<source>AlreadyOpened</source>
|
||||||
|
<translation>文件已被打开</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>BookMarksModel</name>
|
<name>BookMarksModel</name>
|
||||||
|
@ -272,7 +282,7 @@
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/driverselectordialog.cpp" line="52"/>
|
<location filename="../../src/dialog/driverselectordialog.cpp" line="52"/>
|
||||||
<source>DriverTips</source>
|
<source>DriverTips</source>
|
||||||
<translation>提示:如果处于编辑模式,请慎重编辑,否则会易导致磁盘数据丢失。如果因此导致的问题本软件概不负责!(*_*)</translation>
|
<translation>提示:如果处于编辑模式,请慎重编辑!!!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/driverselectordialog.cpp" line="72"/>
|
<location filename="../../src/dialog/driverselectordialog.cpp" line="72"/>
|
||||||
|
@ -793,57 +803,57 @@
|
||||||
<context>
|
<context>
|
||||||
<name>Logger</name>
|
<name>Logger</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/logger.cpp" line="94"/>
|
<location filename="../../src/class/logger.cpp" line="96"/>
|
||||||
<source>[Trace]</source>
|
<source>[Trace]</source>
|
||||||
<translation>【跟踪】</translation>
|
<translation>【跟踪】</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/logger.cpp" line="102"/>
|
<location filename="../../src/class/logger.cpp" line="104"/>
|
||||||
<source>[Warn]</source>
|
<source>[Warn]</source>
|
||||||
<translation>【警告】</translation>
|
<translation>【警告】</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/logger.cpp" line="110"/>
|
<location filename="../../src/class/logger.cpp" line="112"/>
|
||||||
<source>[Info]</source>
|
<source>[Info]</source>
|
||||||
<translation>【信息】</translation>
|
<translation>【信息】</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/logger.cpp" line="117"/>
|
<location filename="../../src/class/logger.cpp" line="119"/>
|
||||||
<source>[Debug]</source>
|
<source>[Debug]</source>
|
||||||
<translation>【调试】</translation>
|
<translation>【调试】</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/logger.cpp" line="125"/>
|
<location filename="../../src/class/logger.cpp" line="127"/>
|
||||||
<source>[Error]</source>
|
<source>[Error]</source>
|
||||||
<translation>【错误】</translation>
|
<translation>【错误】</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/logger.cpp" line="134"/>
|
<location filename="../../src/class/logger.cpp" line="136"/>
|
||||||
<source>Critial</source>
|
<source>Critial</source>
|
||||||
<translation>崩溃</translation>
|
<translation>崩溃</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/logger.cpp" line="136"/>
|
<location filename="../../src/class/logger.cpp" line="138"/>
|
||||||
<source>Error</source>
|
<source>Error</source>
|
||||||
<translation>错误</translation>
|
<translation>错误</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/logger.cpp" line="138"/>
|
<location filename="../../src/class/logger.cpp" line="140"/>
|
||||||
<source>Warning</source>
|
<source>Warning</source>
|
||||||
<translation>警告</translation>
|
<translation>警告</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/logger.cpp" line="140"/>
|
<location filename="../../src/class/logger.cpp" line="142"/>
|
||||||
<source>Info</source>
|
<source>Info</source>
|
||||||
<translation>信息</translation>
|
<translation>信息</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/logger.cpp" line="142"/>
|
<location filename="../../src/class/logger.cpp" line="144"/>
|
||||||
<source>Debug</source>
|
<source>Debug</source>
|
||||||
<translation>调试</translation>
|
<translation>调试</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/logger.cpp" line="144"/>
|
<location filename="../../src/class/logger.cpp" line="146"/>
|
||||||
<source>Trace</source>
|
<source>Trace</source>
|
||||||
<translation>跟踪</translation>
|
<translation>跟踪</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -895,7 +905,7 @@
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="280"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="280"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1476"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1476"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1601"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1603"/>
|
||||||
<source>Plugin</source>
|
<source>Plugin</source>
|
||||||
<translation>插件</translation>
|
<translation>插件</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -906,7 +916,7 @@
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="482"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="482"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1567"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1569"/>
|
||||||
<source>Log</source>
|
<source>Log</source>
|
||||||
<translation>日志</translation>
|
<translation>日志</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -943,8 +953,8 @@
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="894"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="894"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="962"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="962"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1034"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1034"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2129"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2131"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2314"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2316"/>
|
||||||
<source>CopyToClipBoard</source>
|
<source>CopyToClipBoard</source>
|
||||||
<translation>数据已拷贝到粘贴板</translation>
|
<translation>数据已拷贝到粘贴板</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -984,8 +994,8 @@
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="734"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="734"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1305"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1305"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2392"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2394"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2400"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2402"/>
|
||||||
<source>BookMark</source>
|
<source>BookMark</source>
|
||||||
<translation>书签</translation>
|
<translation>书签</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1025,7 +1035,7 @@
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1178"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1178"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1579"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1581"/>
|
||||||
<source>Basic</source>
|
<source>Basic</source>
|
||||||
<translation>基础</translation>
|
<translation>基础</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1087,9 +1097,9 @@
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1242"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1242"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1599"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1601"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1622"/>
|
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1624"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1624"/>
|
||||||
|
<location filename="../../src/dialog/mainwindow.cpp" line="1626"/>
|
||||||
<source>General</source>
|
<source>General</source>
|
||||||
<translation>基本</translation>
|
<translation>基本</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1172,7 +1182,7 @@
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1295"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1295"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2335"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2337"/>
|
||||||
<source>Fill</source>
|
<source>Fill</source>
|
||||||
<translation>填充</translation>
|
<translation>填充</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1484,99 +1494,99 @@
|
||||||
<translation>默认</translation>
|
<translation>默认</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1559"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1562"/>
|
||||||
<source>RestoreLayout</source>
|
<source>RestoreLayout</source>
|
||||||
<translation>恢复布局</translation>
|
<translation>恢复布局</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1563"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1565"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2811"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2815"/>
|
||||||
<source>SaveLayout</source>
|
<source>SaveLayout</source>
|
||||||
<translation>保存布局</translation>
|
<translation>保存布局</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1568"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1570"/>
|
||||||
<source>ExportLog</source>
|
<source>ExportLog</source>
|
||||||
<translation>导出日志</translation>
|
<translation>导出日志</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1570"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1572"/>
|
||||||
<source>ClearLog</source>
|
<source>ClearLog</source>
|
||||||
<translation>清空日志</translation>
|
<translation>清空日志</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1580"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1582"/>
|
||||||
<source>ScriptEditor</source>
|
<source>ScriptEditor</source>
|
||||||
<translation>脚本编辑器</translation>
|
<translation>脚本编辑器</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1585"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1587"/>
|
||||||
<source>Scripts</source>
|
<source>Scripts</source>
|
||||||
<translation>脚本仓库</translation>
|
<translation>脚本仓库</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1607"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1609"/>
|
||||||
<source>PluginFunctions</source>
|
<source>PluginFunctions</source>
|
||||||
<translation>插件功能</translation>
|
<translation>插件功能</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1630"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1632"/>
|
||||||
<source>ScriptSetting</source>
|
<source>ScriptSetting</source>
|
||||||
<translation>脚本设置</translation>
|
<translation>脚本设置</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1636"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1638"/>
|
||||||
<source>PluginSettings</source>
|
<source>PluginSettings</source>
|
||||||
<translation>插件设置</translation>
|
<translation>插件设置</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1646"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1648"/>
|
||||||
<source>Info</source>
|
<source>Info</source>
|
||||||
<translation>信息</translation>
|
<translation>信息</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1648"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1650"/>
|
||||||
<source>Software</source>
|
<source>Software</source>
|
||||||
<translation>软件</translation>
|
<translation>软件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1651"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1653"/>
|
||||||
<source>Sponsor</source>
|
<source>Sponsor</source>
|
||||||
<translation>赞助</translation>
|
<translation>赞助</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1660"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1662"/>
|
||||||
<source>CheckUpdate</source>
|
<source>CheckUpdate</source>
|
||||||
<translation>检查更新</translation>
|
<translation>检查更新</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1654"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1656"/>
|
||||||
<source>Wiki</source>
|
<source>Wiki</source>
|
||||||
<translation>网页 Wiki</translation>
|
<translation>网页 Wiki</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1657"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1659"/>
|
||||||
<source>AboutQT</source>
|
<source>AboutQT</source>
|
||||||
<translation>关于 QT</translation>
|
<translation>关于 QT</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1734"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1736"/>
|
||||||
<source>SetPageIDEmptyTryUseName</source>
|
<source>SetPageIDEmptyTryUseName</source>
|
||||||
<translation>设置页 ID 为空,尝试使用名称作为 ID</translation>
|
<translation>设置页 ID 为空,尝试使用名称作为 ID</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1742"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1744"/>
|
||||||
<source>SetPageDupNameIgnored</source>
|
<source>SetPageDupNameIgnored</source>
|
||||||
<translation>设置页重复的 ID 名称,已忽略加载</translation>
|
<translation>设置页重复的 ID 名称,已忽略加载</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1776"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1778"/>
|
||||||
<source>Plugin %1 contains a duplicate ID (%2) that is already registered by plugin %3</source>
|
<source>Plugin %1 contains a duplicate ID (%2) that is already registered by plugin %3</source>
|
||||||
<translation>插件 %1 包含重复 ID (%2),该 ID 已被插件 %3 注册</translation>
|
<translation>插件 %1 包含重复 ID (%2),该 ID 已被插件 %3 注册</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1818"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1820"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1869"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1871"/>
|
||||||
<source>ChooseFile</source>
|
<source>ChooseFile</source>
|
||||||
<translation>选择文件</translation>
|
<translation>选择文件</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1586,29 +1596,29 @@
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1081"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1081"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1091"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1091"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1153"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1153"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1824"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1826"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1828"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1830"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1851"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1853"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1855"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1857"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1876"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1878"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1880"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1882"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1900"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1902"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1906"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1908"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1910"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1912"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1935"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1937"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1961"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1963"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2024"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2026"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2063"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2065"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2960"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2975"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="3194"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="3209"/>
|
||||||
<source>Error</source>
|
<source>Error</source>
|
||||||
<translation>错误</translation>
|
<translation>错误</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1824"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1826"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1851"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1853"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1876"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1878"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1906"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1908"/>
|
||||||
<source>FileNotExist</source>
|
<source>FileNotExist</source>
|
||||||
<translation>文件不存在!</translation>
|
<translation>文件不存在!</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1618,31 +1628,31 @@
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1082"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1082"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1092"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1092"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1154"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1154"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1828"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1830"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1855"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1857"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1880"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1882"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1910"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1912"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1961"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1963"/>
|
||||||
<source>FilePermission</source>
|
<source>FilePermission</source>
|
||||||
<translation>因文件权限无法继续!</translation>
|
<translation>因文件权限无法继续!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1869"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1871"/>
|
||||||
<source>ProjectFile (*.wingpro)</source>
|
<source>ProjectFile (*.wingpro)</source>
|
||||||
<translation>项目文件 (*.wingpro)</translation>
|
<translation>项目文件 (*.wingpro)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1900"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1902"/>
|
||||||
<source>Root Required!</source>
|
<source>Root Required!</source>
|
||||||
<translation>需要管理员权限继续操作!</translation>
|
<translation>需要管理员权限继续操作!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1931"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1933"/>
|
||||||
<source>ReloadSuccessfully</source>
|
<source>ReloadSuccessfully</source>
|
||||||
<translation>文件重新加载成功!</translation>
|
<translation>文件重新加载成功!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1935"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1937"/>
|
||||||
<source>ReloadUnSuccessfully</source>
|
<source>ReloadUnSuccessfully</source>
|
||||||
<translation>文件重新加载失败!</translation>
|
<translation>文件重新加载失败!</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1651,49 +1661,49 @@
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="975"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="975"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1048"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1048"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1145"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1145"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1991"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1993"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2074"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2076"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2600"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2602"/>
|
||||||
<source>ChooseSaveFile</source>
|
<source>ChooseSaveFile</source>
|
||||||
<translation>请选择保存文件路径:</translation>
|
<translation>请选择保存文件路径:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2160"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2162"/>
|
||||||
<source>NoMoreClone</source>
|
<source>NoMoreClone</source>
|
||||||
<translation>克隆已到上限,无法继续操作!</translation>
|
<translation>克隆已到上限,无法继续操作!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2202"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2204"/>
|
||||||
<source>FindFininishBusy</source>
|
<source>FindFininishBusy</source>
|
||||||
<translation>查找任务繁忙,请勿重复查找!</translation>
|
<translation>查找任务繁忙,请勿重复查找!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2206"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2208"/>
|
||||||
<source>MayTooMuchFindResult</source>
|
<source>MayTooMuchFindResult</source>
|
||||||
<translation>搜索数量已到达上限,结果可能不全,建议请按区段搜索。</translation>
|
<translation>搜索数量已到达上限,结果可能不全,建议请按区段搜索。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2819"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2834"/>
|
||||||
<source>SaveLayoutSuccess</source>
|
<source>SaveLayoutSuccess</source>
|
||||||
<translation>保存布局成功</translation>
|
<translation>保存布局成功</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2822"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2837"/>
|
||||||
<source>SaveLayoutError</source>
|
<source>SaveLayoutError</source>
|
||||||
<translation>保存布局失败</translation>
|
<translation>保存布局失败</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="3550"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="3565"/>
|
||||||
<source>ConfirmSave</source>
|
<source>ConfirmSave</source>
|
||||||
<translation>正在关闭未保存的文件或工作区,你确定保存吗?</translation>
|
<translation>正在关闭未保存的文件或工作区,你确定保存吗?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="3569"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="3584"/>
|
||||||
<source>Column %1</source>
|
<source>Column %1</source>
|
||||||
<translation>列 %1</translation>
|
<translation>列 %1</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="3617"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="3632"/>
|
||||||
<source>ConfirmAPPSave</source>
|
<source>ConfirmAPPSave</source>
|
||||||
<translation>你尝试关闭程序,但仍存在未保存的文件或工作区,你确定保存这些更改吗?</translation>
|
<translation>你尝试关闭程序,但仍存在未保存的文件或工作区,你确定保存这些更改吗?</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1702,21 +1712,21 @@
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="998"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="998"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1124"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1124"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1161"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1161"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1982"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1984"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2003"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2005"/>
|
||||||
<source>SaveSuccessfully</source>
|
<source>SaveSuccessfully</source>
|
||||||
<translation>保存成功!</translation>
|
<translation>保存成功!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1977"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1979"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2008"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2010"/>
|
||||||
<source>SaveWSError</source>
|
<source>SaveWSError</source>
|
||||||
<translation>保存工作区错误!</translation>
|
<translation>保存工作区错误!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1965"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1967"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2012"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2014"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2051"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2053"/>
|
||||||
<source>Warn</source>
|
<source>Warn</source>
|
||||||
<translation>警告</translation>
|
<translation>警告</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1726,173 +1736,178 @@
|
||||||
<translation>脚本对象</translation>
|
<translation>脚本对象</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1965"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1967"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2012"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2014"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2051"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2053"/>
|
||||||
<source>SourceChanged</source>
|
<source>SourceChanged</source>
|
||||||
<translation>局部打开原始文件更改!</translation>
|
<translation>局部打开原始文件更改!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="1972"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="1974"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2019"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2021"/>
|
||||||
<source>SaveSourceFileError</source>
|
<source>SaveSourceFileError</source>
|
||||||
<translation>由于原文件更改,保存文件失败!</translation>
|
<translation>由于原文件更改,保存文件失败!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2024"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2026"/>
|
||||||
<source>SaveUnSuccessfully</source>
|
<source>SaveUnSuccessfully</source>
|
||||||
<translation>保存失败!</translation>
|
<translation>保存失败!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2037"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2039"/>
|
||||||
<source>ChooseExportFile</source>
|
<source>ChooseExportFile</source>
|
||||||
<translation>请选择导出文件路径:</translation>
|
<translation>请选择导出文件路径:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2047"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2049"/>
|
||||||
<source>ExportSuccessfully</source>
|
<source>ExportSuccessfully</source>
|
||||||
<translation>导出成功!</translation>
|
<translation>导出成功!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2058"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2060"/>
|
||||||
<source>ExportSourceFileError</source>
|
<source>ExportSourceFileError</source>
|
||||||
<translation>由于原文件更改,导出文件失败!</translation>
|
<translation>由于原文件更改,导出文件失败!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2063"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2065"/>
|
||||||
<source>ExportUnSuccessfully</source>
|
<source>ExportUnSuccessfully</source>
|
||||||
<translation>导出失败!</translation>
|
<translation>导出失败!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2085"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2087"/>
|
||||||
<source>SaveSelSuccess</source>
|
<source>SaveSelSuccess</source>
|
||||||
<translation>保存选区字节成功!</translation>
|
<translation>保存选区字节成功!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2088"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2090"/>
|
||||||
<source>SaveSelError</source>
|
<source>SaveSelError</source>
|
||||||
<translation>保存选区字节失败,因文件不具有可写权限!</translation>
|
<translation>保存选区字节失败,因文件不具有可写权限!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2115"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2117"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2300"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2302"/>
|
||||||
<source>CutToClipBoard</source>
|
<source>CutToClipBoard</source>
|
||||||
<translation>数据已剪切到粘贴板!</translation>
|
<translation>数据已剪切到粘贴板!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2118"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2120"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2303"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2305"/>
|
||||||
<source>UnCutToClipBoard</source>
|
<source>UnCutToClipBoard</source>
|
||||||
<translation>由于保持大小限制,数据剪切到粘贴板失败!</translation>
|
<translation>由于保持大小限制,数据剪切到粘贴板失败!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2132"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2134"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2317"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2319"/>
|
||||||
<source>UnCopyToClipBoard</source>
|
<source>UnCopyToClipBoard</source>
|
||||||
<translation>由于保持大小限制,数据剪切到复制板失败!</translation>
|
<translation>由于保持大小限制,数据剪切到复制板失败!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2198"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2200"/>
|
||||||
<source>FindFininish</source>
|
<source>FindFininish</source>
|
||||||
<translation>查找结果完毕!</translation>
|
<translation>查找结果完毕!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2335"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2337"/>
|
||||||
<source>PleaseInputFill</source>
|
<source>PleaseInputFill</source>
|
||||||
<translation>请输入填充字节值</translation>
|
<translation>请输入填充字节值</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2354"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2356"/>
|
||||||
<source>FillInputError</source>
|
<source>FillInputError</source>
|
||||||
<translation>填充字节输入错误</translation>
|
<translation>填充字节输入错误</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2392"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2394"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2400"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2402"/>
|
||||||
<source>InputComment</source>
|
<source>InputComment</source>
|
||||||
<translation>请输入批注:</translation>
|
<translation>请输入批注:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2455"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2457"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2496"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2498"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="3050"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="3065"/>
|
||||||
<source>NoSelection</source>
|
<source>NoSelection</source>
|
||||||
<translation>没有选区,无法继续的操作!</translation>
|
<translation>没有选区,无法继续的操作!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2492"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2494"/>
|
||||||
<source>NoMetaData</source>
|
<source>NoMetaData</source>
|
||||||
<translation>无可编辑标记</translation>
|
<translation>无可编辑标记</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2587"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2589"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2596"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2598"/>
|
||||||
<source>EmptyFindResult</source>
|
<source>EmptyFindResult</source>
|
||||||
<translation>没有可导出的搜索结果!</translation>
|
<translation>没有可导出的搜索结果!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2641"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2643"/>
|
||||||
<source>SaveFindResult</source>
|
<source>SaveFindResult</source>
|
||||||
<translation>导出搜索结果成功!</translation>
|
<translation>导出搜索结果成功!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2645"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2647"/>
|
||||||
<source>SaveFindResultError</source>
|
<source>SaveFindResultError</source>
|
||||||
<translation>导出结果失败!</translation>
|
<translation>导出结果失败!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2784"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2786"/>
|
||||||
<source>TooManyBytesDecode</source>
|
<source>TooManyBytesDecode</source>
|
||||||
<translation>超出解码字节限制……</translation>
|
<translation>超出解码字节限制……</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2831"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2815"/>
|
||||||
|
<source>PleaseInput</source>
|
||||||
|
<translation>请输入</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/mainwindow.cpp" line="2846"/>
|
||||||
<source>ExportLogError</source>
|
<source>ExportLogError</source>
|
||||||
<translation>导出日志失败!</translation>
|
<translation>导出日志失败!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2834"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2849"/>
|
||||||
<source>ExportLogSuccess</source>
|
<source>ExportLogSuccess</source>
|
||||||
<translation>导出日志成功,路径:</translation>
|
<translation>导出日志成功,路径:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2842"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2857"/>
|
||||||
<source>ClearLogSuccess</source>
|
<source>ClearLogSuccess</source>
|
||||||
<translation>清空日志成功!</translation>
|
<translation>清空日志成功!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2898"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2913"/>
|
||||||
<source>BadNetwork</source>
|
<source>BadNetwork</source>
|
||||||
<translation>无法与远程服务器的更新检查建立连接,请检查网络。</translation>
|
<translation>无法与远程服务器的更新检查建立连接,请检查网络。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2903"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2918"/>
|
||||||
<source>NewestVersion</source>
|
<source>NewestVersion</source>
|
||||||
<translation>当前软件为最新版本</translation>
|
<translation>当前软件为最新版本</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="314"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="314"/>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2900"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2915"/>
|
||||||
<source>OlderVersion</source>
|
<source>OlderVersion</source>
|
||||||
<translation>你使用的软件为老版本,建议到 Github 和 Gitee 的仓库发行版下载更新。</translation>
|
<translation>你使用的软件为老版本,建议到 Github 和 Gitee 的仓库发行版下载更新。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2906"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2921"/>
|
||||||
<source>CheckingUpdate</source>
|
<source>CheckingUpdate</source>
|
||||||
<translation>检查更新中……</translation>
|
<translation>检查更新中……</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="2961"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="2976"/>
|
||||||
<source>Too much opened files</source>
|
<source>Too much opened files</source>
|
||||||
<translation>打开的文件过多,无法继续操作!</translation>
|
<translation>打开的文件过多,无法继续操作!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="3121"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="3136"/>
|
||||||
<source>CopyLimit</source>
|
<source>CopyLimit</source>
|
||||||
<translation>拷贝字节超出限制</translation>
|
<translation>拷贝字节超出限制</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/mainwindow.cpp" line="3195"/>
|
<location filename="../../src/dialog/mainwindow.cpp" line="3210"/>
|
||||||
<source>ErrOpenFileBelow</source>
|
<source>ErrOpenFileBelow</source>
|
||||||
<translation>打开文件出现错误(由于权限不足),如下为打开错误的文件:</translation>
|
<translation>打开文件出现错误(由于权限不足),如下为打开错误的文件:</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -2077,12 +2092,12 @@
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/settings/pluginsettingdialog.ui" line="132"/>
|
<location filename="../../src/settings/pluginsettingdialog.ui" line="132"/>
|
||||||
<source>DevExtInfo</source>
|
<source>DevExtInfo</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>设备插件信息</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/settings/pluginsettingdialog.ui" line="148"/>
|
<location filename="../../src/settings/pluginsettingdialog.ui" line="148"/>
|
||||||
<source>DevExt:</source>
|
<source>DevExt:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>设备插件:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="87"/>
|
<location filename="../../src/settings/pluginsettingdialog.cpp" line="87"/>
|
||||||
|
@ -2093,64 +2108,64 @@
|
||||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="115"/>
|
<location filename="../../src/settings/pluginsettingdialog.cpp" line="115"/>
|
||||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="135"/>
|
<location filename="../../src/settings/pluginsettingdialog.cpp" line="135"/>
|
||||||
<source>ID</source>
|
<source>ID</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>ID</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="116"/>
|
<location filename="../../src/settings/pluginsettingdialog.cpp" line="116"/>
|
||||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="136"/>
|
<location filename="../../src/settings/pluginsettingdialog.cpp" line="136"/>
|
||||||
<source>Name</source>
|
<source>Name</source>
|
||||||
<translation type="unfinished">名称</translation>
|
<translation>名称</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="117"/>
|
<location filename="../../src/settings/pluginsettingdialog.cpp" line="117"/>
|
||||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="137"/>
|
<location filename="../../src/settings/pluginsettingdialog.cpp" line="137"/>
|
||||||
<source>License</source>
|
<source>License</source>
|
||||||
<translation type="unfinished">协议</translation>
|
<translation>协议</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="118"/>
|
<location filename="../../src/settings/pluginsettingdialog.cpp" line="118"/>
|
||||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="138"/>
|
<location filename="../../src/settings/pluginsettingdialog.cpp" line="138"/>
|
||||||
<source>Author</source>
|
<source>Author</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>作者</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="119"/>
|
<location filename="../../src/settings/pluginsettingdialog.cpp" line="119"/>
|
||||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="139"/>
|
<location filename="../../src/settings/pluginsettingdialog.cpp" line="139"/>
|
||||||
<source>Vendor</source>
|
<source>Vendor</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>厂家</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="120"/>
|
<location filename="../../src/settings/pluginsettingdialog.cpp" line="120"/>
|
||||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="140"/>
|
<location filename="../../src/settings/pluginsettingdialog.cpp" line="140"/>
|
||||||
<source>Version</source>
|
<source>Version</source>
|
||||||
<translation type="unfinished">版本</translation>
|
<translation>版本</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="121"/>
|
<location filename="../../src/settings/pluginsettingdialog.cpp" line="121"/>
|
||||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="141"/>
|
<location filename="../../src/settings/pluginsettingdialog.cpp" line="141"/>
|
||||||
<source>Comment</source>
|
<source>Comment</source>
|
||||||
<translation type="unfinished">批注</translation>
|
<translation>说明</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="122"/>
|
<location filename="../../src/settings/pluginsettingdialog.cpp" line="122"/>
|
||||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="150"/>
|
<location filename="../../src/settings/pluginsettingdialog.cpp" line="150"/>
|
||||||
<source>URL</source>
|
<source>URL</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>网址</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="143"/>
|
<location filename="../../src/settings/pluginsettingdialog.cpp" line="143"/>
|
||||||
<source>pluginDependencies:</source>
|
<source>pluginDependencies:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>插件依赖</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="145"/>
|
<location filename="../../src/settings/pluginsettingdialog.cpp" line="145"/>
|
||||||
<source>PUID:</source>
|
<source>PUID:</source>
|
||||||
<translation type="unfinished">插件唯一标志符:</translation>
|
<translation>插件唯一标志符:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="146"/>
|
<location filename="../../src/settings/pluginsettingdialog.cpp" line="146"/>
|
||||||
<source>Version:</source>
|
<source>Version:</source>
|
||||||
<translation type="unfinished">版本:</translation>
|
<translation>版本:</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -2163,160 +2178,160 @@
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="102"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="102"/>
|
||||||
<source>InvalidPluginBrokenInfo</source>
|
<source>InvalidPluginBrokenInfo</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>加载插件失败:损坏的插件数据</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="578"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="604"/>
|
||||||
<source>FoundDrvPluginCount</source>
|
<source>FoundDrvPluginCount</source>
|
||||||
<translation>总计发现设备拓展插件数目:</translation>
|
<translation>总计发现设备拓展插件数目:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="618"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="644"/>
|
||||||
<source>RegisteredFnDup</source>
|
<source>RegisteredFnDup</source>
|
||||||
<translation>注册重复函数对象</translation>
|
<translation>注册重复函数对象</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="828"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="854"/>
|
||||||
<source>ErrLoadPluginSign</source>
|
<source>ErrLoadPluginSign</source>
|
||||||
<translation>插件加载失败:非法插件签名!</translation>
|
<translation>插件加载失败:非法插件签名!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="832"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="858"/>
|
||||||
<source>ErrLoadPluginSDKVersion</source>
|
<source>ErrLoadPluginSDKVersion</source>
|
||||||
<translation>插件加载失败:非法插件 SDK 版本!</translation>
|
<translation>插件加载失败:非法插件 SDK 版本!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="836"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="862"/>
|
||||||
<source>ErrLoadPluginNoName</source>
|
<source>ErrLoadPluginNoName</source>
|
||||||
<translation>插件加载失败:非法插件名称!</translation>
|
<translation>插件加载失败:非法插件名称!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="857"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="887"/>
|
||||||
<source>ErrLoadInitPlugin</source>
|
<source>ErrLoadInitPlugin</source>
|
||||||
<translation>插件加载失败:初始化插件失败!</translation>
|
<translation>插件加载失败:初始化插件失败!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="864"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="894"/>
|
||||||
<source>PluginName :</source>
|
<source>PluginName :</source>
|
||||||
<translation>插件名:</translation>
|
<translation>插件名:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="865"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="895"/>
|
||||||
<source>PluginAuthor :</source>
|
<source>PluginAuthor :</source>
|
||||||
<translation>插件作者:</translation>
|
<translation>插件作者:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="866"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="896"/>
|
||||||
<source>PluginWidgetRegister</source>
|
<source>PluginWidgetRegister</source>
|
||||||
<translation>注册插件对象中……</translation>
|
<translation>注册插件对象中……</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="968"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="1000"/>
|
||||||
<source>ErrLoadExtPluginSign</source>
|
<source>ErrLoadExtPluginSign</source>
|
||||||
<translation>设备拓展插件加载失败:非法插件签名!</translation>
|
<translation>设备拓展插件加载失败:非法插件签名!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="972"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="1004"/>
|
||||||
<source>ErrLoadExtPluginSDKVersion</source>
|
<source>ErrLoadExtPluginSDKVersion</source>
|
||||||
<translation>设备拓展插件加载失败:非法插件 SDK 版本!</translation>
|
<translation>设备拓展插件加载失败:非法插件 SDK 版本!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="976"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="1008"/>
|
||||||
<source>ErrLoadExtPluginNoName</source>
|
<source>ErrLoadExtPluginNoName</source>
|
||||||
<translation>设备拓展插件加载失败:非法插件名称!</translation>
|
<translation>设备拓展插件加载失败:非法插件名称!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="979"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="1011"/>
|
||||||
<source>ExtPluginName :</source>
|
<source>ExtPluginName :</source>
|
||||||
<translation>设备拓展插件名:</translation>
|
<translation>设备拓展插件名:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="980"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="1012"/>
|
||||||
<source>ExtPluginAuthor :</source>
|
<source>ExtPluginAuthor :</source>
|
||||||
<translation>设备拓展插件作者:</translation>
|
<translation>设备拓展插件作者:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="981"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="1013"/>
|
||||||
<source>ExtPluginWidgetRegister</source>
|
<source>ExtPluginWidgetRegister</source>
|
||||||
<translation>设备拓展注册插件对象中……</translation>
|
<translation>设备拓展注册插件对象中……</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="997"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="1032"/>
|
||||||
<source>ErrLoadInitExtPlugin</source>
|
<source>ErrLoadInitExtPlugin</source>
|
||||||
<translation>设备拓展插件加载失败:初始化插件失败!</translation>
|
<translation>设备拓展插件加载失败:初始化插件失败!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="1064"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="1099"/>
|
||||||
<source>EmptyNameDockWidget:</source>
|
<source>EmptyNameDockWidget:</source>
|
||||||
<translation>空的贴边组件名:</translation>
|
<translation>空的贴边组件名:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="1074"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="1109"/>
|
||||||
<source>InvalidNameDockWidget:</source>
|
<source>InvalidNameDockWidget:</source>
|
||||||
<translation>无效贴边组件名:</translation>
|
<translation>无效贴边组件名:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="1082"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="1117"/>
|
||||||
<source>InvalidNullDockWidget:</source>
|
<source>InvalidNullDockWidget:</source>
|
||||||
<translation>无效空贴边组件:</translation>
|
<translation>无效空贴边组件:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="1222"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="1257"/>
|
||||||
<source>[EvilCall]</source>
|
<source>[EvilCall]</source>
|
||||||
<translation>【恶意调用】</translation>
|
<translation>【恶意调用】</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="2815"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="2800"/>
|
||||||
<source>Not allowed operation in non-UI thread</source>
|
<source>Not allowed operation in non-UI thread</source>
|
||||||
<translation>该操作在非 UI 线程非法</translation>
|
<translation>该操作在非 UI 线程非法</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="600"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="626"/>
|
||||||
<source>UnsafePluginDir</source>
|
<source>UnsafePluginDir</source>
|
||||||
<translation>不安全的插件目录,请将插件目录设置为仅管理员账户可写</translation>
|
<translation>不安全的插件目录,请将插件目录设置为仅管理员账户可写</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="109"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="109"/>
|
||||||
<source>InvalidPluginID</source>
|
<source>InvalidPluginID</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>加载插件失败:非法插件标识符</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="112"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="112"/>
|
||||||
<source>InvalidDupPlugin</source>
|
<source>InvalidDupPlugin</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>加载插件失败:重复的插件标识符</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="516"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="540"/>
|
||||||
<source>FoundPluginCount</source>
|
<source>FoundPluginCount</source>
|
||||||
<translation>总计发现插件数目:</translation>
|
<translation>总计发现插件数目:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="543"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="567"/>
|
||||||
<source>PluginLoadingFailedSummary</source>
|
<source>PluginLoadingFailedSummary</source>
|
||||||
<translation>有依赖插件加载失败总结</translation>
|
<translation>有依赖插件加载失败总结</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="546"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="571"/>
|
||||||
<source>- PluginName:</source>
|
<source>- PluginName:</source>
|
||||||
<translation>- 插件名:</translation>
|
<translation>- 插件名:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="547"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="572"/>
|
||||||
<source>- Dependencies:</source>
|
<source>- Dependencies:</source>
|
||||||
<translation>- 依赖:</translation>
|
<translation>- 依赖:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="549"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="574"/>
|
||||||
<source>PUID:</source>
|
<source>PUID:</source>
|
||||||
<translation>插件唯一标志符:</translation>
|
<translation>插件唯一标志符:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="550"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="575"/>
|
||||||
<source>Version:</source>
|
<source>Version:</source>
|
||||||
<translation>版本:</translation>
|
<translation>版本:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/plugin/pluginsystem.cpp" line="557"/>
|
<location filename="../../src/plugin/pluginsystem.cpp" line="582"/>
|
||||||
<source>PluginLoadingFinished</source>
|
<source>PluginLoadingFinished</source>
|
||||||
<translation>加载插件完毕!</translation>
|
<translation>加载插件完毕!</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -2994,7 +3009,7 @@ Do you wish to keep up to date by reloading the file?</source>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/recentfilemanager.cpp" line="50"/>
|
<location filename="../../src/class/recentfilemanager.cpp" line="50"/>
|
||||||
<location filename="../../src/class/recentfilemanager.cpp" line="190"/>
|
<location filename="../../src/class/recentfilemanager.cpp" line="209"/>
|
||||||
<source>NoHistoryDel</source>
|
<source>NoHistoryDel</source>
|
||||||
<translation>无打开历史项目可删除!</translation>
|
<translation>无打开历史项目可删除!</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -3039,12 +3054,12 @@ Do you wish to keep up to date by reloading the file?</source>
|
||||||
<translation>【结束】</translation>
|
<translation>【结束】</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/recentfilemanager.cpp" line="166"/>
|
<location filename="../../src/class/recentfilemanager.cpp" line="185"/>
|
||||||
<source>FileNotExistClean</source>
|
<source>FileNotExistClean</source>
|
||||||
<translation>文件不存在,该选项已被清除!</translation>
|
<translation>文件不存在,该选项已被清除!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/recentfilemanager.cpp" line="200"/>
|
<location filename="../../src/class/recentfilemanager.cpp" line="219"/>
|
||||||
<source>HistoryClearFinished</source>
|
<source>HistoryClearFinished</source>
|
||||||
<translation>打开历史记录完成!</translation>
|
<translation>打开历史记录完成!</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -59,6 +59,7 @@
|
||||||
<file>images/metashow.png</file>
|
<file>images/metashow.png</file>
|
||||||
<file>images/new.png</file>
|
<file>images/new.png</file>
|
||||||
<file>images/open.png</file>
|
<file>images/open.png</file>
|
||||||
|
<file>images/openapp.png</file>
|
||||||
<file>images/opendriver.png</file>
|
<file>images/opendriver.png</file>
|
||||||
<file>images/openother.png</file>
|
<file>images/openother.png</file>
|
||||||
<file>images/openr.png</file>
|
<file>images/openr.png</file>
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "QConsoleWidget/commandhistorymanager.h"
|
#include "QConsoleWidget/commandhistorymanager.h"
|
||||||
#include "angelscript.h"
|
#include "angelscript.h"
|
||||||
#include "clangformatmanager.h"
|
#include "clangformatmanager.h"
|
||||||
|
#include "control/toast.h"
|
||||||
#include "dbghelper.h"
|
#include "dbghelper.h"
|
||||||
#include "define.h"
|
#include "define.h"
|
||||||
#include "dialog/mainwindow.h"
|
#include "dialog/mainwindow.h"
|
||||||
|
@ -157,12 +158,23 @@ void AppManager::openFile(const QString &file, bool autoDetect, qsizetype start,
|
||||||
}
|
}
|
||||||
if (ret == ErrFile::AlreadyOpened) {
|
if (ret == ErrFile::AlreadyOpened) {
|
||||||
Q_ASSERT(editor);
|
Q_ASSERT(editor);
|
||||||
editor->raise();
|
if (_w->currentEditor() == editor) {
|
||||||
|
Toast::toast(_w, NAMEICONRES("openapp"),
|
||||||
|
tr("AlreadyOpened"));
|
||||||
|
} else {
|
||||||
|
editor->raise();
|
||||||
|
}
|
||||||
|
|
||||||
editor->setFocus();
|
editor->setFocus();
|
||||||
}
|
}
|
||||||
} else if (ret == ErrFile::AlreadyOpened) {
|
} else if (ret == ErrFile::AlreadyOpened) {
|
||||||
Q_ASSERT(editor);
|
Q_ASSERT(editor);
|
||||||
editor->raise();
|
if (_w->currentEditor() == editor) {
|
||||||
|
Toast::toast(_w, NAMEICONRES("openapp"), tr("AlreadyOpened"));
|
||||||
|
} else {
|
||||||
|
editor->raise();
|
||||||
|
}
|
||||||
|
|
||||||
editor->setFocus();
|
editor->setFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -174,7 +186,12 @@ void AppManager::openRawFile(const QString &file) {
|
||||||
auto ret = _w->openFile(file, &editor);
|
auto ret = _w->openFile(file, &editor);
|
||||||
if (ret == ErrFile::AlreadyOpened) {
|
if (ret == ErrFile::AlreadyOpened) {
|
||||||
Q_ASSERT(editor);
|
Q_ASSERT(editor);
|
||||||
editor->raise();
|
if (_w->currentEditor() == editor) {
|
||||||
|
Toast::toast(_w, NAMEICONRES("openapp"), tr("AlreadyOpened"));
|
||||||
|
} else {
|
||||||
|
editor->raise();
|
||||||
|
}
|
||||||
|
|
||||||
editor->setFocus();
|
editor->setFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -185,7 +202,12 @@ void AppManager::openDriver(const QString &driver) {
|
||||||
auto ret = _w->openDriver(driver, &editor);
|
auto ret = _w->openDriver(driver, &editor);
|
||||||
if (ret == ErrFile::AlreadyOpened) {
|
if (ret == ErrFile::AlreadyOpened) {
|
||||||
Q_ASSERT(editor);
|
Q_ASSERT(editor);
|
||||||
editor->raise();
|
if (_w->currentEditor() == editor) {
|
||||||
|
Toast::toast(_w, NAMEICONRES("openapp"), tr("AlreadyOpened"));
|
||||||
|
} else {
|
||||||
|
editor->raise();
|
||||||
|
}
|
||||||
|
|
||||||
editor->setFocus();
|
editor->setFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -198,7 +220,12 @@ void AppManager::openRegionFile(const QString ®ion, qsizetype start,
|
||||||
auto ret = _w->openRegionFile(region, &editor, start, length);
|
auto ret = _w->openRegionFile(region, &editor, start, length);
|
||||||
if (ret == ErrFile::AlreadyOpened) {
|
if (ret == ErrFile::AlreadyOpened) {
|
||||||
Q_ASSERT(editor);
|
Q_ASSERT(editor);
|
||||||
editor->raise();
|
if (_w->currentEditor() == editor) {
|
||||||
|
Toast::toast(_w, NAMEICONRES("openapp"), tr("AlreadyOpened"));
|
||||||
|
} else {
|
||||||
|
editor->raise();
|
||||||
|
}
|
||||||
|
|
||||||
editor->setFocus();
|
editor->setFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -209,7 +236,12 @@ void AppManager::openWorkSpace(const QString &ws) {
|
||||||
auto ret = _w->openWorkSpace(ws, &editor);
|
auto ret = _w->openWorkSpace(ws, &editor);
|
||||||
if (ret == ErrFile::AlreadyOpened) {
|
if (ret == ErrFile::AlreadyOpened) {
|
||||||
Q_ASSERT(editor);
|
Q_ASSERT(editor);
|
||||||
editor->raise();
|
if (_w->currentEditor() == editor) {
|
||||||
|
Toast::toast(_w, NAMEICONRES("openapp"), tr("AlreadyOpened"));
|
||||||
|
} else {
|
||||||
|
editor->raise();
|
||||||
|
}
|
||||||
|
|
||||||
editor->setFocus();
|
editor->setFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,28 @@ QByteArray LayoutManager::layout(const QString &v) const {
|
||||||
|
|
||||||
qsizetype LayoutManager::layoutCount() const { return _layouts.size(); }
|
qsizetype LayoutManager::layoutCount() const { return _layouts.size(); }
|
||||||
|
|
||||||
|
QDir LayoutManager::layoutDir() {
|
||||||
|
QDir pdir(Utilities::getAppDataPath());
|
||||||
|
auto lname = QStringLiteral("layouts");
|
||||||
|
return pdir.absoluteFilePath(lname);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString LayoutManager::getSavedLayoutName(const QString &id) {
|
||||||
|
auto pdir = layoutDir();
|
||||||
|
auto trf = QStringLiteral("metatr.ini");
|
||||||
|
auto sep = QStringLiteral("/");
|
||||||
|
auto lid = id;
|
||||||
|
|
||||||
|
QSettings set(pdir.absoluteFilePath(trf), QSettings::IniFormat);
|
||||||
|
auto name = LanguageManager::instance().defaultLocale().name();
|
||||||
|
QString k = set.value(name + sep + id).toString().trimmed();
|
||||||
|
if (!k.isEmpty()) {
|
||||||
|
lid = k;
|
||||||
|
}
|
||||||
|
|
||||||
|
return lid;
|
||||||
|
}
|
||||||
|
|
||||||
LayoutManager::LayoutManager() {
|
LayoutManager::LayoutManager() {
|
||||||
ASSERT_SINGLETON;
|
ASSERT_SINGLETON;
|
||||||
QDir pdir(Utilities::getAppDataPath());
|
QDir pdir(Utilities::getAppDataPath());
|
||||||
|
@ -66,7 +88,7 @@ void LayoutManager::process(const QDir &dir,
|
||||||
for (auto &l : dir.entryInfoList({"*.wing-layout"}, QDir::Files)) {
|
for (auto &l : dir.entryInfoList({"*.wing-layout"}, QDir::Files)) {
|
||||||
QString k;
|
QString k;
|
||||||
if (set) {
|
if (set) {
|
||||||
k = set->value(name + sep + l.baseName()).toString();
|
k = set->value(name + sep + l.baseName()).toString().trimmed();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (k.isEmpty()) {
|
if (k.isEmpty()) {
|
||||||
|
|
|
@ -36,6 +36,11 @@ public:
|
||||||
|
|
||||||
qsizetype layoutCount() const;
|
qsizetype layoutCount() const;
|
||||||
|
|
||||||
|
static QDir layoutDir();
|
||||||
|
|
||||||
|
// only for exporting layout
|
||||||
|
QString getSavedLayoutName(const QString &id);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
LayoutManager();
|
LayoutManager();
|
||||||
|
|
||||||
|
|
|
@ -88,6 +88,8 @@ Logger::Level Logger::logLevel() const { return _level; }
|
||||||
|
|
||||||
void Logger::_log(const QString &message) { emit instance().log(message); }
|
void Logger::_log(const QString &message) { emit instance().log(message); }
|
||||||
|
|
||||||
|
void Logger::newLine() { _log({}); }
|
||||||
|
|
||||||
void Logger::trace(const QString &message) {
|
void Logger::trace(const QString &message) {
|
||||||
if (instance()._level >= q5TRACE) {
|
if (instance()._level >= q5TRACE) {
|
||||||
QString str = message;
|
QString str = message;
|
||||||
|
|
|
@ -54,8 +54,7 @@ signals:
|
||||||
void log(const QString &message);
|
void log(const QString &message);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
// internal use only
|
static void newLine();
|
||||||
static void _log(const QString &message);
|
|
||||||
|
|
||||||
// external use
|
// external use
|
||||||
static void trace(const QString &message);
|
static void trace(const QString &message);
|
||||||
|
@ -71,6 +70,8 @@ private:
|
||||||
|
|
||||||
virtual ~Logger();
|
virtual ~Logger();
|
||||||
|
|
||||||
|
static void _log(const QString &message);
|
||||||
|
|
||||||
Q_DISABLE_COPY_MOVE(Logger)
|
Q_DISABLE_COPY_MOVE(Logger)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -144,16 +144,35 @@ void RecentFileManager::addRecentFile(const RecentInfo &info) {
|
||||||
}
|
}
|
||||||
auto a = new QAction(m_menu);
|
auto a = new QAction(m_menu);
|
||||||
a->setData(QVariant::fromValue(info));
|
a->setData(QVariant::fromValue(info));
|
||||||
a->setText(getDisplayFileName(info));
|
|
||||||
|
QMimeDatabase db;
|
||||||
|
auto mt = db.mimeTypeForFile(info.fileName);
|
||||||
|
|
||||||
|
a->setText(getDisplayFileName(info) + QStringLiteral(" (") + mt.name() +
|
||||||
|
QStringLiteral(")"));
|
||||||
a->setToolTip(getDisplayTooltip(info));
|
a->setToolTip(getDisplayTooltip(info));
|
||||||
if (info.isWorkSpace) {
|
if (info.isWorkSpace) {
|
||||||
a->setIcon(ICONRES(QStringLiteral("pro")));
|
a->setIcon(ICONRES(QStringLiteral("pro")));
|
||||||
|
} else {
|
||||||
|
a->setIcon(
|
||||||
|
Utilities::getIconFromFile(qApp->style(), info.fileName));
|
||||||
}
|
}
|
||||||
connect(a, &QAction::triggered, this, [=] {
|
connect(a, &QAction::triggered, this, [=] {
|
||||||
auto send = qobject_cast<QAction *>(sender());
|
auto send = qobject_cast<QAction *>(sender());
|
||||||
if (send) {
|
if (send) {
|
||||||
auto f = send->data().value<RecentInfo>();
|
auto f = send->data().value<RecentInfo>();
|
||||||
if (existsPath(f)) {
|
if (existsPath(f)) {
|
||||||
|
auto idx = hitems.indexOf(a);
|
||||||
|
if (idx > 0) {
|
||||||
|
m_menu->removeAction(a);
|
||||||
|
|
||||||
|
if (hitems.count())
|
||||||
|
m_menu->insertAction(hitems.first(), a);
|
||||||
|
else
|
||||||
|
m_menu->addAction(a);
|
||||||
|
|
||||||
|
hitems.move(idx, 0);
|
||||||
|
}
|
||||||
emit triggered(f);
|
emit triggered(f);
|
||||||
} else {
|
} else {
|
||||||
auto index = hitems.indexOf(send);
|
auto index = hitems.indexOf(send);
|
||||||
|
|
|
@ -286,6 +286,7 @@ ErrFile EditorView::newFile(size_t index) {
|
||||||
auto p = QHexDocument::fromMemory<QMemoryBuffer>(QByteArray(), false);
|
auto p = QHexDocument::fromMemory<QMemoryBuffer>(QByteArray(), false);
|
||||||
p->setDocSaved();
|
p->setDocSaved();
|
||||||
m_hex->setDocument(QSharedPointer<QHexDocument>(p));
|
m_hex->setDocument(QSharedPointer<QHexDocument>(p));
|
||||||
|
m_hex->cursor()->setInsertionMode(QHexCursor::InsertMode);
|
||||||
connectDocSavedFlag(this);
|
connectDocSavedFlag(this);
|
||||||
return ErrFile::Success;
|
return ErrFile::Success;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1556,8 +1556,10 @@ RibbonTabContent *MainWindow::buildViewPage(RibbonTabContent *tab) {
|
||||||
p->first, [this, layout]() { m_dock->restoreState(layout); }));
|
p->first, [this, layout]() { m_dock->restoreState(layout); }));
|
||||||
}
|
}
|
||||||
|
|
||||||
addPannelAction(pannel, QStringLiteral("layout"), tr("RestoreLayout"),
|
m_toolBtneditors.insert(
|
||||||
EMPTY_FUNC, {}, menu);
|
ToolButtonIndex::LAYOUT_ACTION,
|
||||||
|
addPannelAction(pannel, QStringLiteral("layout"),
|
||||||
|
tr("RestoreLayout"), EMPTY_FUNC, {}, menu));
|
||||||
|
|
||||||
addPannelAction(pannel, QStringLiteral("layoutexport"),
|
addPannelAction(pannel, QStringLiteral("layoutexport"),
|
||||||
tr("SaveLayout"), &MainWindow::on_saveLayout);
|
tr("SaveLayout"), &MainWindow::on_saveLayout);
|
||||||
|
@ -2807,14 +2809,27 @@ void MainWindow::on_fullScreen() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_saveLayout() {
|
void MainWindow::on_saveLayout() {
|
||||||
auto filename = WingFileDialog::getSaveFileName(
|
static auto suffix = QStringLiteral(".wing-layout");
|
||||||
this, tr("SaveLayout"), m_lastusedpath,
|
bool ok;
|
||||||
QStringLiteral("Layout (*.wing-layout)"));
|
auto fileID = WingInputDialog::getText(
|
||||||
if (!filename.isEmpty()) {
|
this, tr("SaveLayout"), tr("PleaseInput"), QLineEdit::Normal, {}, &ok);
|
||||||
QFile f(filename);
|
if (ok) {
|
||||||
|
auto layoutDir = LayoutManager::layoutDir();
|
||||||
|
QFile f(layoutDir.absoluteFilePath(fileID + suffix));
|
||||||
if (f.open(QFile::WriteOnly)) {
|
if (f.open(QFile::WriteOnly)) {
|
||||||
f.write(m_dock->saveState());
|
auto layout = m_dock->saveState();
|
||||||
|
f.write(layout);
|
||||||
f.close();
|
f.close();
|
||||||
|
|
||||||
|
// append saved layout
|
||||||
|
auto &lm = LayoutManager::instance();
|
||||||
|
auto menu =
|
||||||
|
m_toolBtneditors[ToolButtonIndex::LAYOUT_ACTION]->menu();
|
||||||
|
Q_ASSERT(menu);
|
||||||
|
menu->addAction(
|
||||||
|
newAction(lm.getSavedLayoutName(fileID),
|
||||||
|
[this, layout]() { m_dock->restoreState(layout); }));
|
||||||
|
|
||||||
Toast::toast(this, NAMEICONRES(QStringLiteral("layoutexport")),
|
Toast::toast(this, NAMEICONRES(QStringLiteral("layoutexport")),
|
||||||
tr("SaveLayoutSuccess"));
|
tr("SaveLayoutSuccess"));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -87,6 +87,7 @@ private:
|
||||||
UNDO_ACTION,
|
UNDO_ACTION,
|
||||||
REDO_ACTION,
|
REDO_ACTION,
|
||||||
OPEN_EXT,
|
OPEN_EXT,
|
||||||
|
LAYOUT_ACTION,
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -222,9 +223,11 @@ public:
|
||||||
bool ignoreMd5, bool isExport = false);
|
bool ignoreMd5, bool isExport = false);
|
||||||
ErrFile closeEditor(EditorView *editor, bool force);
|
ErrFile closeEditor(EditorView *editor, bool force);
|
||||||
|
|
||||||
IWingPlugin::FileType getEditorViewFileType(EditorView *view);
|
EditorView *currentEditor();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
IWingPlugin::FileType getEditorViewFileType(EditorView *view);
|
||||||
|
|
||||||
QString saveLog();
|
QString saveLog();
|
||||||
|
|
||||||
ads::CDockWidget *buildDockWidget(ads::CDockManager *dock,
|
ads::CDockWidget *buildDockWidget(ads::CDockManager *dock,
|
||||||
|
@ -250,7 +253,6 @@ private:
|
||||||
|
|
||||||
void setCurrentHexEditorScale(qreal rate);
|
void setCurrentHexEditorScale(qreal rate);
|
||||||
|
|
||||||
EditorView *currentEditor();
|
|
||||||
QHexView *currentHexView();
|
QHexView *currentHexView();
|
||||||
|
|
||||||
bool writeSafeCheck(bool isNewFile, const QString &savePath);
|
bool writeSafeCheck(bool isNewFile, const QString &savePath);
|
||||||
|
|
|
@ -119,7 +119,7 @@ PluginSystem::loadPlugin(const QFileInfo &fileinfo, const QDir &setdir) {
|
||||||
} else {
|
} else {
|
||||||
loadPlugin(p, meta.value(), setdir);
|
loadPlugin(p, meta.value(), setdir);
|
||||||
}
|
}
|
||||||
Logger::_log("");
|
Logger::newLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
|
@ -131,14 +131,17 @@ EditorView *PluginSystem::getCurrentPluginView(IWingPlugin *plg) {
|
||||||
if (plg == nullptr) {
|
if (plg == nullptr) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
if (!m_plgviewMap.contains(plg)) {
|
if (!m_plgCurrentfid.contains(plg)) {
|
||||||
return nullptr;
|
m_plgCurrentfid.insert(plg, -1);
|
||||||
}
|
}
|
||||||
auto view = m_plgviewMap.value(plg).first;
|
|
||||||
if (view == nullptr) {
|
auto fid = m_plgCurrentfid[plg];
|
||||||
view = _win->m_curEditor;
|
auto &plgview = m_plgviewMap[plg];
|
||||||
|
auto ctx = pluginContextById(plg, fid);
|
||||||
|
if (ctx) {
|
||||||
|
return ctx->view;
|
||||||
}
|
}
|
||||||
return view;
|
return _win->m_curEditor;
|
||||||
}
|
}
|
||||||
|
|
||||||
EditorView *PluginSystem::handle2EditorView(IWingPlugin *plg, int handle) {
|
EditorView *PluginSystem::handle2EditorView(IWingPlugin *plg, int handle) {
|
||||||
|
@ -146,14 +149,11 @@ EditorView *PluginSystem::handle2EditorView(IWingPlugin *plg, int handle) {
|
||||||
return getCurrentPluginView(plg);
|
return getCurrentPluginView(plg);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto handles = m_plgHandles.value(plg);
|
auto ctx = pluginContextById(plg, handle);
|
||||||
auto r = std::find_if(handles.begin(), handles.end(),
|
if (ctx) {
|
||||||
[handle](const QPair<int, EditorView *> &d) {
|
return ctx->view;
|
||||||
return d.first == handle;
|
|
||||||
});
|
|
||||||
if (r != handles.end()) {
|
|
||||||
return r->second;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,7 +164,13 @@ PluginSystem::assginHandleForPluginView(IWingPlugin *plg, EditorView *view) {
|
||||||
}
|
}
|
||||||
|
|
||||||
auto id = m_idGen.get();
|
auto id = m_idGen.get();
|
||||||
m_plgHandles[plg].append(qMakePair(id, view));
|
|
||||||
|
PluginFileContext context;
|
||||||
|
context.fid = id;
|
||||||
|
context.linkedplg = plg;
|
||||||
|
context.view = view;
|
||||||
|
|
||||||
|
m_plgviewMap[plg].append(context);
|
||||||
m_viewBindings[view].append(plg);
|
m_viewBindings[view].append(plg);
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
@ -173,14 +179,15 @@ PluginSystem::PluginInfo
|
||||||
PluginSystem::parsePluginMetadata(const QJsonObject &meta) {
|
PluginSystem::parsePluginMetadata(const QJsonObject &meta) {
|
||||||
PluginSystem::PluginInfo info;
|
PluginSystem::PluginInfo info;
|
||||||
|
|
||||||
info.id = meta["Id"].toString();
|
info.id = meta["Id"].toString().trimmed();
|
||||||
info.version = QVersionNumber::fromString(meta["Version"].toString());
|
info.version =
|
||||||
|
QVersionNumber::fromString(meta["Version"].toString().trimmed());
|
||||||
|
|
||||||
info.name = meta["Name"].toString();
|
info.name = meta["Name"].toString().trimmed();
|
||||||
info.vendor = meta["Vendor"].toString();
|
info.vendor = meta["Vendor"].toString().trimmed();
|
||||||
info.author = meta["Author"].toString();
|
info.author = meta["Author"].toString().trimmed();
|
||||||
info.license = meta["License"].toString();
|
info.license = meta["License"].toString().trimmed();
|
||||||
info.url = meta["Url"].toString();
|
info.url = meta["Url"].toString().trimmed();
|
||||||
|
|
||||||
auto dependsObj = meta["Dependencies"];
|
auto dependsObj = meta["Dependencies"];
|
||||||
if (!dependsObj.isNull()) {
|
if (!dependsObj.isNull()) {
|
||||||
|
@ -189,12 +196,12 @@ PluginSystem::parsePluginMetadata(const QJsonObject &meta) {
|
||||||
for (int i = 0; i < arr.size(); ++i) {
|
for (int i = 0; i < arr.size(); ++i) {
|
||||||
auto d = arr.at(i);
|
auto d = arr.at(i);
|
||||||
if (d.isObject()) {
|
if (d.isObject()) {
|
||||||
auto id = d["Id"].toString();
|
auto id = d["Id"].toString().trimmed();
|
||||||
if (id.isEmpty()) {
|
if (id.isEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
auto version =
|
auto version = QVersionNumber::fromString(
|
||||||
QVersionNumber::fromString(d["Version"].toString());
|
d["Version"].toString().trimmed());
|
||||||
WingDependency dp;
|
WingDependency dp;
|
||||||
dp.puid = id;
|
dp.puid = id;
|
||||||
dp.version = version;
|
dp.version = version;
|
||||||
|
@ -215,8 +222,11 @@ PluginSystem::checkPluginMetadata(const PluginInfo &meta, bool isPlg) {
|
||||||
return PluginStatus::InvalidID;
|
return PluginStatus::InvalidID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (meta.id.front().isDigit()) {
|
||||||
|
return PluginStatus::InvalidID;
|
||||||
|
}
|
||||||
auto r = std::find_if(meta.id.begin(), meta.id.end(), [](const QChar &ch) {
|
auto r = std::find_if(meta.id.begin(), meta.id.end(), [](const QChar &ch) {
|
||||||
return !ch.isLetterOrNumber();
|
return !ch.isLetterOrNumber() && ch != '_';
|
||||||
});
|
});
|
||||||
if (r != meta.id.end()) {
|
if (r != meta.id.end()) {
|
||||||
return PluginStatus::InvalidID;
|
return PluginStatus::InvalidID;
|
||||||
|
@ -242,35 +252,38 @@ bool PluginSystem::checkPluginCanOpenedFile(IWingPlugin *plg) {
|
||||||
if (plg == nullptr) {
|
if (plg == nullptr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return m_plgHandles[plg].size() <= UCHAR_MAX;
|
return m_plgviewMap[plg].size() <= UCHAR_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PluginSystem::checkPluginHasAlreadyOpened(IWingPlugin *plg,
|
bool PluginSystem::checkPluginHasAlreadyOpened(IWingPlugin *plg,
|
||||||
EditorView *view) {
|
EditorView *view) {
|
||||||
auto &maps = m_plgHandles[plg];
|
auto &maps = m_plgviewMap[plg];
|
||||||
auto ret = std::find_if(
|
auto ret = std::find_if(maps.begin(), maps.end(),
|
||||||
maps.begin(), maps.end(),
|
[view](const PluginFileContext &content) {
|
||||||
[view](const QPair<SharedUniqueId, EditorView *> &content) {
|
return content.view == view;
|
||||||
return content.second == view;
|
});
|
||||||
});
|
|
||||||
return ret != maps.end();
|
return ret != maps.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PluginSystem::cleanUpEditorViewHandle(EditorView *view) {
|
void PluginSystem::cleanUpEditorViewHandle(EditorView *view) {
|
||||||
if (m_viewBindings.contains(view)) {
|
if (m_viewBindings.contains(view)) {
|
||||||
auto v = m_viewBindings.value(view);
|
auto v = m_viewBindings[view];
|
||||||
|
|
||||||
// clean up
|
// clean up
|
||||||
for (auto &plg : v) {
|
for (auto &plg : v) {
|
||||||
auto handles = m_plgHandles.value(plg);
|
auto &handles = m_plgviewMap[plg];
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
handles.erase(std::remove_if(
|
handles.erase(std::remove_if(
|
||||||
handles.begin(), handles.end(),
|
handles.begin(), handles.end(),
|
||||||
[view, plg, this](const QPair<int, EditorView *> &v) {
|
[view, this](const PluginFileContext &v) {
|
||||||
if (v.second == view) {
|
if (v.view == view) {
|
||||||
|
if (v.fid == m_plgCurrentfid[v.linkedplg]) {
|
||||||
|
m_plgCurrentfid[v.linkedplg] = -1;
|
||||||
|
}
|
||||||
dispatchEvent(
|
dispatchEvent(
|
||||||
IWingPlugin::RegisteredEvent::PluginFileClosed,
|
IWingPlugin::RegisteredEvent::PluginFileClosed,
|
||||||
{quintptr(plg), v.second->fileName(), v.first,
|
{quintptr(v.linkedplg), v.view->fileName(),
|
||||||
|
int(v.fid),
|
||||||
QVariant::fromValue(
|
QVariant::fromValue(
|
||||||
_win->getEditorViewFileType(view))});
|
_win->getEditorViewFileType(view))});
|
||||||
return true;
|
return true;
|
||||||
|
@ -279,68 +292,78 @@ void PluginSystem::cleanUpEditorViewHandle(EditorView *view) {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
#else
|
#else
|
||||||
handles.removeIf(
|
handles.removeIf([view, this](const PluginFileContext &v) {
|
||||||
[view, plg, this](const QPair<int, EditorView *> &v) {
|
if (v.view == view) {
|
||||||
if (v.second == view) {
|
if (v.fid == m_plgCurrentfid[v.linkedplg]) {
|
||||||
dispatchEvent(
|
m_plgCurrentfid[v.linkedplg] = -1;
|
||||||
IWingPlugin::RegisteredEvent::PluginFileClosed,
|
|
||||||
{quintptr(plg), v.second->fileName(), v.first,
|
|
||||||
QVariant::fromValue(
|
|
||||||
_win->getEditorViewFileType(view))});
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
dispatchEvent(
|
||||||
});
|
IWingPlugin::RegisteredEvent::PluginFileClosed,
|
||||||
|
{quintptr(v.linkedplg), v.view->fileName(), int(v.fid),
|
||||||
|
QVariant::fromValue(
|
||||||
|
_win->getEditorViewFileType(view))});
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
m_viewBindings.remove(view);
|
m_viewBindings.remove(view);
|
||||||
|
|
||||||
// TODO cleanup
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PluginSystem::closeEditor(IWingPlugin *plg, int handle, bool force) {
|
bool PluginSystem::closeEditor(IWingPlugin *plg, int handle, bool force) {
|
||||||
if (handle > 0) {
|
if (handle >= 0) {
|
||||||
auto &handles = m_plgHandles[plg];
|
auto &handles = m_plgviewMap[plg];
|
||||||
auto r = std::find_if(
|
auto r = std::find_if(handles.begin(), handles.end(),
|
||||||
handles.begin(), handles.end(),
|
[handle](const PluginFileContext &d) {
|
||||||
[handle](const QPair<SharedUniqueId, EditorView *> &d) {
|
return (*d.fid) == handle;
|
||||||
return (*d.first) == handle;
|
});
|
||||||
});
|
|
||||||
if (r == handles.end()) {
|
if (r == handles.end()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto &bind = m_viewBindings[r->second];
|
auto &bind = m_viewBindings[r->view];
|
||||||
|
bind.removeOne(plg);
|
||||||
if (bind.isEmpty()) {
|
if (bind.isEmpty()) {
|
||||||
_win->closeEditor(r->second, force);
|
_win->closeEditor(r->view, force);
|
||||||
|
m_viewBindings.remove(r->view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_plgCurrentfid[plg] == handle) {
|
||||||
|
m_plgCurrentfid[plg] = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
handles.erase(r);
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_plgviewMap.remove(plg);
|
|
||||||
m_plgHandles.remove(plg);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PluginSystem::closeHandle(IWingPlugin *plg, int handle) {
|
bool PluginSystem::closeHandle(IWingPlugin *plg, int handle) {
|
||||||
if (handle < 1) {
|
if (handle < 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
auto &handles = m_plgHandles[plg];
|
auto &handles = m_plgviewMap[plg];
|
||||||
auto r =
|
auto r = std::find_if(
|
||||||
std::find_if(handles.begin(), handles.end(),
|
handles.begin(), handles.end(),
|
||||||
[handle](const QPair<SharedUniqueId, EditorView *> &d) {
|
[handle](const PluginFileContext &d) { return (*d.fid) == handle; });
|
||||||
return (*d.first) == handle;
|
|
||||||
});
|
|
||||||
if (r == handles.end()) {
|
if (r == handles.end()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto &bind = m_viewBindings[r->second];
|
auto &bind = m_viewBindings[r->view];
|
||||||
bind.removeOne(plg);
|
bind.removeOne(plg);
|
||||||
|
if (bind.isEmpty()) {
|
||||||
|
m_viewBindings.remove(r->view);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_plgCurrentfid[plg] == handle) {
|
||||||
|
m_plgCurrentfid[plg] = -1;
|
||||||
|
}
|
||||||
|
handles.erase(r);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -510,6 +533,7 @@ void PluginSystem::loadExtPlugin() {
|
||||||
plugindir.setNameFilters({"*.wingplg"});
|
plugindir.setNameFilters({"*.wingplg"});
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Logger::newLine();
|
||||||
checkDirRootSafe(plugindir);
|
checkDirRootSafe(plugindir);
|
||||||
|
|
||||||
auto plgs = plugindir.entryInfoList();
|
auto plgs = plugindir.entryInfoList();
|
||||||
|
@ -541,7 +565,8 @@ void PluginSystem::loadExtPlugin() {
|
||||||
|
|
||||||
if (!_lazyplgs.isEmpty()) {
|
if (!_lazyplgs.isEmpty()) {
|
||||||
Logger::critical(tr("PluginLoadingFailedSummary"));
|
Logger::critical(tr("PluginLoadingFailedSummary"));
|
||||||
Logger::_log({});
|
Logger::newLine();
|
||||||
|
|
||||||
for (auto &lplg : errorplg) {
|
for (auto &lplg : errorplg) {
|
||||||
Logger::critical(tr("- PluginName:") + lplg.name);
|
Logger::critical(tr("- PluginName:") + lplg.name);
|
||||||
Logger::critical(tr("- Dependencies:"));
|
Logger::critical(tr("- Dependencies:"));
|
||||||
|
@ -572,6 +597,7 @@ void PluginSystem::loadDevicePlugin() {
|
||||||
devdir.setNameFilters({"*.wingdrv"});
|
devdir.setNameFilters({"*.wingdrv"});
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Logger::newLine();
|
||||||
checkDirRootSafe(devdir);
|
checkDirRootSafe(devdir);
|
||||||
|
|
||||||
auto plgs = devdir.entryInfoList();
|
auto plgs = devdir.entryInfoList();
|
||||||
|
@ -840,6 +866,10 @@ void PluginSystem::loadPlugin(IWingPlugin *p, PluginInfo &meta,
|
||||||
|
|
||||||
emit pluginLoading(p->pluginName());
|
emit pluginLoading(p->pluginName());
|
||||||
|
|
||||||
|
if (meta.name.isEmpty()) {
|
||||||
|
meta.name = p->metaObject()->className();
|
||||||
|
}
|
||||||
|
|
||||||
p_tr = LanguageManager::instance().try2LoadPluginLang(meta.name);
|
p_tr = LanguageManager::instance().try2LoadPluginLang(meta.name);
|
||||||
|
|
||||||
connectLoadingInterface(p);
|
connectLoadingInterface(p);
|
||||||
|
@ -950,7 +980,9 @@ void PluginSystem::loadPlugin(IWingPlugin *p, PluginInfo &meta,
|
||||||
registerEvents(p);
|
registerEvents(p);
|
||||||
connectInterface(p);
|
connectInterface(p);
|
||||||
|
|
||||||
m_plgviewMap.insert(p, qMakePair(nullptr, nullptr));
|
// prepare for file contenxt
|
||||||
|
m_plgviewMap.insert(p, {});
|
||||||
|
m_plgCurrentfid.insert(p, -1);
|
||||||
} catch (const QString &error) {
|
} catch (const QString &error) {
|
||||||
Logger::critical(error);
|
Logger::critical(error);
|
||||||
if (p_tr) {
|
if (p_tr) {
|
||||||
|
@ -980,6 +1012,9 @@ void PluginSystem::loadPlugin(IWingDevice *p, PluginInfo &meta,
|
||||||
Logger::warning(tr("ExtPluginAuthor :") + meta.author);
|
Logger::warning(tr("ExtPluginAuthor :") + meta.author);
|
||||||
Logger::warning(tr("ExtPluginWidgetRegister"));
|
Logger::warning(tr("ExtPluginWidgetRegister"));
|
||||||
|
|
||||||
|
if (meta.name.isEmpty()) {
|
||||||
|
meta.name = p->metaObject()->className();
|
||||||
|
}
|
||||||
p_tr = LanguageManager::instance().try2LoadPluginLang(meta.name);
|
p_tr = LanguageManager::instance().try2LoadPluginLang(meta.name);
|
||||||
|
|
||||||
connectLoadingInterface(p);
|
connectLoadingInterface(p);
|
||||||
|
@ -1616,18 +1651,12 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (handle < 0) {
|
if (handle < 0) {
|
||||||
m_plgviewMap[plg].first = nullptr;
|
m_plgCurrentfid[plg] = -1;
|
||||||
} else {
|
} else {
|
||||||
auto handles = m_plgHandles.value(plg);
|
auto ctx = pluginContextById(plg, handle);
|
||||||
auto ret = std::find_if(
|
if (ctx) {
|
||||||
handles.begin(), handles.end(),
|
m_plgCurrentfid[plg] = handle;
|
||||||
[handle](const QPair<int, EditorView *> &v) {
|
|
||||||
return v.first == handle;
|
|
||||||
});
|
|
||||||
if (ret == handles.end()) {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
m_plgviewMap[plg].first = ret->second;
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
@ -1641,22 +1670,16 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
auto cur = _win->m_curEditor;
|
auto cur = _win->m_curEditor;
|
||||||
if (cur) {
|
if (cur) {
|
||||||
cur->raise();
|
cur->raise();
|
||||||
} else {
|
return true;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
auto handles = m_plgHandles.value(plg);
|
auto ctx = pluginContextById(plg, handle);
|
||||||
auto ret = std::find_if(
|
if (ctx) {
|
||||||
handles.begin(), handles.end(),
|
ctx->view->raise();
|
||||||
[handle](const QPair<int, EditorView *> &v) {
|
return true;
|
||||||
return v.first == handle;
|
|
||||||
});
|
|
||||||
if (ret == handles.end()) {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
ret->second->raise();
|
|
||||||
}
|
}
|
||||||
return true;
|
return false;
|
||||||
});
|
});
|
||||||
connect(pctl, &WingPlugin::Controller::setLockedFile, _win,
|
connect(pctl, &WingPlugin::Controller::setLockedFile, _win,
|
||||||
[=](bool b) -> bool {
|
[=](bool b) -> bool {
|
||||||
|
@ -1730,43 +1753,40 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
});
|
});
|
||||||
connect(pctl, &WingPlugin::Controller::beginMarco, _win,
|
connect(pctl, &WingPlugin::Controller::beginMarco, _win,
|
||||||
[=](const QString &txt) -> bool {
|
[=](const QString &txt) -> bool {
|
||||||
QPair<EditorView *, QUndoCommand *> empty;
|
auto fid = m_plgCurrentfid[plg];
|
||||||
auto e = m_plgviewMap.value(plg, empty).first;
|
if (fid < 0) {
|
||||||
if (e) {
|
return false;
|
||||||
auto &info = m_plgviewMap[plg];
|
|
||||||
if (info.second) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
info.second = new QUndoCommand(txt);
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
|
auto r = pluginContextByIdIt(plg, fid);
|
||||||
|
if (r) {
|
||||||
|
(*r)->cmd = new QUndoCommand;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
});
|
});
|
||||||
connect(pctl, &WingPlugin::Controller::endMarco, _win, [=]() -> bool {
|
connect(pctl, &WingPlugin::Controller::endMarco, _win, [=]() -> bool {
|
||||||
auto e = m_plgviewMap.value(plg).first;
|
auto fid = m_plgCurrentfid[plg];
|
||||||
if (e) {
|
if (fid < 0) {
|
||||||
auto &info = m_plgviewMap[plg];
|
|
||||||
if (info.second) {
|
|
||||||
e->hexEditor()->document()->pushMakeUndo(info.second);
|
|
||||||
info.second = nullptr;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto &info = m_plgviewMap[plg];
|
||||||
|
auto &e = info[fid];
|
||||||
|
if (e.cmd) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
connect(pctl, &WingPlugin::Controller::insertBytes, _win,
|
connect(pctl, &WingPlugin::Controller::insertBytes, _win,
|
||||||
[=](qsizetype offset, const QByteArray &data) -> bool {
|
[=](qsizetype offset, const QByteArray &data) -> bool {
|
||||||
QPair<EditorView *, QUndoCommand *> empty{nullptr, nullptr};
|
auto e = getCurrentPluginView(plg);
|
||||||
auto mapitem = m_plgviewMap.value(plg, empty);
|
|
||||||
auto e = mapitem.first;
|
|
||||||
if (e) {
|
if (e) {
|
||||||
auto editor = e->hexEditor();
|
auto editor = e->hexEditor();
|
||||||
auto doc = editor->document();
|
auto doc = editor->document();
|
||||||
Q_ASSERT(m_plgviewMap.contains(plg));
|
auto uc = pluginCurrentUndoCmd(plg);
|
||||||
auto cmd = doc->MakeInsert(mapitem.second, editor->cursor(),
|
auto cmd =
|
||||||
offset, data);
|
doc->MakeInsert(uc, editor->cursor(), offset, data);
|
||||||
if (mapitem.second == nullptr && cmd) {
|
if (uc == nullptr && cmd) {
|
||||||
_rwlock.lockForWrite();
|
_rwlock.lockForWrite();
|
||||||
doc->pushMakeUndo(cmd);
|
doc->pushMakeUndo(cmd);
|
||||||
_rwlock.unlock();
|
_rwlock.unlock();
|
||||||
|
@ -1778,15 +1798,14 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
connect(pctl, &WingPlugin::Controller::writeBytes, _win,
|
connect(pctl, &WingPlugin::Controller::writeBytes, _win,
|
||||||
[=](qsizetype offset, const QByteArray &data) -> bool {
|
[=](qsizetype offset, const QByteArray &data) -> bool {
|
||||||
QPair<EditorView *, QUndoCommand *> empty{nullptr, nullptr};
|
QPair<EditorView *, QUndoCommand *> empty{nullptr, nullptr};
|
||||||
auto mapitem = m_plgviewMap.value(plg, empty);
|
auto e = getCurrentPluginView(plg);
|
||||||
auto e = mapitem.first;
|
|
||||||
if (e) {
|
if (e) {
|
||||||
auto editor = e->hexEditor();
|
auto editor = e->hexEditor();
|
||||||
auto doc = editor->document();
|
auto doc = editor->document();
|
||||||
Q_ASSERT(m_plgviewMap.contains(plg));
|
auto uc = pluginCurrentUndoCmd(plg);
|
||||||
auto cmd = doc->MakeReplace(mapitem.second,
|
auto cmd =
|
||||||
editor->cursor(), offset, data);
|
doc->MakeReplace(uc, editor->cursor(), offset, data);
|
||||||
if (mapitem.second == nullptr && cmd) {
|
if (uc == nullptr && cmd) {
|
||||||
_rwlock.lockForWrite();
|
_rwlock.lockForWrite();
|
||||||
doc->pushMakeUndo(cmd);
|
doc->pushMakeUndo(cmd);
|
||||||
_rwlock.unlock();
|
_rwlock.unlock();
|
||||||
|
@ -1824,9 +1843,7 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
connect(pctl, &WingPlugin::Controller::insertString, _win,
|
connect(pctl, &WingPlugin::Controller::insertString, _win,
|
||||||
[=](qsizetype offset, const QString &value,
|
[=](qsizetype offset, const QString &value,
|
||||||
const QString &encoding) -> bool {
|
const QString &encoding) -> bool {
|
||||||
QPair<EditorView *, QUndoCommand *> empty{nullptr, nullptr};
|
auto e = getCurrentPluginView(plg);
|
||||||
auto mapitem = m_plgviewMap.value(plg, empty);
|
|
||||||
auto e = mapitem.first;
|
|
||||||
if (e) {
|
if (e) {
|
||||||
auto editor = e->hexEditor();
|
auto editor = e->hexEditor();
|
||||||
auto doc = editor->document();
|
auto doc = editor->document();
|
||||||
|
@ -1838,10 +1855,10 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
auto unicode = Utilities::encodingString(value, enco);
|
auto unicode = Utilities::encodingString(value, enco);
|
||||||
|
auto uc = pluginCurrentUndoCmd(plg);
|
||||||
auto cmd = doc->MakeInsert(mapitem.second, editor->cursor(),
|
auto cmd =
|
||||||
offset, unicode);
|
doc->MakeInsert(uc, editor->cursor(), offset, unicode);
|
||||||
if (mapitem.second == nullptr && cmd) {
|
if (uc == nullptr && cmd) {
|
||||||
_rwlock.lockForWrite();
|
_rwlock.lockForWrite();
|
||||||
doc->pushMakeUndo(cmd);
|
doc->pushMakeUndo(cmd);
|
||||||
_rwlock.unlock();
|
_rwlock.unlock();
|
||||||
|
@ -1879,9 +1896,7 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
connect(pctl, &WingPlugin::Controller::writeString, _win,
|
connect(pctl, &WingPlugin::Controller::writeString, _win,
|
||||||
[=](qsizetype offset, const QString &value,
|
[=](qsizetype offset, const QString &value,
|
||||||
const QString &encoding) -> bool {
|
const QString &encoding) -> bool {
|
||||||
QPair<EditorView *, QUndoCommand *> empty{nullptr, nullptr};
|
auto e = getCurrentPluginView(plg);
|
||||||
auto mapitem = m_plgviewMap.value(plg, empty);
|
|
||||||
auto e = mapitem.first;
|
|
||||||
if (e) {
|
if (e) {
|
||||||
auto editor = e->hexEditor();
|
auto editor = e->hexEditor();
|
||||||
auto doc = editor->document();
|
auto doc = editor->document();
|
||||||
|
@ -1893,10 +1908,10 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
auto unicode = Utilities::encodingString(value, enco);
|
auto unicode = Utilities::encodingString(value, enco);
|
||||||
|
auto uc = pluginCurrentUndoCmd(plg);
|
||||||
auto cmd = doc->MakeReplace(
|
auto cmd =
|
||||||
mapitem.second, editor->cursor(), offset, unicode);
|
doc->MakeReplace(uc, editor->cursor(), offset, unicode);
|
||||||
if (mapitem.second == nullptr && cmd) {
|
if (uc == nullptr && cmd) {
|
||||||
_rwlock.lockForWrite();
|
_rwlock.lockForWrite();
|
||||||
doc->pushMakeUndo(cmd);
|
doc->pushMakeUndo(cmd);
|
||||||
_rwlock.unlock();
|
_rwlock.unlock();
|
||||||
|
@ -1932,9 +1947,7 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
});
|
});
|
||||||
connect(pctl, &WingPlugin::Controller::appendString, _win,
|
connect(pctl, &WingPlugin::Controller::appendString, _win,
|
||||||
[=](const QString &value, const QString &encoding) -> bool {
|
[=](const QString &value, const QString &encoding) -> bool {
|
||||||
QPair<EditorView *, QUndoCommand *> empty{nullptr, nullptr};
|
auto e = getCurrentPluginView(plg);
|
||||||
auto mapitem = m_plgviewMap.value(plg, empty);
|
|
||||||
auto e = mapitem.first;
|
|
||||||
if (e) {
|
if (e) {
|
||||||
auto editor = e->hexEditor();
|
auto editor = e->hexEditor();
|
||||||
auto doc = editor->document();
|
auto doc = editor->document();
|
||||||
|
@ -1947,10 +1960,10 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
auto unicode = Utilities::encodingString(value, enco);
|
auto unicode = Utilities::encodingString(value, enco);
|
||||||
Q_ASSERT(m_plgviewMap.contains(plg));
|
auto uc = pluginCurrentUndoCmd(plg);
|
||||||
auto cmd = doc->MakeInsert(mapitem.second, editor->cursor(),
|
auto cmd =
|
||||||
offset, unicode);
|
doc->MakeInsert(uc, editor->cursor(), offset, unicode);
|
||||||
if (mapitem.second == nullptr && cmd) {
|
if (uc == nullptr && cmd) {
|
||||||
_rwlock.lockForWrite();
|
_rwlock.lockForWrite();
|
||||||
doc->pushMakeUndo(cmd);
|
doc->pushMakeUndo(cmd);
|
||||||
_rwlock.unlock();
|
_rwlock.unlock();
|
||||||
|
@ -1962,17 +1975,15 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
|
|
||||||
connect(pctl, &WingPlugin::Controller::remove, _win,
|
connect(pctl, &WingPlugin::Controller::remove, _win,
|
||||||
[=](qsizetype offset, qsizetype len) -> bool {
|
[=](qsizetype offset, qsizetype len) -> bool {
|
||||||
QPair<EditorView *, QUndoCommand *> empty{nullptr, nullptr};
|
auto e = getCurrentPluginView(plg);
|
||||||
auto mapitem = m_plgviewMap.value(plg, empty);
|
|
||||||
auto e = mapitem.first;
|
|
||||||
if (e) {
|
if (e) {
|
||||||
auto editor = e->hexEditor();
|
auto editor = e->hexEditor();
|
||||||
auto doc = editor->document();
|
auto doc = editor->document();
|
||||||
|
|
||||||
Q_ASSERT(m_plgviewMap.contains(plg));
|
auto uc = pluginCurrentUndoCmd(plg);
|
||||||
auto cmd = doc->MakeRemove(mapitem.second, editor->cursor(),
|
auto cmd =
|
||||||
offset, len);
|
doc->MakeRemove(uc, editor->cursor(), offset, len);
|
||||||
if (mapitem.second == nullptr && cmd) {
|
if (uc == nullptr && cmd) {
|
||||||
_rwlock.lockForWrite();
|
_rwlock.lockForWrite();
|
||||||
doc->pushMakeUndo(cmd);
|
doc->pushMakeUndo(cmd);
|
||||||
_rwlock.unlock();
|
_rwlock.unlock();
|
||||||
|
@ -1982,18 +1993,15 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
connect(pctl, &WingPlugin::Controller::removeAllBytes, _win, [=]() -> bool {
|
connect(pctl, &WingPlugin::Controller::removeAllBytes, _win, [=]() -> bool {
|
||||||
QPair<EditorView *, QUndoCommand *> empty{nullptr, nullptr};
|
auto e = getCurrentPluginView(plg);
|
||||||
auto mapitem = m_plgviewMap.value(plg, empty);
|
|
||||||
auto e = mapitem.first;
|
|
||||||
if (e) {
|
if (e) {
|
||||||
auto editor = e->hexEditor();
|
auto editor = e->hexEditor();
|
||||||
auto doc = editor->document();
|
auto doc = editor->document();
|
||||||
auto len = doc->length();
|
auto len = doc->length();
|
||||||
|
|
||||||
Q_ASSERT(m_plgviewMap.contains(plg));
|
auto uc = pluginCurrentUndoCmd(plg);
|
||||||
auto cmd =
|
auto cmd = doc->MakeRemove(uc, editor->cursor(), 0, len);
|
||||||
doc->MakeRemove(mapitem.second, editor->cursor(), 0, len);
|
if (uc == nullptr && cmd) {
|
||||||
if (mapitem.second == nullptr && cmd) {
|
|
||||||
_rwlock.lockForWrite();
|
_rwlock.lockForWrite();
|
||||||
doc->pushMakeUndo(cmd);
|
doc->pushMakeUndo(cmd);
|
||||||
_rwlock.unlock();
|
_rwlock.unlock();
|
||||||
|
@ -2086,11 +2094,10 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
if (e) {
|
if (e) {
|
||||||
auto doc = e->hexEditor()->document();
|
auto doc = e->hexEditor()->document();
|
||||||
|
|
||||||
Q_ASSERT(m_plgviewMap.contains(plg));
|
auto uc = pluginCurrentUndoCmd(plg);
|
||||||
auto cmd = doc->metadata()->MakeMetadata(
|
auto cmd = doc->metadata()->MakeMetadata(
|
||||||
m_plgviewMap[plg].second, begin, begin + length,
|
uc, begin, begin + length, fgcolor, bgcolor, comment);
|
||||||
fgcolor, bgcolor, comment);
|
if (uc == nullptr && cmd) {
|
||||||
if (cmd) {
|
|
||||||
doc->pushMakeUndo(cmd);
|
doc->pushMakeUndo(cmd);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2105,10 +2112,9 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
auto e = pluginCurrentEditor(plg);
|
auto e = pluginCurrentEditor(plg);
|
||||||
if (e) {
|
if (e) {
|
||||||
auto doc = e->hexEditor()->document();
|
auto doc = e->hexEditor()->document();
|
||||||
Q_ASSERT(m_plgviewMap.contains(plg));
|
auto uc = pluginCurrentUndoCmd(plg);
|
||||||
auto cmd = doc->metadata()->MakeRemoveMetadata(
|
auto cmd = doc->metadata()->MakeRemoveMetadata(uc, offset);
|
||||||
m_plgviewMap[plg].second, offset);
|
if (uc == nullptr && cmd) {
|
||||||
if (cmd) {
|
|
||||||
doc->pushMakeUndo(cmd);
|
doc->pushMakeUndo(cmd);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2122,9 +2128,9 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
auto e = pluginCurrentEditor(plg);
|
auto e = pluginCurrentEditor(plg);
|
||||||
if (e) {
|
if (e) {
|
||||||
auto doc = e->hexEditor()->document();
|
auto doc = e->hexEditor()->document();
|
||||||
Q_ASSERT(m_plgviewMap.contains(plg));
|
auto uc = pluginCurrentUndoCmd(plg);
|
||||||
auto cmd = doc->metadata()->MakeClear(m_plgviewMap[plg].second);
|
auto cmd = doc->metadata()->MakeClear(uc);
|
||||||
if (cmd) {
|
if (uc == nullptr && cmd) {
|
||||||
doc->pushMakeUndo(cmd);
|
doc->pushMakeUndo(cmd);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2140,11 +2146,10 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
auto e = pluginCurrentEditor(plg);
|
auto e = pluginCurrentEditor(plg);
|
||||||
if (e) {
|
if (e) {
|
||||||
auto doc = e->hexEditor()->document();
|
auto doc = e->hexEditor()->document();
|
||||||
Q_ASSERT(m_plgviewMap.contains(plg));
|
auto uc = pluginCurrentUndoCmd(plg);
|
||||||
auto cmd = doc->metadata()->MakeComment(
|
auto cmd = doc->metadata()->MakeComment(
|
||||||
m_plgviewMap[plg].second, begin, begin + length,
|
uc, begin, begin + length, comment);
|
||||||
comment);
|
if (uc == nullptr && cmd) {
|
||||||
if (cmd) {
|
|
||||||
doc->pushMakeUndo(cmd);
|
doc->pushMakeUndo(cmd);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2160,10 +2165,10 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
auto e = pluginCurrentEditor(plg);
|
auto e = pluginCurrentEditor(plg);
|
||||||
if (e) {
|
if (e) {
|
||||||
auto doc = e->hexEditor()->document();
|
auto doc = e->hexEditor()->document();
|
||||||
Q_ASSERT(m_plgviewMap.contains(plg));
|
auto uc = pluginCurrentUndoCmd(plg);
|
||||||
auto cmd = doc->metadata()->MakeForeground(
|
auto cmd = doc->metadata()->MakeForeground(
|
||||||
m_plgviewMap[plg].second, begin, begin + length, fgcolor);
|
uc, begin, begin + length, fgcolor);
|
||||||
if (cmd) {
|
if (uc == nullptr && cmd) {
|
||||||
doc->pushMakeUndo(cmd);
|
doc->pushMakeUndo(cmd);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2179,10 +2184,10 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
auto e = pluginCurrentEditor(plg);
|
auto e = pluginCurrentEditor(plg);
|
||||||
if (e) {
|
if (e) {
|
||||||
auto doc = e->hexEditor()->document();
|
auto doc = e->hexEditor()->document();
|
||||||
Q_ASSERT(m_plgviewMap.contains(plg));
|
auto uc = pluginCurrentUndoCmd(plg);
|
||||||
auto cmd = doc->metadata()->MakeBackground(
|
auto cmd = doc->metadata()->MakeBackground(
|
||||||
m_plgviewMap[plg].second, begin, begin + length, bgcolor);
|
uc, begin, begin + length, bgcolor);
|
||||||
if (cmd) {
|
if (uc == nullptr && cmd) {
|
||||||
doc->pushMakeUndo(cmd);
|
doc->pushMakeUndo(cmd);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2263,10 +2268,9 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
auto e = pluginCurrentEditor(plg);
|
auto e = pluginCurrentEditor(plg);
|
||||||
if (e) {
|
if (e) {
|
||||||
auto doc = e->hexEditor()->document();
|
auto doc = e->hexEditor()->document();
|
||||||
Q_ASSERT(m_plgviewMap.contains(plg));
|
auto uc = pluginCurrentUndoCmd(plg);
|
||||||
auto cmd = doc->MakeAddBookMark(m_plgviewMap[plg].second,
|
auto cmd = doc->MakeAddBookMark(uc, pos, comment);
|
||||||
pos, comment);
|
if (uc == nullptr && cmd) {
|
||||||
if (cmd) {
|
|
||||||
doc->pushMakeUndo(cmd);
|
doc->pushMakeUndo(cmd);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2281,10 +2285,9 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
auto e = pluginCurrentEditor(plg);
|
auto e = pluginCurrentEditor(plg);
|
||||||
if (e) {
|
if (e) {
|
||||||
auto doc = e->hexEditor()->document();
|
auto doc = e->hexEditor()->document();
|
||||||
Q_ASSERT(m_plgviewMap.contains(plg));
|
auto uc = pluginCurrentUndoCmd(plg);
|
||||||
auto cmd = doc->MakeModBookMark(m_plgviewMap[plg].second,
|
auto cmd = doc->MakeModBookMark(uc, pos, comment);
|
||||||
pos, comment);
|
if (uc == nullptr && cmd) {
|
||||||
if (cmd) {
|
|
||||||
doc->pushMakeUndo(cmd);
|
doc->pushMakeUndo(cmd);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2299,10 +2302,9 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
auto e = pluginCurrentEditor(plg);
|
auto e = pluginCurrentEditor(plg);
|
||||||
if (e) {
|
if (e) {
|
||||||
auto doc = e->hexEditor()->document();
|
auto doc = e->hexEditor()->document();
|
||||||
Q_ASSERT(m_plgviewMap.contains(plg));
|
auto uc = pluginCurrentUndoCmd(plg);
|
||||||
auto cmd =
|
auto cmd = doc->MakeRemoveBookMark(uc, pos);
|
||||||
doc->MakeRemoveBookMark(m_plgviewMap[plg].second, pos);
|
if (uc == nullptr && cmd) {
|
||||||
if (cmd) {
|
|
||||||
doc->pushMakeUndo(cmd);
|
doc->pushMakeUndo(cmd);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2316,9 +2318,9 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
auto e = pluginCurrentEditor(plg);
|
auto e = pluginCurrentEditor(plg);
|
||||||
if (e) {
|
if (e) {
|
||||||
auto doc = e->hexEditor()->document();
|
auto doc = e->hexEditor()->document();
|
||||||
Q_ASSERT(m_plgviewMap.contains(plg));
|
auto uc = pluginCurrentUndoCmd(plg);
|
||||||
auto cmd = doc->MakeClearBookMark(m_plgviewMap[plg].second);
|
auto cmd = doc->MakeClearBookMark(uc);
|
||||||
if (cmd) {
|
if (uc == nullptr && cmd) {
|
||||||
doc->pushMakeUndo(cmd);
|
doc->pushMakeUndo(cmd);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2337,9 +2339,7 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
auto view = _win->newfileGUI();
|
auto view = _win->newfileGUI();
|
||||||
if (view) {
|
if (view) {
|
||||||
auto id = assginHandleForPluginView(plg, view);
|
auto id = assginHandleForPluginView(plg, view);
|
||||||
auto &info = m_plgviewMap[plg];
|
m_plgCurrentfid[plg] = id;
|
||||||
info.first = view;
|
|
||||||
info.second = nullptr;
|
|
||||||
return ErrFile(int(*id));
|
return ErrFile(int(*id));
|
||||||
} else {
|
} else {
|
||||||
return ErrFile::Error;
|
return ErrFile::Error;
|
||||||
|
@ -2361,9 +2361,7 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
return ErrFile::AlreadyOpened;
|
return ErrFile::AlreadyOpened;
|
||||||
}
|
}
|
||||||
auto id = assginHandleForPluginView(plg, view);
|
auto id = assginHandleForPluginView(plg, view);
|
||||||
auto &info = m_plgviewMap[plg];
|
m_plgCurrentfid[plg] = id;
|
||||||
info.first = view;
|
|
||||||
info.second = nullptr;
|
|
||||||
return ErrFile(int(*id));
|
return ErrFile(int(*id));
|
||||||
} else {
|
} else {
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -2386,9 +2384,7 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
return ErrFile::AlreadyOpened;
|
return ErrFile::AlreadyOpened;
|
||||||
}
|
}
|
||||||
auto id = assginHandleForPluginView(plg, view);
|
auto id = assginHandleForPluginView(plg, view);
|
||||||
auto &info = m_plgviewMap[plg];
|
m_plgCurrentfid[plg] = id;
|
||||||
info.first = view;
|
|
||||||
info.second = nullptr;
|
|
||||||
|
|
||||||
PluginSystem::instance().dispatchEvent(
|
PluginSystem::instance().dispatchEvent(
|
||||||
IWingPlugin::RegisteredEvent::PluginFileOpened,
|
IWingPlugin::RegisteredEvent::PluginFileOpened,
|
||||||
|
@ -2418,9 +2414,7 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
return ErrFile::AlreadyOpened;
|
return ErrFile::AlreadyOpened;
|
||||||
}
|
}
|
||||||
auto id = assginHandleForPluginView(plg, view);
|
auto id = assginHandleForPluginView(plg, view);
|
||||||
auto &info = m_plgviewMap[plg];
|
m_plgCurrentfid[plg] = id;
|
||||||
info.first = view;
|
|
||||||
info.second = nullptr;
|
|
||||||
|
|
||||||
PluginSystem::instance().dispatchEvent(
|
PluginSystem::instance().dispatchEvent(
|
||||||
IWingPlugin::RegisteredEvent::PluginFileOpened,
|
IWingPlugin::RegisteredEvent::PluginFileOpened,
|
||||||
|
@ -2450,9 +2444,7 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
return ErrFile::AlreadyOpened;
|
return ErrFile::AlreadyOpened;
|
||||||
}
|
}
|
||||||
auto id = assginHandleForPluginView(plg, view);
|
auto id = assginHandleForPluginView(plg, view);
|
||||||
auto &info = m_plgviewMap[plg];
|
m_plgCurrentfid[plg] = id;
|
||||||
info.first = view;
|
|
||||||
info.second = nullptr;
|
|
||||||
|
|
||||||
PluginSystem::instance().dispatchEvent(
|
PluginSystem::instance().dispatchEvent(
|
||||||
IWingPlugin::RegisteredEvent::PluginFileOpened,
|
IWingPlugin::RegisteredEvent::PluginFileOpened,
|
||||||
|
@ -2481,9 +2473,7 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
return ErrFile::AlreadyOpened;
|
return ErrFile::AlreadyOpened;
|
||||||
}
|
}
|
||||||
auto id = assginHandleForPluginView(plg, view);
|
auto id = assginHandleForPluginView(plg, view);
|
||||||
auto &info = m_plgviewMap[plg];
|
m_plgCurrentfid[plg] = id;
|
||||||
info.first = view;
|
|
||||||
info.second = nullptr;
|
|
||||||
|
|
||||||
PluginSystem::instance().dispatchEvent(
|
PluginSystem::instance().dispatchEvent(
|
||||||
IWingPlugin::RegisteredEvent::PluginFileOpened,
|
IWingPlugin::RegisteredEvent::PluginFileOpened,
|
||||||
|
@ -2576,9 +2566,8 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
auto id = assginHandleForPluginView(plg, view);
|
auto id = assginHandleForPluginView(plg, view);
|
||||||
auto &info = m_plgviewMap[plg];
|
m_plgCurrentfid[plg] = id;
|
||||||
info.first = view;
|
|
||||||
info.second = nullptr;
|
|
||||||
return ErrFile(int(*id));
|
return ErrFile(int(*id));
|
||||||
}
|
}
|
||||||
return ErrFile::Error;
|
return ErrFile::Error;
|
||||||
|
@ -2642,16 +2631,12 @@ void PluginSystem::connectControllerInterface(IWingPlugin *plg) {
|
||||||
if (!checkThreadAff()) {
|
if (!checkThreadAff()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
auto &maps = m_plgHandles[plg];
|
auto &maps = m_plgviewMap[plg];
|
||||||
for (auto &item : maps) {
|
for (auto &item : maps) {
|
||||||
auto &bind = m_viewBindings[item.second];
|
closeEditor(plg, item.fid, true);
|
||||||
bind.removeOne(plg);
|
|
||||||
if (bind.isEmpty()) {
|
|
||||||
_win->closeEditor(item.second, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
m_plgviewMap.remove(plg);
|
m_plgCurrentfid[plg] = -1;
|
||||||
m_plgHandles.remove(plg);
|
maps.clear();
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -2868,15 +2853,62 @@ void PluginSystem::loadAllPlugin() {
|
||||||
loadExtPlugin();
|
loadExtPlugin();
|
||||||
}
|
}
|
||||||
|
|
||||||
EditorView *PluginSystem::pluginCurrentEditor(IWingPlugin *sender) const {
|
EditorView *PluginSystem::pluginCurrentEditor(IWingPlugin *plg) const {
|
||||||
if (sender) {
|
if (plg) {
|
||||||
QPair<EditorView *, QUndoCommand *> empty{nullptr, nullptr};
|
auto fid = m_plgCurrentfid[plg];
|
||||||
auto editor = m_plgviewMap.value(sender, empty).first;
|
if (fid < 0) {
|
||||||
if (editor) {
|
|
||||||
return editor;
|
|
||||||
} else {
|
|
||||||
return _win->currentEditor();
|
return _win->currentEditor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto ctx = pluginContextById(plg, fid);
|
||||||
|
if (ctx) {
|
||||||
|
return ctx->view;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::optional<PluginSystem::PluginFileContext>
|
||||||
|
PluginSystem::pluginContextById(IWingPlugin *plg, int fid) const {
|
||||||
|
if (fid < 0) {
|
||||||
|
return std::nullopt;
|
||||||
|
}
|
||||||
|
auto &handles = m_plgviewMap[plg];
|
||||||
|
auto r = std::find_if(
|
||||||
|
handles.begin(), handles.end(),
|
||||||
|
[fid](const PluginFileContext &d) { return (*d.fid) == fid; });
|
||||||
|
if (r == handles.end()) {
|
||||||
|
return std::nullopt;
|
||||||
|
}
|
||||||
|
return *r;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::optional<QVector<PluginSystem::PluginFileContext>::iterator>
|
||||||
|
PluginSystem::pluginContextByIdIt(IWingPlugin *plg, int fid) {
|
||||||
|
auto &handles = m_plgviewMap[plg];
|
||||||
|
if (fid < 0) {
|
||||||
|
return std::nullopt;
|
||||||
|
}
|
||||||
|
auto r = std::find_if(
|
||||||
|
handles.begin(), handles.end(),
|
||||||
|
[fid](const PluginFileContext &d) { return (*d.fid) == fid; });
|
||||||
|
if (r == handles.end()) {
|
||||||
|
return std::nullopt;
|
||||||
|
}
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
QUndoCommand *PluginSystem::pluginCurrentUndoCmd(IWingPlugin *plg) const {
|
||||||
|
if (plg) {
|
||||||
|
auto fid = m_plgCurrentfid[plg];
|
||||||
|
if (fid < 0) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto ctx = pluginContextById(plg, fid);
|
||||||
|
if (ctx) {
|
||||||
|
return ctx->cmd;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,17 +44,23 @@ private:
|
||||||
public:
|
public:
|
||||||
class UniqueId : public QSharedData {
|
class UniqueId : public QSharedData {
|
||||||
public:
|
public:
|
||||||
UniqueId() : _id(0), _gen(nullptr) {}
|
UniqueId() : _id(-1), _gen(nullptr) {}
|
||||||
|
|
||||||
UniqueId(UniqueIdGenerator *gen, int id) : _id(id), _gen(gen) {
|
UniqueId(UniqueIdGenerator *gen, int id) : _id(id), _gen(gen) {
|
||||||
Q_ASSERT(gen);
|
Q_ASSERT(gen);
|
||||||
Q_ASSERT(id > 0);
|
Q_ASSERT(id >= 0);
|
||||||
|
#ifdef QT_DEBUG
|
||||||
|
qDebug() << "[UniqueId] alloced: " << id;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
~UniqueId() {
|
~UniqueId() {
|
||||||
if (_gen) {
|
if (_gen) {
|
||||||
_gen->release(_id);
|
_gen->release(_id);
|
||||||
}
|
}
|
||||||
|
#ifdef QT_DEBUG
|
||||||
|
qDebug() << "[UniqueId] freed: " << _id;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
operator int() { return _id; }
|
operator int() { return _id; }
|
||||||
|
@ -65,7 +71,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
UniqueIdGenerator() : currentId(1) {}
|
UniqueIdGenerator() : currentId(0) {}
|
||||||
|
|
||||||
QExplicitlySharedDataPointer<UniqueId> get() {
|
QExplicitlySharedDataPointer<UniqueId> get() {
|
||||||
if (!releasedIds.isEmpty()) {
|
if (!releasedIds.isEmpty()) {
|
||||||
|
@ -113,6 +119,20 @@ public:
|
||||||
};
|
};
|
||||||
Q_ENUM(PluginStatus)
|
Q_ENUM(PluginStatus)
|
||||||
|
|
||||||
|
private:
|
||||||
|
struct PluginFileContext {
|
||||||
|
SharedUniqueId fid;
|
||||||
|
EditorView *view = nullptr;
|
||||||
|
IWingPlugin *linkedplg = nullptr;
|
||||||
|
QUndoCommand *cmd = nullptr;
|
||||||
|
|
||||||
|
~PluginFileContext() {
|
||||||
|
if (cmd) {
|
||||||
|
delete cmd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static PluginSystem &instance();
|
static PluginSystem &instance();
|
||||||
|
|
||||||
|
@ -194,7 +214,15 @@ private:
|
||||||
|
|
||||||
static QString packLogMessage(const char *header, const QString &msg);
|
static QString packLogMessage(const char *header, const QString &msg);
|
||||||
|
|
||||||
EditorView *pluginCurrentEditor(IWingPlugin *sender) const;
|
EditorView *pluginCurrentEditor(IWingPlugin *plg) const;
|
||||||
|
|
||||||
|
std::optional<PluginSystem::PluginFileContext>
|
||||||
|
pluginContextById(IWingPlugin *plg, int fid) const;
|
||||||
|
|
||||||
|
std::optional<QVector<PluginFileContext>::iterator>
|
||||||
|
pluginContextByIdIt(IWingPlugin *plg, int fid);
|
||||||
|
|
||||||
|
QUndoCommand *pluginCurrentUndoCmd(IWingPlugin *plg) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void loadPlugin(IWingPlugin *p, PluginInfo &meta,
|
void loadPlugin(IWingPlugin *p, PluginInfo &meta,
|
||||||
|
@ -246,17 +274,15 @@ private:
|
||||||
bool insertBasicTypeContent(IWingPlugin *plg, qsizetype offset,
|
bool insertBasicTypeContent(IWingPlugin *plg, qsizetype offset,
|
||||||
const T &value) {
|
const T &value) {
|
||||||
Q_STATIC_ASSERT(std::is_integral_v<T> || std::is_floating_point_v<T>);
|
Q_STATIC_ASSERT(std::is_integral_v<T> || std::is_floating_point_v<T>);
|
||||||
QPair<EditorView *, QUndoCommand *> empty{nullptr, nullptr};
|
auto e = getCurrentPluginView(plg);
|
||||||
auto mapitem = m_plgviewMap.value(plg, empty);
|
|
||||||
auto e = mapitem.first;
|
|
||||||
if (e) {
|
if (e) {
|
||||||
auto editor = e->hexEditor();
|
auto editor = e->hexEditor();
|
||||||
auto doc = editor->document();
|
auto doc = editor->document();
|
||||||
auto buffer = reinterpret_cast<const char *>(&value);
|
auto buffer = reinterpret_cast<const char *>(&value);
|
||||||
|
auto uc = pluginCurrentUndoCmd(plg);
|
||||||
auto cmd = doc->MakeInsert(mapitem.second, editor->cursor(), offset,
|
auto cmd = doc->MakeInsert(uc, editor->cursor(), offset,
|
||||||
QByteArray(buffer, sizeof(T)));
|
QByteArray(buffer, sizeof(T)));
|
||||||
if (mapitem.second == nullptr && cmd) {
|
if (uc == nullptr && cmd) {
|
||||||
_rwlock.lockForWrite();
|
_rwlock.lockForWrite();
|
||||||
doc->pushMakeUndo(cmd);
|
doc->pushMakeUndo(cmd);
|
||||||
_rwlock.unlock();
|
_rwlock.unlock();
|
||||||
|
@ -270,17 +296,15 @@ private:
|
||||||
bool writeBasicTypeContent(IWingPlugin *plg, qsizetype offset,
|
bool writeBasicTypeContent(IWingPlugin *plg, qsizetype offset,
|
||||||
const T &value) {
|
const T &value) {
|
||||||
Q_STATIC_ASSERT(std::is_integral_v<T> || std::is_floating_point_v<T>);
|
Q_STATIC_ASSERT(std::is_integral_v<T> || std::is_floating_point_v<T>);
|
||||||
QPair<EditorView *, QUndoCommand *> empty{nullptr, nullptr};
|
auto e = getCurrentPluginView(plg);
|
||||||
auto mapitem = m_plgviewMap.value(plg, empty);
|
|
||||||
auto e = mapitem.first;
|
|
||||||
if (e) {
|
if (e) {
|
||||||
auto editor = e->hexEditor();
|
auto editor = e->hexEditor();
|
||||||
auto doc = editor->document();
|
auto doc = editor->document();
|
||||||
auto buffer = reinterpret_cast<const char *>(&value);
|
auto buffer = reinterpret_cast<const char *>(&value);
|
||||||
|
auto uc = pluginCurrentUndoCmd(plg);
|
||||||
auto cmd = doc->MakeReplace(mapitem.second, editor->cursor(),
|
auto cmd = doc->MakeReplace(uc, editor->cursor(), offset,
|
||||||
offset, QByteArray(buffer, sizeof(T)));
|
QByteArray(buffer, sizeof(T)));
|
||||||
if (mapitem.second == nullptr && cmd) {
|
if (uc == nullptr && cmd) {
|
||||||
_rwlock.lockForWrite();
|
_rwlock.lockForWrite();
|
||||||
doc->pushMakeUndo(cmd);
|
doc->pushMakeUndo(cmd);
|
||||||
_rwlock.unlock();
|
_rwlock.unlock();
|
||||||
|
@ -293,17 +317,15 @@ private:
|
||||||
template <typename T>
|
template <typename T>
|
||||||
bool appendBasicTypeContent(IWingPlugin *plg, const T &value) {
|
bool appendBasicTypeContent(IWingPlugin *plg, const T &value) {
|
||||||
Q_STATIC_ASSERT(std::is_integral_v<T> || std::is_floating_point_v<T>);
|
Q_STATIC_ASSERT(std::is_integral_v<T> || std::is_floating_point_v<T>);
|
||||||
QPair<EditorView *, QUndoCommand *> empty{nullptr, nullptr};
|
auto e = getCurrentPluginView(plg);
|
||||||
auto mapitem = m_plgviewMap.value(plg, empty);
|
|
||||||
auto e = mapitem.first;
|
|
||||||
if (e) {
|
if (e) {
|
||||||
auto editor = e->hexEditor();
|
auto editor = e->hexEditor();
|
||||||
auto doc = editor->document();
|
auto doc = editor->document();
|
||||||
auto buffer = reinterpret_cast<const char *>(&value);
|
auto buffer = reinterpret_cast<const char *>(&value);
|
||||||
|
auto uc = pluginCurrentUndoCmd(plg);
|
||||||
auto cmd = doc->MakeAppend(mapitem.second, editor->cursor(),
|
auto cmd = doc->MakeAppend(uc, editor->cursor(),
|
||||||
QByteArray(buffer, sizeof(T)));
|
QByteArray(buffer, sizeof(T)));
|
||||||
if (mapitem.second == nullptr && cmd) {
|
if (uc == nullptr && cmd) {
|
||||||
_rwlock.lockForWrite();
|
_rwlock.lockForWrite();
|
||||||
doc->pushMakeUndo(cmd);
|
doc->pushMakeUndo(cmd);
|
||||||
_rwlock.unlock();
|
_rwlock.unlock();
|
||||||
|
@ -331,9 +353,8 @@ private:
|
||||||
|
|
||||||
QMap<IWingPlugin::RegisteredEvent, QList<IWingPlugin *>> _evplgs;
|
QMap<IWingPlugin::RegisteredEvent, QList<IWingPlugin *>> _evplgs;
|
||||||
|
|
||||||
QHash<IWingPlugin *, QPair<EditorView *, QUndoCommand *>> m_plgviewMap;
|
QHash<IWingPlugin *, QVector<PluginFileContext>> m_plgviewMap;
|
||||||
QHash<IWingPlugin *, QList<QPair<SharedUniqueId, EditorView *>>>
|
QHash<IWingPlugin *, int> m_plgCurrentfid; // fid
|
||||||
m_plgHandles;
|
|
||||||
QHash<EditorView *, QList<IWingPlugin *>> m_viewBindings;
|
QHash<EditorView *, QList<IWingPlugin *>> m_viewBindings;
|
||||||
|
|
||||||
UniqueIdGenerator m_idGen;
|
UniqueIdGenerator m_idGen;
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
|
|
||||||
* 简体中文:寂静的羽夏(wingsummer)
|
* 简体中文:寂静的羽夏(wingsummer)
|
||||||
|
* 繁體中文:寂靜的羽夏(wingsummer)【通過繁簡文字轉化工具】
|
||||||
|
|
Loading…
Reference in New Issue