mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-24 18:03:53 +03:00
widgetexplorer:delete on each hiding
This commit is contained in:
parent
53827549d7
commit
1e487a4b1c
@ -19,6 +19,7 @@
|
||||
|
||||
#include "viewsettingsfactory.h"
|
||||
|
||||
// local
|
||||
#include "primaryconfigview.h"
|
||||
#include "widgetexplorerview.h"
|
||||
#include "../view.h"
|
||||
@ -38,10 +39,6 @@ ViewSettingsFactory::~ViewSettingsFactory()
|
||||
if (m_primaryConfigView) {
|
||||
delete m_primaryConfigView;
|
||||
}
|
||||
|
||||
if (m_widgetExplorerView) {
|
||||
delete m_widgetExplorerView;
|
||||
}
|
||||
}
|
||||
|
||||
bool ViewSettingsFactory::hasOrphanSettings() const
|
||||
@ -88,13 +85,9 @@ ViewPart::PrimaryConfigView *ViewSettingsFactory::primaryConfigView(Latte::View
|
||||
|
||||
ViewPart::WidgetExplorerView *ViewSettingsFactory::widgetExplorerView(Latte::View *view)
|
||||
{
|
||||
if (!m_widgetExplorerView) {
|
||||
m_widgetExplorerView = new ViewPart::WidgetExplorerView(view);
|
||||
} else {
|
||||
m_widgetExplorerView->setParentView(view);
|
||||
}
|
||||
|
||||
return m_widgetExplorerView;
|
||||
//! it is deleted on hiding
|
||||
auto widgetExplorerView = new ViewPart::WidgetExplorerView(view);
|
||||
return widgetExplorerView;
|
||||
}
|
||||
|
||||
|
||||
|
@ -60,7 +60,6 @@ public:
|
||||
|
||||
private:
|
||||
QPointer<ViewPart::PrimaryConfigView> m_primaryConfigView;
|
||||
QPointer<ViewPart::WidgetExplorerView> m_widgetExplorerView;
|
||||
QPointer<Plasma::Containment> m_lastContainment;
|
||||
|
||||
};
|
||||
|
@ -230,7 +230,9 @@ void WidgetExplorerView::hideConfigWindow()
|
||||
return;
|
||||
}
|
||||
|
||||
QTimer::singleShot(100, [this]() {
|
||||
deleteLater();
|
||||
|
||||
/*QTimer::singleShot(100, [this]() {
|
||||
//! avoid crashes under wayland because some mouse events are sended after the surface is destroyed
|
||||
|
||||
if (m_shellSurface) {
|
||||
@ -239,7 +241,7 @@ void WidgetExplorerView::hideConfigWindow()
|
||||
} else {
|
||||
hide();
|
||||
}
|
||||
});
|
||||
});*/
|
||||
}
|
||||
|
||||
void WidgetExplorerView::syncSlideEffect()
|
||||
|
Loading…
x
Reference in New Issue
Block a user