diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-02-18 16:14:52 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-02-18 16:14:52 +0100 |
commit | f4900d340a4c620b56871995741696d28e53c167 (patch) | |
tree | 66d4ed6e4e8012e8a534717e87bf15cf8a992652 /src/gui | |
parent | 7c33ae6a7bbbd42ce70acf77aa55c1bc2a23c8ec (diff) | |
parent | 843de37bca944110fdf3aab161d680e3845d2dd2 (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
src/widgets/styles/qmacstyle_mac.mm
Change-Id: If8326db9e7da3cbf45dbf7475fdff9915c7723b1
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/accessible/qaccessible.h | 2 | ||||
-rw-r--r-- | src/gui/image/qimage.cpp | 5 | ||||
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 2 | ||||
-rw-r--r-- | src/gui/opengl/qopenglframebufferobject.cpp | 36 | ||||
-rw-r--r-- | src/gui/text/qfont.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qtextcursor.cpp | 4 |
6 files changed, 27 insertions, 24 deletions
diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h index 016e9b6d07..96fc7c031b 100644 --- a/src/gui/accessible/qaccessible.h +++ b/src/gui/accessible/qaccessible.h @@ -39,6 +39,7 @@ ** ****************************************************************************/ +#ifndef QT_NO_ACCESSIBILITY #ifndef QACCESSIBLE_H #define QACCESSIBLE_H @@ -677,3 +678,4 @@ inline void QAccessible::updateAccessibility(QObject *object, int child, Event r QT_END_NAMESPACE #endif // QACCESSIBLE_H +#endif //!QT_NO_ACCESSIBILITY diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 975ef54d6b..481cb37c8c 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -4944,7 +4944,10 @@ QPaintEngine *QImage::paintEngine() const if (!d->paintEngine) { QPaintDevice *paintDevice = const_cast<QImage *>(this); - QPaintEngine *paintEngine = QGuiApplicationPrivate::platformIntegration()->createImagePaintEngine(paintDevice); + QPaintEngine *paintEngine = 0; + QPlatformIntegration *platformIntegration = QGuiApplicationPrivate::platformIntegration(); + if (platformIntegration) + paintEngine = platformIntegration->createImagePaintEngine(paintDevice); d->paintEngine = paintEngine ? paintEngine : new QRasterPaintEngine(paintDevice); } diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 3a8428b332..89b3b9ab89 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -60,7 +60,9 @@ #include <QtCore/private/qthread_p.h> #include <QtCore/qdir.h> #include <QtDebug> +#ifndef QT_NO_ACCESSIBILITY #include "qaccessible.h" +#endif #include <qpalette.h> #include <qscreen.h> #include "qsessionmanager.h" diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index 8e92ab5d58..8d6b05d0b4 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -686,25 +686,24 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen \ingroup painting-3D The QOpenGLFramebufferObject class encapsulates an OpenGL framebuffer - object, defined by the \c{GL_EXT_framebuffer_object} extension. In - addition it provides a rendering surface that can be painted on - with a QPainter, rendered to using native OpenGL calls, or both. This - surface can be bound and used as a regular texture in your own OpenGL - drawing code. By default, the QOpenGLFramebufferObject class - generates a 2D OpenGL texture (using the \c{GL_TEXTURE_2D} target), - which is used as the internal rendering target. + object, defined by the \c{GL_EXT_framebuffer_object} extension. It provides + a rendering surface that can be painted on with a QPainter with the help of + QOpenGLPaintDevice, or rendered to using native OpenGL calls. This surface + can be bound and used as a regular texture in your own OpenGL drawing code. + By default, the QOpenGLFramebufferObject class generates a 2D OpenGL + texture (using the \c{GL_TEXTURE_2D} target), which is used as the internal + rendering target. \b{It is important to have a current OpenGL context when creating a QOpenGLFramebufferObject, otherwise initialization will fail.} - When using a QPainter to paint to a QOpenGLFramebufferObject you should take - care that the QOpenGLFramebufferObject is created with the CombinedDepthStencil - attachment for QPainter to be able to render correctly. - Note that you need to create a QOpenGLFramebufferObject with more than one - sample per pixel for primitives to be antialiased when drawing using a - QPainter. To create a multisample framebuffer object you should use one of - the constructors that take a QOpenGLFramebufferObject parameter, and set the - QOpenGLFramebufferObject::samples() property to a non-zero value. + Create the QOpenGLFrameBufferObject instance with the CombinedDepthStencil + attachment if you want QPainter to render correctly. Note that you need to + create a QOpenGLFramebufferObject with more than one sample per pixel for + primitives to be antialiased when drawing using a QPainter. To create a + multisample framebuffer object you should use one of the constructors that + take a QOpenGLFramebufferObjectFormat parameter, and set the + QOpenGLFramebufferObjectFormat::samples() property to a non-zero value. For multisample framebuffer objects a color render buffer is created, otherwise a texture with the specified texture target is created. @@ -716,11 +715,8 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen as a texture, you first need to copy from it to a regular framebuffer object using QOpenGLContext::blitFramebuffer(). - \section1 Threading - - As of Qt 4.8, it's possible to draw into a QOpenGLFramebufferObject - using a QPainter in a separate thread. Note that OpenGL 2.0 or - OpenGL ES 2.0 is required for this to work. + It is possible to draw into a QOpenGLFramebufferObject using QPainter and + QOpenGLPaintDevice in a separate thread. */ diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index 87ca5e4cfe..279d165322 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -671,7 +671,7 @@ void QFontPrivate::detachButKeepEngineData(QFont *font) \sa QGuiApplication::setFont(), QGuiApplication::font() */ QFont::QFont() - : d(QGuiApplication::font().d.data()), resolve_mask(0) + : d(QGuiApplicationPrivate::instance() ? QGuiApplication::font().d.data() : new QFontPrivate()), resolve_mask(0) { } diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp index 182b9ac7fd..39fca795c9 100644 --- a/src/gui/text/qtextcursor.cpp +++ b/src/gui/text/qtextcursor.cpp @@ -1283,7 +1283,7 @@ bool QTextCursor::movePosition(MoveOperation op, MoveMode mode, int n) Returns true if the cursor does visual navigation; otherwise returns false. - Visual navigation means skipping over hidden text pragraphs. The + Visual navigation means skipping over hidden text paragraphs. The default is false. \sa setVisualNavigation(), movePosition() @@ -1298,7 +1298,7 @@ bool QTextCursor::visualNavigation() const Sets visual navigation to \a b. - Visual navigation means skipping over hidden text pragraphs. The + Visual navigation means skipping over hidden text paragraphs. The default is false. \sa visualNavigation(), movePosition() |