diff --git a/frame/controller/dockitemmanager.cpp b/frame/controller/dockitemmanager.cpp index 96cf53f48..77ec6daf5 100644 --- a/frame/controller/dockitemmanager.cpp +++ b/frame/controller/dockitemmanager.cpp @@ -72,12 +72,8 @@ DockItemManager::DockItemManager(QObject *parent) // 刷新图标 QMetaObject::invokeMethod(this, "refershItemsIcon", Qt::QueuedConnection); - - // 自动化测试,需要从后端读取的插件配置中,显示的插件默认需要有enable属性,这里主动向后端写入一次 - m_updatePluginsOrderTimer->start(); } - DockItemManager *DockItemManager::instance(QObject *parent) { if (!INSTANCE) diff --git a/frame/window/accessible.h b/frame/window/accessible.h index 504754a9f..d9e0578c5 100644 --- a/frame/window/accessible.h +++ b/frame/window/accessible.h @@ -16,6 +16,7 @@ #include "../item/components/floatingpreview.h" #include "../plugins/tray/snitraywidget.h" +#include "../plugins/tray/abstracttraywidget.h" #include "../plugins/tray/indicatortraywidget.h" #include "../plugins/tray/xembedtraywidget.h" #include "../plugins/tray/system-trays/systemtrayitem.h" @@ -66,10 +67,11 @@ SET_BUTTON_ACCESSIBLE(PlaceholderItem, "placeholderitem") SET_BUTTON_ACCESSIBLE(AppDragWidget, "appdragwidget") SET_BUTTON_ACCESSIBLE(AppSnapshot, "appsnapshot") SET_BUTTON_ACCESSIBLE(FloatingPreview, "floatingpreview") -SET_BUTTON_ACCESSIBLE(XEmbedTrayWidget, m_w->itemKeyForConfig()) -SET_BUTTON_ACCESSIBLE(IndicatorTrayWidget, m_w->itemKeyForConfig()) -SET_BUTTON_ACCESSIBLE(SNITrayWidget, m_w->itemKeyForConfig()) -SET_BUTTON_ACCESSIBLE(SystemTrayItem, m_w->itemKeyForConfig()) +SET_BUTTON_ACCESSIBLE(XEmbedTrayWidget, m_w->itemKeyForConfig().replace("sni:","")) +SET_BUTTON_ACCESSIBLE(IndicatorTrayWidget, m_w->itemKeyForConfig().replace("sni:","")) +SET_BUTTON_ACCESSIBLE(SNITrayWidget, m_w->itemKeyForConfig().replace("sni:","")) +SET_BUTTON_ACCESSIBLE(AbstractTrayWidget, m_w->itemKeyForConfig().replace("sni:","")) +SET_BUTTON_ACCESSIBLE(SystemTrayItem, m_w->itemKeyForConfig().replace("sni:","")) SET_FORM_ACCESSIBLE(FashionTrayItem, "fashiontrayitem") SET_FORM_ACCESSIBLE(FashionTrayWidgetWrapper, "fashiontraywrapper") SET_BUTTON_ACCESSIBLE(FashionTrayControlWidget, "fashiontraycontrolwidget") @@ -91,7 +93,7 @@ SET_FORM_ACCESSIBLE(MultitaskingWidget, "plugin-multitasking") SET_FORM_ACCESSIBLE(ShowDesktopWidget, "plugin-showdesktop") SET_FORM_ACCESSIBLE(OverlayWarningWidget, "plugin-overlaywarningwidget") SET_FORM_ACCESSIBLE(QWidget, m_w->objectName().isEmpty() ? "widget" : m_w->objectName()) -SET_LABEL_ACCESSIBLE(QLabel, m_w->objectName() == "notifications" ? m_w->objectName() : m_w->text().isEmpty() ? m_w->objectName().isEmpty() ? "text" : m_w->objectName() : m_w->text()) +SET_LABEL_ACCESSIBLE(QLabel, m_w->objectName() == "notifications" ? m_w->objectName() : m_w->text().isEmpty() ? m_w->objectName().isEmpty() ? "text" : m_w->objectName() : m_w->text()) SET_BUTTON_ACCESSIBLE(DIconButton, m_w->objectName().isEmpty() ? "imagebutton" : m_w->objectName()) SET_BUTTON_ACCESSIBLE(DSwitchButton, m_w->text().isEmpty() ? "switchbutton" : m_w->text()) SET_BUTTON_ACCESSIBLE(DesktopWidget, "desktopWidget"); @@ -113,6 +115,7 @@ QAccessibleInterface *accessibleFactory(const QString &classname, QObject *objec USE_ACCESSIBLE(classname, AppSnapshot); USE_ACCESSIBLE(classname, FloatingPreview); USE_ACCESSIBLE(classname, SNITrayWidget); + USE_ACCESSIBLE(classname, AbstractTrayWidget); USE_ACCESSIBLE(classname, SystemTrayItem); USE_ACCESSIBLE(classname, FashionTrayItem); USE_ACCESSIBLE(classname, FashionTrayWidgetWrapper); diff --git a/plugins/sound/sounditem.cpp b/plugins/sound/sounditem.cpp index 9d1ea55db..b38f4a5f8 100644 --- a/plugins/sound/sounditem.cpp +++ b/plugins/sound/sounditem.cpp @@ -46,7 +46,6 @@ SoundItem::SoundItem(QWidget *parent) , m_applet(new SoundApplet(this)) , m_sinkInter(nullptr) { - m_tipsLabel->setObjectName("sound"); m_tipsLabel->setAccessibleName("soundtips"); m_tipsLabel->setVisible(false); diff --git a/plugins/tray/snitraywidget.cpp b/plugins/tray/snitraywidget.cpp index 039484067..6112fb466 100644 --- a/plugins/tray/snitraywidget.cpp +++ b/plugins/tray/snitraywidget.cpp @@ -603,7 +603,8 @@ void SNITrayWidget::showHoverTips() return; m_tipsLabel->setText(tooltip.title); - m_tipsLabel->setAccessibleName(tooltip.title); + m_tipsLabel->setAccessibleName(itemKeyForConfig().replace("sni:","")); + showPopupWindow(m_tipsLabel); } diff --git a/plugins/tray/system-trays/systemtrayitem.cpp b/plugins/tray/system-trays/systemtrayitem.cpp index 3e85d1323..1d837c299 100644 --- a/plugins/tray/system-trays/systemtrayitem.cpp +++ b/plugins/tray/system-trays/systemtrayitem.cpp @@ -52,7 +52,7 @@ SystemTrayItem::SystemTrayItem(PluginsItemInterface *const pluginInter, const QS hLayout->setMargin(0); setLayout(hLayout); - setAccessibleName(m_pluginInter->pluginName() + "-" + m_itemKey); + setAccessibleName(m_itemKey); setAttribute(Qt::WA_TranslucentBackground); if (PopupWindow.isNull()) {