src/hbcore/core/hbthemeindex.cpp
changeset 7 923ff622b8b9
parent 6 c3690ec91ef8
child 21 4633027730f5
child 34 ed14f46c0e55
--- a/src/hbcore/core/hbthemeindex.cpp	Wed Jun 23 18:33:25 2010 +0300
+++ b/src/hbcore/core/hbthemeindex.cpp	Tue Jul 06 14:36:53 2010 +0300
@@ -65,6 +65,9 @@
     // First check base theme, which should be always valid
     HbThemeIndexInfo info = HbThemeUtils::getThemeIndexInfo(BaseTheme);
     if (!info.address) { // This shouldn't happen, as there must be valid base theme
+#ifdef THEME_INDEX_TRACES
+        qDebug("HbThemeUtils::getThemeIndexInfo(BaseTheme) returned null address");
+#endif
         return; // Data will be 0
     }
     
@@ -72,6 +75,9 @@
     const HbThemeIndexItemData *baseItemData = baseIndex.getItemData(resourceName);
 
     if (!baseItemData) { // If the item is not found from base theme, it can't be found elsewhere
+#ifdef THEME_INDEX_TRACES
+        qDebug("HbThemeIndex::getItemData(%s) returned null data", qPrintable(resourceName));
+#endif
         return; // Data will be 0
     }
 
@@ -334,9 +340,13 @@
 QColor HbThemeIndexResource::colorValue()
 {
     if (!data || data->itemType != HbThemeIndexItemData::ColorItem) {
+        qWarning("HbThemeIndexResource::colorValue(): cannot fetch color for 0x%x::%i",
+                 qptrdiff(data), data ? data->itemType : (uint) -1);
         return QColor();
     }
-
+#ifdef THEME_INDEX_TRACES
+    qDebug("HbThemeIndexResource::colorValue(): constructing QColor(%x)", data->colorValue);
+#endif // THEME_INDEX_TRACES
     return QColor(data->colorValue);
 }