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
e4a2f994
Commit
e4a2f994
authored
Mar 02, 2012
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: playlist_model: don't declare array with non constant expression
parent
2d2c0ffa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
+14
-4
No files found.
modules/gui/qt4/components/playlist/playlist_model.cpp
View file @
e4a2f994
...
...
@@ -233,7 +233,10 @@ void PLModel::dropMove( const PlMimeData * plMimeData, PLItem *target, int row )
{
QList
<
input_item_t
*>
inputItems
=
plMimeData
->
inputItems
();
QList
<
PLItem
*>
model_items
;
playlist_item_t
*
pp_items
[
inputItems
.
count
()];
playlist_item_t
**
pp_items
;
pp_items
=
(
playlist_item_t
**
)
calloc
(
inputItems
.
count
(),
sizeof
(
playlist_item_t
*
)
);
if
(
!
pp_items
)
return
;
PL_LOCK
;
...
...
@@ -242,7 +245,9 @@ void PLModel::dropMove( const PlMimeData * plMimeData, PLItem *target, int row )
if
(
!
p_parent
||
row
>
p_parent
->
i_children
)
{
PL_UNLOCK
;
return
;
PL_UNLOCK
;
free
(
pp_items
);
return
;
}
int
new_pos
=
row
==
-
1
?
p_parent
->
i_children
:
row
;
...
...
@@ -265,7 +270,9 @@ void PLModel::dropMove( const PlMimeData * plMimeData, PLItem *target, int row )
{
if
(
climber
==
item
)
{
PL_UNLOCK
;
return
;
PL_UNLOCK
;
free
(
pp_items
);
return
;
}
climber
=
climber
->
parent
();
}
...
...
@@ -281,7 +288,9 @@ void PLModel::dropMove( const PlMimeData * plMimeData, PLItem *target, int row )
if
(
model_items
.
isEmpty
()
)
{
PL_UNLOCK
;
return
;
PL_UNLOCK
;
free
(
pp_items
);
return
;
}
playlist_TreeMoveMany
(
p_playlist
,
i
,
pp_items
,
p_parent
,
new_pos
);
...
...
@@ -292,6 +301,7 @@ void PLModel::dropMove( const PlMimeData * plMimeData, PLItem *target, int row )
takeItem
(
item
);
insertChildren
(
target
,
model_items
,
model_pos
);
free
(
pp_items
);
}
/* remove item with its id */
...
...
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