summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2017-05-19 14:14:48 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2017-05-19 14:14:48 +0200
commit0db61bd22d1a67863a4510a82c5d0dda3f608165 (patch)
treef3783af660c15266330e7b60f9d405868260cf0d /src
parent109735551a5e986d8013667aae30b668cb6190c7 (diff)
QPhotoRec: add serial number if available to disk description
Diffstat (limited to 'src')
-rw-r--r--src/qphotorec.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qphotorec.cpp b/src/qphotorec.cpp
index f3a44f5..0047b73 100644
--- a/src/qphotorec.cpp
+++ b/src/qphotorec.cpp
@@ -441,9 +441,12 @@ void QPhotorec::HDDlistWidget_updateUI()
element_disk=element_disk->next, i++)
{
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(
QIcon::fromTheme("drive-harddisk", QIcon(":res/gnome/drive-harddisk.png")),
- disk->description_short(disk));
+ description);
if(disk==selected_disk)
HDDlistWidget->setCurrentIndex(i);
}