mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
DolphinQt: Resolve deprecated usage of margin()
This function has been marked as obsolete. In Qt 6.0 it's removed entirely, so we must use getContentsMargin() explicitly instead (margin() would do this for us). Ditto for setMargin(), in which case we use setContentsMargin instead. setMargin() would just pass its argument to all four parameters of setContentsMargin(), so we can do the same.
This commit is contained in:
@ -151,7 +151,11 @@ QSize FlowLayout::minimumSize() const
|
||||
for (const auto& item : m_item_list)
|
||||
size = size.expandedTo(item->minimumSize());
|
||||
|
||||
size += QSize(2 * margin(), 2 * margin());
|
||||
// Any direction's margin works, as they all set the same within the constructor.
|
||||
int margin = 0;
|
||||
getContentsMargins(&margin, nullptr, nullptr, nullptr);
|
||||
|
||||
size += QSize(2 * margin, 2 * margin);
|
||||
return size;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user