From 66c44f3497d80c9c604d90c406121555694c7d54 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Sat, 18 Apr 2015 21:13:49 +0200 Subject: lumina-fm show separated number of folders and files in status bar --- lumina-fm/BackgroundWorker.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lumina-fm/BackgroundWorker.cpp') diff --git a/lumina-fm/BackgroundWorker.cpp b/lumina-fm/BackgroundWorker.cpp index 125e0e1c..76b8ff8c 100644 --- a/lumina-fm/BackgroundWorker.cpp +++ b/lumina-fm/BackgroundWorker.cpp @@ -88,14 +88,19 @@ void BackgroundWorker::startDirChecks(QString path){ } -void BackgroundWorker::createStatusBarMsg(QFileInfoList fileList, QString path, QString message){ +void BackgroundWorker::createStatusBarMsg(QFileInfoList fileList, QString path, QString messageFolders, QString messageFiles){ + //collect some statistics of dir and display them in statusbar //Get the total size of the items double totalSizes = 0; + int numberFolders = 0; + int numberFiles = 0; for(int i=0; i 0){ totalSizes = qRound(totalSizes*100)/100.0; //round to 2 decimel places msgStatusBar += " "+QString(tr("Total size: %1 %2")).arg(QString::number(totalSizes), units[cunit]); -- cgit From 7b0f1cb26ed0e64b73562569f16e7a94d449ddc5 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Sat, 18 Apr 2015 21:21:20 +0200 Subject: use ++ in createStatusBarMgs over += 1 --- lumina-fm/BackgroundWorker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lumina-fm/BackgroundWorker.cpp') diff --git a/lumina-fm/BackgroundWorker.cpp b/lumina-fm/BackgroundWorker.cpp index 76b8ff8c..02d2f02e 100644 --- a/lumina-fm/BackgroundWorker.cpp +++ b/lumina-fm/BackgroundWorker.cpp @@ -97,10 +97,10 @@ void BackgroundWorker::createStatusBarMsg(QFileInfoList fileList, QString path, int numberFiles = 0; for(int i=0; i