diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-01-11 18:49:49 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-01-11 18:49:49 (GMT) |
commit | bf39fbe3ffcde6d55e508145c1f727cd4815d330 (patch) | |
tree | cff344aadda212ade460dd3a093333d0362b8f90 /src/gui | |
parent | 6900cf8d7cb8d1e98f3af2ac7ce909dc3b5fc2ef (diff) | |
parent | f10a3a1008c2ccbfbdf7f3e0cfe6af34c8a7db9c (diff) | |
download | Qt-bf39fbe3ffcde6d55e508145c1f727cd4815d330.zip Qt-bf39fbe3ffcde6d55e508145c1f727cd4815d330.tar.gz Qt-bf39fbe3ffcde6d55e508145c1f727cd4815d330.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public:
Fix for QTBUG-7267 Qs60Style::drawControl() does not align CE_ItemViewItem
Fix for QTBUG-6408 QFontEngineS60::QFontEngineS60 called hundreds of
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/styles/qs60style.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qfontengine_s60.cpp | 36 | ||||
-rw-r--r-- | src/gui/text/qfontengine_s60_p.h | 3 |
3 files changed, 8 insertions, 33 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index bcc993a..d78ea21 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -1363,7 +1363,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, } } - int rightValue = widget ? widget->contentsRect().right() : 0; + int rightValue = widget ? widget->contentsRect().right() : voptAdj.rect.right(); if (isScrollBarVisible) rightValue -= scrollBarWidth; diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp index e279ad2..7fad188 100644 --- a/src/gui/text/qfontengine_s60.cpp +++ b/src/gui/text/qfontengine_s60.cpp @@ -45,12 +45,11 @@ #include <private/qapplication_p.h> #include "qimage.h" #include "qt_s60_p.h" -#include "qpixmap_s60_p.h" #include <e32base.h> #include <e32std.h> -#include <EIKENV.H> -#include <GDI.H> +#include <eikenv.h> +#include <gdi.h> QT_BEGIN_NAMESPACE @@ -135,42 +134,21 @@ QFontEngineS60::QFontEngineS60(const QFontDef &request, const QFontEngineS60Exte { QFontEngine::fontDef = request; m_fontSizeInPixels = (request.pixelSize >= 0)? - request.pixelSize:pointsToPixels(request.pointSize); - - QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock); - - m_textRenderBitmap = q_check_ptr(new CFbsBitmap()); // CBase derived object needs check on new - const TSize bitmapSize(1, 1); // It is just a dummy bitmap that I need to keep the font alive (or maybe not) - qt_symbian_throwIfError(m_textRenderBitmap->Create(bitmapSize, EGray256)); - QT_TRAP_THROWING(m_textRenderBitmapDevice = CFbsBitmapDevice::NewL(m_textRenderBitmap)); - qt_symbian_throwIfError(m_textRenderBitmapDevice->CreateContext(m_textRenderBitmapGc)); - cache_cost = sizeof(QFontEngineS60) + bitmapSize.iHeight * bitmapSize.iWidth * 4; + request.pixelSize:pointsToPixels(request.pointSize); TFontSpec fontSpec(qt_QString2TPtrC(request.family), m_fontSizeInPixels); fontSpec.iFontStyle.SetBitmapType(EAntiAliasedGlyphBitmap); fontSpec.iFontStyle.SetPosture(request.style == QFont::StyleNormal?EPostureUpright:EPostureItalic); fontSpec.iFontStyle.SetStrokeWeight(request.weight > QFont::Normal?EStrokeWeightBold:EStrokeWeightNormal); - const TInt errorCode = m_textRenderBitmapDevice->GetNearestFontInPixels(m_font, fontSpec); + const TInt errorCode = S60->screenDevice()->GetNearestFontToDesignHeightInPixels(m_font, fontSpec); Q_ASSERT(errorCode == 0); - m_textRenderBitmapGc->UseFont(m_font); - - lock.relock(); + + cache_cost = sizeof(QFontEngineS60); } QFontEngineS60::~QFontEngineS60() { - QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock); - - m_textRenderBitmapGc->DiscardFont(); - delete m_textRenderBitmapGc; - m_textRenderBitmapGc = NULL; - m_textRenderBitmapDevice->ReleaseFont(m_font); - delete m_textRenderBitmapDevice; - m_textRenderBitmapDevice = NULL; - delete m_textRenderBitmap; - m_textRenderBitmap = NULL; - - lock.relock(); + S60->screenDevice()->ReleaseFont(m_font); } bool QFontEngineS60::stringToCMap(const QChar *characters, int len, QGlyphLayout *glyphs, int *nglyphs, QTextEngine::ShaperFlags flags) const diff --git a/src/gui/text/qfontengine_s60_p.h b/src/gui/text/qfontengine_s60_p.h index 9e22245..b21f1c8 100644 --- a/src/gui/text/qfontengine_s60_p.h +++ b/src/gui/text/qfontengine_s60_p.h @@ -126,9 +126,6 @@ private: QFixed glyphAdvance(HB_Glyph glyph) const; - CFbsBitmap *m_textRenderBitmap; - CFbsBitmapDevice *m_textRenderBitmapDevice; - CFbsBitGc *m_textRenderBitmapGc; CFont* m_font; const QFontEngineS60Extensions *m_extensions; qreal m_fontSizeInPixels; |