summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-02-18 20:03:20 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-18 20:03:20 +0100
commit3654a4a3c1cb2ac9bb8b486877d9f1e6a6b220be (patch)
tree611c16caa5096bd1348f188c9072354f1e613a9f /src/gui
parentc04f3584abd621f09e8f2c81b9c6c87212a993a3 (diff)
parentf4900d340a4c620b56871995741696d28e53c167 (diff)
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/accessible/qaccessible.h2
-rw-r--r--src/gui/image/qimage.cpp5
-rw-r--r--src/gui/kernel/qguiapplication.cpp2
-rw-r--r--src/gui/opengl/qopenglframebufferobject.cpp36
-rw-r--r--src/gui/text/qfont.cpp2
-rw-r--r--src/gui/text/qtextcursor.cpp4
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()