#include "BackgroundWorker.h" #include #include #include #include #include BackgroundWorker::BackgroundWorker() : QObject(){ } BackgroundWorker::~BackgroundWorker(){ } void BackgroundWorker::startDirChecks(QString path){ QDir dir(path); //Make sure to remove any symlinks or redundency in the path if(dir.canonicalPath()!=path){ path = dir.canonicalPath(); dir.cd(path); } qDebug() << "Starting Dir Checks:" << path; //First check for image files if(imgFilter.isEmpty()){ //Initial Run - load supported image extensions QList fmt = QImageReader::supportedImageFormats(); for(int i=0; i0 and totalSizes>1024*1024*1024) msgStatusBar += QString(tr(", size: %1 Gb")).arg(totalSizes/1024/1024/1024, 0,'f', 2); else if (i>0 and totalSizes>1024*1024) msgStatusBar += QString(tr(", size: %1 Mb")).arg(totalSizes/1024/1024, 0,'f',2); else if (i>0 and totalSizes>1024) msgStatusBar += QString(tr(", size: %1 Kb")).arg(totalSizes/1024, 0, 'f' , 2); else if (totalSizes > 0) { msgStatusBar += QString(tr(", size: %1 b")).arg(totalSizes, 0, 'f' , 2);} if (!path.isEmpty()) { //path could be empty when fileList is based on user's selection QString capacity = LOS::FileSystemCapacity(path) ; if (msgStatusBar.isEmpty()) msgStatusBar += tr("Capacity: ") + capacity; else msgStatusBar += tr(", Capacity: ") + capacity; } if (!msgStatusBar.isEmpty()) emit Si_DisplayStatusBar(msgStatusBar); }