Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
80033860
Commit
80033860
authored
Aug 19, 2013
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: PLModel: don't rely on model's root for finding root type
parent
5b779465
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
+13
-4
modules/gui/qt4/components/playlist/playlist_model.hpp
modules/gui/qt4/components/playlist/playlist_model.hpp
+2
-1
No files found.
modules/gui/qt4/components/playlist/playlist_model.cpp
View file @
80033860
...
...
@@ -613,11 +613,20 @@ PLItem * PLModel::findInner( PLItem *root, int i_id, bool b_isinputid ) const
PLModel
::
pl_nodetype
PLModel
::
getPLRootType
()
const
{
if
(
rootItem
->
id
(
PLAYLIST_ID
)
==
3
)
/* can't rely on rootitem as it depends on view / rebuild() */
AbstractPLItem
*
plitem
=
rootItem
;
while
(
plitem
->
parent
()
)
plitem
=
plitem
->
parent
();
switch
(
plitem
->
id
(
PLAYLIST_ID
)
)
{
case
2
:
return
ROOTTYPE_CURRENT_PLAYING
;
case
3
:
return
ROOTTYPE_MEDIA_LIBRARY
;
else
return
ROOTTYPE_
CURRENT_PLAYING
;
// id == 2
/* FIXME: handle all cases */
default:
return
ROOTTYPE_
OTHER
;
}
}
bool
PLModel
::
canEdit
()
const
...
...
modules/gui/qt4/components/playlist/playlist_model.hpp
View file @
80033860
...
...
@@ -221,7 +221,8 @@ private:
enum
pl_nodetype
{
ROOTTYPE_CURRENT_PLAYING
,
ROOTTYPE_MEDIA_LIBRARY
ROOTTYPE_MEDIA_LIBRARY
,
ROOTTYPE_OTHER
};
pl_nodetype
getPLRootType
()
const
;
...
...
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