From ad05af534dc61b0c07b2c676d8f1ff040d9fbf7b Mon Sep 17 00:00:00 2001 From: Bjoern Breitmeyer Date: Wed, 30 Jan 2013 14:02:28 +0100 Subject: Fixed QT_NO_ACCESSIBILITY build. Change-Id: I14229753fc2e3b54da8a285ae9d27201b73e24be Reviewed-by: Friedemann Kleint --- src/gui/accessible/qaccessible.h | 2 ++ src/gui/kernel/qguiapplication.cpp | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src/gui') diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h index d316ec4f10..5988e6c346 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 @@ -681,3 +682,4 @@ QT_END_NAMESPACE QT_END_HEADER #endif // QACCESSIBLE_H +#endif //!QT_NO_ACCESSIBILITY diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 02ae51bfc2..c155ecfe0c 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -60,7 +60,9 @@ #include #include #include +#ifndef QT_NO_ACCESSIBILITY #include "qaccessible.h" +#endif #include #include #include "qsessionmanager.h" -- cgit v1.2.3 From ff86f6ba4c730941e13e45c670828bb07d92c380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 12 Feb 2013 15:20:27 +0100 Subject: Fixed QOpenGLFramebufferObject docs to mention QOpenGLPaintDevice. Task-number: QTBUG-29496 Change-Id: Id9ec5e2a070992f53bba58468e2472513d52cb8b Reviewed-by: Gunnar Sletta --- src/gui/opengl/qopenglframebufferobject.cpp | 34 +++++++++++++---------------- 1 file changed, 15 insertions(+), 19 deletions(-) (limited to 'src/gui') diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index 8e92ab5d58..2a9caac030 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -686,24 +686,23 @@ 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 + 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 QOpenGLFramebufferObject parameter, and set the QOpenGLFramebufferObject::samples() property to a non-zero value. For multisample framebuffer objects a color render buffer 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. */ -- cgit v1.2.3 From 733430636d1a1e0fb49cf0665994f8ec064c8613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 14 Feb 2013 09:02:24 +0100 Subject: Fixed crashes when using QImage in combination with QCoreApplication. As long as fonts weren't used we supported using QImage in combination with QCoreApplication in 4.x, and there's no reason we can't continue doing so. Task-number: QTBUG-29643 Change-Id: I2cf351d3c93f1c175bbf624e45024d39ab913111 Reviewed-by: Friedemann Kleint Reviewed-by: Gunnar Sletta Reviewed-by: Konstantin Ritt --- src/gui/image/qimage.cpp | 5 ++++- src/gui/text/qfont.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/gui') 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(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/text/qfont.cpp b/src/gui/text/qfont.cpp index 72a24a4698..2961cb9493 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -672,7 +672,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) { } -- cgit v1.2.3 From 783ad64b90ce03b4d719b534553430f147dd5010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 14 Feb 2013 09:57:56 +0100 Subject: Fixed error in QGLFramebufferObject and QOpenGLFramebufferObject docs. It's the format class that lets you control the number of samples. Change-Id: Id01f107a15787f33b65429d3c882854f2dc8784e Reviewed-by: Gunnar Sletta --- src/gui/opengl/qopenglframebufferobject.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui') diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index 2a9caac030..8d6b05d0b4 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -702,8 +702,8 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen 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. + 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. -- cgit v1.2.3 From abb8beb06490123f1a4a2053d728ae2891726a88 Mon Sep 17 00:00:00 2001 From: Marcel Krems Date: Thu, 7 Feb 2013 04:07:29 +0100 Subject: Doc: Fixed typo "pragraphs" -> "paragraphs" Change-Id: I47e88dbedd3afee4bd53550ef1ce643829aecedb Reviewed-by: Jerome Pasion --- src/gui/text/qtextcursor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui') 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() -- cgit v1.2.3