diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-05-02 21:34:55 +0200 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2022-07-10 12:19:15 +0200 |
commit | c36342371819a4983b5ac2b928acc6a78b857ed8 (patch) | |
tree | 925d5ef6756a205feddc40864c0717e0c6472d44 /launcher/ui/instanceview/VisualGroup.cpp | |
parent | e58158c3cd629717a9742fe08da9b09ed39bc198 (diff) | |
download | PrismLauncher-c36342371819a4983b5ac2b928acc6a78b857ed8.tar.gz PrismLauncher-c36342371819a4983b5ac2b928acc6a78b857ed8.tar.bz2 PrismLauncher-c36342371819a4983b5ac2b928acc6a78b857ed8.zip |
refactor: fix deprecation up to Qt 6
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/ui/instanceview/VisualGroup.cpp')
-rw-r--r-- | launcher/ui/instanceview/VisualGroup.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/launcher/ui/instanceview/VisualGroup.cpp b/launcher/ui/instanceview/VisualGroup.cpp index 8991fb2d..1c2dd7fc 100644 --- a/launcher/ui/instanceview/VisualGroup.cpp +++ b/launcher/ui/instanceview/VisualGroup.cpp @@ -55,7 +55,14 @@ void VisualGroup::update() positionInRow = 0; maxRowHeight = 0; } - auto itemHeight = view->itemDelegate()->sizeHint(view->viewOptions(), item).height(); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + QStyleOptionViewItem viewItemOption; + view->initViewItemOption(&viewItemOption); +#else + QStyleOptionViewItem viewItemOption = view->viewOptions(); +#endif + + auto itemHeight = view->itemDelegate()->sizeHint(viewItemOption, item).height(); if(itemHeight > maxRowHeight) { maxRowHeight = itemHeight; |