Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Multimedia
JuK
Commits
7cdee8b4
Commit
7cdee8b4
authored
Jun 16, 2003
by
Scott Wheeler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A couple of small clean ups and added some processEvents hackery...
svn path=/trunk/kdemultimedia/juk/; revision=231704
parent
ec588013
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
8 deletions
+22
-8
playlist.cpp
playlist.cpp
+14
-8
viewmode.cpp
viewmode.cpp
+8
-0
No files found.
playlist.cpp
View file @
7cdee8b4
...
...
@@ -280,7 +280,8 @@ void Playlist::clearItems(const PlaylistItemList &items)
QStringList
Playlist
::
files
()
const
{
QStringList
list
;
for
(
PlaylistItem
*
i
=
static_cast
<
PlaylistItem
*>
(
firstChild
());
i
;
i
=
static_cast
<
PlaylistItem
*>
(
i
->
itemBelow
()))
PlaylistItem
*
i
=
static_cast
<
PlaylistItem
*>
(
firstChild
());
for
(;
i
;
i
=
static_cast
<
PlaylistItem
*>
(
i
->
itemBelow
()))
list
.
append
(
i
->
absFilePath
());
return
list
;
...
...
@@ -298,13 +299,16 @@ PlaylistItemList Playlist::items()
PlaylistItemList
Playlist
::
visibleItems
()
const
{
PlaylistItemList
list
;
for
(
PlaylistItem
*
i
=
static_cast
<
PlaylistItem
*>
(
firstChild
());
i
;
i
=
static_cast
<
PlaylistItem
*>
(
i
->
itemBelow
()))
{
//This check should be removed at some point since those items should all be already visible
//at the time of writing there's a bug that leaves some invisible items in the list
PlaylistItem
*
i
=
static_cast
<
PlaylistItem
*>
(
firstChild
());
for
(;
i
;
i
=
static_cast
<
PlaylistItem
*>
(
i
->
itemBelow
()))
{
// This check should be removed at some point since those items should
// all be already visible at the time of writing there's a bug that
// leaves some invisible items in the list
if
(
i
->
isVisible
())
list
.
append
(
i
);
else
kdDebug
(
65432
)
<<
"File shouldn't be in the list"
<<
i
->
fileName
()
<<
endl
;
kdDebug
(
65432
)
<<
"File shouldn't be in the list"
<<
i
->
fileName
()
<<
endl
;
}
return
list
;
...
...
@@ -736,6 +740,8 @@ QString Playlist::resolveSymLinks(const QFileInfo &file) // static
void
Playlist
::
polish
()
{
KListView
::
polish
();
if
(
m_polished
)
return
;
...
...
@@ -778,11 +784,11 @@ void Playlist::polish()
m_headerMenu
->
insertTitle
(
i18n
(
"Show"
));
m_headerMenu
->
setCheckable
(
true
);
for
(
int
i
=
0
;
i
<
header
()
->
count
();
++
i
)
{
for
(
int
i
=
0
;
i
<
header
()
->
count
();
++
i
)
{
m_headerMenu
->
insertItem
(
header
()
->
label
(
i
),
i
);
m_headerMenu
->
setItemChecked
(
i
,
true
);
adjustColumn
(
i
);
}
connect
(
m_headerMenu
,
SIGNAL
(
activated
(
int
)),
this
,
SLOT
(
slotToggleColumnVisible
(
int
)));
...
...
viewmode.cpp
View file @
7cdee8b4
...
...
@@ -223,6 +223,8 @@ void TreeViewMode::setupCategory(PlaylistBox::Item *parent, const QStringList &m
{
CollectionList
*
collection
=
CollectionList
::
instance
();
KApplication
::
setOverrideCursor
(
Qt
::
waitCursor
);
for
(
QStringList
::
ConstIterator
it
=
members
.
begin
();
it
!=
members
.
end
();
++
it
)
{
PlaylistSearch
::
ComponentList
components
;
...
...
@@ -235,5 +237,11 @@ void TreeViewMode::setupCategory(PlaylistBox::Item *parent, const QStringList &m
SearchPlaylist
*
p
=
new
SearchPlaylist
(
s
,
static_cast
<
QWidget
*>
(
collection
->
parent
()),
*
it
);
new
PlaylistBox
::
Item
(
parent
,
"midi"
,
*
it
,
p
);
static
int
i
=
0
;
if
(
++
i
%
5
==
0
)
kapp
->
processEvents
();
}
KApplication
::
restoreOverrideCursor
();
}
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