forked from qt-creator/qt-creator
Utils: Fix two deprecation warnings
QSize actualSize(const QSize &size, Mode mode = Normal, State state = Off) const;
QT_DEPRECATED_VERSION_X_6_0("Use actualSize(size) instead")
QSize actualSize(QWindow *window, const QSize &size, Mode mode = Normal, State state = Off) const;
Change-Id: I6f70d148afb5b3fb4f3ab7ee86f2d5eba6618ac5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -689,8 +689,7 @@ void FancyIconButton::animateShow(bool visible)
|
||||
|
||||
QSize FancyIconButton::sizeHint() const
|
||||
{
|
||||
QWindow *window = this->window()->windowHandle();
|
||||
return icon().actualSize(window, QSize(32, 16)); // Find flags icon can be wider than 16px
|
||||
return icon().actualSize(QSize(32, 16)); // Find flags icon can be wider than 16px
|
||||
}
|
||||
|
||||
void FancyIconButton::keyPressEvent(QKeyEvent *ke)
|
||||
|
||||
@@ -50,8 +50,7 @@ void IconButton::leaveEvent(QEvent *e)
|
||||
|
||||
QSize IconButton::sizeHint() const
|
||||
{
|
||||
QWindow *window = this->window()->windowHandle();
|
||||
QSize s = icon().actualSize(window, QSize(32, 16)) + QSize(8, 8);
|
||||
QSize s = icon().actualSize(QSize(32, 16)) + QSize(8, 8);
|
||||
|
||||
if (StyleHelper::toolbarStyle() == StyleHelper::ToolbarStyleRelaxed)
|
||||
s += QSize(5, 5);
|
||||
|
||||
Reference in New Issue
Block a user