]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/statusbar/statusbarspaceinfo.h
Fix for crash which was introduced by commit
[dolphin.git] / src / statusbar / statusbarspaceinfo.h
index 0a563ad13fb78d732f3b13b34689f9a533c61b73..5d571beba9b936c52dd3279e370c39a1bfd50827 100644 (file)
 #ifndef STATUSBARSPACEINFO_H
 #define STATUSBARSPACEINFO_H
 
-#include <KUrl>
+#include <QUrl>
 
-#include <QColor>
-#include <QKeyEvent>
-#include <QString>
 
 #include <kcapacitybar.h>
 
 class QHideEvent;
 class QShowEvent;
 
+class SpaceInfoObserver;
+
 /**
  * @short Shows the available space for the volume represented
  *        by the given URL as part of the status bar.
@@ -43,21 +42,19 @@ public:
     explicit StatusBarSpaceInfo(QWidget* parent = 0);
     virtual ~StatusBarSpaceInfo();
 
-    void setUrl(const KUrl& url);
-    KUrl url() const;
+    void setUrl(const QUrl& url);
+    QUrl url() const;
 
 protected:
-    void showEvent(QShowEvent* event);
-    void hideEvent(QHideEvent* event);
+    void showEvent(QShowEvent* event) Q_DECL_OVERRIDE;
+    void hideEvent(QHideEvent* event) Q_DECL_OVERRIDE;
 
 private slots:
-    /** Refreshes the space information for the current set URL. */
-    void refresh();
+    void slotValuesChanged();
 
 private:
-    quint64 m_kBSize;
-    KUrl m_url;
-    QTimer* m_timer;
+    QScopedPointer<SpaceInfoObserver> m_observer;
+    QUrl m_url;
 };
 
 #endif