Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
6eabc8bc
Commit
6eabc8bc
authored
Sep 05, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - Cleanups and use QMenu on the stack to avoid leaks. Show menu with exec instead of popup.
parent
684cafc4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
modules/gui/qt4/components/playlist/panels.hpp
modules/gui/qt4/components/playlist/panels.hpp
+1
-1
modules/gui/qt4/components/playlist/standardpanel.cpp
modules/gui/qt4/components/playlist/standardpanel.cpp
+11
-11
No files found.
modules/gui/qt4/components/playlist/panels.hpp
View file @
6eabc8bc
...
@@ -75,7 +75,7 @@ private:
...
@@ -75,7 +75,7 @@ private:
QPushButton
*
repeatButton
,
*
randomButton
,
*
addButton
;
QPushButton
*
repeatButton
,
*
randomButton
,
*
addButton
;
ClickLineEdit
*
searchLine
;
ClickLineEdit
*
searchLine
;
int
currentRootId
;
int
currentRootId
;
QSignalMapper
*
ContextUpdateMapper
;
QSignalMapper
*
ContextUpdateMapper
;
public
slots
:
public
slots
:
void
removeItem
(
int
);
void
removeItem
(
int
);
virtual
void
setRoot
(
int
);
virtual
void
setRoot
(
int
);
...
...
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
6eabc8bc
...
@@ -188,32 +188,32 @@ void StandardPLPanel::setCurrentRootId( int _new )
...
@@ -188,32 +188,32 @@ void StandardPLPanel::setCurrentRootId( int _new )
void
StandardPLPanel
::
add
()
void
StandardPLPanel
::
add
()
{
{
QMenu
*
popup
=
new
QMenu
()
;
QMenu
popup
;
if
(
currentRootId
==
THEPL
->
p_local_category
->
i_id
||
if
(
currentRootId
==
THEPL
->
p_local_category
->
i_id
||
currentRootId
==
THEPL
->
p_local_onelevel
->
i_id
)
currentRootId
==
THEPL
->
p_local_onelevel
->
i_id
)
{
{
popup
->
addAction
(
qtr
(
I_PL_ADDF
),
THEDP
,
SLOT
(
simplePLAppendDialog
()));
popup
.
addAction
(
qtr
(
I_PL_ADDF
),
THEDP
,
SLOT
(
simplePLAppendDialog
()));
popup
->
addAction
(
qtr
(
I_PL_ADVADD
),
THEDP
,
SLOT
(
PLAppendDialog
())
);
popup
.
addAction
(
qtr
(
I_PL_ADVADD
),
THEDP
,
SLOT
(
PLAppendDialog
())
);
popup
->
addAction
(
qtr
(
I_PL_ADDDIR
),
THEDP
,
SLOT
(
PLAppendDir
())
);
popup
.
addAction
(
qtr
(
I_PL_ADDDIR
),
THEDP
,
SLOT
(
PLAppendDir
())
);
}
}
else
if
(
currentRootId
==
THEPL
->
p_ml_category
->
i_id
||
else
if
(
currentRootId
==
THEPL
->
p_ml_category
->
i_id
||
currentRootId
==
THEPL
->
p_ml_onelevel
->
i_id
)
currentRootId
==
THEPL
->
p_ml_onelevel
->
i_id
)
{
{
popup
->
addAction
(
qtr
(
I_PL_ADDF
),
THEDP
,
SLOT
(
simpleMLAppendDialog
()));
popup
.
addAction
(
qtr
(
I_PL_ADDF
),
THEDP
,
SLOT
(
simpleMLAppendDialog
()));
popup
->
addAction
(
qtr
(
I_PL_ADVADD
),
THEDP
,
SLOT
(
MLAppendDialog
()
)
);
popup
.
addAction
(
qtr
(
I_PL_ADVADD
),
THEDP
,
SLOT
(
MLAppendDialog
()
)
);
popup
->
addAction
(
qtr
(
I_PL_ADDDIR
),
THEDP
,
SLOT
(
MLAppendDir
()
)
);
popup
.
addAction
(
qtr
(
I_PL_ADDDIR
),
THEDP
,
SLOT
(
MLAppendDir
()
)
);
}
}
popup
->
popup
(
QCursor
::
pos
()
);
popup
.
exec
(
QCursor
::
pos
()
);
}
}
void
StandardPLPanel
::
popupSelectColumn
(
QPoint
)
void
StandardPLPanel
::
popupSelectColumn
(
QPoint
)
{
{
ContextUpdateMapper
=
new
QSignalMapper
(
this
);
ContextUpdateMapper
=
new
QSignalMapper
(
this
);
QMenu
*
selectColMenu
=
new
QMenu
(
qtr
(
"Show columns"
)
)
;
QMenu
selectColMenu
;
#define ADD_META_ACTION( meta ) { \
#define ADD_META_ACTION( meta ) { \
QAction* option = selectColMenu
->
addAction( qfu(VLC_META_##meta) ); \
QAction* option = selectColMenu
.
addAction( qfu(VLC_META_##meta) ); \
option->setCheckable( true ); \
option->setCheckable( true ); \
option->setChecked( model->shownFlags() & VLC_META_ENGINE_##meta ); \
option->setChecked( model->shownFlags() & VLC_META_ENGINE_##meta ); \
ContextUpdateMapper->setMapping( option, VLC_META_ENGINE_##meta ); \
ContextUpdateMapper->setMapping( option, VLC_META_ENGINE_##meta ); \
...
@@ -232,7 +232,7 @@ void StandardPLPanel::popupSelectColumn( QPoint )
...
@@ -232,7 +232,7 @@ void StandardPLPanel::popupSelectColumn( QPoint )
#undef ADD_META_ACTION
#undef ADD_META_ACTION
selectColMenu
->
popup
(
QCursor
::
pos
()
);
selectColMenu
.
exec
(
QCursor
::
pos
()
);
}
}
void
StandardPLPanel
::
clearFilter
()
void
StandardPLPanel
::
clearFilter
()
...
...
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