mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
fix: 修复任务栏等待很长时间才进入安全模式
调用dbus接口,弹出提示框时耗时严重,阻塞UI线程,所以使用单独线程调用 Log: 修复任务栏等待很长时间才进入安全模式 Bug: https://pms.uniontech.com/zentao/bug-view-83591.html Change-Id: Ic04118cb5ed56c21f9d6233151aab36ad4d94195
This commit is contained in:
parent
fd08fdd672
commit
35a52d481a
@ -38,6 +38,7 @@
|
||||
#include <QScreen>
|
||||
#include <QGuiApplication>
|
||||
#include <QX11Info>
|
||||
#include <QtConcurrent>
|
||||
#include <qpa/qplatformwindow.h>
|
||||
|
||||
#include <X11/X.h>
|
||||
@ -609,7 +610,8 @@ void MainWindow::sendNotifications()
|
||||
actionButton << "reload" << tr("Exit Safe Mode");
|
||||
QVariantMap hints;
|
||||
hints["x-deepin-action-reload"] = QString("dbus-send,--session,--dest=com.deepin.dde.Dock,--print-reply,/com/deepin/dde/Dock,com.deepin.dde.Dock.ReloadPlugins");
|
||||
QTimer::singleShot(0, this, [=] {
|
||||
// 在进入安全模式时,执行此DBUS耗时25S左右,导致任务栏显示阻塞,所以使用线程调用
|
||||
QtConcurrent::run(QThreadPool::globalInstance(), [=] {
|
||||
DDBusSender()
|
||||
.service("com.deepin.dde.Notification")
|
||||
.path("/com/deepin/dde/Notification")
|
||||
|
Loading…
x
Reference in New Issue
Block a user