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
edcc45df
Commit
edcc45df
authored
Oct 25, 2009
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qt4: use longname to search activated input-item
Should fix #3112 and maybe make it littlebit cleaner (hopefully)
parent
0adb9ceb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
modules/gui/qt4/components/playlist/selector.cpp
modules/gui/qt4/components/playlist/selector.cpp
+6
-7
modules/gui/qt4/components/playlist/selector.hpp
modules/gui/qt4/components/playlist/selector.hpp
+1
-0
No files found.
modules/gui/qt4/components/playlist/selector.cpp
View file @
edcc45df
...
@@ -82,23 +82,21 @@ void PLSelector::setSource( QTreeWidgetItem *item )
...
@@ -82,23 +82,21 @@ void PLSelector::setSource( QTreeWidgetItem *item )
if
(
!
playlist_IsServicesDiscoveryLoaded
(
THEPL
,
qtu
(
qs
)
)
)
if
(
!
playlist_IsServicesDiscoveryLoaded
(
THEPL
,
qtu
(
qs
)
)
)
{
{
playlist_ServicesDiscoveryAdd
(
THEPL
,
qtu
(
qs
)
);
playlist_ServicesDiscoveryAdd
(
THEPL
,
qtu
(
qs
)
);
#warning FIXME
playlist_item_t
*
pl_item
=
THEPL
->
p_root_category
->
pp_children
[
THEPL
->
p_root_category
->
i_children
-
1
];
item
->
setData
(
0
,
PPL_ITEM_ROLE
,
QVariant
::
fromValue
(
pl_item
)
);
emit
activated
(
pl_item
);
return
;
}
}
}
}
if
(
i_type
==
SD_TYPE
)
if
(
i_type
==
SD_TYPE
)
msg_Dbg
(
p_intf
,
"SD already loaded, reloading"
);
msg_Dbg
(
p_intf
,
"SD already loaded, reloading"
);
playlist_Lock
(
THEPL
);
playlist_item_t
*
pl_item
=
playlist_item_t
*
pl_item
=
item
->
data
(
0
,
PPL_ITEM_ROLE
).
value
<
playlist_item_t
*>
();
playlist_ChildSearchName
(
THEPL
->
p_root_onelevel
,
qtu
(
item
->
data
(
0
,
LONGNAME_ROLE
).
toString
()
)
);
playlist_Unlock
(
THEPL
);
if
(
pl_item
)
if
(
pl_item
)
emit
activated
(
pl_item
);
emit
activated
(
pl_item
);
else
msg_Info
(
p_intf
,
"no node found for %s"
,
qtu
(
item
->
data
(
0
,
LONGNAME_ROLE
).
toString
()
)
);
}
}
void
PLSelector
::
createItems
()
void
PLSelector
::
createItems
()
...
@@ -135,6 +133,7 @@ void PLSelector::createItems()
...
@@ -135,6 +133,7 @@ void PLSelector::createItems()
sd_item
=
new
QTreeWidgetItem
(
QStringList
(
qfu
(
*
ppsz_longname
)
)
);
sd_item
=
new
QTreeWidgetItem
(
QStringList
(
qfu
(
*
ppsz_longname
)
)
);
sd_item
->
setData
(
0
,
TYPE_ROLE
,
SD_TYPE
);
sd_item
->
setData
(
0
,
TYPE_ROLE
,
SD_TYPE
);
sd_item
->
setData
(
0
,
NAME_ROLE
,
qfu
(
*
ppsz_name
)
);
sd_item
->
setData
(
0
,
NAME_ROLE
,
qfu
(
*
ppsz_name
)
);
sd_item
->
setData
(
0
,
LONGNAME_ROLE
,
qfu
(
*
ppsz_longname
)
);
sd_item
->
setFlags
(
sd_item
->
flags
()
&
~
Qt
::
ItemIsDropEnabled
);
sd_item
->
setFlags
(
sd_item
->
flags
()
&
~
Qt
::
ItemIsDropEnabled
);
sds
->
addChild
(
sd_item
);
sds
->
addChild
(
sd_item
);
free
(
*
ppsz_name
);
free
(
*
ppsz_name
);
...
...
modules/gui/qt4/components/playlist/selector.hpp
View file @
edcc45df
...
@@ -48,6 +48,7 @@ enum {
...
@@ -48,6 +48,7 @@ enum {
TYPE_ROLE
=
Qt
::
UserRole
,
TYPE_ROLE
=
Qt
::
UserRole
,
PPL_ITEM_ROLE
,
PPL_ITEM_ROLE
,
NAME_ROLE
,
NAME_ROLE
,
LONGNAME_ROLE
,
};
};
Q_DECLARE_METATYPE
(
playlist_item_t
*
);
Q_DECLARE_METATYPE
(
playlist_item_t
*
);
...
...
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