Commit 60938f3f authored by frysch's avatar frysch

output total file count

parent a847fead
Pipeline #129 failed with stages
......@@ -124,11 +124,13 @@ void MainWindow::countLines(const QStringList &folders)
"located files with extensions\n" + FILTERS.join(", ") + ":\n\n");
QFile curFile;
auto lineCounter = 0;
auto fileCounter = 0;
if(!FILTERS.isEmpty()) {
for(QDir curDir : folders)
{
auto fileList = curDir.entryList(FILTERS);
fileCounter += fileList.length();
for(const auto &fileN : fileList)
{
curFile.setFileName(curDir.path()+"/" +fileN);
......@@ -144,6 +146,7 @@ void MainWindow::countLines(const QStringList &folders)
}
}
}
analysis.append("\n------\ntotal file count: " + QString::number(fileCounter));
ui->textBrowser_analysis->setText(analysis);
ui->label_number->setText(QString::number(lineCounter));
}
Markdown is supported
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