From c4e41fa534620a29b3df1349a54993a42faa543e Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Mon, 5 Feb 2018 20:44:46 -0800 Subject: [PATCH] QStyleHelper: Remove unused function setWidgetSizePolicy() This used to be public back when QMacStyle had public API. Long replaced by the WA_Mac*Size attributes. Change-Id: Ifd948e648ec90ff29b6b3652bc9d5cb1dc9c6a09 Reviewed-by: Jake Petroules --- src/widgets/styles/qstylehelper.cpp | 8 -------- src/widgets/styles/qstylehelper_p.h | 1 - 2 files changed, 9 deletions(-) diff --git a/src/widgets/styles/qstylehelper.cpp b/src/widgets/styles/qstylehelper.cpp index 373699a7aa..8679d96eda 100644 --- a/src/widgets/styles/qstylehelper.cpp +++ b/src/widgets/styles/qstylehelper.cpp @@ -411,14 +411,6 @@ QWindow *styleObjectWindow(QObject *so) return 0; } -void setWidgetSizePolicy(const QWidget *widget, WidgetSizePolicy policy) -{ - QWidget *wadget = const_cast(widget); - wadget->setAttribute(Qt::WA_MacNormalSize, policy == SizeLarge); - wadget->setAttribute(Qt::WA_MacSmallSize, policy == SizeSmall); - wadget->setAttribute(Qt::WA_MacMiniSize, policy == SizeMini); -} - WidgetSizePolicy widgetSizePolicy(const QWidget *widget, const QStyleOption *opt) { while (widget) { diff --git a/src/widgets/styles/qstylehelper_p.h b/src/widgets/styles/qstylehelper_p.h index bd263cea7b..260860bf4d 100644 --- a/src/widgets/styles/qstylehelper_p.h +++ b/src/widgets/styles/qstylehelper_p.h @@ -94,7 +94,6 @@ namespace QStyleHelper enum WidgetSizePolicy { SizeLarge = 0, SizeSmall = 1, SizeMini = 2, SizeDefault = -1 }; - void setWidgetSizePolicy(const QWidget *w, WidgetSizePolicy policy); Q_WIDGETS_EXPORT WidgetSizePolicy widgetSizePolicy(const QWidget *w, const QStyleOption *opt = 0); }