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
bfb26c0e
Commit
bfb26c0e
authored
Aug 31, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qt4: delete the callbacks only if they already exist.
parent
ae41cb9d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
+9
-5
modules/gui/qt4/components/playlist/playlist_model.hpp
modules/gui/qt4/components/playlist/playlist_model.hpp
+1
-1
No files found.
modules/gui/qt4/components/playlist/playlist_model.cpp
View file @
bfb26c0e
...
...
@@ -91,7 +91,7 @@ PLModel::PLModel( playlist_t *_p_playlist, /* THEPL */
ADD_ICON
(
NODE
,
":/type/node"
);
#undef ADD_ICON
rebuild
(
p_root
);
rebuild
(
p_root
,
true
);
CONNECT
(
THEMIM
->
getIM
(),
metaChanged
(
input_item_t
*
),
this
,
processInputItemUpdate
(
input_item_t
*
)
);
CONNECT
(
THEMIM
,
inputChanged
(
input_thread_t
*
),
...
...
@@ -707,14 +707,18 @@ end:
void
PLModel
::
rebuild
()
{
rebuild
(
NULL
);
rebuild
(
NULL
,
false
);
}
void
PLModel
::
rebuild
(
playlist_item_t
*
p_root
)
void
PLModel
::
rebuild
(
playlist_item_t
*
p_root
,
bool
b_first
)
{
playlist_item_t
*
p_item
;
/* Remove callbacks before locking to avoid deadlocks */
/* Remove callbacks before locking to avoid deadlocks
The first time the callbacks are not present so
don't try to delete them */
if
(
!
b_first
)
delCallbacks
();
/* Invalidate cache */
i_cached_id
=
i_cached_input_id
=
-
1
;
...
...
modules/gui/qt4/components/playlist/playlist_model.hpp
View file @
bfb26c0e
...
...
@@ -125,7 +125,7 @@ public:
void
sort
(
int
column
,
Qt
::
SortOrder
order
);
void
sort
(
int
i_root_id
,
int
column
,
Qt
::
SortOrder
order
);
void
removeItem
(
int
);
void
rebuild
();
void
rebuild
(
playlist_item_t
*
);
void
rebuild
();
void
rebuild
(
playlist_item_t
*
,
bool
b_first
=
false
);
private:
...
...
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