Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
1950858c
Commit
1950858c
authored
Aug 14, 2009
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: remove i_input_id from PLItem
parent
79980287
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
12 deletions
+11
-12
modules/gui/qt4/components/playlist/playlist_item.cpp
modules/gui/qt4/components/playlist/playlist_item.cpp
+1
-2
modules/gui/qt4/components/playlist/playlist_item.hpp
modules/gui/qt4/components/playlist/playlist_item.hpp
+0
-1
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
+10
-9
No files found.
modules/gui/qt4/components/playlist/playlist_item.cpp
View file @
1950858c
...
@@ -52,7 +52,6 @@ void PLItem::init( playlist_item_t *_playlist_item, PLItem *parent, PLModel *m,
...
@@ -52,7 +52,6 @@ void PLItem::init( playlist_item_t *_playlist_item, PLItem *parent, PLModel *m,
{
{
parentItem
=
parent
;
/* Can be NULL, but only for the rootItem */
parentItem
=
parent
;
/* Can be NULL, but only for the rootItem */
i_id
=
_playlist_item
->
i_id
;
/* Playlist item specific id */
i_id
=
_playlist_item
->
i_id
;
/* Playlist item specific id */
i_input_id
=
_playlist_item
->
p_input
->
i_id
;
/* Identifier of the input */
model
=
m
;
/* PLModel (QAbsmodel) */
model
=
m
;
/* PLModel (QAbsmodel) */
i_type
=
-
1
;
/* Item type - Avoid segfault */
i_type
=
-
1
;
/* Item type - Avoid segfault */
b_current
=
false
;
/* Is the item the current Item or not */
b_current
=
false
;
/* Is the item the current Item or not */
...
@@ -142,7 +141,7 @@ int PLItem::row() const
...
@@ -142,7 +141,7 @@ int PLItem::row() const
/* update the PL Item, get the good names and so on */
/* update the PL Item, get the good names and so on */
void
PLItem
::
update
(
playlist_item_t
*
p_item
,
bool
iscurrent
)
void
PLItem
::
update
(
playlist_item_t
*
p_item
,
bool
iscurrent
)
{
{
assert
(
p_item
->
p_input
->
i_id
==
i_input_id
);
assert
(
p_item
->
p_input
==
p_input
);
/* Useful for the model */
/* Useful for the model */
i_type
=
p_item
->
p_input
->
i_type
;
i_type
=
p_item
->
p_input
->
i_type
;
...
...
modules/gui/qt4/components/playlist/playlist_item.hpp
View file @
1950858c
...
@@ -66,7 +66,6 @@ protected:
...
@@ -66,7 +66,6 @@ protected:
bool
b_current
;
bool
b_current
;
int
i_type
;
int
i_type
;
int
i_id
;
int
i_id
;
int
i_input_id
;
int
i_showflags
;
int
i_showflags
;
bool
b_is_node
;
bool
b_is_node
;
input_item_t
*
p_input
;
input_item_t
*
p_input
;
...
...
modules/gui/qt4/components/playlist/playlist_model.cpp
View file @
1950858c
...
@@ -121,21 +121,21 @@ Qt::ItemFlags PLModel::flags( const QModelIndex &index ) const
...
@@ -121,21 +121,21 @@ Qt::ItemFlags PLModel::flags( const QModelIndex &index ) const
static_cast
<
PLItem
*>
(
index
.
internalPointer
()
)
:
static_cast
<
PLItem
*>
(
index
.
internalPointer
()
)
:
rootItem
;
rootItem
;
in
t
pl_input_id
=
p_playlist
->
p_local_category
->
p_input
->
i_id
;
in
put_item_t
*
pl_input
=
p_playlist
->
p_local_category
->
p_input
;
in
t
ml_input_id
=
p_playlist
->
p_ml_category
->
p_input
->
i_id
;
in
put_item_t
*
ml_input
=
p_playlist
->
p_ml_category
->
p_input
;
if
(
rootItem
->
i_id
==
p_playlist
->
p_root_onelevel
->
i_id
if
(
rootItem
->
i_id
==
p_playlist
->
p_root_onelevel
->
i_id
||
rootItem
->
i_id
==
p_playlist
->
p_root_category
->
i_id
)
||
rootItem
->
i_id
==
p_playlist
->
p_root_category
->
i_id
)
{
{
if
(
item
->
i_input_id
==
pl_input_id
if
(
item
->
p_input
==
pl_input
||
item
->
i_input_id
==
ml_input_id
)
||
item
->
p_input
==
ml_input
)
flags
|=
Qt
::
ItemIsDropEnabled
;
flags
|=
Qt
::
ItemIsDropEnabled
;
}
}
else
else
{
{
if
(
item
->
b_is_node
&&
if
(
item
->
b_is_node
&&
(
rootItem
->
i_input_id
==
pl_input_id
||
(
rootItem
->
p_input
==
pl_input
||
rootItem
->
i_input_id
==
ml_input_id
)
)
rootItem
->
p_input
==
ml_input
)
)
flags
|=
Qt
::
ItemIsDropEnabled
;
flags
|=
Qt
::
ItemIsDropEnabled
;
flags
|=
Qt
::
ItemIsDragEnabled
;
flags
|=
Qt
::
ItemIsDragEnabled
;
}
}
...
@@ -561,7 +561,8 @@ PLItem *PLModel::FindById( PLItem *root, int i_id )
...
@@ -561,7 +561,8 @@ PLItem *PLModel::FindById( PLItem *root, int i_id )
PLItem
*
PLModel
::
FindByInput
(
PLItem
*
root
,
int
i_id
)
PLItem
*
PLModel
::
FindByInput
(
PLItem
*
root
,
int
i_id
)
{
{
return
FindInner
(
root
,
i_id
,
true
);
PLItem
*
result
=
FindInner
(
root
,
i_id
,
true
);
return
result
;
}
}
#define CACHE( i, p ) { i_cached_id = i; p_cached_item = p; }
#define CACHE( i, p ) { i_cached_id = i; p_cached_item = p; }
...
@@ -580,7 +581,7 @@ PLItem * PLModel::FindInner( PLItem *root, int i_id, bool b_input )
...
@@ -580,7 +581,7 @@ PLItem * PLModel::FindInner( PLItem *root, int i_id, bool b_input )
CACHE
(
i_id
,
root
);
CACHE
(
i_id
,
root
);
return
root
;
return
root
;
}
}
else
if
(
b_input
&&
root
->
i_input
_id
==
i_id
)
else
if
(
b_input
&&
root
->
p_input
->
i
_id
==
i_id
)
{
{
ICACHE
(
i_id
,
root
);
ICACHE
(
i_id
,
root
);
return
root
;
return
root
;
...
@@ -594,7 +595,7 @@ PLItem * PLModel::FindInner( PLItem *root, int i_id, bool b_input )
...
@@ -594,7 +595,7 @@ PLItem * PLModel::FindInner( PLItem *root, int i_id, bool b_input )
CACHE
(
i_id
,
(
*
it
)
);
CACHE
(
i_id
,
(
*
it
)
);
return
p_cached_item
;
return
p_cached_item
;
}
}
else
if
(
b_input
&&
(
*
it
)
->
i_input
_id
==
i_id
)
else
if
(
b_input
&&
(
*
it
)
->
p_input
->
i
_id
==
i_id
)
{
{
ICACHE
(
i_id
,
(
*
it
)
);
ICACHE
(
i_id
,
(
*
it
)
);
return
p_cached_item_bi
;
return
p_cached_item_bi
;
...
...
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