QPhotoRec: add serial number if available to disk description

This commit is contained in:
Christophe Grenier 2017-05-19 14:14:48 +02:00
parent 109735551a
commit 0db61bd22d

View file

@ -441,9 +441,12 @@ void QPhotorec::HDDlistWidget_updateUI()
element_disk=element_disk->next, i++) element_disk=element_disk->next, i++)
{ {
disk_t *disk=element_disk->disk; disk_t *disk=element_disk->disk;
QString description=disk->description_short(disk);
if(disk->serial_no!=NULL)
description += ", S/N:" + QString(disk->serial_no);
HDDlistWidget->addItem( HDDlistWidget->addItem(
QIcon::fromTheme("drive-harddisk", QIcon(":res/gnome/drive-harddisk.png")), QIcon::fromTheme("drive-harddisk", QIcon(":res/gnome/drive-harddisk.png")),
disk->description_short(disk)); description);
if(disk==selected_disk) if(disk==selected_disk)
HDDlistWidget->setCurrentIndex(i); HDDlistWidget->setCurrentIndex(i);
} }