src/hbcore/gui/hbmainwindow.cpp
changeset 30 80e4d18b72f5
parent 23 e6ad4ef83b23
equal deleted inserted replaced
28:b7da29130b0e 30:80e4d18b72f5
   263   (so we won't waste time with that).
   263   (so we won't waste time with that).
   264 
   264 
   265   \internal
   265   \internal
   266  */
   266  */
   267 
   267 
       
   268 #ifdef Q_OS_SYMBIAN
       
   269 #define HB_SPLASH_FLICKER_WORKAROUND
       
   270 #endif
       
   271 
   268 class HbRootItem : public HbWidget
   272 class HbRootItem : public HbWidget
   269 {
   273 {
   270 public:
   274 public:
   271     explicit  HbRootItem(QGraphicsItem *parent = 0);
   275     explicit  HbRootItem(QGraphicsItem *parent = 0);
   272     ~HbRootItem() {}
   276     ~HbRootItem() {}
  1027                 // create the test utility
  1031                 // create the test utility
  1028                 if (!d->mTheTestUtility) {
  1032                 if (!d->mTheTestUtility) {
  1029                     d->mTheTestUtility = new HbTheTestUtility(this);
  1033                     d->mTheTestUtility = new HbTheTestUtility(this);
  1030                 }
  1034                 }
  1031             }
  1035             }
  1032 #ifdef Q_OS_SYMBIAN
  1036 #ifdef HB_SPLASH_FLICKER_WORKAROUND
  1033             // Disable surface transparency unless we were really asked to be transparent.
  1037             // Disable surface transparency unless we were really asked to be transparent.
  1034             // Must be done before destroying the splash screen widget.
  1038             // Must be done before destroying the splash screen widget.
  1035             if (!testAttribute(Qt::WA_TranslucentBackground)) {
  1039             if (!testAttribute(Qt::WA_TranslucentBackground)) {
  1036                 RWindow *const window = static_cast<RWindow *>(effectiveWinId()->DrawableWindow());
  1040                 RWindow *const window = static_cast<RWindow *>(effectiveWinId()->DrawableWindow());
  1037                 window->SetSurfaceTransparency(false);
  1041                 window->SetSurfaceTransparency(false);
  1103     QGraphicsView::paintEvent(event);
  1107     QGraphicsView::paintEvent(event);
  1104 }
  1108 }
  1105 
  1109 
  1106 void HbMainWindow::showEvent(QShowEvent *event)
  1110 void HbMainWindow::showEvent(QShowEvent *event)
  1107 {
  1111 {
  1108 #ifdef Q_OS_SYMBIAN
  1112 #ifdef HB_SPLASH_FLICKER_WORKAROUND
  1109     // Enable surface transparency if QWidget did not do it already. This is a
  1113     // Enable surface transparency if QWidget did not do it already. This is a
  1110     // workaround for having non-transparent surfaces filled automatically with
  1114     // workaround for having non-transparent surfaces filled automatically with
  1111     // black color. The showEvent is a suitable place because the native control
  1115     // black color. The showEvent is a suitable place because the native control
  1112     // is already created at this point, but it is not too late either. Note
  1116     // is already created at this point, but it is not too late either. Note
  1113     // that while this is meant to be a workaround, the system transition
  1117     // that while this is meant to be a workaround, the system transition