--- src/part/summaryWidget.cpp.orig 2013-11-24 22:07:54.000000000 +0900
+++ src/part/summaryWidget.cpp 2013-11-24 22:06:42.000000000 +0900
#include <QtGui/QMouseEvent>
+#include <QFileIconProvider>
QLabel *label = new QLabel(text, this);
horizontalLayout->addWidget(label);
QLabel *icon = new QLabel(this);
+ QIcon i = QFileIconProvider().icon(QFileInfo(disk.mount));
+ icon->setPixmap(i.pixmap(32,32));
icon->setPixmap(KIcon(disk.icon).pixmap(16,16));
horizontalLayout->addWidget(icon);
horizontalLayout->setAlignment(Qt::AlignCenter);
+ int nmounts = getmntinfo(&mounts, MNT_WAIT);
+ for (int i = 0; i < nmounts; ++i) {
+ struct statfs *m = mounts + i;
+ char *path = m->f_mntonname;
+ if (m->f_blocks == 0 || m->f_flags & MNT_DONTBROWSE ||
+ access(path, R_OK | X_OK) != 0)
+ disk.mount = QString::fromUtf8(path);
+ disk.size = m->f_blocks * m->f_bsize / 1024;
+ disk.free = m->f_bfree * m->f_bsize / 1024;
+ disk.used = disk.size - disk.free;
const Solid::StorageAccess *partition;