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
8124a62c
Commit
8124a62c
authored
Sep 14, 2012
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: add dev only playlist debug view tab
parent
ef0181f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
modules/gui/qt4/dialogs/messages.cpp
modules/gui/qt4/dialogs/messages.cpp
+46
-0
modules/gui/qt4/dialogs/messages.hpp
modules/gui/qt4/dialogs/messages.hpp
+6
-0
No files found.
modules/gui/qt4/dialogs/messages.cpp
View file @
8124a62c
...
...
@@ -99,6 +99,24 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
updateButton
->
setFlat
(
true
);
ui
.
mainTab
->
setCornerWidget
(
updateButton
);
#ifndef NDEBUG
QWidget
*
pldebugTab
=
new
QWidget
();
QVBoxLayout
*
pldebugTabLayout
=
new
QVBoxLayout
();
pldebugTab
->
setLayout
(
pldebugTabLayout
);
ui
.
mainTab
->
addTab
(
pldebugTab
,
"Playlist Tree"
);
pldebugTree
=
new
QTreeWidget
();
pldebugTree
->
headerItem
()
->
setText
(
0
,
"Name"
);
pldebugTree
->
headerItem
()
->
setText
(
1
,
"PL id"
);
pldebugTree
->
headerItem
()
->
setText
(
2
,
"Item id"
);
pldebugTree
->
headerItem
()
->
setText
(
3
,
"PL flags"
);
pldebugTree
->
headerItem
()
->
setText
(
4
,
"Item flags"
);
pldebugTree
->
setColumnCount
(
5
);
pldebugTabLayout
->
addWidget
(
pldebugTree
);
QPushButton
*
pldebugUpdateButton
=
new
QPushButton
(
"Update"
);
pldebugTabLayout
->
addWidget
(
pldebugUpdateButton
);
BUTTONACT
(
pldebugUpdateButton
,
updatePLTree
()
);
#endif
tabChanged
(
0
);
BUTTONACT
(
updateButton
,
updateOrClear
()
);
...
...
@@ -329,3 +347,31 @@ void MessagesDialog::MsgCallback( void *self, int type, const msg_item_t *item,
vlc_restorecancel
(
canc
);
free
(
str
);
}
#ifndef NDEBUG
static
QTreeWidgetItem
*
PLWalk
(
playlist_item_t
*
p_node
)
{
QTreeWidgetItem
*
current
=
new
QTreeWidgetItem
();
current
->
setText
(
0
,
qfu
(
p_node
->
p_input
->
psz_name
)
);
current
->
setToolTip
(
0
,
qfu
(
p_node
->
p_input
->
psz_uri
)
);
current
->
setText
(
1
,
QString
(
"%1"
).
arg
(
p_node
->
i_id
)
);
current
->
setText
(
2
,
QString
(
"%1"
).
arg
(
p_node
->
p_input
->
i_id
)
);
current
->
setText
(
3
,
QString
(
"0x%1"
).
arg
(
p_node
->
i_flags
,
0
,
16
)
);
current
->
setText
(
4
,
QString
(
"0x%1"
).
arg
(
p_node
->
p_input
->
i_type
,
0
,
16
)
);
for
(
int
i
=
0
;
p_node
->
i_children
>
0
&&
i
<
p_node
->
i_children
;
i
++
)
current
->
addChild
(
PLWalk
(
p_node
->
pp_children
[
i
]
)
);
return
current
;
}
void
MessagesDialog
::
updatePLTree
()
{
playlist_t
*
p_playlist
=
THEPL
;
pldebugTree
->
clear
();
PL_LOCK
;
pldebugTree
->
addTopLevelItem
(
PLWalk
(
p_playlist
->
p_root_category
)
);
PL_UNLOCK
;
pldebugTree
->
expandAll
();
for
(
int
i
=
0
;
i
<
5
;
i
++
)
pldebugTree
->
resizeColumnToContents
(
i
);
}
#endif
modules/gui/qt4/dialogs/messages.hpp
View file @
8124a62c
...
...
@@ -67,6 +67,9 @@ private slots:
void
updateOrClear
();
void
tabChanged
(
int
);
void
filterMessages
();
#ifndef NDEBUG
void
updatePLTree
();
#endif
private:
void
buildTree
(
QTreeWidgetItem
*
,
vlc_object_t
*
);
...
...
@@ -74,6 +77,9 @@ private:
friend
class
Singleton
<
MessagesDialog
>
;
QPushButton
*
updateButton
;
QMutex
messageLocker
;
#ifndef NDEBUG
QTreeWidget
*
pldebugTree
;
#endif
};
#endif
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