FileInfoSet Refresher::parents( const FileInfoSet children ) { FileInfoSet parents; foreach ( FileInfo * child, children ) { if ( child && child->parent() ) parents << child->parent(); } return parents.normalized(); }
void MainWindow::showSummary() { FileInfoSet sel = _selectionModel->selectedItems(); int count = sel.size(); if ( count <= 1 ) showCurrent( _selectionModel->currentItem() ); else { sel = sel.normalized(); _ui->statusBar->showMessage( tr( "%1 items selected (%2 total)" ) .arg( count ) .arg( formatSize( sel.totalSize() ) ) ); } }