mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
fixed(tray):dbus error to dock block
安装 uos-chineseime ,右键重启会导致dbus错误,导致任务栏卡死
This commit is contained in:
parent
d65e60c0ac
commit
086aca92cc
@ -578,6 +578,13 @@ void SNITrayWidget::showHoverTips()
|
||||
if (!r.contains(QCursor::pos()))
|
||||
return;
|
||||
|
||||
QProcess p;
|
||||
p.start("qdbus", {m_dbusService});
|
||||
if (!p.waitForFinished(100)) {
|
||||
qWarning() << "sni dbus service error : " << m_dbusService;
|
||||
return;
|
||||
}
|
||||
|
||||
QDBusInterface infc(m_dbusService, m_dbusPath);
|
||||
QDBusMessage msg = infc.call("Get", "org.kde.StatusNotifierItem", "ToolTip");
|
||||
if (msg.type() == QDBusMessage::ReplyMessage) {
|
||||
|
@ -406,6 +406,21 @@ void TrayPlugin::traySNIAdded(const QString &itemKey, const QString &sniServiceP
|
||||
return;
|
||||
}
|
||||
|
||||
if (sniServicePath.startsWith("/") || !sniServicePath.contains("/")) {
|
||||
qDebug() << "SNI service path invalid";
|
||||
return;
|
||||
}
|
||||
|
||||
QStringList list = sniServicePath.split("/");
|
||||
QString nsiServerName = list.takeFirst();
|
||||
|
||||
QProcess p;
|
||||
p.start("qdbus", {nsiServerName});
|
||||
if (!p.waitForFinished(100)) {
|
||||
qWarning() << "sni dbus service error : " << nsiServerName;
|
||||
return;
|
||||
}
|
||||
|
||||
SNITrayWidget *trayWidget = new SNITrayWidget(sniServicePath);
|
||||
if (!trayWidget->isValid())
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user