Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
ace7419f
Commit
ace7419f
authored
Sep 07, 2009
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: reuse the SD data
When reloading, correctly update the view.
parent
4bc32868
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
modules/gui/qt4/components/playlist/selector.cpp
modules/gui/qt4/components/playlist/selector.cpp
+16
-11
modules/gui/qt4/components/playlist/standardpanel.cpp
modules/gui/qt4/components/playlist/standardpanel.cpp
+0
-1
No files found.
modules/gui/qt4/components/playlist/selector.cpp
View file @
ace7419f
...
...
@@ -77,25 +77,30 @@ void PLSelector::setSource( QTreeWidgetItem *item )
int
i_type
=
item
->
data
(
0
,
Qt
::
UserRole
).
toInt
();
assert
(
(
i_type
==
PL_TYPE
||
i_type
==
ML_TYPE
||
i_type
==
SD_TYPE
)
);
if
(
i_type
==
SD_TYPE
)
{
QString
qs
=
item
->
data
(
0
,
Qt
::
UserRole
+
1
).
toString
();
QString
qs
=
item
->
data
(
0
,
Qt
::
UserRole
+
2
).
toString
();
if
(
!
playlist_IsServicesDiscoveryLoaded
(
THEPL
,
qtu
(
qs
)
)
)
{
playlist_ServicesDiscoveryAdd
(
THEPL
,
qtu
(
qs
)
);
#warning FIXME
emit
activated
(
THEPL
->
p_root_category
->
pp_children
[
THEPL
->
p_root_category
->
i_children
-
1
]
);
playlist_item_t
*
pl_item
=
THEPL
->
p_root_category
->
pp_children
[
THEPL
->
p_root_category
->
i_children
-
1
];
item
->
setData
(
0
,
Qt
::
UserRole
+
1
,
QVariant
::
fromValue
(
pl_item
)
);
emit
activated
(
pl_item
);
return
;
}
}
else
if
(
i_type
==
PL_TYPE
||
i_type
==
ML_TYPE
)
{
if
(
i_type
==
SD_TYPE
)
msg_Dbg
(
p_intf
,
"SD already loaded, reloading"
);
playlist_item_t
*
pl_item
=
item
->
data
(
0
,
Qt
::
UserRole
+
1
).
value
<
playlist_item_t
*>
();
if
(
pl_item
)
emit
activated
(
pl_item
);
}
else
assert
(
0
);
}
void
PLSelector
::
createItems
()
...
...
@@ -132,7 +137,7 @@ void PLSelector::createItems()
{
sd_item
=
new
QTreeWidgetItem
(
QStringList
(
*
ppsz_longname
)
);
sd_item
->
setData
(
0
,
Qt
::
UserRole
,
SD_TYPE
);
sd_item
->
setData
(
0
,
Qt
::
UserRole
+
1
,
qfu
(
*
ppsz_name
)
);
sd_item
->
setData
(
0
,
Qt
::
UserRole
+
2
,
qfu
(
*
ppsz_name
)
);
sds
->
addChild
(
sd_item
);
}
}
...
...
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
ace7419f
...
...
@@ -344,4 +344,3 @@ StandardPLPanel::~StandardPLPanel()
getSettings
()
->
endGroup
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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