Commit 8f76df41 authored by Zren (Chris Holland)'s avatar Zren (Chris Holland) Committed by Elvis Angelaccio

Only show capacity bar for devices (has a udi).

parent e7532607
......@@ -43,8 +43,9 @@ QPalette::ColorRole PlacesItemListWidget::normalTextColorRole() const
void PlacesItemListWidget::updateCapacityBar()
{
const bool isDevice = !data().value("udi").toString().isEmpty();
const QUrl url = data().value("url").toUrl();
if (url.isLocalFile()) {
if (isDevice && url.isLocalFile()) {
const QString mountPointPath = url.toLocalFile();
qDebug() << "url:" << mountPointPath;
KMountPoint::Ptr mp = KMountPoint::currentMountPoints().findByPath(mountPointPath);
......@@ -57,12 +58,12 @@ void PlacesItemListWidget::updateCapacityBar()
qDebug() << " capacityBarRatio:" << m_capacityBarRatio << "(" << info.used() << "/" << info.size() << ")";
// update();
} else {
resetCapacityBar();
return;
}
} else {
resetCapacityBar();
}
// else
resetCapacityBar();
}
void PlacesItemListWidget::resetCapacityBar()
......
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