3
3
# Picard, the next-generation MusicBrainz tagger
4
4
#
5
5
# Copyright (C) 2006-2007 Lukáš Lalinský
6
- # Copyright (C) 2010, 2018-2021 Philipp Wolfer
6
+ # Copyright (C) 2010, 2018-2021, 2024 Philipp Wolfer
7
7
# Copyright (C) 2012, 2014 Wieland Hoffmann
8
8
# Copyright (C) 2012-2014 Michael Wiencek
9
9
# Copyright (C) 2013-2015, 2018-2021, 2023-2024 Laurent Monin
25
25
# along with this program; if not, write to the Free Software
26
26
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27
27
28
+ from PyQt6 .QtCore import Qt
28
29
29
30
from picard .config import (
30
31
Option ,
@@ -83,7 +84,8 @@ def _load_cover_art_providers(self):
83
84
"""
84
85
self .ui .ca_providers_list .clear ()
85
86
for p in cover_art_providers ():
86
- item = CheckboxListItem (_ (p .title ), checked = p .enabled , data = p .name )
87
+ item = CheckboxListItem (_ (p .title ), checked = p .enabled )
88
+ item .setData (Qt .ItemDataRole .UserRole , p .name )
87
89
self .ui .ca_providers_list .addItem (item )
88
90
89
91
def load (self ):
@@ -101,7 +103,7 @@ def load(self):
101
103
102
104
def _ca_providers (self ):
103
105
for item in qlistwidget_items (self .ui .ca_providers_list ):
104
- yield (item .data , item .checked )
106
+ yield (item .data ( Qt . ItemDataRole . UserRole ) , item .checked )
105
107
106
108
def save (self ):
107
109
config = get_config ()
0 commit comments