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
e8dc49e4
Commit
e8dc49e4
authored
Mar 03, 2022
by
Jan Blackquill
🌈
Committed by
Jan Blackquill
Mar 03, 2022
Browse files
KItemListHeaderWidget: don't crash if widget == nullptr
BUG: 449238
parent
505bf52f
Pipeline
#144764
passed with stage
in 3 minutes and 55 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
src/kitemviews/private/kitemlistheaderwidget.cpp
View file @
e8dc49e4
...
...
@@ -417,12 +417,14 @@ void KItemListHeaderWidget::paintRole(QPainter* painter,
int
orderIndex
,
QWidget
*
widget
)
const
{
const
auto
direction
=
widget
?
widget
->
layoutDirection
()
:
qApp
->
layoutDirection
();
// The following code is based on the code from QHeaderView::paintSection().
// SPDX-FileCopyrightText: 2011 Nokia Corporation and/or its subsidiary(-ies).
QStyleOptionHeader
option
;
option
.
direction
=
widget
->
layoutD
irection
()
;
option
.
direction
=
d
irection
;
option
.
textAlignment
=
widget
->
layoutD
irection
()
==
Qt
::
LeftToRight
d
irection
==
Qt
::
LeftToRight
?
Qt
::
AlignLeft
:
Qt
::
AlignRight
;
...
...
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