From a40e77495612db0b89730debbacc585a22d0eb3a Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Tue, 16 Nov 2010 13:27:57 +0100 Subject: Fix possible missing glyphs in text when using GL engine If you create/destroy gl contexts a lot, you may sometimes get a new context with the same pointer as a destroyed context. When you look up the glyph cache in the font engine using the context pointer as a key, you will then get a glyph cache which contains no valid data. We need to reset the glyph cache completely in this case and set up bindings for the new context so that the glyph cache can be repopulated and reused. Note that there is a different solution for this in Qt 4.8, so this is temporary solution for the Qt 4.7.x series. Task-number: QT-4162 Reviewed-by: Fabien Freling --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 2 ++ src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp | 9 ++++++++- src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h | 15 ++++++++++++++- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 1dcb773..73915cb 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1479,6 +1479,8 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp if (!cache || cache->cacheType() != glyphType) { cache = new QGLTextureGlyphCache(ctx, glyphType, QTransform()); staticTextItem->fontEngine()->setGlyphCache(ctx, cache); + } else if (cache->context() == 0) { // Old context has been destroyed, new context has same ptr value + cache->setContext(ctx); } bool recreateVertexArrays = false; diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp index 919c542..28e8c40 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp @@ -54,11 +54,18 @@ extern Q_GUI_EXPORT bool qt_cleartype_enabled; QGLTextureGlyphCache::QGLTextureGlyphCache(QGLContext *context, QFontEngineGlyphCache::Type type, const QTransform &matrix) : QImageTextureGlyphCache(type, matrix) - , ctx(context) + , ctx(0) , m_width(0) , m_height(0) , m_filterMode(Nearest) { + setContext(context); +} + +void QGLTextureGlyphCache::setContext(QGLContext *context) +{ + ctx = context; + // broken FBO readback is a bug in the SGX 1.3 and 1.4 drivers for the N900 where // copying between FBO's is broken if the texture is either GL_ALPHA or POT. The // workaround is to use a system-memory copy of the glyph cache for this device. diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h index e22146d..fa2b091 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h @@ -90,6 +90,9 @@ public: FilterMode filterMode() const { return m_filterMode; } void setFilterMode(FilterMode m) { m_filterMode = m; } + void setContext(QGLContext *context); + QGLContext *context() const { return ctx; } + public Q_SLOTS: void contextDestroyed(const QGLContext *context) { if (context == ctx) { @@ -98,10 +101,20 @@ public Q_SLOTS: // the context may not be current, so we cannot directly // destroy the fbo and texture here, but since the context // is about to be destroyed, the GL server will do the - // clean up for us anyway + // clean up for us anyway. We reset everything, so that the + // glyph cache object can be reused later by setting a new + // context on it. m_fbo = 0; m_texture = 0; ctx = 0; + m_width = 0; + m_height = 0; + m_w = 0; + m_h = 0; + m_cx = 0; + m_cy = 0; + m_currentRowHeight = 0; + coords.clear(); } else { // since the context holding the texture is shared, and // about to be destroyed, we have to transfer ownership -- cgit v0.12 From e963a1365d495649a1c8930f4776c78781218881 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Tue, 16 Nov 2010 21:47:14 +0100 Subject: Doc: Fixing typo --- src/gui/graphicsview/qgraphicstransform.cpp | 2 +- src/gui/kernel/qapplication_win.cpp | 4 ++-- src/gui/kernel/qclipboard_mac.cpp | 2 +- src/gui/kernel/qevent.cpp | 2 +- src/gui/kernel/qgesturemanager.cpp | 2 +- src/gui/kernel/qgesturemanager_p.h | 2 +- src/gui/kernel/qguiplatformplugin.cpp | 2 +- src/gui/kernel/qkeymapper_mac.cpp | 2 +- src/gui/kernel/qkeysequence.cpp | 2 +- src/gui/kernel/qwidget.cpp | 4 ++-- src/gui/kernel/qwidget_s60.cpp | 2 +- src/gui/kernel/qx11embed_x11.cpp | 2 +- src/gui/util/qundostack.cpp | 2 +- src/network/ssl/qsslsocket_openssl.cpp | 2 +- src/plugins/bearer/symbian/symbianengine.cpp | 2 +- src/plugins/graphicssystems/meego/qmeegographicssystem.cpp | 2 +- src/script/api/qscriptcontextinfo.cpp | 2 +- src/xmlpatterns/expr/qarithmeticexpression_p.h | 2 +- tests/auto/collections/tst_collections.cpp | 2 +- tools/assistant/tools/assistant/helpenginewrapper.cpp | 2 +- 20 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/gui/graphicsview/qgraphicstransform.cpp b/src/gui/graphicsview/qgraphicstransform.cpp index 1f155c6..d495da2 100644 --- a/src/gui/graphicsview/qgraphicstransform.cpp +++ b/src/gui/graphicsview/qgraphicstransform.cpp @@ -54,7 +54,7 @@ instances to one QGraphicsItem. Each QGraphicsTransform is applied in order, one at a time, to the QGraphicsItem it's assigned to. - QGraphicsTransform is particularily useful for animations. Whereas + QGraphicsTransform is particularly useful for animations. Whereas QGraphicsItem::setTransform() lets you assign any transform directly to an item, there is no direct way to interpolate between two different transformations (e.g., when transitioning between two states, each for diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 78028eb..10c4ed6 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -3269,7 +3269,7 @@ bool QETWidget::translateMouseEvent(const MSG &msg) if (type == QEvent::MouseButtonPress && QApplication::activePopupWidget() != activePopupWidget && replayPopupMouseEvent) { - // the popup dissappeared. Replay the event + // the popup disappeared. Replay the event QWidget* w = QApplication::widgetAt(gpos.x, gpos.y); if (w && !QApplicationPrivate::isBlockedByModal(w)) { Q_ASSERT(w->testAttribute(Qt::WA_WState_Created)); @@ -3506,7 +3506,7 @@ static void tabletInit(const quint64 uniqueId, const UINT csr_type, HCTX hTab) } #endif // QT_NO_TABLETEVENT -// Update the "dynamic" informations of a cursor device (pen, airbrush, etc). +// Update the "dynamic" information of a cursor device (pen, airbrush, etc). // The dynamic information is the information of QTabletDeviceData that can change // in time (eraser or pen if a device is turned around). #ifndef QT_NO_TABLETEVENT diff --git a/src/gui/kernel/qclipboard_mac.cpp b/src/gui/kernel/qclipboard_mac.cpp index 49a6cc8..482a3a3 100644 --- a/src/gui/kernel/qclipboard_mac.cpp +++ b/src/gui/kernel/qclipboard_mac.cpp @@ -623,7 +623,7 @@ QMacPasteboard::sync() const #ifdef DEBUG_PASTEBOARD if(fromGlobal) - qDebug("Pasteboard: Syncronize!"); + qDebug("Pasteboard: Synchronize!"); #endif return fromGlobal; } diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index eade02e..7fdb926 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -1970,7 +1970,7 @@ void QInputMethodEvent::setCommitString(const QString &commitString, int replace is usually given by a wheel on 4D mouse. If the device does not support a Z-axis, pass zero here. - The \a tangentialPressure paramater contins the tangential pressure of an air + The \a tangentialPressure parameter contins the tangential pressure of an air brush. If the device does not support tangential pressure, pass 0 here. \a rotation contains the device's rotation in degrees. 4D mice support diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp index 9519447..46450b1 100644 --- a/src/gui/kernel/qgesturemanager.cpp +++ b/src/gui/kernel/qgesturemanager.cpp @@ -189,7 +189,7 @@ void QGestureManager::cleanupCachedGestures(QObject *target, Qt::GestureType typ QGesture *QGestureManager::getState(QObject *object, QGestureRecognizer *recognizer, Qt::GestureType type) { // if the widget is being deleted we should be careful not to - // create a new state, as it will create QWeakPointer which doesnt work + // create a new state, as it will create QWeakPointer which doesn't work // from the destructor. if (object->isWidgetType()) { if (static_cast(object)->d_func()->data.in_destructor) diff --git a/src/gui/kernel/qgesturemanager_p.h b/src/gui/kernel/qgesturemanager_p.h index a5a3482..92310f5 100644 --- a/src/gui/kernel/qgesturemanager_p.h +++ b/src/gui/kernel/qgesturemanager_p.h @@ -101,7 +101,7 @@ private: NotGesture, MaybeGesture // this means timers are up and waiting for some // more events, and input events are handled by - // gesture recognizer explicitely + // gesture recognizer explicitly } state; struct ObjectGesture diff --git a/src/gui/kernel/qguiplatformplugin.cpp b/src/gui/kernel/qguiplatformplugin.cpp index 2dd251b..c80c6d3 100644 --- a/src/gui/kernel/qguiplatformplugin.cpp +++ b/src/gui/kernel/qguiplatformplugin.cpp @@ -187,7 +187,7 @@ QString QGuiPlatformPlugin::styleName() #endif } -/* return an aditional default palette (only work on X11) */ +/* return an additional default palette (only work on X11) */ QPalette QGuiPlatformPlugin::palette() { #ifdef Q_WS_X11 diff --git a/src/gui/kernel/qkeymapper_mac.cpp b/src/gui/kernel/qkeymapper_mac.cpp index 300e5ca..b8f08bf 100644 --- a/src/gui/kernel/qkeymapper_mac.cpp +++ b/src/gui/kernel/qkeymapper_mac.cpp @@ -765,7 +765,7 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *widget, EventHandlerCallRef e &handled_event) == false) return handled_event; QString text(ourChar); - /* This is actually wrong - but unfortunatly it is the best that can be + /* This is actually wrong - but unfortunately it is the best that can be done for now because of the Control/Meta mapping problems */ if (modifiers & (Qt::ControlModifier | Qt::MetaModifier) && !qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)) { diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp index 50b2354..bf3eddd 100644 --- a/src/gui/kernel/qkeysequence.cpp +++ b/src/gui/kernel/qkeysequence.cpp @@ -1105,7 +1105,7 @@ QKeySequence QKeySequence::mnemonic(const QString &text) #else found = true; } else { - qWarning("QKeySequence::mnemonic: \"%s\" contains multiple occurences of '&'", qPrintable(text)); + qWarning("QKeySequence::mnemonic: \"%s\" contains multiple occurrences of '&'", qPrintable(text)); #endif } } diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index e22ec55..39c734e 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -8836,7 +8836,7 @@ void QWidget::mousePressEvent(QMouseEvent *event) QWidget* w; while ((w = QApplication::activePopupWidget()) && w != this){ w->close(); - if (QApplication::activePopupWidget() == w) // widget does not want to dissappear + if (QApplication::activePopupWidget() == w) // widget does not want to disappear w->hide(); // hide at least } if (!rect().contains(event->pos())){ @@ -9305,7 +9305,7 @@ void QWidget::setInputMethodHints(Qt::InputMethodHints hints) #ifndef QT_NO_IM Q_D(QWidget); d->imHints = hints; - // Optimisation to update input context only it has already been created. + // Optimization to update input context only it has already been created. if (d->ic || qApp->d_func()->inputContext) { QInputContext *ic = inputContext(); if (ic) diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index cf4bdf1..97917ba 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -57,7 +57,7 @@ #include #endif -// This is necessary in order to be able to perform delayed invokation on slots +// This is necessary in order to be able to perform delayed invocation on slots // which take arguments of type WId. One example is // QWidgetPrivate::_q_delayedDestroy, which is used to delay destruction of // CCoeControl objects until after the CONE event handler has finished running. diff --git a/src/gui/kernel/qx11embed_x11.cpp b/src/gui/kernel/qx11embed_x11.cpp index 9f1b1f8..e6e3bfb 100644 --- a/src/gui/kernel/qx11embed_x11.cpp +++ b/src/gui/kernel/qx11embed_x11.cpp @@ -1136,7 +1136,7 @@ void QX11EmbedContainer::paintEvent(QPaintEvent *) /*! \internal - Returns wether or not the windows' embedded flag is set. + Returns whether or not the windows' embedded flag is set. */ bool QX11EmbedContainerPrivate::isEmbedded() const { diff --git a/src/gui/util/qundostack.cpp b/src/gui/util/qundostack.cpp index 919ac3c..04cfca9 100644 --- a/src/gui/util/qundostack.cpp +++ b/src/gui/util/qundostack.cpp @@ -441,7 +441,7 @@ bool QUndoStackPrivate::checkUndoLimit() /*! Constructs an empty undo stack with the parent \a parent. The - stack will initally be in the clean state. If \a parent is a + stack will initially be in the clean state. If \a parent is a QUndoGroup object, the stack is automatically added to the group. \sa push() diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index 70ef7ba..0479d83 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -728,7 +728,7 @@ void CSymbianCertificateRetriever::RunL() if (iStatus.Int() == KErrNone) iCertificates->append(iCertificateData); else - qWarning() << "CSymbianCertificateRetriever: failed to retreive a certificate, error " << iStatus.Int(); + qWarning() << "CSymbianCertificateRetriever: failed to retrieve a certificate, error " << iStatus.Int(); GetCertificateL(); break; } diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp index 33fa508..f025d86 100644 --- a/src/plugins/bearer/symbian/symbianengine.cpp +++ b/src/plugins/bearer/symbian/symbianengine.cpp @@ -981,7 +981,7 @@ void SymbianEngine::RunL() QMutexLocker locker(&mutex); if (iStatus != KErrCancel) { - // By default, start relistening notifications. Stop only if interesting event occured. + // By default, start relistening notifications. Stop only if interesting event occurred. iWaitingCommsDatabaseNotifications = true; RDbNotifier::TEvent event = STATIC_CAST(RDbNotifier::TEvent, iStatus.Int()); switch (event) { diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp index 063af13..507f70b 100644 --- a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp +++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp @@ -83,7 +83,7 @@ QWindowSurface* QMeeGoGraphicsSystem::createWindowSurface(QWidget *widget) const QPixmapData *QMeeGoGraphicsSystem::createPixmapData(QPixmapData::PixelType type) const { // Long story short: without this it's possible to hit an - // unitialized paintDevice due to a Qt bug too complex to even + // uninitialized paintDevice due to a Qt bug too complex to even // explain here... not to mention fix without going crazy. // MDK QGLShareContextScope ctx(qt_gl_share_widget()->context()); diff --git a/src/script/api/qscriptcontextinfo.cpp b/src/script/api/qscriptcontextinfo.cpp index a90e014..8528dec 100644 --- a/src/script/api/qscriptcontextinfo.cpp +++ b/src/script/api/qscriptcontextinfo.cpp @@ -177,7 +177,7 @@ QScriptContextInfoPrivate::QScriptContextInfoPrivate(const QScriptContext *conte fileName = source->url(); } - // Get the others informations: + // Get the others information: JSC::JSObject *callee = frame->callee(); if (callee && callee->inherits(&JSC::InternalFunction::info)) functionName = JSC::asInternalFunction(callee)->name(frame); diff --git a/src/xmlpatterns/expr/qarithmeticexpression_p.h b/src/xmlpatterns/expr/qarithmeticexpression_p.h index 66c1f13..6ff8219 100644 --- a/src/xmlpatterns/expr/qarithmeticexpression_p.h +++ b/src/xmlpatterns/expr/qarithmeticexpression_p.h @@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE namespace QPatternist { /** - * @short Implements arithmetics, such as multiplication and substraction. + * @short Implements arithmetics, such as multiplication and subtraction. * * * Optimizations: there's some operator/value combos that are no ops. For diff --git a/tests/auto/collections/tst_collections.cpp b/tests/auto/collections/tst_collections.cpp index f81535e..43e1a52 100644 --- a/tests/auto/collections/tst_collections.cpp +++ b/tests/auto/collections/tst_collections.cpp @@ -1222,7 +1222,7 @@ void tst_Collections::vector() } } - // this used to trigger an unitialized read in valgrind + // this used to trigger an uninitialized read in valgrind QVector foo; foo.resize(144); diff --git a/tools/assistant/tools/assistant/helpenginewrapper.cpp b/tools/assistant/tools/assistant/helpenginewrapper.cpp index a53a9ee..748ad2c 100644 --- a/tools/assistant/tools/assistant/helpenginewrapper.cpp +++ b/tools/assistant/tools/assistant/helpenginewrapper.cpp @@ -144,7 +144,7 @@ HelpEngineWrapper::HelpEngineWrapper(const QString &collectionFile) /* * Otherwise we will waste time if several new docs are found, - * because we will start to index them, only to be interupted + * because we will start to index them, only to be interrupted * by the next request. Also, there is a nasty SQLITE bug that will * cause the application to hang for minutes in that case. * This call is reverted by initalDocSetupDone(), which must be -- cgit v0.12 From b2a89cf4049e425553bfe74bcb1a52433e6a13c7 Mon Sep 17 00:00:00 2001 From: Michael Dominic K Date: Wed, 17 Nov 2010 10:55:08 +0100 Subject: Send QMeeGoSwitchEvent to toplevel widgets before switching graphics system. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge-request: 926 Reviewed-by: Samuel Rødal --- .../qmeegographicssystemhelper.cpp | 17 ++++++ .../qmeegographicssystemhelper.pro | 4 +- .../qmeegoswitchevent.cpp | 58 +++++++++++++++++++ .../qmeegographicssystemhelper/qmeegoswitchevent.h | 65 ++++++++++++++++++++++ 4 files changed, 142 insertions(+), 2 deletions(-) create mode 100644 tools/qmeegographicssystemhelper/qmeegoswitchevent.cpp create mode 100644 tools/qmeegographicssystemhelper/qmeegoswitchevent.h diff --git a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp index d348e70..b660eb3 100644 --- a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp +++ b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp @@ -46,6 +46,7 @@ #include #include #include "qmeegoruntime.h" +#include "qmeegoswitchevent.h" QString QMeeGoGraphicsSystemHelper::runningGraphicsSystemName() { @@ -81,8 +82,16 @@ void QMeeGoGraphicsSystemHelper::switchToMeeGo() if (QApplicationPrivate::instance()->graphics_system_name != QLatin1String("runtime")) qWarning("Can't switch to meego - switching only supported with 'runtime' graphics system."); else { + QMeeGoSwitchEvent willSwitchEvent(QLatin1String("meego"), QMeeGoSwitchEvent::WillSwitch); + foreach (QWidget *widget, QApplication::topLevelWidgets()) + QCoreApplication::sendEvent(widget, &willSwitchEvent); + QApplication *app = static_cast(QCoreApplication::instance()); app->setGraphicsSystem(QLatin1String("meego")); + + QMeeGoSwitchEvent didSwitchEvent(QLatin1String("meego"), QMeeGoSwitchEvent::DidSwitch); + foreach (QWidget *widget, QApplication::topLevelWidgets()) + QCoreApplication::sendEvent(widget, &didSwitchEvent); } } @@ -94,8 +103,16 @@ void QMeeGoGraphicsSystemHelper::switchToRaster() if (QApplicationPrivate::instance()->graphics_system_name != QLatin1String("runtime")) qWarning("Can't switch to raster - switching only supported with 'runtime' graphics system."); else { + QMeeGoSwitchEvent willSwitchEvent(QLatin1String("raster"), QMeeGoSwitchEvent::WillSwitch); + foreach (QWidget *widget, QApplication::topLevelWidgets()) + QCoreApplication::sendEvent(widget, &willSwitchEvent); + QApplication *app = static_cast(QCoreApplication::instance()); app->setGraphicsSystem(QLatin1String("raster")); + + QMeeGoSwitchEvent didSwitchEvent(QLatin1String("raster"), QMeeGoSwitchEvent::DidSwitch); + foreach (QWidget *widget, QApplication::topLevelWidgets()) + QCoreApplication::sendEvent(widget, &didSwitchEvent); } } diff --git a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.pro b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.pro index 161a31b..360847e 100644 --- a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.pro +++ b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.pro @@ -6,5 +6,5 @@ include(../../src/qbase.pri) QT += gui INCLUDEPATH += '../../src/plugins/graphicssystems/meego' -HEADERS = qmeegographicssystemhelper.h qmeegooverlaywidget.h qmeegolivepixmap.h qmeegoruntime.h qmeegolivepixmap_p.h qmeegofencesync.h qmeegofencesync_p.h -SOURCES = qmeegographicssystemhelper.cpp qmeegooverlaywidget.cpp qmeegoruntime.cpp qmeegolivepixmap.cpp qmeegographicssystemhelper.h qmeegooverlaywidget.h qmeegolivepixmap.h qmeegoruntime.h qmeegolivepixmap_p.h qmeegofencesync.h qmeegofencesync_p.h qmeegofencesync.cpp +HEADERS = qmeegographicssystemhelper.h qmeegooverlaywidget.h qmeegolivepixmap.h qmeegoruntime.h qmeegolivepixmap_p.h qmeegofencesync.h qmeegofencesync_p.h qmeegoswitchevent.h +SOURCES = qmeegographicssystemhelper.cpp qmeegooverlaywidget.cpp qmeegoruntime.cpp qmeegolivepixmap.cpp qmeegographicssystemhelper.h qmeegooverlaywidget.h qmeegolivepixmap.h qmeegoruntime.h qmeegolivepixmap_p.h qmeegofencesync.h qmeegofencesync_p.h qmeegofencesync.cpp qmeegoswitchevent.cpp qmeegoswitchevent.h diff --git a/tools/qmeegographicssystemhelper/qmeegoswitchevent.cpp b/tools/qmeegographicssystemhelper/qmeegoswitchevent.cpp new file mode 100644 index 0000000..b136ce8 --- /dev/null +++ b/tools/qmeegographicssystemhelper/qmeegoswitchevent.cpp @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qmeegoswitchevent.h" + +QMeeGoSwitchEvent::QMeeGoSwitchEvent(const QString &graphicsSystemName, QMeeGoSwitchEvent::State s) : QEvent((QEvent::Type) QMeeGoSwitchEvent::SwitchEvent) +{ + name = graphicsSystemName; + switchState = s; +} + +QString QMeeGoSwitchEvent::graphicsSystemName() const +{ + return name; +} + +QMeeGoSwitchEvent::State QMeeGoSwitchEvent::state() const +{ + return switchState; +} \ No newline at end of file diff --git a/tools/qmeegographicssystemhelper/qmeegoswitchevent.h b/tools/qmeegographicssystemhelper/qmeegoswitchevent.h new file mode 100644 index 0000000..a67c6c4 --- /dev/null +++ b/tools/qmeegographicssystemhelper/qmeegoswitchevent.h @@ -0,0 +1,65 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +class QMeeGoSwitchEvent : public QEvent +{ +public: + enum State { + WillSwitch, + DidSwitch + }; + + enum Type { + SwitchEvent = QEvent::User + 1024 + }; + + QMeeGoSwitchEvent(const QString &graphicsSystemName, State s); + QString graphicsSystemName() const; + State state() const; + + +private: + QString name; + State switchState; +}; -- cgit v0.12 From 0091dcee679c8787f80bc2ed49f263c801779987 Mon Sep 17 00:00:00 2001 From: Michael Dominic K Date: Wed, 17 Nov 2010 10:55:09 +0100 Subject: Documentation update for new switching events. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge-request: 926 Reviewed-by: Samuel Rødal --- .../qmeegographicssystemhelper.h | 6 +++++ .../qmeegographicssystemhelper/qmeegoswitchevent.h | 26 +++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h index 2baacbb..d47c829 100644 --- a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h +++ b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h @@ -102,6 +102,9 @@ public: When running with the 'runtime' graphics system, sets the currently active system to 'meego'. The window surface and all the resources are automatically migrated to OpenGL. Will fail if the active graphics system is not 'runtime'. + Calling this function will emit QMeeGoSwitchEvent to the top level widgets. + Two events will be emitted for each switch -- one before the switch (QMeeGoSwitchEvent::WillSwitch) + and one after the switch (QMeeGoSwitchEvent::DidSwitch). */ static void switchToMeeGo(); @@ -111,6 +114,9 @@ public: system to 'raster'. The window surface and the graphics resources (including the EGL shared image resources) are automatically migrated back to the CPU. All OpenGL resources (surface, context, cache, font cache) are automaticall anihilated. + Calling this function will emit QMeeGoSwitchEvent to the top level widgets. + Two events will be emitted for each switch -- one before the switch (QMeeGoSwitchEvent::WillSwitch) + and one after the switch (QMeeGoSwitchEvent::DidSwitch). */ static void switchToRaster(); diff --git a/tools/qmeegographicssystemhelper/qmeegoswitchevent.h b/tools/qmeegographicssystemhelper/qmeegoswitchevent.h index a67c6c4..2d8371e 100644 --- a/tools/qmeegographicssystemhelper/qmeegoswitchevent.h +++ b/tools/qmeegographicssystemhelper/qmeegoswitchevent.h @@ -42,22 +42,46 @@ #include #include +//! A custom event representing a graphics system switch. +/*! + This event is sent two times -- before the actual switch and after the switch. + The current mode of the event can be detected by looking at the State of the + event. + + The end-user application can use the event to drop it's own allocated GL resources + when going to software mode. +*/ + class QMeeGoSwitchEvent : public QEvent { public: + + //! The state represented by this event. enum State { WillSwitch, DidSwitch }; + //! The event type id to use to detect this event. enum Type { SwitchEvent = QEvent::User + 1024 }; + //! Constructor for the event. + /*! + Creates a new event with the given name and the given state. + */ QMeeGoSwitchEvent(const QString &graphicsSystemName, State s); + + //! Returns the name of the target graphics system. + /*! + Depending on the state, the name represents the system we're about to swtich to, + or the system we just switched to. + */ QString graphicsSystemName() const; - State state() const; + //! Returns the state represented by this event. + State state() const; private: QString name; -- cgit v0.12 From d68b5355b36e31dbeec2474d8469646358e0cd87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 17 Nov 2010 10:58:57 +0100 Subject: Compile fix. Not sure why this worked before. Reviewed-by: Benjamin Poulain --- src/corelib/tools/qstring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index d4a1248..92b54a0 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -3572,7 +3572,7 @@ static QByteArray toLatin1_helper(const QChar *data, int length) } length = length % 16; } -#elif QT_ALWAYS_HAVE_NEON +#elif defined(QT_ALWAYS_HAVE_NEON) // Refer to the documentation of the SSE2 implementation // this use eactly the same method as for SSE except: // 1) neon has unsigned comparison -- cgit v0.12 From 6ad33e1ff7618704fd41549780d0d0c93778364e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 17 Nov 2010 13:01:38 +0100 Subject: Prevent crash in GL 2 engine when stroking null rectangle. Task-number: QTBUG-15320 Reviewed-by: Kim --- .../gl2paintengineex/qpaintengineex_opengl2.cpp | 3 +++ tests/auto/qgl/tst_qgl.cpp | 23 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 73915cb..37552ac 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1212,6 +1212,9 @@ void QGL2PaintEngineExPrivate::stroke(const QVectorPath &path, const QPen &pen) stroker.process(dashStroke, pen, clip); } + if (!stroker.vertexCount()) + return; + if (opaque) { prepareForDraw(opaque); setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, stroker.vertices()); diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp index e38bf42..cc2cac9 100644 --- a/tests/auto/qgl/tst_qgl.cpp +++ b/tests/auto/qgl/tst_qgl.cpp @@ -97,6 +97,7 @@ private slots: void qglContextDefaultBindTexture(); void textureCleanup(); void threadImages(); + void nullRectCrash(); }; tst_QGL::tst_QGL() @@ -2375,6 +2376,28 @@ void tst_QGL::threadImages() delete widget; } +void tst_QGL::nullRectCrash() +{ + if (!QGLFramebufferObject::hasOpenGLFramebufferObjects()) + QSKIP("QGLFramebufferObject not supported on this platform", SkipSingle); + + QGLWidget glw; + glw.makeCurrent(); + + QGLFramebufferObjectFormat fboFormat; + fboFormat.setAttachment(QGLFramebufferObject::CombinedDepthStencil); + + QGLFramebufferObject *fbo = new QGLFramebufferObject(128, 128, fboFormat); + + QPainter fboPainter(fbo); + + fboPainter.setPen(QPen(QColor(255, 127, 127, 127), 2)); + fboPainter.setBrush(QColor(127, 255, 127, 127)); + fboPainter.drawRect(QRectF()); + + fboPainter.end(); +} + class tst_QGLDummy : public QObject { Q_OBJECT -- cgit v0.12 From 78895a7ecaf6579894d88388c09be6e6368dc029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Tue, 16 Nov 2010 14:19:29 +0200 Subject: Fixed crash when destroying QGLWidget The QGLWidget destroys the QGLContext, which in turn destroys the bound pixmap. When this happens there may not be a current QGLContext, so check that before trying to restore it. Done-with: Gunnar Sletta Reviewed-by: Samuel --- src/opengl/qgl_p.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 4742bdb..b46d428 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -506,7 +506,8 @@ private slots: // when you come to delete the context. QGLContextPrivate::unbindPixmapFromTexture(boundPixmap); glDeleteTextures(1, &id); - oldContext->makeCurrent(); + if (oldContext) + oldContext->makeCurrent(); return; } #endif -- cgit v0.12 From 9f18a1ad5ce32dd397642a4c03fa1fcb21fb9456 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 18 Nov 2010 05:40:36 +0000 Subject: Check correctly before including SSE4.2 header. Previously, this failed machines that only had SSE4.1 but not SSE4.2 due to an assumption that nmmintrin.h could be included when only using SSE4.1. Fixes http://bugreports.qt.nokia.com/browse/QTBUG-13623. Merge-request: 929 Reviewed-by: Benjamin Poulain --- src/corelib/tools/qsimd_p.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h index 87fa770..2dbed76 100644 --- a/src/corelib/tools/qsimd_p.h +++ b/src/corelib/tools/qsimd_p.h @@ -87,9 +87,13 @@ QT_BEGIN_HEADER #include #endif -// SSE4.1 and SSE4.2 intrinsics -#if (defined(QT_HAVE_SSE4_1) || defined(QT_HAVE_SSE4_2)) && (defined(__SSE4_1__) || defined(Q_CC_MSVC)) +// SSE4.1 intrinsics +#if defined(QT_HAVE_SSE4_1) && (defined(__SSE4_1__) || defined(Q_CC_MSVC)) #include +#endif + +// SSE4.2 intrinsics +#if defined(QT_HAVE_SSE4_2) && (defined(__SSE4_2__) || defined(Q_CC_MSVC)) #include #endif -- cgit v0.12 From 72f161739b270b01807f97cd853030440f0fd430 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Fri, 19 Nov 2010 12:38:36 +0100 Subject: Fix possible corrupted text when gl glyph cache becomes full When the OpenGL glyph cache filled up (the max texture size on the hardware was exceeded) the characters would be drawn as black blocks instead. As a work-around for this, the cache will now be cleared and repopulated whenever this happens, meaning that once in a while (when a lot of different glyphs have been drawn in a font) there will be a performance hit. A more complete solution is described in QTBUG-13784, but this requires so much refactoring that it was deemed too risky for a patch release. This patch fixes the problem with a small penalty and low risk. Task-number: QT-3971 Reviewed-by: Samuel --- src/gui/painting/qtextureglyphcache.cpp | 13 ++++++++++--- src/gui/painting/qtextureglyphcache_p.h | 2 +- .../gl2paintengineex/qpaintengineex_opengl2.cpp | 9 +++++++-- src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp | 19 ++++++++++++++++++- src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h | 2 ++ 5 files changed, 38 insertions(+), 7 deletions(-) diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp index b609f7b..2cd7780 100644 --- a/src/gui/painting/qtextureglyphcache.cpp +++ b/src/gui/painting/qtextureglyphcache.cpp @@ -65,7 +65,7 @@ static inline int qt_next_power_of_two(int v) return v; } -void QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const glyph_t *glyphs, +bool QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const glyph_t *glyphs, const QFixedPoint *) { #ifdef CACHE_DEBUG @@ -119,7 +119,7 @@ void QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const rowHeight = qMax(rowHeight, glyph_height); } if (listItemCoordinates.isEmpty()) - return; + return true; rowHeight += margin * 2 + paddingDoubled; if (isNull()) @@ -150,6 +150,13 @@ void QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const int new_height = m_h*2; while (new_height < m_cy + c.h) new_height *= 2; + + if (new_height > maxTextureHeight()) { + // We can't make a new texture of the required size, so + // bail out + return false; + } + // if no room in the current texture - realloc a larger texture resizeTextureData(m_w, new_height); m_h = new_height; @@ -165,7 +172,7 @@ void QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const ++iter; } - + return true; } QImage QTextureGlyphCache::textureMapForGlyph(glyph_t g) const diff --git a/src/gui/painting/qtextureglyphcache_p.h b/src/gui/painting/qtextureglyphcache_p.h index e6d2b22..f84d1e6 100644 --- a/src/gui/painting/qtextureglyphcache_p.h +++ b/src/gui/painting/qtextureglyphcache_p.h @@ -96,7 +96,7 @@ public: int baseLineY; }; - void populate(QFontEngine *fontEngine, int numGlyphs, const glyph_t *glyphs, + bool populate(QFontEngine *fontEngine, int numGlyphs, const glyph_t *glyphs, const QFixedPoint *positions); virtual void createTextureData(int width, int height) = 0; diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 37552ac..3ddc15a 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1499,8 +1499,13 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp // cache so this text is performed before we test if the cache size has changed. if (recreateVertexArrays) { cache->setPaintEnginePrivate(this); - cache->populate(staticTextItem->fontEngine(), staticTextItem->numGlyphs, - staticTextItem->glyphs, staticTextItem->glyphPositions); + if (!cache->populate(staticTextItem->fontEngine(), staticTextItem->numGlyphs, + staticTextItem->glyphs, staticTextItem->glyphPositions)) { + // No space in cache. We need to clear the cache and try again + cache->clear(); + cache->populate(staticTextItem->fontEngine(), staticTextItem->numGlyphs, + staticTextItem->glyphs, staticTextItem->glyphPositions); + } } if (cache->width() == 0 || cache->height() == 0) diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp index 28e8c40..705ad09 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp @@ -78,7 +78,7 @@ void QGLTextureGlyphCache::setContext(QGLContext *context) SLOT(contextDestroyed(const QGLContext*))); } -QGLTextureGlyphCache::~QGLTextureGlyphCache() +void QGLTextureGlyphCache::clear() { if (ctx) { QGLShareContextScope scope(ctx); @@ -88,7 +88,24 @@ QGLTextureGlyphCache::~QGLTextureGlyphCache() if (m_width || m_height) glDeleteTextures(1, &m_texture); + + m_fbo = 0; + m_texture = 0; + m_width = 0; + m_height = 0; + m_w = 0; + m_h = 0; + m_cx = 0; + m_cy = 0; + m_currentRowHeight = 0; + coords.clear(); } + +} + +QGLTextureGlyphCache::~QGLTextureGlyphCache() +{ + clear(); } void QGLTextureGlyphCache::createTextureData(int width, int height) diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h index fa2b091..aaef350 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h @@ -124,6 +124,8 @@ public Q_SLOTS: } } + void clear(); + private: QGLContext *ctx; -- cgit v0.12 From 649719c29bc3b33ab6a5eb9577d53bd0ba897550 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Fri, 19 Nov 2010 14:38:58 +0100 Subject: Fix possible missing glyphs in raster engine glyph cache Two possible failures when using the glyph cache on raster engine and populating the cache with very many glyphs: 1. Change 72f161739b270b01807f97cd853030440f0fd430 caused the maximum height of the glyph cache to be 32768, which was not sufficient for large fonts with very many characters (e.g. Chinese text) 2. Since we are using QPainter to draw into the glyph cache for RGB32 glyphcaches, and QPainter does not support very high coordinates, we need to create a reference image that references a section of the glyph cache and paint into that instead. Task-number: QT-3971 Reviewed-by: Samuel --- src/gui/painting/qtextureglyphcache.cpp | 21 ++++++++++++--------- src/gui/painting/qtextureglyphcache_p.h | 2 +- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp index 2cd7780..2daa1f0 100644 --- a/src/gui/painting/qtextureglyphcache.cpp +++ b/src/gui/painting/qtextureglyphcache.cpp @@ -151,11 +151,11 @@ bool QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const while (new_height < m_cy + c.h) new_height *= 2; - if (new_height > maxTextureHeight()) { - // We can't make a new texture of the required size, so - // bail out - return false; - } + if (maxTextureHeight() > 0 && new_height > maxTextureHeight()) { + // We can't make a new texture of the required size, so + // bail out + return false; + } // if no room in the current texture - realloc a larger texture resizeTextureData(m_w, new_height); @@ -266,11 +266,14 @@ void QImageTextureGlyphCache::fillTexture(const Coord &c, glyph_t g) } #endif - if (m_type == QFontEngineGlyphCache::Raster_RGBMask) { - QPainter p(&m_image); + if (m_type == QFontEngineGlyphCache::Raster_RGBMask) { + QImage ref(m_image.bits() + (c.x * 4 + c.y * m_image.bytesPerLine()), + qMax(mask.width(), c.w), qMax(mask.height(), c.h), m_image.bytesPerLine(), + m_image.format()); + QPainter p(&ref); p.setCompositionMode(QPainter::CompositionMode_Source); - p.fillRect(c.x, c.y, c.w, c.h, QColor(0,0,0,0)); // TODO optimize this - p.drawImage(c.x, c.y, mask); + p.fillRect(0, 0, c.w, c.h, QColor(0,0,0,0)); // TODO optimize this + p.drawImage(0, 0, mask); p.end(); } else if (m_type == QFontEngineGlyphCache::Raster_Mono) { if (mask.depth() > 1) { diff --git a/src/gui/painting/qtextureglyphcache_p.h b/src/gui/painting/qtextureglyphcache_p.h index f84d1e6..94cb555 100644 --- a/src/gui/painting/qtextureglyphcache_p.h +++ b/src/gui/painting/qtextureglyphcache_p.h @@ -118,7 +118,7 @@ public: QImage textureMapForGlyph(glyph_t g) const; virtual int maxTextureWidth() const { return QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH; } - virtual int maxTextureHeight() const { return 32768; } + virtual int maxTextureHeight() const { return -1; } protected: QFontEngine *m_current_fontengine; -- cgit v0.12 From c82ba87a0e8e416099e95898386ea25c790c3da3 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Fri, 19 Nov 2010 16:16:46 +0100 Subject: Doc: Fixing typo. --- tests/auto/qkeysequence/tst_qkeysequence.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/qkeysequence/tst_qkeysequence.cpp b/tests/auto/qkeysequence/tst_qkeysequence.cpp index 60f022f..55c7edf 100644 --- a/tests/auto/qkeysequence/tst_qkeysequence.cpp +++ b/tests/auto/qkeysequence/tst_qkeysequence.cpp @@ -405,7 +405,7 @@ void tst_QKeySequence::mnemonic() #ifndef QT_NO_DEBUG if (warning) { - QString str = QString::fromLatin1("QKeySequence::mnemonic: \"%1\" contains multiple occurences of '&'").arg(string); + QString str = QString::fromLatin1("QKeySequence::mnemonic: \"%1\" contains multiple occurrences of '&'").arg(string); QTest::ignoreMessage(QtWarningMsg, qPrintable(str)); // qWarning(qPrintable(str)); } -- cgit v0.12