summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qimage.cpp2
-rw-r--r--src/gui/kernel/qevent.cpp2
-rw-r--r--src/gui/kernel/qguiapplication.cpp3
-rw-r--r--src/gui/kernel/qopenglcontext.cpp12
-rw-r--r--src/gui/kernel/qplatformsystemtrayicon.cpp4
-rw-r--r--src/gui/kernel/qplatformsystemtrayicon.h2
-rw-r--r--src/gui/kernel/qstylehints.cpp2
-rw-r--r--src/gui/kernel/qwindow.cpp3
-rw-r--r--src/gui/painting/qpdf.cpp4
-rw-r--r--src/gui/text/qfontengine_ft.cpp30
-rw-r--r--src/gui/text/qfontengine_ft_p.h3
-rw-r--r--src/gui/text/qrawfont_p.h15
12 files changed, 30 insertions, 52 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 1cd5b869a6..38fa2df906 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -314,7 +314,7 @@ bool QImageData::checkForAlphaPixels() const
sharing}. QImage objects can also be streamed and compared.
\note If you would like to load QImage objects in a static build of Qt,
- refer to the \l{How To Create Qt Plugins#Static Plugins}{Plugin HowTo}.
+ refer to the \l{How To Create Qt Plugins}{Plugin HowTo}.
\warning Painting on a QImage with the format
QImage::Format_Indexed8 is not supported.
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 9eefa968ad..f845bf89c9 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -283,7 +283,6 @@ QMouseEvent::~QMouseEvent()
\sa Qt::MouseEventSource
\sa QGraphicsSceneMouseEvent::source()
- \sa QGraphicsSceneMouseEvent::setSource()
*/
Qt::MouseEventSource QMouseEvent::source() const
{
@@ -299,7 +298,6 @@ Qt::MouseEventSource QMouseEvent::source() const
\sa Qt::MouseEventFlag
\sa QGraphicsSceneMouseEvent::flags()
- \sa QGraphicsSceneMouseEvent::setFlags()
*/
Qt::MouseEventFlags QMouseEvent::flags() const
{
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 8c77ff95f2..9ddb9e15ee 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -2159,6 +2159,9 @@ void QGuiApplicationPrivate::processTabletLeaveProximityEvent(QWindowSystemInter
#ifndef QT_NO_GESTURES
void QGuiApplicationPrivate::processGestureEvent(QWindowSystemInterfacePrivate::GestureEvent *e)
{
+ if (e->window.isNull())
+ return;
+
QNativeGestureEvent ev(e->type, e->pos, e->pos, e->globalPos, e->realValue, e->sequenceId, e->intValue);
ev.setTimestamp(e->timestamp);
QGuiApplication::sendSpontaneousEvent(e->window, &ev);
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index 895ea1b07b..1cd67b19d2 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -519,7 +519,7 @@ void QOpenGLContext::setScreen(QScreen *screen)
value type. These classes can be found in the QtPlatformHeaders module.
When create() is called with native handles set, the handles' ownership are
- not taken, meaning that destroy() will not destroy the native context.
+ not taken, meaning that \c destroy() will not destroy the native context.
\note Some frameworks track the current context and surfaces internally.
Making the adopted QOpenGLContext current via Qt will have no effect on such
@@ -583,9 +583,9 @@ QVariant QOpenGLContext::nativeHandle() const
be used with makeCurrent(), swapBuffers(), etc.
\note If the context is already created, this function will first call
- destroy(), and then create a new OpenGL context.
+ \c destroy(), and then create a new OpenGL context.
- \sa makeCurrent(), destroy(), format()
+ \sa makeCurrent(), format()
*/
bool QOpenGLContext::create()
{
@@ -614,7 +614,7 @@ bool QOpenGLContext::create()
destroying the underlying platform context frees any state associated with
the context.
- After destroy() has been called, you must call create() if you wish to
+ After \c destroy() has been called, you must call create() if you wish to
use the context again.
\note This implicitly calls doneCurrent() if the context is current.
@@ -659,10 +659,8 @@ void QOpenGLContext::destroy()
/*!
Destroys the QOpenGLContext object.
- This implicitly calls destroy(), so if this is the current context for the
+ This implicitly calls \c destroy(), so if this is the current context for the
thread, doneCurrent() is also called.
-
- \sa destroy()
*/
QOpenGLContext::~QOpenGLContext()
{
diff --git a/src/gui/kernel/qplatformsystemtrayicon.cpp b/src/gui/kernel/qplatformsystemtrayicon.cpp
index ae87805856..a8fe4e04fb 100644
--- a/src/gui/kernel/qplatformsystemtrayicon.cpp
+++ b/src/gui/kernel/qplatformsystemtrayicon.cpp
@@ -119,9 +119,9 @@ QPlatformSystemTrayIcon::~QPlatformSystemTrayIcon()
/*!
\fn void QPlatformSystemTrayIcon::showMessage(const QString &title, const QString &msg,
- const QIcon &icon, MessageIcon iconType, int secs)
+ const QIcon &icon, MessageIcon iconType, int msecs)
Shows a balloon message for the entry with the given \a title, message \a msg and \a icon for
- the time specified in \a secs. \a iconType is used as a hint for the implementing platform.
+ the time specified in \a msecs. \a iconType is used as a hint for the implementing platform.
\sa QSystemTrayIcon::showMessage()
*/
diff --git a/src/gui/kernel/qplatformsystemtrayicon.h b/src/gui/kernel/qplatformsystemtrayicon.h
index 9bbaf5e9ca..d77bfa9f8f 100644
--- a/src/gui/kernel/qplatformsystemtrayicon.h
+++ b/src/gui/kernel/qplatformsystemtrayicon.h
@@ -70,7 +70,7 @@ public:
virtual void updateMenu(QPlatformMenu *menu) = 0;
virtual QRect geometry() const = 0;
virtual void showMessage(const QString &title, const QString &msg,
- const QIcon &icon, MessageIcon iconType, int secs) = 0;
+ const QIcon &icon, MessageIcon iconType, int msecs) = 0;
virtual bool isSystemTrayAvailable() const = 0;
virtual bool supportsMessages() const = 0;
diff --git a/src/gui/kernel/qstylehints.cpp b/src/gui/kernel/qstylehints.cpp
index 65a710c3f7..125e59aa5f 100644
--- a/src/gui/kernel/qstylehints.cpp
+++ b/src/gui/kernel/qstylehints.cpp
@@ -88,7 +88,7 @@ public:
Access to these parameters are useful when implementing custom user interface components, in that
they allow the components to exhibit the same behaviour and feel as other components.
- \sa QGuiApplication::styleHints(), QPlatformTheme
+ \sa QGuiApplication::styleHints()
*/
QStyleHints::QStyleHints()
: QObject(*new QStyleHintsPrivate(), 0)
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index dd4bb57690..ced39bbe10 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -2444,7 +2444,8 @@ void QWindowPrivate::setCursor(const QCursor *newCursor)
hasCursor = false;
}
// Only attempt to set cursor and emit signal if there is an actual platform cursor
- if (q->screen()->handle()->cursor()) {
+ QScreen* screen = q->screen();
+ if (screen && screen->handle()->cursor()) {
applyCursor();
QEvent event(QEvent::CursorChange);
QGuiApplication::sendEvent(q, &event);
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index 8cf45863b8..2efaec41ef 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -2083,10 +2083,8 @@ int QPdfEnginePrivate::writeImage(const QByteArray &data, int width, int height,
}
if (maskObject > 0)
xprintf("/Mask %d 0 R\n", maskObject);
- if (softMaskObject > 0) {
+ if (softMaskObject > 0)
xprintf("/SMask %d 0 R\n", softMaskObject);
- xprintf("/Decode [1 0 1 0 1 0]\n");
- }
int lenobj = requestObject();
xprintf("/Length %d 0 R\n", lenobj);
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index 4d6c04a262..5c1af8bb40 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -1410,36 +1410,6 @@ QFontEngineFT::QGlyphSet *QFontEngineFT::loadTransformedGlyphSet(const QTransfor
return gs;
}
-bool QFontEngineFT::loadGlyphs(QGlyphSet *gs, const glyph_t *glyphs, int num_glyphs,
- const QFixedPoint *positions,
- GlyphFormat format)
-{
- FT_Face face = 0;
-
- for (int i = 0; i < num_glyphs; ++i) {
- QFixed spp = subPixelPositionForX(positions[i].x);
- Glyph *glyph = gs ? gs->getGlyph(glyphs[i], spp) : 0;
- if (glyph == 0 || glyph->format != format) {
- if (!face) {
- face = lockFace();
- FT_Matrix m = matrix;
- FT_Matrix_Multiply(&gs->transformationMatrix, &m);
- FT_Set_Transform(face, &m, 0);
- freetype->matrix = m;
- }
- if (!loadGlyph(gs, glyphs[i], spp, format)) {
- unlockFace();
- return false;
- }
- }
- }
-
- if (face)
- unlockFace();
-
- return true;
-}
-
void QFontEngineFT::getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics)
{
FT_Face face = lockFace(Unscaled);
diff --git a/src/gui/text/qfontengine_ft_p.h b/src/gui/text/qfontengine_ft_p.h
index 02c692cccc..e33f0fc0f5 100644
--- a/src/gui/text/qfontengine_ft_p.h
+++ b/src/gui/text/qfontengine_ft_p.h
@@ -269,9 +269,6 @@ private:
Glyph *loadGlyphFor(glyph_t g, QFixed subPixelPosition, GlyphFormat format, const QTransform &t);
QGlyphSet *loadTransformedGlyphSet(const QTransform &matrix);
- bool loadGlyphs(QGlyphSet *gs, const glyph_t *glyphs, int num_glyphs,
- const QFixedPoint *positions,
- GlyphFormat format = Format_Render);
QFontEngineFT(const QFontDef &fd);
virtual ~QFontEngineFT();
diff --git a/src/gui/text/qrawfont_p.h b/src/gui/text/qrawfont_p.h
index 9b0846de9a..96ba3fd026 100644
--- a/src/gui/text/qrawfont_p.h
+++ b/src/gui/text/qrawfont_p.h
@@ -70,14 +70,18 @@ public:
, hintingPreference(other.hintingPreference)
, thread(other.thread)
{
+#ifndef QT_NO_DEBUG
Q_ASSERT(fontEngine == 0 || thread == QThread::currentThread());
+#endif
if (fontEngine != 0)
fontEngine->ref.ref();
}
~QRawFontPrivate()
{
+#ifndef QT_NO_DEBUG
Q_ASSERT(ref.load() == 0);
+#endif
cleanUp();
}
@@ -89,27 +93,36 @@ public:
inline bool isValid() const
{
+#ifndef QT_NO_DEBUG
Q_ASSERT(fontEngine == 0 || thread == QThread::currentThread());
+#endif
return fontEngine != 0;
}
inline void setFontEngine(QFontEngine *engine)
{
+#ifndef QT_NO_DEBUG
Q_ASSERT(fontEngine == 0 || thread == QThread::currentThread());
+#endif
if (fontEngine == engine)
return;
if (fontEngine != 0) {
if (!fontEngine->ref.deref())
delete fontEngine;
+#ifndef QT_NO_DEBUG
thread = 0;
+#endif
}
fontEngine = engine;
if (fontEngine != 0) {
fontEngine->ref.ref();
- Q_ASSERT(thread = QThread::currentThread()); // set only if assertions enabled
+#ifndef QT_NO_DEBUG
+ thread = QThread::currentThread();
+ Q_ASSERT(thread);
+#endif
}
}