-QString StatusBarSpaceInfo::text() const
-{
- return m_text;
-}
-
-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 != static_cast<quint64>(maximum()));
- if (valuesChanged) {
- m_text = i18nc("@info:status Free disk space", "%1 free", KIO::convertSize(kBAvailable * 1024));
- setUpdatesEnabled(false);
- setMaximum(kBSize);
- setValue(kBUsed);
- setUpdatesEnabled(true);
- update();
- }
-}
-
-void StatusBarSpaceInfo::slotDiskFreeSpaceDone()
-{
- if (m_foundMountPoint) {
- return;
- }
-
- m_gettingSize = false;
- m_text = i18nc("@info:status", "Unknown size");
- setValue(0);
- update();
-}
-