]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/statusbarspaceinfo.cpp
Further optimizations: do a delayed update of the geometry. This leads to a reduced...
[dolphin.git] / src / statusbarspaceinfo.cpp
index d63b12eb7fbb70e97bef2250ffbf71869e45fae1..fca7bdd0beda538f7d457f44c879c01bab5dcf94 100644 (file)
@@ -15,7 +15,7 @@
  *   You should have received a copy of the GNU General Public License     *
  *   along with this program; if not, write to the                         *
  *   Free Software Foundation, Inc.,                                       *
- *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA          *
  ***************************************************************************/
 
 #include "statusbarspaceinfo.h"
@@ -52,7 +52,7 @@ void StatusBarSpaceInfo::setUrl(const KUrl& url)
 {
     m_url = url;
     refresh();
-    update();
+    QTimer::singleShot(300, this, SLOT(update()));
 }
 
 void StatusBarSpaceInfo::paintEvent(QPaintEvent* /* event */)
@@ -132,13 +132,9 @@ void StatusBarSpaceInfo::slotFoundMountPoint(const unsigned long& kBSize,
     update();
 }
 
-void StatusBarSpaceInfo::slotDone()
+void StatusBarSpaceInfo::showResult()
 {
     m_gettingSize = false;
-    if ((m_kBSize > 0) && (m_kBAvailable > 0)) {
-       show();
-    }
-
     update();
 }
 
@@ -160,7 +156,7 @@ void StatusBarSpaceInfo::refresh()
                                            const unsigned long&,
                                            const QString& )));
     connect(job, SIGNAL(done()),
-            this, SLOT(slotDone()));
+            this, SLOT(showResult()));
 
     job->readDF(mountPoint);
 }