mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 21:02:04 +08:00
chore:改为系统通知导出日志
This commit is contained in:
@@ -280,10 +280,10 @@ void SettingsPage::on_checkBox_disableSandbox_clicked(bool checked)
|
|||||||
config.sync();
|
config.sync();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加导出日志按钮的点击事件处理函数
|
// 修改导出日志按钮的点击事件处理函数
|
||||||
void SettingsPage::on_pushButton_exportLog_clicked()
|
void SettingsPage::on_pushButton_exportLog_clicked()
|
||||||
{
|
{
|
||||||
auto future = QtConcurrent::run([=]() {
|
auto future = QtConcurrent::run([=]() {
|
||||||
// 禁用按钮防止重复点击
|
// 禁用按钮防止重复点击
|
||||||
QMetaObject::invokeMethod(ui->pushButton_exportLog, "setEnabled", Qt::QueuedConnection, Q_ARG(bool, false));
|
QMetaObject::invokeMethod(ui->pushButton_exportLog, "setEnabled", Qt::QueuedConnection, Q_ARG(bool, false));
|
||||||
|
|
||||||
@@ -302,7 +302,8 @@ void SettingsPage::on_pushButton_exportLog_clicked()
|
|||||||
|
|
||||||
// 在主线程显示消息框
|
// 在主线程显示消息框
|
||||||
QMetaObject::invokeMethod(this, [message, this]() {
|
QMetaObject::invokeMethod(this, [message, this]() {
|
||||||
QMessageBox::information(this, tr("Export Logs"), message);
|
// 使用系统通知代替QMessageBox弹窗,避免重复通知
|
||||||
|
Utils::sendNotification("spark-store", tr("Export Logs"), message);
|
||||||
// 重新启用按钮
|
// 重新启用按钮
|
||||||
ui->pushButton_exportLog->setEnabled(true);
|
ui->pushButton_exportLog->setEnabled(true);
|
||||||
}, Qt::QueuedConnection);
|
}, Qt::QueuedConnection);
|
||||||
|
|||||||
Reference in New Issue
Block a user