src/hbcore/gui/hbwidget.cpp
changeset 23 e6ad4ef83b23
parent 21 4633027730f5
child 30 80e4d18b72f5
--- a/src/hbcore/gui/hbwidget.cpp	Wed Aug 18 10:05:37 2010 +0300
+++ b/src/hbcore/gui/hbwidget.cpp	Thu Sep 02 20:44:51 2010 +0300
@@ -63,6 +63,7 @@
   : HbWidgetBasePrivate(),
     style(0),
     backgroundPrimitiveType(HbStylePrivate::P_None),
+    polished(0),
     polishPending(false),
     themingPending(true),
     repolishOutstanding(false),
@@ -77,7 +78,7 @@
     focusResidualItem(0)
 {
     q_ptr = 0;
-	testabilitySignal = new HbTestabilitySignal_p();
+    testabilitySignal = new HbTestabilitySignal_p();
 }
 
 void HbWidgetPrivate::init()
@@ -493,18 +494,19 @@
 
 /*!
     Sets a custom style for the widget. 
-	When a new style is set for the widget the widget's primitives need to recreated and primitives and layout updated.
-	In order for the style change to work each widget needs to override recreatePrimitives() method and recreate the
-	primitives. 
+    When a new style is set for the widget the widget's primitives need to recreated and primitives and layout updated.
+    In order for the style change to work each widget needs to override recreatePrimitives() method and recreate the
+    primitives. 
     \param style Custom style for the widget, note that the ownership is not transferred
 */
 void HbWidget::setStyle( HbStyle *style )
 {
     Q_D( HbWidget );
     d->style = style;
-	recreatePrimitives();
-	updatePrimitives();
-	repolish();
+    recreatePrimitives();
+    repolish();
+    updatePrimitives();
+    
 }
 
 /*!
@@ -537,24 +539,6 @@
 }
 
 /*!
-    \deprecated HbWidget::pluginBaseId()
-        is deprecated. Style plugins are deprecated.
-*/
-int HbWidget::pluginBaseId() const
-{
-    return 0; // deprecated
-}
-
-/*!
-    \deprecated HbWidget::setPluginBaseId(int)
-        is deprecated. Style plugins are deprecated.
-*/
-void HbWidget::setPluginBaseId( int baseId )
-{
-    Q_UNUSED(baseId); // deprecated
-}
-
-/*!
   This function returns the HbMainWindow of the widget or \c 0 if
   it doesn't exist.  Note that if the widget is not added to the scene
   then this function returns the first mainwindow (if there is one)
@@ -748,10 +732,10 @@
     Q_D(HbWidget);
 
     if (d->testabilitySignal && d->testabilitySignal->signalEnabled()) {
-    	emit d->testabilitySignal->propertyChanges(change, value);
+        emit d->testabilitySignal->propertyChanges(change, value);
     }
 
-	if (change == QGraphicsItem::ItemVisibleHasChanged) {
+    if (change == QGraphicsItem::ItemVisibleHasChanged) {
         if (!d->polished && !value.toBool()) {
 
             // temporary solution starts -->>
@@ -759,7 +743,7 @@
             // when the defect is fixed, this needs to be removed to prevent calling the polish
             // twice.
 #if (QT_VERSION < QT_VERSION_CHECK(4, 6, 1))            
-			if ( !scene() ) {
+            if ( !scene() ) {
                 d->polishPending = true;
             }
 #endif
@@ -900,9 +884,9 @@
     // "d->polished" check removed because there's a bug in QGraphicsScene (Qt bug id 251309):
     // "polishEvent" is never sent to items that were invisible when added to scene.
 #if (QT_VERSION < QT_VERSION_CHECK(4, 6, 1))       
-	if (!d->repolishOutstanding) {
+    if (!d->repolishOutstanding) {
 #else
-	if (d->polished && !d->repolishOutstanding) {
+    if (d->polished && !d->repolishOutstanding) {
 #endif
         d->repolishOutstanding = true;
         QEvent* polishEvent = new QEvent( QEvent::Polish );