When explicitly refreshing the view (e.g. F5) also refresh disk space info.
This would also allow us to raise the refresh interval somewhat.
CCBUG: 398612
Differential Revision: https://phabricator.kde.org/D15508
{
clearStatusBar();
m_activeViewContainer->reload();
{
clearStatusBar();
m_activeViewContainer->reload();
+ m_activeViewContainer->statusBar()->updateSpaceInfo();
}
void DolphinMainWindow::stopLoading()
}
void DolphinMainWindow::stopLoading()
setExtensionsVisible(true);
}
setExtensionsVisible(true);
}
+void DolphinStatusBar::updateSpaceInfo()
+{
+ m_spaceInfo->update();
+}
+
void DolphinStatusBar::contextMenuEvent(QContextMenuEvent* event)
{
Q_UNUSED(event);
void DolphinStatusBar::contextMenuEvent(QContextMenuEvent* event)
{
Q_UNUSED(event);
+ /**
+ * Refreshes the disk space information.
+ */
+ void updateSpaceInfo();
+
public slots:
void setText(const QString& text);
void setUrl(const QUrl& url);
public slots:
void setText(const QString& text);
void setUrl(const QUrl& url);
+void SpaceInfoObserver::update()
+{
+ if (m_mountPointObserver) {
+ m_mountPointObserver->update();
+ }
+}
+
void SpaceInfoObserver::spaceInfoChanged(quint64 size, quint64 available)
{
// Make sure that the size has actually changed
void SpaceInfoObserver::spaceInfoChanged(quint64 size, quint64 available)
{
// Make sure that the size has actually changed
void setUrl(const QUrl& url);
void setUrl(const QUrl& url);
+public slots:
+ void update();
+
signals:
/**
* This signal is emitted when the size or available space changes.
signals:
/**
* This signal is emitted when the size or available space changes.
+void StatusBarSpaceInfo::update()
+{
+ if (m_observer) {
+ m_observer->update();
+ }
+}
+
void StatusBarSpaceInfo::showEvent(QShowEvent* event)
{
KCapacityBar::showEvent(event);
void StatusBarSpaceInfo::showEvent(QShowEvent* event)
{
KCapacityBar::showEvent(event);
void setUrl(const QUrl& url);
QUrl url() const;
void setUrl(const QUrl& url);
QUrl url() const;
protected:
void showEvent(QShowEvent* event) override;
void hideEvent(QHideEvent* event) override;
protected:
void showEvent(QShowEvent* event) override;
void hideEvent(QHideEvent* event) override;