summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRagnar Thomsen <rthomsen6@gmail.com>2016-08-08 19:22:21 (GMT)
committerRagnar Thomsen <rthomsen6@gmail.com>2016-08-08 19:22:21 (GMT)
commit15c4ecc9795fb326908bbdeefbcd015a43d34c9b (patch)
tree3fa0933b97040e412cbd7c4a7d4f0250de4472aa
parent6e40c57ad2ba28b3eb1d4cbaf4d2c17350c00122 (diff)
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.
-rw-r--r--part/archivemodel.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/part/archivemodel.cpp b/part/archivemodel.cpp
index 21ae068..3587a77 100644
--- a/part/archivemodel.cpp
+++ b/part/archivemodel.cpp
@@ -844,6 +844,8 @@ void ArchiveModel::newEntry(const ArchiveEntry& receivedEntry, InsertBehaviour b
void ArchiveModel::slotLoadingFinished(KJob *job)
{
if (!job->error()) {
+ QElapsedTimer timer;
+ timer.start();
int i = 0;
foreach(const ArchiveEntry &entry, m_newArchiveEntries) {
newEntry(entry, DoNotNotifyViews);
@@ -853,7 +855,7 @@ void ArchiveModel::slotLoadingFinished(KJob *job)
endResetModel();
m_newArchiveEntries.clear();
- qCDebug(ARK) << "Added" << i << "entries to model";
+ qCDebug(ARK) << "Added" << i << "entries to model in" << timer.elapsed() << "ms";
}
emit loadingFinished(job);