Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
System
Dolphin
Commits
e3049432
Commit
e3049432
authored
Nov 11, 2021
by
Alexander Lohnau
💬
Browse files
Port deprecated QFontMetrics::horizontalAdvance
parent
906622ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/kitemviews/kitemlistview.cpp
View file @
e3049432
...
...
@@ -2237,7 +2237,7 @@ QHash<QByteArray, qreal> KItemListView::preferredColumnWidths(const KItemRangeLi
const
int
headerMargin
=
m_headerWidget
->
style
()
->
pixelMetric
(
QStyle
::
PM_HeaderMargin
);
for
(
const
QByteArray
&
visibleRole
:
qAsConst
(
m_visibleRoles
))
{
const
QString
headerText
=
m_model
->
roleDescription
(
visibleRole
);
const
qreal
headerWidth
=
fontMetrics
.
width
(
headerText
)
+
gripMargin
+
headerMargin
*
2
;
const
qreal
headerWidth
=
fontMetrics
.
horizontalAdvance
(
headerText
)
+
gripMargin
+
headerMargin
*
2
;
widths
.
insert
(
visibleRole
,
headerWidth
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment