소스 검색

Document the time required to build the art graph

Donald Carr 8 년 전
부모
커밋
e54e1975c5
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/picturemodel.cpp

+ 4 - 0
src/picturemodel.cpp

@@ -25,6 +25,7 @@
 #include <QThread>
 #include <QImageReader>
 #include <QMimeDatabase>
+#include <QElapsedTimer>
 
 struct FSNode {
   FSNode(const QString& rname, const FSNode *pparent = nullptr);
@@ -140,11 +141,14 @@ void FSNodeTree::addModelNode(const FSNode* parentNode)
 
 void FSNodeTree::populate()
 {
+    QElapsedTimer timer;
+    timer.start();
     QDir currentDir(rootDir);
     if (!currentDir.exists()) {
         qDebug() << "Being told to watch a non existent directory";
     }
     addModelNode(new FSNode(rootDir));
+    qDebug() << "Completed building file tree after:" << timer.elapsed();
 }
 
 class PictureModel::PictureModelPrivate {