summaryrefslogtreecommitdiffstats
path: root/src/opengl/qpaintengine_opengl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qpaintengine_opengl.cpp')
-rw-r--r--src/opengl/qpaintengine_opengl.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index 12c487d449..58778ea86c 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -921,6 +921,7 @@ static inline QPainterPath strokeForPath(const QPainterPath &path, const QPen &c
stroker.setCapStyle(cpen.capStyle());
stroker.setJoinStyle(cpen.joinStyle());
stroker.setMiterLimit(cpen.miterLimit());
+ stroker.setDashOffset(cpen.dashOffset());
qreal width = cpen.widthF();
if (width == 0)
@@ -4734,9 +4735,11 @@ void QGLGlyphCache::cacheGlyphs(QGLContext *context, QFontEngine *fontEngine,
font_cache = new QGLFontGlyphHash;
// qDebug() << "new context" << context << font_cache;
qt_context_cache.insert(context, font_cache);
- if (context->isValid() && context->device()->devType() == QInternal::Widget) {
- QWidget *widget = static_cast<QWidget *>(context->device());
- connect(widget, SIGNAL(destroyed(QObject*)), SLOT(widgetDestroyed(QObject*)));
+ if (context->isValid()) {
+ if (context->device()->devType() == QInternal::Widget) {
+ QWidget *widget = static_cast<QWidget *>(context->device());
+ connect(widget, SIGNAL(destroyed(QObject*)), SLOT(widgetDestroyed(QObject*)));
+ }
connect(QGLSignalProxy::instance(),
SIGNAL(aboutToDestroyContext(const QGLContext*)),
SLOT(cleanupContext(const QGLContext*)));