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
25100efb
Commit
25100efb
authored
Feb 17, 2010
by
Jakob Leben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: refactor and (again) emit currentChanged when processing new items
parent
d46336c6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
+7
-8
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/input_manager.hpp
+4
-0
No files found.
modules/gui/qt4/components/playlist/playlist_model.cpp
View file @
25100efb
...
...
@@ -350,9 +350,7 @@ QVariant PLModel::data( const QModelIndex &index, int role ) const
bool
PLModel
::
isCurrent
(
const
QModelIndex
&
index
)
const
{
input_thread_t
*
p_input_thread
=
THEMIM
->
getInput
();
if
(
!
p_input_thread
)
return
false
;
return
getItem
(
index
)
->
p_input
==
input_GetItem
(
p_input_thread
);
return
getItem
(
index
)
->
p_input
==
THEMIM
->
currentInputItem
();
}
int
PLModel
::
itemId
(
const
QModelIndex
&
index
)
const
...
...
@@ -621,7 +619,10 @@ void PLModel::processItemAppend( int i_item, int i_parent )
PL_LOCK
;
p_item
=
playlist_ItemGetById
(
p_playlist
,
i_item
);
if
(
!
p_item
||
p_item
->
i_flags
&
PLAYLIST_DBL_FLAG
)
goto
end
;
if
(
!
p_item
||
p_item
->
i_flags
&
PLAYLIST_DBL_FLAG
)
{
PL_UNLOCK
;
return
;
}
for
(
pos
=
0
;
pos
<
p_item
->
p_parent
->
i_children
;
pos
++
)
if
(
p_item
->
p_parent
->
pp_children
[
pos
]
==
p_item
)
break
;
...
...
@@ -633,10 +634,8 @@ void PLModel::processItemAppend( int i_item, int i_parent )
nodeItem
->
insertChild
(
newItem
,
pos
);
endInsertRows
();
return
;
end:
PL_UNLOCK
;
return
;
if
(
newItem
->
p_input
==
THEMIM
->
currentInputItem
()
)
emit
currentChanged
(
index
(
newItem
,
0
)
);
}
...
...
modules/gui/qt4/input_manager.hpp
View file @
25100efb
...
...
@@ -253,6 +253,10 @@ public:
input_thread_t
*
getInput
()
{
return
p_input
;
}
InputManager
*
getIM
()
{
return
im
;
}
inline
input_item_t
*
currentInputItem
()
{
return
(
p_input
?
input_GetItem
(
p_input
)
:
NULL
);
}
vout_thread_t
*
getVout
();
aout_instance_t
*
getAout
();
...
...
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