diff base/StorageAdviser.cpp @ 374:7cc6b7b0d819 sv1-v1.2pre3

* line up overview widget nicely with main pane (at least on first startup) * fix #1878396 renaming layer seems to have no visible effect * comment out some debug output
author Chris Cannam
date Wed, 06 Feb 2008 17:40:53 +0000
parents 824ee993ca8d
children 52303ec15cd2
line wrap: on
line diff
--- a/base/StorageAdviser.cpp	Wed Feb 06 16:21:29 2008 +0000
+++ b/base/StorageAdviser.cpp	Wed Feb 06 17:40:53 2008 +0000
@@ -22,6 +22,8 @@
 
 #include <iostream>
 
+//#define DEBUG_STORAGE_ADVISER 1
+
 long StorageAdviser::m_discPlanned = 0;
 long StorageAdviser::m_memoryPlanned = 0;
 
@@ -30,9 +32,11 @@
 			  int minimumSize,
 			  int maximumSize)
 {
+#ifdef DEBUG_STORAGE_ADVISER
     std::cerr << "StorageAdviser::recommend: Criteria " << criteria 
               << ", minimumSize " << minimumSize
               << ", maximumSize " << maximumSize << std::endl;
+#endif
 
     QString path = TempDirectory::getInstance()->getPath();
     int discFree = GetDiscSpaceMBAvailable(path.toLocal8Bit());
@@ -51,7 +55,9 @@
         memoryFree = 0;
     }
 
+#ifdef DEBUG_STORAGE_ADVISER
     std::cerr << "Disc space: " << discFree << ", memory free: " << memoryFree << ", memory total: " << memoryTotal << ", min " << minimumSize << ", max " << maximumSize << std::endl;
+#endif
 
     //!!! We have a potentially serious problem here if multiple
     //recommendations are made in advance of any of the resulting
@@ -86,8 +92,10 @@
     else if (minmb > (discFree / 10)) discStatus = Marginal;
     else discStatus = Sufficient;
 
+#ifdef DEBUG_STORAGE_ADVISER
     std::cerr << "Memory status: " << memoryStatus << ", disc status "
               << discStatus << std::endl;
+#endif
 
     int recommendation = NoRecommendation;