mirror of
https://gitee.com/spark-store-project/spark-web-app-runtime.git
synced 2025-12-15 19:42:04 +08:00
fix: 修复 UOS 上加载 RC 页面始终处于加载中的问题
页面加载始终未触发 loadFinished 信号,判断加载未完成 Log: 添加 loadProgressChanged 信号处理,加载进度到 100% 就显示页面;loadFinished 信号如果报错,在窗口中提示“加载存在错误”
This commit is contained in:
@@ -265,8 +265,8 @@ void MainWindow::initConnections()
|
||||
});
|
||||
connect(m_tray, &QSystemTrayIcon::activated, this, &MainWindow::on_trayIconActivated);
|
||||
|
||||
connect(m_widget, &Widget::sigLoadErrorOccurred, this, &MainWindow::slotLoadErrorOccurred);
|
||||
connect(m_widget->getPage()->profile(), &QWebEngineProfile::downloadRequested, this, &MainWindow::on_downloadStart);
|
||||
|
||||
connect(m_widget->getPage(), &QWebEnginePage::windowCloseRequested, this, [=]() {
|
||||
this->close();
|
||||
});
|
||||
@@ -476,3 +476,8 @@ void MainWindow::on_downloadCancel(QWebEngineDownloadItem *item)
|
||||
downloadMessage->hide();
|
||||
DMessageManager::instance()->sendMessage(this, QIcon::fromTheme("dialog-error").pixmap(64, 64), QString(QObject::tr("%1Download canceled!")).arg(" "));
|
||||
}
|
||||
|
||||
void MainWindow::slotLoadErrorOccurred()
|
||||
{
|
||||
DMessageManager::instance()->sendMessage(this, QIcon::fromTheme("dialog-warning").pixmap(64, 64), QString(QObject::tr("%1Load error occurred!")).arg(" "));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user