Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
System
Dolphin
Commits
8f76df41
Commit
8f76df41
authored
Nov 01, 2019
by
Zren (Chris Holland)
Committed by
Elvis Angelaccio
Nov 04, 2020
Browse files
Only show capacity bar for devices (has a udi).
parent
e7532607
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/panels/places/placesitemlistwidget.cpp
View file @
8f76df41
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment