-void StatusBarSpaceInfo::slotFoundMountPoint(const QString& mountPoint,
- quint64 kBSize,
- quint64 kBUsed,
- quint64 kBAvailable)
-{
- Q_UNUSED(mountPoint);
-
- m_gettingSize = false;
- m_foundMountPoint = true;
- const bool valuesChanged = (kBUsed != static_cast<quint64>(value())) || (kBSize != m_kBSize);
- if (valuesChanged) {
- setText(i18nc("@info:status Free disk space", "%1 free", KIO::convertSize(kBAvailable * 1024)));
- setUpdatesEnabled(false);
- m_kBSize = kBSize;
- setValue(kBSize > 0 ? (kBUsed * 100) / kBSize : 0);
- setUpdatesEnabled(true);
- update();
- }
-}
-
-void StatusBarSpaceInfo::slotDiskFreeSpaceDone()
-{
- if (m_foundMountPoint) {
- return;
- }
-
- m_gettingSize = false;
- setText(i18nc("@info:status", "Unknown size"));
- setValue(0);
- update();
-}
-