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
29ac7d73
Commit
29ac7d73
authored
May 23, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: remove dead code
parent
75e7a5f3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
9 deletions
+7
-9
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+6
-8
modules/gui/qt4/menus.hpp
modules/gui/qt4/menus.hpp
+1
-1
No files found.
modules/gui/qt4/menus.cpp
View file @
29ac7d73
...
@@ -1220,9 +1220,7 @@ QMenu * VLCMenuBar::Populate( intf_thread_t *p_intf,
...
@@ -1220,9 +1220,7 @@ QMenu * VLCMenuBar::Populate( intf_thread_t *p_intf,
* Private methods.
* Private methods.
*****************************************************************************/
*****************************************************************************/
static
bool
IsMenuEmpty
(
const
char
*
psz_var
,
static
bool
IsMenuEmpty
(
const
char
*
psz_var
,
vlc_object_t
*
p_object
)
vlc_object_t
*
p_object
,
bool
b_root
=
true
)
{
{
/* Check if we want to display the variable */
/* Check if we want to display the variable */
if
(
!
(
var_Type
(
p_object
,
psz_var
)
&
VLC_VAR_HASCHOICE
)
)
if
(
!
(
var_Type
(
p_object
,
psz_var
)
&
VLC_VAR_HASCHOICE
)
)
...
@@ -1230,7 +1228,7 @@ static bool IsMenuEmpty( const char *psz_var,
...
@@ -1230,7 +1228,7 @@ static bool IsMenuEmpty( const char *psz_var,
vlc_value_t
val
;
vlc_value_t
val
;
var_Change
(
p_object
,
psz_var
,
VLC_VAR_CHOICESCOUNT
,
&
val
,
NULL
);
var_Change
(
p_object
,
psz_var
,
VLC_VAR_CHOICESCOUNT
,
&
val
,
NULL
);
return
val
.
i_int
==
0
||
(
val
.
i_int
==
1
&&
b_root
)
;
return
val
.
i_int
==
0
||
val
.
i_int
==
1
;
}
}
#define TEXT_OR_VAR qfue ( text.psz_string ? text.psz_string : psz_var )
#define TEXT_OR_VAR qfue ( text.psz_string ? text.psz_string : psz_var )
...
@@ -1322,14 +1320,14 @@ void VLCMenuBar::UpdateItem( intf_thread_t *p_intf, QMenu *menu,
...
@@ -1322,14 +1320,14 @@ void VLCMenuBar::UpdateItem( intf_thread_t *p_intf, QMenu *menu,
}
}
action
->
setEnabled
(
action
->
setEnabled
(
CreateChoicesMenu
(
submenu
,
psz_var
,
p_object
,
true
)
==
0
);
CreateChoicesMenu
(
submenu
,
psz_var
,
p_object
)
==
0
);
if
(
forceDisabled
)
if
(
forceDisabled
)
action
->
setEnabled
(
false
);
action
->
setEnabled
(
false
);
}
}
else
else
{
{
action
->
setEnabled
(
action
->
setEnabled
(
CreateChoicesMenu
(
menu
,
psz_var
,
p_object
,
true
)
==
0
);
CreateChoicesMenu
(
menu
,
psz_var
,
p_object
)
==
0
);
}
}
FREENULL
(
text
.
psz_string
);
FREENULL
(
text
.
psz_string
);
return
;
return
;
...
@@ -1370,7 +1368,7 @@ static bool CheckTitle( vlc_object_t *p_object, const char *psz_var )
...
@@ -1370,7 +1368,7 @@ static bool CheckTitle( vlc_object_t *p_object, const char *psz_var )
int
VLCMenuBar
::
CreateChoicesMenu
(
QMenu
*
submenu
,
const
char
*
psz_var
,
int
VLCMenuBar
::
CreateChoicesMenu
(
QMenu
*
submenu
,
const
char
*
psz_var
,
vlc_object_t
*
p_object
,
bool
b_roo
t
)
vlc_object_t
*
p_objec
t
)
{
{
vlc_value_t
val
,
val_list
,
text_list
;
vlc_value_t
val
,
val_list
,
text_list
;
int
i_type
,
i
;
int
i_type
,
i
;
...
@@ -1379,7 +1377,7 @@ int VLCMenuBar::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
...
@@ -1379,7 +1377,7 @@ int VLCMenuBar::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
i_type
=
var_Type
(
p_object
,
psz_var
);
i_type
=
var_Type
(
p_object
,
psz_var
);
/* Make sure we want to display the variable */
/* Make sure we want to display the variable */
if
(
submenu
->
isEmpty
()
&&
IsMenuEmpty
(
psz_var
,
p_object
,
b_root
)
)
if
(
submenu
->
isEmpty
()
&&
IsMenuEmpty
(
psz_var
,
p_object
)
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
switch
(
i_type
&
VLC_VAR_TYPE
)
switch
(
i_type
&
VLC_VAR_TYPE
)
...
...
modules/gui/qt4/menus.hpp
View file @
29ac7d73
...
@@ -150,7 +150,7 @@ private:
...
@@ -150,7 +150,7 @@ private:
vlc_value_t
,
int
,
bool
c
=
false
);
vlc_value_t
,
int
,
bool
c
=
false
);
static
void
UpdateItem
(
intf_thread_t
*
,
QMenu
*
,
const
char
*
,
static
void
UpdateItem
(
intf_thread_t
*
,
QMenu
*
,
const
char
*
,
vlc_object_t
*
,
bool
);
vlc_object_t
*
,
bool
);
static
int
CreateChoicesMenu
(
QMenu
*
,
const
char
*
,
vlc_object_t
*
,
bool
);
static
int
CreateChoicesMenu
(
QMenu
*
,
const
char
*
,
vlc_object_t
*
);
static
void
EnableStaticEntries
(
QMenu
*
,
bool
);
static
void
EnableStaticEntries
(
QMenu
*
,
bool
);
/* recentMRL menu */
/* recentMRL menu */
...
...
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