summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <tsdgeos@terra.es>2012-03-08 23:26:51 (GMT)
committerAlbert Astals Cid <tsdgeos@terra.es>2012-03-08 23:26:51 (GMT)
commitbf47b97cc28238599175477fe61acc2625f595e4 (patch)
tree227e5f400c0a78e528bb114722107c7ea49c4b67
parentbd6219327f4d13e46b151fa6d13fcbcdba7c8f03 (diff)
Do not return 0 in getFreeMemory for the first two seconds
-rw-r--r--core/document.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/document.cpp b/core/document.cpp
index 74757f1..2e39221 100644
--- a/core/document.cpp
+++ b/core/document.cpp
@@ -271,7 +271,7 @@ qulonglong DocumentPrivate::getTotalMemory()
qulonglong DocumentPrivate::getFreeMemory()
{
- static QTime lastUpdate = QTime::currentTime();
+ static QTime lastUpdate = QTime::currentTime().addSecs(-3);
static qulonglong cachedValue = 0;
if ( qAbs( lastUpdate.secsTo( QTime::currentTime() ) ) <= 2 )