Commit 15c4ecc9 authored by Ragnar Thomsen's avatar Ragnar Thomsen
Browse files

Show time for building model in debug output

Creating the model after the ListJob has completed can take quite some
time for large archives, so use a QElapsedTimer to show the time in
debug output.
parent 6e40c57a
......@@ -844,6 +844,8 @@ void ArchiveModel::newEntry(const ArchiveEntry& receivedEntry, InsertBehaviour b
void ArchiveModel::slotLoadingFinished(KJob *job)
if (!job->error()) {
QElapsedTimer timer;
int i = 0;
foreach(const ArchiveEntry &entry, m_newArchiveEntries) {
newEntry(entry, DoNotNotifyViews);
......@@ -853,7 +855,7 @@ void ArchiveModel::slotLoadingFinished(KJob *job)
qCDebug(ARK) << "Added" << i << "entries to model";
qCDebug(ARK) << "Added" << i << "entries to model in" << timer.elapsed() << "ms";
emit loadingFinished(job);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment