src/gui/painting/qwindowsurface.cpp
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
    41 
    41 
    42 #include <private/qwindowsurface_p.h>
    42 #include <private/qwindowsurface_p.h>
    43 #include <qwidget.h>
    43 #include <qwidget.h>
    44 #include <private/qwidget_p.h>
    44 #include <private/qwidget_p.h>
    45 #include <private/qbackingstore_p.h>
    45 #include <private/qbackingstore_p.h>
       
    46 #include <private/qapplication_p.h>
    46 
    47 
    47 QT_BEGIN_NAMESPACE
    48 QT_BEGIN_NAMESPACE
    48 
    49 
    49 class QWindowSurfacePrivate
    50 class QWindowSurfacePrivate
    50 {
    51 {
   114     Constructs an empty surface for the given top-level \a window.
   115     Constructs an empty surface for the given top-level \a window.
   115 */
   116 */
   116 QWindowSurface::QWindowSurface(QWidget *window)
   117 QWindowSurface::QWindowSurface(QWidget *window)
   117     : d_ptr(new QWindowSurfacePrivate(window))
   118     : d_ptr(new QWindowSurfacePrivate(window))
   118 {
   119 {
   119     if (window)
   120     if (!QApplicationPrivate::runtime_graphics_system) {
   120         window->setWindowSurface(this);
   121         if(window)
       
   122             window->setWindowSurface(this);
       
   123     }
   121 }
   124 }
   122 
   125 
   123 /*!
   126 /*!
   124     Destroys this surface.
   127     Destroys this surface.
   125 */
   128 */