1-修复删除入库信息BUG问题
2-修复源删除BUG
This commit is contained in:
parent
6c8b430f77
commit
c2abae6119
@ -44,8 +44,6 @@ endif()
|
||||
#设置QT .cmake文件路径
|
||||
#自编译QT静态库
|
||||
SET(QT_DIR "D:/Dev/Qt/6.8.0/mingw1310_static_x64/lib/cmake")
|
||||
#Msys2静态库
|
||||
#SET(QT_DIR "D:/Dev/msys64/mingw64/qt6-static/lib/cmake")
|
||||
SET(JSON ${PROJECT_SOURCE_DIR}/3rdparty/json)
|
||||
|
||||
LIST(APPEND CMAKE_PREFIX_PATH ${QT_DIR} ${MSYS})
|
||||
@ -110,52 +108,18 @@ SET(PROJECT_SOURCES
|
||||
${src}
|
||||
)
|
||||
# 设置消息策略为qFatal来禁用qDebug信息
|
||||
#LIST(APPEND CMAKE_CXX_FLAGS "-DQT_NO_DEBUG_OUTPUT")
|
||||
LIST(APPEND CMAKE_CXX_FLAGS "-DQT_NO_DEBUG_OUTPUT")
|
||||
|
||||
#资源文件
|
||||
QT6_ADD_RESOURCES(RCFILES res.qrc)
|
||||
#WIN32
|
||||
add_executable(${PROJECT_NAME} ${PROJECT_SOURCES} ${RCFILES} xsteam.rc)
|
||||
|
||||
#安全编译
|
||||
#关闭RPATH特性
|
||||
SET(CMAKE_SKIP_RPATH TRUE)
|
||||
#开启栈保护
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong")
|
||||
#开启GOT表保护
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,relro,-z,now")
|
||||
SET(CMAKE_EXECUTABLE_LINKER_FLAGS "${CMAKE_EXECUTABLE_LINKER_FLAGS} -Wl,-z,relro,-z,now")
|
||||
#开启栈不可执行
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,noexecstack")
|
||||
SET(CMAKE_EXECUTABLE_LINKER_FLAGS "${CMAKE_EXECUTABLE_LINKER_FLAGS} -Wl,-z,noexecstack")
|
||||
#开启地址无关
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpic")
|
||||
#随机化
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpie")
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pie")
|
||||
SET(CMAKE_EXECUTABLE_LINKER_FLAGS "${CMAKE_EXECUTABLE_LINKER_FLAGS} -pie")
|
||||
#隐藏暴露的符号
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fvisibility=hidden")
|
||||
SET(CMAKE_EXECUTABLE_LINKER_FLAGS "${CMAKE_EXECUTABLE_LINKER_FLAGS} -fvisibility=hidden")
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fvisibility-inlines-hidden")
|
||||
SET(CMAKE_EXECUTABLE_LINKER_FLAGS "${CMAKE_EXECUTABLE_LINKER_FLAGS} -fvisibility-inlines-hidden")
|
||||
#删除调试符号
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -s")
|
||||
SET(CMAKE_EXECUTABLE_LINKER_FLAGS "${CMAKE_EXECUTABLE_LINKER_FLAGS} -s")
|
||||
#删除生成EXE符号信息
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s")
|
||||
#开启整数溢出检查
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -ftrapv")
|
||||
#开启栈检查
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -fstack-check")
|
||||
add_executable(${PROJECT_NAME} WIN32 ${PROJECT_SOURCES} ${RCFILES} xsteam.rc)
|
||||
|
||||
#忽略多重定引用
|
||||
target_link_options(${PROJECT_NAME} PUBLIC -Wl,--allow-multiple-definition)
|
||||
# 设置链接标志为静态链接
|
||||
#SET(CMAKE_EXE_LINKER_FLAGS -static)
|
||||
SET(CMAKE_EXE_LINKER_FLAGS -static)
|
||||
|
||||
#set_property(TARGET harfbuzz::harfbuzz PROPERTY
|
||||
# IMPORTED_IMPLIB "D:/Dev/msys64/mingw64/lib/libharfbuzz.dll.a" )
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME} PRIVATE Qt6::Core Qt6::Gui Qt6::Widgets PkgConfig::LIBGIT2 PkgConfig::CURL
|
||||
)
|
||||
|
@ -27,8 +27,8 @@ void sui::init_layout()
|
||||
setWindowFlags(Qt::FramelessWindowHint);
|
||||
setAttribute(Qt::WA_TranslucentBackground);
|
||||
setMouseTracking(true);
|
||||
setBaseSize(700, 600);
|
||||
resize(700, 600);
|
||||
setBaseSize(800, 600);
|
||||
resize(800, 600);
|
||||
setLayout(m_layout);
|
||||
}
|
||||
|
||||
|
@ -315,7 +315,7 @@ void xsteam_data_unserialize()
|
||||
_temp_data.m_time = x.value().at("Up_Time");
|
||||
_temp_data.ico = x.value().at("Ico");
|
||||
_temp_data.s_name = x.value().at("Src_Name");
|
||||
|
||||
|
||||
if (x.value().contains("Manifest"))
|
||||
{
|
||||
_temp_data.manifest = x.value().at("Manifest").get<std::vector<std::string>>();
|
||||
@ -527,7 +527,6 @@ bool xsteam_lua_to_com(UidData u_data)
|
||||
m_cmd = nullptr;
|
||||
std::cout << "lua_file exists:" << _lua_file.exists() << std::endl;
|
||||
std::cout << "lua_packa_file exists:" << _lua_packa_file.exists() << std::endl;
|
||||
/*
|
||||
if (_lua_file.exists())
|
||||
{
|
||||
_lua_file.remove();
|
||||
@ -536,7 +535,6 @@ bool xsteam_lua_to_com(UidData u_data)
|
||||
{
|
||||
_lua_packa_file.remove();
|
||||
};
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
void xsteam_run_steam_steamtools(RUN_MODE _mode)
|
||||
@ -601,17 +599,17 @@ bool xsteam_steam_steamtools_exists(bool &steam_ok, bool &steamtools_ok)
|
||||
}
|
||||
void xsteam_delete_uid_st(std::string uid)
|
||||
{
|
||||
for (auto it = _data.u_data.begin(); it != _data.u_data.end();)
|
||||
for (auto it = _data.u_data.begin(); it != _data.u_data.end(); ++it)
|
||||
{
|
||||
if (it->uid == uid)
|
||||
{
|
||||
it = _data.u_data.erase(it);
|
||||
QFile st(QString::fromStdString(_data.x_config.steamtools_st_dir + uid + ".st"));
|
||||
if (st.exists())
|
||||
{
|
||||
st.remove();
|
||||
}
|
||||
xsteam_save_data_write();
|
||||
_data.u_data.erase(it);
|
||||
xsteam_save_data_write();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -125,12 +125,10 @@ void xsteam_git_fetch::fecth_uid_to_steam(UidData &u_data)
|
||||
xsteam_vdf_write(vdf_config_file, vdf_data);
|
||||
u_data.i_time = (QDateTime::currentDateTime().toString("yyyy.MM.dd hh:mm:ss")).toStdString();
|
||||
}
|
||||
/*
|
||||
if (QDir(vdf_dir).exists())
|
||||
{
|
||||
QDir(vdf_dir).removeRecursively();
|
||||
}
|
||||
*/
|
||||
free_git_fetch();
|
||||
emit signal_fetch_return_data(u_data);
|
||||
return;
|
||||
|
@ -151,7 +151,7 @@ void xsteam_src_edit_ui::object_delete_src()
|
||||
{
|
||||
if (it->src_name == _name.toStdString())
|
||||
{
|
||||
it = _data.s_data.erase(it);
|
||||
_data.s_data.erase(it);
|
||||
modessl->removeRow(curRow);
|
||||
m_Table->setModel(modessl);
|
||||
}
|
||||
|
@ -322,7 +322,7 @@ void xsteam_ui::slots_in_dlc_add()
|
||||
QString dlc_id = modessl->data(indextemp).value<QString>();
|
||||
xs_data.n_dlc.push_back(dlc_id.toStdString());
|
||||
ip_in_dlc_table->item_append(xs_data, VIEW_MODE::IN_DLC_INFO);
|
||||
slots_msg_text("增加:" + dlc_id.toStdString() + "成功!");
|
||||
slots_msg_text("增加DLC:" + dlc_id.toStdString() + "成功!");
|
||||
}
|
||||
}
|
||||
void xsteam_ui::slots_delete_uid_st()
|
||||
@ -332,16 +332,13 @@ void xsteam_ui::slots_delete_uid_st()
|
||||
{
|
||||
QAbstractItemModel *modessl = ip_uid_table->model();
|
||||
QModelIndex indextemp = modessl->index(curRow, 1);
|
||||
QString uid = modessl->data(indextemp).value<QString>();
|
||||
QString d_uid = modessl->data(indextemp).value<QString>();
|
||||
modessl->removeRow(curRow);
|
||||
ip_uid_table->setModel(modessl);
|
||||
QFuture<void> future = QtConcurrent::run([=]()
|
||||
{ xsteam_delete_uid_st(uid.toStdString()); });
|
||||
QFuture<void> future = QtConcurrent::run([=](std::string _uid)
|
||||
{ xsteam_delete_uid_st(_uid); }, d_uid.toStdString());
|
||||
}
|
||||
}
|
||||
void xsteam_ui::slots_updata_uid_st()
|
||||
{
|
||||
}
|
||||
void xsteam_ui::slots_fetch_src_data()
|
||||
{
|
||||
slots_msg_text("正在拉取" + server_txt->currentText().toStdString() + "数据...");
|
||||
@ -379,7 +376,8 @@ void xsteam_ui::slots_selection_row(const QItemSelection ¤t, const QItemSe
|
||||
for (int i = 0; i < server_txt->count(); ++i)
|
||||
{
|
||||
std::string item_str = server_txt->itemText(i).toStdString();
|
||||
if(xs_data.s_name==item_str){
|
||||
if (xs_data.s_name == item_str)
|
||||
{
|
||||
server_txt->setCurrentIndex(i);
|
||||
break;
|
||||
}
|
||||
|
@ -98,7 +98,6 @@ private slots:
|
||||
void slots_fetch_src_data();
|
||||
void slots_rightMenu(const QPoint &pos);
|
||||
void slots_delete_uid_st();
|
||||
void slots_updata_uid_st();
|
||||
void slots_get_uid_dlcs();
|
||||
void slots_in_dlc_delete();
|
||||
void slots_in_dlc_add();
|
||||
|
Loading…
Reference in New Issue
Block a user