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
cafb8e30
Commit
cafb8e30
authored
Aug 16, 2012
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: InputManager: Namespace PLEvent types.
Pointed out that LeafToParent_Type was misused.
parent
b54356d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
18 deletions
+17
-18
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+9
-9
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/input_manager.hpp
+8
-9
No files found.
modules/gui/qt4/input_manager.cpp
View file @
cafb8e30
...
@@ -1027,19 +1027,19 @@ void MainInputManager::customEvent( QEvent *event )
...
@@ -1027,19 +1027,19 @@ void MainInputManager::customEvent( QEvent *event )
// msg_Dbg( p_intf, "New MainIM Event of type: %i", type );
// msg_Dbg( p_intf, "New MainIM Event of type: %i", type );
switch
(
type
)
switch
(
type
)
{
{
case
PLItemAppended_Type
:
case
PL
Event
:
:
PL
ItemAppended_Type
:
plEv
=
static_cast
<
PLEvent
*>
(
event
);
plEv
=
static_cast
<
PLEvent
*>
(
event
);
emit
playlistItemAppended
(
plEv
->
i_item
,
plEv
->
i_parent
);
emit
playlistItemAppended
(
plEv
->
i_item
,
plEv
->
i_parent
);
return
;
return
;
case
PLItemRemoved_Type
:
case
PL
Event
:
:
PL
ItemRemoved_Type
:
plEv
=
static_cast
<
PLEvent
*>
(
event
);
plEv
=
static_cast
<
PLEvent
*>
(
event
);
emit
playlistItemRemoved
(
plEv
->
i_item
);
emit
playlistItemRemoved
(
plEv
->
i_item
);
return
;
return
;
case
PLEmpty_Type
:
case
PLE
vent
:
:
PLE
mpty_Type
:
plEv
=
static_cast
<
PLEvent
*>
(
event
);
plEv
=
static_cast
<
PLEvent
*>
(
event
);
emit
playlistNotEmpty
(
plEv
->
i_item
>=
0
);
emit
playlistNotEmpty
(
plEv
->
i_item
>=
0
);
return
;
return
;
case
LeafToParent_Type
:
case
PLEvent
:
:
LeafToParent_Type
:
plEv
=
static_cast
<
PLEvent
*>
(
event
);
plEv
=
static_cast
<
PLEvent
*>
(
event
);
emit
leafBecameParent
(
plEv
->
i_item
);
emit
leafBecameParent
(
plEv
->
i_item
);
return
;
return
;
...
@@ -1226,7 +1226,7 @@ static int LeafToParent( vlc_object_t *p_this, const char *psz_var,
...
@@ -1226,7 +1226,7 @@ static int LeafToParent( vlc_object_t *p_this, const char *psz_var,
VLC_UNUSED
(
p_this
);
VLC_UNUSED
(
psz_var
);
VLC_UNUSED
(
oldval
);
VLC_UNUSED
(
p_this
);
VLC_UNUSED
(
psz_var
);
VLC_UNUSED
(
oldval
);
MainInputManager
*
mim
=
(
MainInputManager
*
)
param
;
MainInputManager
*
mim
=
(
MainInputManager
*
)
param
;
PLEvent
*
event
=
new
PLEvent
(
LeafToParent_Type
,
newval
.
i_int
);
PLEvent
*
event
=
new
PLEvent
(
PLEvent
::
LeafToParent_Type
,
newval
.
i_int
);
QApplication
::
postEvent
(
mim
,
event
);
QApplication
::
postEvent
(
mim
,
event
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
@@ -1249,9 +1249,9 @@ static int PLItemAppended
...
@@ -1249,9 +1249,9 @@ static int PLItemAppended
MainInputManager
*
mim
=
static_cast
<
MainInputManager
*>
(
data
);
MainInputManager
*
mim
=
static_cast
<
MainInputManager
*>
(
data
);
playlist_add_t
*
p_add
=
static_cast
<
playlist_add_t
*>
(
cur
.
p_address
);
playlist_add_t
*
p_add
=
static_cast
<
playlist_add_t
*>
(
cur
.
p_address
);
PLEvent
*
event
=
new
PLEvent
(
PLItemAppended_Type
,
p_add
->
i_item
,
p_add
->
i_node
);
PLEvent
*
event
=
new
PLEvent
(
PL
Event
::
PL
ItemAppended_Type
,
p_add
->
i_item
,
p_add
->
i_node
);
QApplication
::
postEvent
(
mim
,
event
);
QApplication
::
postEvent
(
mim
,
event
);
event
=
new
PLEvent
(
PLEmpty_Type
,
p_add
->
i_item
,
0
);
event
=
new
PLEvent
(
PLE
vent
::
PLE
mpty_Type
,
p_add
->
i_item
,
0
);
QApplication
::
postEvent
(
mim
,
event
);
QApplication
::
postEvent
(
mim
,
event
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
@@ -1263,12 +1263,12 @@ static int PLItemRemoved
...
@@ -1263,12 +1263,12 @@ static int PLItemRemoved
playlist_t
*
pl
=
(
playlist_t
*
)
obj
;
playlist_t
*
pl
=
(
playlist_t
*
)
obj
;
MainInputManager
*
mim
=
static_cast
<
MainInputManager
*>
(
data
);
MainInputManager
*
mim
=
static_cast
<
MainInputManager
*>
(
data
);
PLEvent
*
event
=
new
PLEvent
(
PLItemRemoved_Type
,
cur
.
i_int
,
0
);
PLEvent
*
event
=
new
PLEvent
(
PL
Event
::
PL
ItemRemoved_Type
,
cur
.
i_int
,
0
);
QApplication
::
postEvent
(
mim
,
event
);
QApplication
::
postEvent
(
mim
,
event
);
// can't use playlist_IsEmpty( ) as it isn't true yet
// can't use playlist_IsEmpty( ) as it isn't true yet
if
(
pl
->
items
.
i_size
==
1
)
// lock is held
if
(
pl
->
items
.
i_size
==
1
)
// lock is held
{
{
event
=
new
PLEvent
(
PLEmpty_Type
,
-
1
,
0
);
event
=
new
PLEvent
(
PLE
vent
::
PLE
mpty_Type
,
-
1
,
0
);
QApplication
::
postEvent
(
mim
,
event
);
QApplication
::
postEvent
(
mim
,
event
);
}
}
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
...
modules/gui/qt4/input_manager.hpp
View file @
cafb8e30
...
@@ -60,7 +60,6 @@ enum {
...
@@ -60,7 +60,6 @@ enum {
ProgramChanged_Type
,
ProgramChanged_Type
,
RandomChanged_Type
,
RandomChanged_Type
,
LoopOrRepeatChanged_Type
,
LoopOrRepeatChanged_Type
,
LeafToParent_Type
,
EPGEvent_Type
,
EPGEvent_Type
,
/* SignalChanged_Type, */
/* SignalChanged_Type, */
...
@@ -104,17 +103,17 @@ private:
...
@@ -104,17 +103,17 @@ private:
input_item_t
*
p_item
;
input_item_t
*
p_item
;
};
};
enum
PLEventTypes
{
PLItemAppended_Type
=
QEvent
::
User
+
PLEventType
+
1
,
PLItemRemoved_Type
,
PLEmpty_Type
};
class
PLEvent
:
public
QEvent
class
PLEvent
:
public
QEvent
{
{
public:
public:
PLEvent
(
int
t
,
int
i
,
int
p
=
0
)
enum
PLEventTypes
{
PLItemAppended_Type
=
QEvent
::
User
+
PLEventType
+
1
,
PLItemRemoved_Type
,
LeafToParent_Type
,
PLEmpty_Type
};
PLEvent
(
PLEventTypes
t
,
int
i
,
int
p
=
0
)
:
QEvent
(
(
QEvent
::
Type
)(
t
)
),
i_item
(
i
),
i_parent
(
p
)
{}
:
QEvent
(
(
QEvent
::
Type
)(
t
)
),
i_item
(
i
),
i_parent
(
p
)
{}
/* Needed for "playlist-item*" and "leaf-to-parent" callbacks
/* Needed for "playlist-item*" and "leaf-to-parent" callbacks
...
...
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