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
Games
Kajongg
Commits
c4effeda
Commit
c4effeda
authored
May 06, 2021
by
Wolfgang Rohdewald
Browse files
ToolBarItem: do not override QListWidgetItem.icon/text
found by pylint only after porting to qtpy
parent
5e01f656
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/kdestub.py
View file @
c4effeda
...
...
@@ -1308,13 +1308,12 @@ class ToolBarItem(QListWidgetItem):
def
__init__
(
self
,
action
,
parent
):
self
.
action
=
action
self
.
parent
=
parent
QListWidgetItem
.
__init__
(
self
,
self
.
icon
,
self
.
text
,
parent
)
QListWidgetItem
.
__init__
(
self
,
self
.
__
icon
()
,
self
.
__
text
()
,
parent
)
# drop between items, not onto items
self
.
setFlags
(
(
self
.
flags
()
|
Qt
.
ItemIsDragEnabled
)
&
~
Qt
.
ItemIsDropEnabled
)
@
property
def
icon
(
self
):
def
__icon
(
self
):
"""the action icon, default is an empty icon"""
result
=
self
.
action
.
icon
()
if
result
.
isNull
():
...
...
@@ -1327,8 +1326,7 @@ class ToolBarItem(QListWidgetItem):
result
=
self
.
emptyIcon
return
result
@
property
def
text
(
self
):
def
__text
(
self
):
"""the action text"""
return
self
.
action
.
text
().
replace
(
'&'
,
''
)
...
...
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