Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
JuK
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
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
Multimedia
JuK
Commits
a5978904
Commit
a5978904
authored
Mar 05, 2003
by
Scott Wheeler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix delayed cache checking
svn path=/trunk/kdemultimedia/juk/; revision=211443
parent
ec4c44ee
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
9 deletions
+13
-9
collectionlist.cpp
collectionlist.cpp
+10
-7
collectionlist.h
collectionlist.h
+2
-2
juk.cpp
juk.cpp
+1
-0
No files found.
collectionlist.cpp
View file @
a5978904
...
...
@@ -98,11 +98,19 @@ void CollectionList::clear()
Playlist
::
clear
();
}
void
CollectionList
::
slotCheckCache
()
{
for
(
QDictIterator
<
CollectionListItem
>
it
(
m_itemsDict
);
it
.
current
();
++
it
)
{
it
.
current
()
->
checkCurrent
();
kapp
->
processEvents
();
}
}
////////////////////////////////////////////////////////////////////////////////
// protected methods
////////////////////////////////////////////////////////////////////////////////
CollectionList
::
CollectionList
(
PlaylistSplitter
*
s
,
QWidget
*
parent
)
:
Playlist
(
s
,
parent
,
i18n
(
"Collection List"
))
CollectionList
::
CollectionList
(
PlaylistSplitter
*
s
,
QWidget
*
parent
)
:
Playlist
(
s
,
parent
,
i18n
(
"Collection List"
))
//, m_finishedLoading(false)
{
}
...
...
@@ -206,7 +214,6 @@ CollectionListItem::CollectionListItem(const QFileInfo &file, const QString &pat
<<
"CollectionList::initialize() has been called."
<<
endl
;
SplashScreen
::
increment
();
QTimer
::
singleShot
(
3
*
1000
,
this
,
SLOT
(
slotCheckCurrent
()));
}
CollectionListItem
::~
CollectionListItem
()
...
...
@@ -222,11 +229,7 @@ void CollectionListItem::addChildItem(PlaylistItem *child)
connect
(
this
,
SIGNAL
(
signalRefreshed
()),
child
,
SLOT
(
slotRefreshImpl
()));
}
////////////////////////////////////////////////////////////////////////////////
// CollectionListItem private slots
////////////////////////////////////////////////////////////////////////////////
void
CollectionListItem
::
slotCheckCurrent
()
void
CollectionListItem
::
checkCurrent
()
{
if
(
!
data
()
->
exists
()
||
!
data
()
->
isFile
())
CollectionList
::
instance
()
->
clearItem
(
this
);
...
...
collectionlist.h
View file @
a5978904
...
...
@@ -57,6 +57,7 @@ public:
public
slots
:
virtual
void
paste
();
virtual
void
clear
();
void
slotCheckCache
();
protected:
CollectionList
(
PlaylistSplitter
*
s
,
QWidget
*
parent
);
...
...
@@ -113,14 +114,13 @@ protected:
void
addChildItem
(
PlaylistItem
*
child
);
private
slots
:
/**
* This slot, called from a QTimer::singleShot() set in the constructor, allows for
* delayed consistancy checking for the cache at the cost of a few CPU cycles. The
* effect however is that stating files is delayed until after the GUI is shown by
* moving this action into the event loop.
*/
void
slotC
heckCurrent
();
void
c
heckCurrent
();
};
#endif
juk.cpp
View file @
a5978904
...
...
@@ -59,6 +59,7 @@ JuK::JuK(QWidget *parent, const char *name) : KMainWindow(parent, name, WDestruc
processArgs
();
SplashScreen
::
finishedLoading
();
QTimer
::
singleShot
(
0
,
CollectionList
::
instance
(),
SLOT
(
slotCheckCache
()));
}
JuK
::~
JuK
()
...
...
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