1.修复设置路径不生效;\n2.修复元数据更新后业务转码模块对函数检查状态异常问题;

This commit is contained in:
taocong 2026-07-07 10:21:02 +08:00
parent 38fde4223f
commit 9fdd342234
12 changed files with 64 additions and 3 deletions

View File

@ -15,6 +15,10 @@
<toc-element topic="UFT3功能查询.md"/> <toc-element topic="UFT3功能查询.md"/>
<toc-element topic="UF20功能查询.md"/> <toc-element topic="UF20功能查询.md"/>
</toc-element> </toc-element>
<toc-element topic="数据映射.md">
<toc-element topic="表替换.md"/>
<toc-element topic="函数替换.md"/>
</toc-element>
<toc-element topic="元数据更新.md"/> <toc-element topic="元数据更新.md"/>
<toc-element topic="更新记录.md"> <toc-element topic="更新记录.md">
<toc-element topic="update-1-2-0.md"/> <toc-element topic="update-1-2-0.md"/>

View File

@ -0,0 +1,3 @@
# 函数替换
Start typing here...

View File

@ -0,0 +1,6 @@
# 数据映射
## 快速跳转
[表替换](http://10.20.163.105:6045/uft3changecode/表替换.html)
[函数替换](http://10.20.163.105:6045/uft3changecode/函数替换.html)

View File

@ -0,0 +1,3 @@
# 表替换
Start typing here...

View File

@ -5,6 +5,7 @@
#include "ElaToolButton.h" #include "ElaToolButton.h"
#include "utils/uf2configreader.h" #include "utils/uf2configreader.h"
#include "utils/uft3configreader.h" #include "utils/uft3configreader.h"
#include "utils/configmanager.h"
#include "utils/logmanager.h" #include "utils/logmanager.h"
#include "utils/Constants.h" #include "utils/Constants.h"
#include "utils/versionchecker.h" #include "utils/versionchecker.h"
@ -76,7 +77,10 @@ MainWindow::MainWindow(QWidget *parent)
void MainWindow::loadConfigCache() void MainWindow::loadConfigCache()
{ {
LogManager::instance()->log("正在加载配置缓存..."); LogManager::instance()->log("正在加载配置缓存...");
// 1. 加载 config.ini 到内存缓存ConfigManager::loadConfig 之前从未被调用过)
ConfigManager::instance()->loadConfig(QCoreApplication::applicationDirPath());
UF2ConfigReader uf2Reader; UF2ConfigReader uf2Reader;
bool uf2Loaded = uf2Reader.loadAllUF20Config(); bool uf2Loaded = uf2Reader.loadAllUF20Config();

View File

@ -48,6 +48,26 @@ void MetadataProcessor::initConfig(const QString& basePath)
LogManager::instance()->log(QString("UFT30路径: %1").arg(m_uft30Path)); LogManager::instance()->log(QString("UFT30路径: %1").arg(m_uft30Path));
} }
void MetadataProcessor::reloadPaths()
{
LogManager::instance()->log("========== 重新加载配置路径 ==========");
ConfigManager* configManager = ConfigManager::instance();
m_uf20Path = configManager->getValue("projectPath", "uf20");
m_ufAcct20Path = configManager->getValue("projectPath", "ufAcct20");
m_uftDbSettPath = configManager->getValue("projectPath", "UftdbSett");
m_uft30PubPath = configManager->getValue("projectPath", "uft30pub");
m_uft30CbptransPath = configManager->getValue("projectPath", "uft30cbptrans");
m_uft30Path = configManager->getValue("projectPath", "uft30");
m_supportUftdbSett = configManager->getValue("testConfig", "supportUftdbSett");
m_moduleGenerationCheck = configManager->getValue("testConfig", "moduleGenerationCheck");
LogManager::instance()->log(QString("UF20路径: %1").arg(m_uf20Path));
LogManager::instance()->log(QString("UFT30路径: %1").arg(m_uft30Path));
}
bool MetadataProcessor::isValidUtf8(const QByteArray& data) bool MetadataProcessor::isValidUtf8(const QByteArray& data)

View File

@ -31,6 +31,7 @@ public:
public: public:
void initConfig(const QString& basePath); void initConfig(const QString& basePath);
void reloadPaths(); // 从 ConfigManager 刷新缓存的路径
private: private:
bool isValidUtf8(const QByteArray& data); bool isValidUtf8(const QByteArray& data);

View File

@ -20,6 +20,7 @@
#include <QStandardItem> #include <QStandardItem>
#include <QStyledItemDelegate> #include <QStyledItemDelegate>
#include <QPainter> #include <QPainter>
#include <QShowEvent>
#include "src/utils/logmanager.h" #include "src/utils/logmanager.h"
#include "ElaPushButton.h" #include "ElaPushButton.h"
#include "ElaProgressBar.h" #include "ElaProgressBar.h"
@ -225,6 +226,14 @@ void BatchConvertPage::resizeEvent(QResizeEvent *event)
} }
} }
void BatchConvertPage::showEvent(QShowEvent *event)
{
QWidget::showEvent(event);
// 每次显示页面时刷新"是否存在"列
// (元数据更新后 DataCache 变化,需要重新检查函数存在状态)
updateTable();
}
void BatchConvertPage::onEditRow(int row) void BatchConvertPage::onEditRow(int row)
{ {
if (row < 0 || row >= m_funcList.size()) { if (row < 0 || row >= m_funcList.size()) {

View File

@ -50,6 +50,7 @@ private:
bool checkFunctionExists(const QString &funcName); bool checkFunctionExists(const QString &funcName);
void updateTable(); void updateTable();
void resizeEvent(QResizeEvent *event) override; void resizeEvent(QResizeEvent *event) override;
void showEvent(QShowEvent *event) override;
QString getConfigFilePath() const; QString getConfigFilePath() const;
void setupConfigWatcher(); void setupConfigWatcher();
QDateTime currentFileMtime() const; QDateTime currentFileMtime() const;

View File

@ -128,6 +128,13 @@ void MetadataUpdatePage::initUI()
void MetadataUpdatePage::showEvent(QShowEvent* event) void MetadataUpdatePage::showEvent(QShowEvent* event)
{ {
ElaScrollPage::showEvent(event); ElaScrollPage::showEvent(event);
// 每次显示页面时重新从 ConfigManager 读取路径
// (用户可能已在设置页面修改过路径)
if (_processor) {
_processor->reloadPaths();
}
static bool firstShow = true; static bool firstShow = true;
if (firstShow) if (firstShow)
{ {

View File

@ -14,7 +14,7 @@ namespace Constants {
// 应用版本号(发版时只需修改此处) // 应用版本号(发版时只需修改此处)
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
namespace App { namespace App {
constexpr char Version[] = "1.2.0"; constexpr char Version[] = "1.3.0";
} }
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------

View File

@ -7,5 +7,8 @@
}, },
"V1.2.0": { "V1.2.0": {
"release_notes": "1.新增数据映射页面,表映射、函数映射;\n2.新增版本更新提示功能;" "release_notes": "1.新增数据映射页面,表映射、函数映射;\n2.新增版本更新提示功能;"
} },
"V1.3.0": {
"release_notes": "1.修复设置路径不生效;\n2.修复元数据更新后业务转码模块对函数检查状态异常问题;"
}
} }