diff --git a/CMakeLists.txt b/CMakeLists.txt index a59624ad8..3a459c836 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,3 +66,6 @@ install(FILES "cmake/DdeDock/DdeDockConfig.cmake" ## services files install(FILES frame/com.deepin.dde.Dock.service DESTINATION /usr/share/dbus-1/services) + +install(FILES gschema/com.deepin.dde.dock.module.gschema.xml + DESTINATION share/glib-2.0/schemas) diff --git a/debian/control b/debian/control index 7955ca4ad..7d5caf281 100644 --- a/debian/control +++ b/debian/control @@ -22,8 +22,8 @@ Build-Depends: debhelper (>= 8.0.0), libdframeworkdbus-dev, libgsettings-qt-dev, cmake, - libdde-network-utils-dev (>= 0.1.4), - libdde-network-utils-dev (<< 0.1.5), + libdde-network-utils-dev (>= 5.0.1), + libdde-network-utils-dev (<< 5.0.2), libdbusmenu-qt5-dev, clang [mips64el] Standards-Version: 3.9.8 diff --git a/debian/dde-dock.install b/debian/dde-dock.install index 726fd8b12..44d322cc7 100644 --- a/debian/dde-dock.install +++ b/debian/dde-dock.install @@ -7,4 +7,5 @@ usr/lib/dde-dock/plugins/libtrash.so usr/lib/dde-dock/plugins/libtray.so usr/lib/dde-dock/plugins/liboverlay-warning.so usr/lib/dde-dock/plugins/system-trays +usr/share etc/dde-dock diff --git a/frame/item/appitem.cpp b/frame/item/appitem.cpp index 865b92541..e86c4deb3 100644 --- a/frame/item/appitem.cpp +++ b/frame/item/appitem.cpp @@ -39,12 +39,28 @@ #include #include #include +#include #define APP_DRAG_THRESHOLD 20 int AppItem::IconBaseSize; QPoint AppItem::MousePressPos; +static QGSettings* GSettingsByApp() { + static QGSettings settings("com.deepin.dde.dock.module.app"); + return &settings; +} + +static QGSettings* GSettingsByActiveApp() { + static QGSettings settings("com.deepin.dde.dock.module.activeapp"); + return &settings; +} + +static QGSettings* GSettingsByDockApp() { + static QGSettings settings("com.deepin.dde.dock.module.dockapp"); + return &settings; +} + AppItem::AppItem(const QDBusObjectPath &entry, QWidget *parent) : DockItem(parent), m_appNameTips(new TipsWidget(this)), @@ -106,6 +122,9 @@ AppItem::AppItem(const QDBusObjectPath &entry, QWidget *parent) updateWindowInfos(m_itemEntryInter->windowInfos()); refershIcon(); + + connect(GSettingsByApp(), &QGSettings::changed, this, &AppItem::onGSettingsChanged); + connect(GSettingsByDockApp(), &QGSettings::changed, this, &AppItem::onGSettingsChanged); } AppItem::~AppItem() @@ -296,6 +315,10 @@ void AppItem::paintEvent(QPaintEvent *e) void AppItem::mouseReleaseEvent(QMouseEvent *e) { + if (checkGSettingsControl()) { + return; + } + if (e->button() == Qt::MiddleButton) { m_itemEntryInter->NewInstance(QX11Info::getTimestamp()); @@ -322,6 +345,10 @@ void AppItem::mouseReleaseEvent(QMouseEvent *e) void AppItem::mousePressEvent(QMouseEvent *e) { + if (checkGSettingsControl()) { + return; + } + m_updateIconGeometryTimer->stop(); hidePopup(); @@ -355,6 +382,10 @@ void AppItem::mouseMoveEvent(QMouseEvent *e) void AppItem::wheelEvent(QWheelEvent *e) { + if (checkGSettingsControl()) { + return; + } + QWidget::wheelEvent(e); if (qAbs(e->angleDelta().y()) > 20) { @@ -371,6 +402,10 @@ void AppItem::resizeEvent(QResizeEvent *e) void AppItem::dragEnterEvent(QDragEnterEvent *e) { + if (checkGSettingsControl()) { + return; + } + // ignore drag from panel if (e->source()) { return e->ignore(); @@ -387,6 +422,10 @@ void AppItem::dragEnterEvent(QDragEnterEvent *e) void AppItem::dragMoveEvent(QDragMoveEvent *e) { + if (checkGSettingsControl()) { + return; + } + DockItem::dragMoveEvent(e); if (m_windowInfos.isEmpty()) @@ -422,11 +461,19 @@ void AppItem::showEvent(QShowEvent *e) { DockItem::showEvent(e); + QTimer::singleShot(0, this, [=] { + onGSettingsChanged("enable"); + }); + refershIcon(); } void AppItem::showHoverTips() { + if (checkGSettingsControl()) { + return; + } + if (!m_windowInfos.isEmpty()) return showPreview(); @@ -447,6 +494,10 @@ const QString AppItem::contextMenu() const QWidget *AppItem::popupTips() { + if (checkGSettingsControl()) { + return nullptr; + } + if (m_dragging) return nullptr; @@ -464,6 +515,10 @@ QWidget *AppItem::popupTips() void AppItem::startDrag() { + if (checkGSettingsControl()) { + return; + } + m_dragging = true; update(); @@ -643,3 +698,27 @@ void AppItem::checkAttentionEffect() }); } +void AppItem::onGSettingsChanged(const QString& key) { + if (key != "enable") { + return; + } + + QGSettings *setting = m_itemEntryInter->isDocked() + ? GSettingsByDockApp() + : GSettingsByActiveApp(); + + if (setting->keys().contains("enable")) { + const bool isEnable = GSettingsByApp()->keys().contains("enable") && GSettingsByApp()->get("enable").toBool(); + setVisible(isEnable && setting->get("enable").toBool()); + } +} + +bool AppItem::checkGSettingsControl() const +{ + QGSettings *setting = m_itemEntryInter->isDocked() + ? GSettingsByDockApp() + : GSettingsByActiveApp(); + + return (setting->keys().contains("control") && setting->get("control").toBool()) || + (GSettingsByApp()->keys().contains("control") && GSettingsByApp()->get("control").toBool()); +} diff --git a/frame/item/appitem.h b/frame/item/appitem.h index d9703f5d2..aabcaf840 100644 --- a/frame/item/appitem.h +++ b/frame/item/appitem.h @@ -96,6 +96,8 @@ private slots: void playSwingEffect(); void stopSwingEffect(); void checkAttentionEffect(); + void onGSettingsChanged(const QString& key); + bool checkGSettingsControl() const; private: TipsWidget *m_appNameTips; diff --git a/frame/item/launcheritem.cpp b/frame/item/launcheritem.cpp index 4776d15bd..dfb4354d1 100644 --- a/frame/item/launcheritem.cpp +++ b/frame/item/launcheritem.cpp @@ -28,6 +28,7 @@ #include #include #include +#include DCORE_USE_NAMESPACE @@ -35,12 +36,15 @@ LauncherItem::LauncherItem(QWidget *parent) : DockItem(parent) , m_launcherInter(new LauncherInter("com.deepin.dde.Launcher", "/com/deepin/dde/Launcher", QDBusConnection::sessionBus(), this)) , m_tips(new TipsWidget(this)) + , m_gsettings(new QGSettings("com.deepin.dde.dock.module.launcher")) { m_launcherInter->setSync(true, false); setAccessibleName("Launcher"); m_tips->setVisible(false); m_tips->setObjectName("launcher"); + + connect(m_gsettings, &QGSettings::changed, this, &LauncherItem::onGSettingsChanged); } void LauncherItem::refershIcon() @@ -58,6 +62,14 @@ void LauncherItem::refershIcon() update(); } +void LauncherItem::showEvent(QShowEvent* event) { + QTimer::singleShot(0, this, [=] { + onGSettingsChanged("enable"); + }); + + return DockItem::showEvent(event); +} + void LauncherItem::paintEvent(QPaintEvent *e) { DockItem::paintEvent(e); @@ -85,6 +97,10 @@ void LauncherItem::resizeEvent(QResizeEvent *e) void LauncherItem::mousePressEvent(QMouseEvent *e) { + if (checkGSettingsControl()) { + return; + } + hidePopup(); return QWidget::mousePressEvent(e); @@ -92,6 +108,10 @@ void LauncherItem::mousePressEvent(QMouseEvent *e) void LauncherItem::mouseReleaseEvent(QMouseEvent *e) { + if (checkGSettingsControl()) { + return; + } + if (e->button() != Qt::LeftButton) return; @@ -102,6 +122,26 @@ void LauncherItem::mouseReleaseEvent(QMouseEvent *e) QWidget *LauncherItem::popupTips() { + if (checkGSettingsControl()) { + return nullptr; + } + m_tips->setText(tr("Launcher")); return m_tips; } + +void LauncherItem::onGSettingsChanged(const QString& key) { + if (key != "enable") { + return; + } + + if (m_gsettings->keys().contains("enable")) { + setVisible(m_gsettings->get("enable").toBool()); + } +} + +bool LauncherItem::checkGSettingsControl() const +{ + return m_gsettings->keys().contains("control") + && m_gsettings->get("control").toBool(); +} diff --git a/frame/item/launcheritem.h b/frame/item/launcheritem.h index b7596c82a..7e8b1ab51 100644 --- a/frame/item/launcheritem.h +++ b/frame/item/launcheritem.h @@ -27,8 +27,10 @@ #include + using LauncherInter = com::deepin::dde::Launcher; +class QGSettings; class LauncherItem : public DockItem { Q_OBJECT @@ -40,6 +42,9 @@ public: void refershIcon(); +protected: + void showEvent(QShowEvent* event) override; + private: void paintEvent(QPaintEvent *e); void resizeEvent(QResizeEvent *e); @@ -48,11 +53,16 @@ private: QWidget *popupTips(); + void onGSettingsChanged(const QString& key); + + bool checkGSettingsControl() const; + private: QPixmap m_smallIcon; QPixmap m_largeIcon; LauncherInter *m_launcherInter; TipsWidget *m_tips; + QGSettings* m_gsettings; }; #endif // LAUNCHERITEM_H diff --git a/frame/item/pluginsitem.cpp b/frame/item/pluginsitem.cpp index e81d299f2..0bdec2bbb 100644 --- a/frame/item/pluginsitem.cpp +++ b/frame/item/pluginsitem.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #define PLUGIN_ITEM_DRAG_THRESHOLD 20 @@ -57,6 +58,10 @@ PluginsItem::PluginsItem(PluginsItemInterface* const pluginInter, const QString setLayout(hLayout); setAccessibleName(pluginInter->pluginName() + "-" + m_itemKey); setAttribute(Qt::WA_TranslucentBackground); + + m_gsettings = new QGSettings(QString("com.deepin.dde.dock.module.%1").arg(pluginInter->pluginName()).toUtf8()); + m_gsettings->setParent(this); + connect(m_gsettings, &QGSettings::changed, this, &PluginsItem::onGSettingsChanged); } PluginsItem::~PluginsItem() @@ -147,6 +152,16 @@ void PluginsItem::refershIcon() m_pluginInter->refreshIcon(m_itemKey); } +void PluginsItem::onGSettingsChanged(const QString& key) { + if (key != "enable") { + return; + } + + if (m_gsettings->keys().contains("enable")) { + setVisible(m_gsettings->get("enable").toBool()); + } +} + QWidget *PluginsItem::centralWidget() const { return m_centralWidget; @@ -154,6 +169,10 @@ QWidget *PluginsItem::centralWidget() const void PluginsItem::mousePressEvent(QMouseEvent *e) { + if (checkGSettingsControl()) { + return; + } + m_hover = false; update(); @@ -169,6 +188,10 @@ void PluginsItem::mousePressEvent(QMouseEvent *e) void PluginsItem::mouseMoveEvent(QMouseEvent *e) { + if (checkGSettingsControl()) { + return; + } + if (e->buttons() != Qt::LeftButton) return DockItem::mouseMoveEvent(e); @@ -181,6 +204,10 @@ void PluginsItem::mouseMoveEvent(QMouseEvent *e) void PluginsItem::mouseReleaseEvent(QMouseEvent *e) { + if (checkGSettingsControl()) { + return; + } + DockItem::mouseReleaseEvent(e); if (e->button() != Qt::LeftButton) @@ -200,6 +227,10 @@ void PluginsItem::mouseReleaseEvent(QMouseEvent *e) void PluginsItem::enterEvent(QEvent *event) { + if (checkGSettingsControl()) { + return; + } + m_hover = true; update(); @@ -220,9 +251,23 @@ void PluginsItem::leaveEvent(QEvent *event) DockItem::leaveEvent(event); } +void PluginsItem::showEvent(QShowEvent* event) { + QTimer::singleShot(0, this, [=] { + onGSettingsChanged("enable"); + }); + + return DockItem::showEvent(event); +} + bool PluginsItem::eventFilter(QObject *watched, QEvent *event) { if (watched == m_centralWidget) { + if (event->type() == QEvent::MouseButtonPress || + event->type() == QEvent::MouseButtonRelease) { + if (checkGSettingsControl()) { + return true; + } + } if (event->type() == QEvent::MouseButtonRelease) { m_hover = false; update(); @@ -252,6 +297,10 @@ const QString PluginsItem::contextMenu() const QWidget *PluginsItem::popupTips() { + if (checkGSettingsControl()) { + return nullptr; + } + return m_pluginInter->itemTipsWidget(m_itemKey); } @@ -301,3 +350,9 @@ void PluginsItem::mouseClicked() if (w) showPopupApplet(w); } + +bool PluginsItem::checkGSettingsControl() const +{ + return m_gsettings->keys().contains("control") + && m_gsettings->get("control").toBool(); +} diff --git a/frame/item/pluginsitem.h b/frame/item/pluginsitem.h index 3ccb65579..3307435d7 100644 --- a/frame/item/pluginsitem.h +++ b/frame/item/pluginsitem.h @@ -25,6 +25,7 @@ #include "dockitem.h" #include "pluginsiteminterface.h" +class QGSettings; class PluginsItem : public DockItem { Q_OBJECT @@ -54,6 +55,7 @@ public: public slots: void refershIcon() override; + void onGSettingsChanged(const QString& key); protected: void mousePressEvent(QMouseEvent *e) override; @@ -62,6 +64,7 @@ protected: void enterEvent(QEvent *event) Q_DECL_OVERRIDE; void leaveEvent(QEvent *event) Q_DECL_OVERRIDE; bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE; + void showEvent(QShowEvent* event) override; void invokedMenuItem(const QString &itemId, const bool checked) override; void showPopupWindow(QWidget * const content, const bool model = false) override; @@ -71,6 +74,7 @@ protected: private: void startDrag(); void mouseClicked(); + bool checkGSettingsControl() const; private: PluginsItemInterface * const m_pluginInter; @@ -81,6 +85,7 @@ private: bool m_hover; static QPoint MousePressPoint; + QGSettings* m_gsettings; }; #endif // PLUGINSITEM_H diff --git a/frame/item/traypluginitem.cpp b/frame/item/traypluginitem.cpp index afcbb2813..7eb16f8a2 100644 --- a/frame/item/traypluginitem.cpp +++ b/frame/item/traypluginitem.cpp @@ -22,6 +22,7 @@ #include "traypluginitem.h" #include +#include TrayPluginItem::TrayPluginItem(PluginsItemInterface * const pluginInter, const QString &itemKey, QWidget *parent) : PluginsItem(pluginInter, itemKey, parent) @@ -47,6 +48,17 @@ bool TrayPluginItem::eventFilter(QObject *watched, QEvent *e) // 监听插件Widget的"FashionTraySize"属性 // 当接收到这个属性变化的事件后,重新计算和设置dock的大小 + if (watched == centralWidget()) { + if (e->type() == QEvent::MouseButtonPress || + e->type() == QEvent::MouseButtonRelease) { + QGSettings settings("com.deepin.dde.dock.module.systemtray"); + if (settings.keys().contains("control") + && settings.get("control").toBool()) { + return true; + } + } + } + if (watched == centralWidget() && e->type() == QEvent::DynamicPropertyChange) { const QString &propertyName = static_cast(e)->propertyName(); if (propertyName == "FashionTraySize") { diff --git a/gschema/com.deepin.dde.dock.module.gschema.xml b/gschema/com.deepin.dde.dock.module.gschema.xml new file mode 100644 index 000000000..07cb209be --- /dev/null +++ b/gschema/com.deepin.dde.dock.module.gschema.xml @@ -0,0 +1,211 @@ + + + + + false + Blocking event + + Blocking mouse events + + + + true + Module Enable + + Control Module Enable + + + + + + false + Blocking event + + Blocking mouse events + + + + true + Module Enable + + Control Module Enable + + + + + + false + Blocking event + + Blocking mouse events + + + + true + Module Enable + + Control Module Enable + + + + + + false + Blocking event + + Blocking mouse events + + + + true + Module Enable + + Control Module Enable + + + + + + false + Blocking event + + Blocking mouse events + + + + true + Module Enable + + Control Module Enable + + + + + + false + Blocking event + + Blocking mouse events + + + + true + Module Enable + + Control Module Enable + + + + + + false + Blocking event + + Blocking mouse events + + + + true + Module Enable + + Control Module Enable + + + + + + false + Blocking event + + Blocking mouse events + + + + true + Module Enable + + Control Module Enable + + + + + + false + Blocking event + + Blocking mouse events + + + + true + Module Enable + + Control Module Enable + + + + + + false + Blocking event + + Blocking mouse events + + + + true + Module Enable + + Control Module Enable + + + + + + false + Blocking event + + Blocking mouse events + + + + true + Module Enable + + Control Module Enable + + + + + + false + Blocking event + + Blocking mouse events + + + + true + Module Enable + + Control Module Enable + + + + + + false + Blocking event + + Blocking mouse events + + + + true + Module Enable + + Control Module Enable + + + + diff --git a/plugins/tray/system-trays/systemtrayitem.cpp b/plugins/tray/system-trays/systemtrayitem.cpp index 2856739ae..ca5a7ffc6 100644 --- a/plugins/tray/system-trays/systemtrayitem.cpp +++ b/plugins/tray/system-trays/systemtrayitem.cpp @@ -26,6 +26,7 @@ #include #include +#include Dock::Position SystemTrayItem::DockPosition = Dock::Position::Top; QPointer SystemTrayItem::PopupWindow = nullptr; @@ -78,6 +79,10 @@ SystemTrayItem::SystemTrayItem(PluginsItemInterface * const pluginInter, const Q connect(m_popupAdjustDelayTimer, &QTimer::timeout, this, &SystemTrayItem::updatePopupPosition, Qt::QueuedConnection); grabGesture(Qt::TapAndHoldGesture); + + m_gsettings = new QGSettings(QString("com.deepin.dde.dock.module.%1").arg(pluginInter->pluginName()).toUtf8()); + m_gsettings->setParent(this); + connect(m_gsettings, &QGSettings::changed, this, &SystemTrayItem::onGSettingsChanged); } SystemTrayItem::~SystemTrayItem() @@ -175,6 +180,10 @@ bool SystemTrayItem::event(QEvent *event) void SystemTrayItem::enterEvent(QEvent *event) { + if (checkGSettingsControl()) { + return; + } + m_popupTipsDelayTimer->start(); update(); @@ -196,6 +205,10 @@ void SystemTrayItem::leaveEvent(QEvent *event) void SystemTrayItem::mousePressEvent(QMouseEvent *event) { + if (checkGSettingsControl()) { + return; + } + m_popupTipsDelayTimer->stop(); hideNonModel(); @@ -210,6 +223,10 @@ void SystemTrayItem::mousePressEvent(QMouseEvent *event) void SystemTrayItem::mouseReleaseEvent(QMouseEvent *event) { + if (checkGSettingsControl()) { + return; + } + if (event->button() != Qt::LeftButton) { return; } @@ -230,6 +247,14 @@ void SystemTrayItem::mouseReleaseEvent(QMouseEvent *event) AbstractTrayWidget::mouseReleaseEvent(event); } +void SystemTrayItem::showEvent(QShowEvent* event) { + QTimer::singleShot(0, this, [=] { + onGSettingsChanged("enable"); + }); + + return AbstractTrayWidget::showEvent(event); +} + const QPoint SystemTrayItem::popupMarkPoint() const { QPoint p(topleftPoint()); @@ -447,3 +472,20 @@ void SystemTrayItem::updatePopupPosition() const QPoint p = popupMarkPoint(); PopupWindow->show(p, PopupWindow->model()); } + +void SystemTrayItem::onGSettingsChanged(const QString &key) { + if (key != "enable") { + return; + } + + if (m_gsettings->keys().contains("enable")) { + const bool visible = m_gsettings->get("enable").toBool(); + setVisible(visible); + emit itemVisibleChanged(visible); + } +} + +bool SystemTrayItem::checkGSettingsControl() const +{ + return m_gsettings->get("control").toBool(); +} diff --git a/plugins/tray/system-trays/systemtrayitem.h b/plugins/tray/system-trays/systemtrayitem.h index e9ab2f578..f763e019a 100644 --- a/plugins/tray/system-trays/systemtrayitem.h +++ b/plugins/tray/system-trays/systemtrayitem.h @@ -30,6 +30,7 @@ #include +class QGSettings; class SystemTrayItem : public AbstractTrayWidget { Q_OBJECT @@ -61,12 +62,16 @@ public: void showPopupApplet(QWidget * const applet); void hidePopup(); +signals: + void itemVisibleChanged(bool visible); + protected: bool event(QEvent *event) Q_DECL_OVERRIDE; void enterEvent(QEvent *event) Q_DECL_OVERRIDE; void leaveEvent(QEvent *event) Q_DECL_OVERRIDE; void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE; void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE; + void showEvent(QShowEvent* event) override; protected: const QPoint popupMarkPoint() const; @@ -86,6 +91,8 @@ protected Q_SLOTS: private: void updatePopupPosition(); + void onGSettingsChanged(const QString &key); + bool checkGSettingsControl() const; private: bool m_popupShown; @@ -103,6 +110,7 @@ private: static Dock::Position DockPosition; static QPointer PopupWindow; + QGSettings* m_gsettings; }; #endif // SYSTEMTRAYITEM_H diff --git a/plugins/tray/system-trays/systemtrayscontroller.cpp b/plugins/tray/system-trays/systemtrayscontroller.cpp index 0c8ca884f..45c2742e2 100644 --- a/plugins/tray/system-trays/systemtrayscontroller.cpp +++ b/plugins/tray/system-trays/systemtrayscontroller.cpp @@ -41,6 +41,14 @@ void SystemTraysController::itemAdded(PluginsItemInterface * const itemInter, co return; SystemTrayItem *item = new SystemTrayItem(itemInter, itemKey); + connect(item, &SystemTrayItem::itemVisibleChanged, this, [=] (bool visible){ + if (visible) { + emit pluginItemAdded(itemKey, item); + } + else { + emit pluginItemRemoved(itemKey, item); + } + }, Qt::QueuedConnection); item->setVisible(false); diff --git a/plugins/tray/trayplugin.cpp b/plugins/tray/trayplugin.cpp index 75153aca6..12ba08f7e 100644 --- a/plugins/tray/trayplugin.cpp +++ b/plugins/tray/trayplugin.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include "../widgets/tipswidget.h" #include "xcb/xcb_icccm.h" @@ -403,6 +404,11 @@ void TrayPlugin::trayXEmbedAdded(const QString &itemKey, quint32 winId) return; } + QGSettings settings("com.deepin.dde.dock.module.systemtray"); + if (settings.keys().contains("enable") && !settings.get("enable").toBool()) { + return; + } + AbstractTrayWidget *trayWidget = new XEmbedTrayWidget(winId); addTrayWidget(itemKey, trayWidget); } @@ -413,6 +419,11 @@ void TrayPlugin::traySNIAdded(const QString &itemKey, const QString &sniServiceP return; } + QGSettings settings("com.deepin.dde.dock.module.systemtray"); + if (settings.keys().contains("enable") && !settings.get("enable").toBool()) { + return; + } + SNITrayWidget *trayWidget = new SNITrayWidget(sniServicePath); if (trayWidget->status() == SNITrayWidget::ItemStatus::Passive) { m_passiveSNITrayMap.insert(itemKey, trayWidget); @@ -429,6 +440,11 @@ void TrayPlugin::trayIndicatorAdded(const QString &itemKey, const QString &indic return; } + QGSettings settings("com.deepin.dde.dock.module.systemtray"); + if (settings.keys().contains("enable") && !settings.get("enable").toBool()) { + return; + } + IndicatorTray *indicatorTray = nullptr; if (!m_indicatorMap.keys().contains(indicatorName)) { indicatorTray = new IndicatorTray(indicatorName);