Fix build without features.menu

Change-Id: If7947839b8da5abc8ee84aace60cc7de7a053e04
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit d84bf703b505db470e5c7916e3cd630c3e456cef)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Tasuku Suzuki 2021-04-13 14:54:07 +09:00 committed by Qt Cherry-pick Bot
parent 6718bdc88c
commit 49059a4007

View File

@ -599,13 +599,6 @@ void QPushButton::showMenu()
d->_q_popupPressed();
}
void QPushButtonPrivate::init()
{
Q_Q(QPushButton);
q->setAttribute(Qt::WA_MacShowFocusRect);
resetLayoutItemMargins();
}
void QPushButtonPrivate::_q_popupPressed()
{
Q_Q(QPushButton);
@ -670,6 +663,13 @@ QPoint QPushButtonPrivate::adjustedMenuPosition()
#endif // QT_CONFIG(menu)
void QPushButtonPrivate::init()
{
Q_Q(QPushButton);
q->setAttribute(Qt::WA_MacShowFocusRect);
resetLayoutItemMargins();
}
void QPushButtonPrivate::resetLayoutItemMargins()
{
Q_Q(QPushButton);