https://bugs.kde.org/show_bug.cgi?id=511547

--- Comment #2 from Christian Aguilera <[email protected]> ---
It seems the problem is that `_listener` in `ToolsAreaManager` is never
destroyed, therefore the tools area manager continues to operate even after a
new `QStyle` has been set in the application.

This piece of code is what appears to be modifying the tool bars:

```cpp
    if (window->toolBarArea(toolbar) == Qt::TopToolBarArea) {
        widget->setPalette(palette());
        appendIfNotAlreadyExists(window, toolbar);
        return true;
    }
```
https://invent.kde.org/plasma/breeze/-/blob/e853447a8aaaa0ea0f04d0f43e05637272a4cbb6/kstyle/breezetoolsareamanager.cpp#L147-151

The potential fix would be:

```diff
diff --git a/kstyle/breezetoolsareamanager.cpp
b/kstyle/breezetoolsareamanager.cpp
index f2aaec4..7254796 100644
--- a/kstyle/breezetoolsareamanager.cpp
+++ b/kstyle/breezetoolsareamanager.cpp
@@ -46,6 +46,7 @@ ToolsAreaManager::ToolsAreaManager()

 ToolsAreaManager::~ToolsAreaManager()
 {
+    delete _listener;
 }

 void ToolsAreaManager::loadSchemeConfig(const QString &path)
```

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to