From 669ea85c57567624e687d92898266f78bb55f1fa Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: 周三, 20 12月 2023 22:30:54 +0800 Subject: [PATCH] minor tweaks --- src/widgets/widgetitemdelegate.cpp | 6 ------ src/core/contexts/abstractwindowcontext.cpp | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/core/contexts/abstractwindowcontext.cpp b/src/core/contexts/abstractwindowcontext.cpp index 193cae2..ca51be2 100644 --- a/src/core/contexts/abstractwindowcontext.cpp +++ b/src/core/contexts/abstractwindowcontext.cpp @@ -19,7 +19,7 @@ m_host = host; m_delegate.reset(delegate); - m_windowHandle = m_delegate->window(m_host); + m_windowHandle = m_delegate->hostWindow(m_host); if (m_windowHandle) { winIdChanged(); } @@ -198,7 +198,7 @@ void AbstractWindowContext::notifyWinIdChange() { auto oldWindow = m_windowHandle; - m_windowHandle = m_delegate->window(m_host); + m_windowHandle = m_delegate->hostWindow(m_host); if (oldWindow == m_windowHandle) return; winIdChanged(); diff --git a/src/widgets/widgetitemdelegate.cpp b/src/widgets/widgetitemdelegate.cpp index 214617b..1bee67a 100644 --- a/src/widgets/widgetitemdelegate.cpp +++ b/src/widgets/widgetitemdelegate.cpp @@ -47,12 +47,6 @@ if (!minSize.isEmpty() && !maxSize.isEmpty() && (minSize == maxSize)) { return true; } - // Usually set by the user. - const QSizePolicy sizePolicy = widget->sizePolicy(); - if ((sizePolicy.horizontalPolicy() == QSizePolicy::Fixed) && - (sizePolicy.verticalPolicy() == QSizePolicy::Fixed)) { - return true; - } return false; } -- Gitblit v1.9.1