mirror of
https://gitee.com/spark-store-project/spark-web-app-runtime.git
synced 2025-12-15 03:22:05 +08:00
feat: ISSUE #I62BVT 添加网页通知功能
WebEngineView 中添加 WebEngineView::present(std::unique_ptr<QWebEngineNotification> &newNotification) 函数,通过 DNotifySender 转发系统通知 Log: 添加网页通知功能,通知图片缓存在 /tmp 下;使用 DLogManager 生成日志;修复强制使用 DTK 平台插件异常问题
This commit is contained in:
@@ -5,6 +5,13 @@
|
||||
WebEnginePage::WebEnginePage(QObject *parent)
|
||||
: QWebEnginePage(parent)
|
||||
{
|
||||
connect(this, &QWebEnginePage::featurePermissionRequested, [&](const QUrl &origin, QWebEnginePage::Feature feature) {
|
||||
if (feature != QWebEnginePage::Notifications) {
|
||||
return;
|
||||
}
|
||||
|
||||
setFeaturePermission(origin, feature, QWebEnginePage::PermissionGrantedByUser);
|
||||
});
|
||||
}
|
||||
|
||||
WebEnginePage::~WebEnginePage()
|
||||
|
||||
Reference in New Issue
Block a user