src/hbcore/utils/hbwidgetloader.cpp
changeset 5 627c4a0fd0e7
parent 1 f7ac710697a9
child 7 923ff622b8b9
--- a/src/hbcore/utils/hbwidgetloader.cpp	Thu May 27 13:10:59 2010 +0300
+++ b/src/hbcore/utils/hbwidgetloader.cpp	Fri Jun 11 13:58:22 2010 +0300
@@ -22,6 +22,9 @@
 ** Nokia at developer.feedback@nokia.com.
 **
 ****************************************************************************/
+#ifndef HB_BIN_CSS
+#define HB_USETHEMESERVER
+#endif
 
 #include "hbwidgetloader_p.h"
 #include "hbwidgetloadersyntax_p.h"
@@ -29,7 +32,9 @@
 
 #include "hbinstance.h"
 #include "hbtheme_p.h"
+#ifdef HB_USETHEMESERVER
 #include "hbthemeclient_p.h"
+#endif
 
 #include <QtDebug>
 #include <QFile>
@@ -63,11 +68,11 @@
 Q_GLOBAL_STATIC(QStringList, filesNotPresent)
 
 // Layout caching
-static HbWidgetLoader::LayoutDefinition *staticCacheLayout = NULL;
-static QString staticCacheFileName = QString();
-static QString staticCacheName = QString();
-static QString staticCacheSection = QString();
-static QDateTime staticCacheModified = QDateTime();
+static HbWidgetLoader::LayoutDefinition *staticCacheLayout = 0;
+static QString staticCacheFileName;
+static QString staticCacheName;
+static QString staticCacheSection;
+static QDateTime staticCacheModified;
 
 class HbWidgetLoaderPrivate
 {
@@ -237,6 +242,12 @@
     delete mActions;
 }
 
+#ifdef HB_BIN_CSS
+void HbWidgetLoaderPrivate::setWidget( HbWidget* widget )
+{
+    Q_UNUSED(widget)
+}
+#else
 /*!
     \internal
 */
@@ -246,6 +257,7 @@
     mActions->mWidget = widget;
     mActions->mCurrentProfile = HbDeviceProfile::profile(widget);
 }
+#endif
 
 /*!
     \internal
@@ -280,10 +292,12 @@
     }
 
     // get the shared layout definition address.
+#ifdef HB_USETHEMESERVER
     layoutDef = HbThemeClient::global()->getSharedLayoutDefs(fileName, name, section);
     if (layoutDef) {
         clientLayoutDefsCache()->insert(key, layoutDef);
     }
+#endif
     return true;
 }