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:
@@ -4,9 +4,15 @@
|
||||
#include <DPlatformWindowHandle>
|
||||
#include <DAboutDialog>
|
||||
|
||||
#include <QStandardPaths>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
Application::Application(int &argc, char **argv)
|
||||
: DApplication(argc, argv)
|
||||
{
|
||||
saveLaunchParams(argc, argv);
|
||||
|
||||
loadTranslator();
|
||||
|
||||
setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
@@ -35,6 +41,33 @@ void Application::handleAboutAction()
|
||||
DApplication::handleAboutAction();
|
||||
}
|
||||
|
||||
QStringList Application::launchParams() const
|
||||
{
|
||||
return m_argv;
|
||||
}
|
||||
|
||||
void Application::setMainWindow(MainWindow *window)
|
||||
{
|
||||
m_mainWindow = window;
|
||||
}
|
||||
|
||||
MainWindow *Application::mainWindow()
|
||||
{
|
||||
return m_mainWindow;
|
||||
}
|
||||
|
||||
void Application::saveLaunchParams(int &argc, char **argv)
|
||||
{
|
||||
m_argc = argc;
|
||||
|
||||
m_argv.clear();
|
||||
for (int i = 0; i < m_argc; i++) {
|
||||
m_argv.append(argv[i]);
|
||||
}
|
||||
|
||||
qDebug() << Q_FUNC_INFO << m_argc << m_argv;
|
||||
}
|
||||
|
||||
void Application::initAboutDialog()
|
||||
{
|
||||
// Customized DAboutDialog
|
||||
|
||||
Reference in New Issue
Block a user