diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/embedded/qscreen_qws.cpp | 1 | ||||
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 26 | ||||
-rw-r--r-- | src/gui/painting/qpainter.cpp | 17 | ||||
-rw-r--r-- | src/gui/text/qfont.cpp | 5 | ||||
-rw-r--r-- | src/gui/text/qfontdatabase.cpp | 10 | ||||
-rw-r--r-- | src/gui/text/qfontmetrics.cpp | 3 | ||||
-rw-r--r-- | src/gui/text/qglyphrun.cpp | 3 | ||||
-rw-r--r-- | src/gui/text/qplatformfontdatabase_qpa.cpp | 28 | ||||
-rw-r--r-- | src/gui/text/qrawfont.cpp | 3 | ||||
-rw-r--r-- | src/gui/text/qtextengine.cpp | 2 |
10 files changed, 76 insertions, 22 deletions
diff --git a/src/gui/embedded/qscreen_qws.cpp b/src/gui/embedded/qscreen_qws.cpp index 2c10357..b17ade0 100644 --- a/src/gui/embedded/qscreen_qws.cpp +++ b/src/gui/embedded/qscreen_qws.cpp @@ -1545,6 +1545,7 @@ QImage::Format QScreenPrivate::preferredImageFormat() const \value SvgalibClass QSvgalibScreen \value ProxyClass QProxyScreen \value GLClass QGLScreen + \value IntfbClass QIntfbScreen \value CustomClass Unknown QScreen subclass \sa classId() diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 33daa99..899b792 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -64,6 +64,8 @@ #define QT_EAknCursorPositionChanged MAknEdStateObserver::EAknEdwinStateEvent(6) // MAknEdStateObserver::EAknActivatePenInputRequest #define QT_EAknActivatePenInputRequest MAknEdStateObserver::EAknEdwinStateEvent(7) +// MAknEdStateObserver::EAknClosePenInputRequest +#define QT_EAknClosePenInputRequest MAknEdStateObserver::EAknEdwinStateEvent(10) // EAknEditorFlagSelectionVisible is only valid from 3.2 onwards. // Sym^3 AVKON FEP manager expects that this flag is used for FEP-aware editors @@ -315,8 +317,9 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event) if (!needsInputPanel()) return false; - if (event->type() == QEvent::CloseSoftwareInputPanel) { - m_fepState->ReportAknEdStateEventL(MAknEdStateObserver::EAknClosePenInputRequest); + if ((event->type() == QEvent::CloseSoftwareInputPanel) + && (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0)) { + m_fepState->ReportAknEdStateEventL(QT_EAknClosePenInputRequest); return false; } @@ -1082,7 +1085,18 @@ TInt QCoeFepInputContext::DocumentLengthForFep() const return 0; QVariant variant = w->inputMethodQuery(Qt::ImSurroundingText); - return variant.value<QString>().size() + m_preeditString.size(); + + int size = variant.value<QString>().size() + m_preeditString.size(); + + // To fix an issue with backspaces not being generated if document size is zero, + // fake document length to be at least one always, except when dealing with + // hidden text widgets, where this faking would generate extra asterisk. Since the + // primary use of hidden text widgets is password fields, they are unlikely to + // support multiple lines anyway. + if (size == 0 && !(m_textCapabilities & TCoeInputCapabilities::ESecretText)) + size = 1; + + return size; } TInt QCoeFepInputContext::DocumentMaximumLengthForFep() const @@ -1165,6 +1179,12 @@ void QCoeFepInputContext::GetEditorContentForFep(TDes& aEditorContent, TInt aDoc // FEP expects the preedit string to be part of the editor content, so let's mix it in. int cursor = w->inputMethodQuery(Qt::ImCursorPosition).toInt(); text.insert(cursor, m_preeditString); + + // Add additional space to empty non-password text to compensate + // for the fake length we specified in DocumentLengthForFep(). + if (text.size() == 0 && !(m_textCapabilities & TCoeInputCapabilities::ESecretText)) + text += QChar(0x20); + aEditorContent.Copy(qt_QString2TPtrC(text.mid(aDocumentPosition, aLengthToRetrieve))); } diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 8e64f3b..efb016e 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -5792,16 +5792,19 @@ void QPainter::drawImage(const QRectF &targetRect, const QImage &image, const QR d->engine->drawImage(QRectF(x, y, w, h), image, QRectF(sx, sy, sw, sh), flags); } +#if !defined(QT_NO_RAWFONT) /*! - Draws the glyphs represented by \a glyphs at \a position. The \a position gives the - edge of the baseline for the string of glyphs. The glyphs will be retrieved from the font - selected on \a glyphs and at offsets given by the positions in \a glyphs. + \fn void QPainter::drawGlyphRun(const QPointF &position, const QGlyphRun &glyphs) + + Draws the specified \a glyphs at the given \a position. + The \a position gives the edge of the baseline for the string of glyphs. + The glyphs will be retrieved from the font selected by \a glyphs and at + offsets given by the positions in \a glyphs. \since 4.8 \sa QGlyphRun::setRawFont(), QGlyphRun::setPositions(), QGlyphRun::setGlyphIndexes() */ -#if !defined(QT_NO_RAWFONT) void QPainter::drawGlyphRun(const QPointF &position, const QGlyphRun &glyphRun) { Q_D(QPainter); @@ -9251,9 +9254,9 @@ void QPainter::drawPixmapFragments(const PixmapFragment *fragments, int fragment \since 4.8 This function is used to draw the same \a pixmap with multiple target - and source rectangles. If \a sourceRects is 0, the whole pixmap will be - rendered at each of the target rectangles. The \a hints parameter can be - used to pass in drawing hints. + and source rectangles specified by \a targetRects. If \a sourceRects is 0, + the whole pixmap will be rendered at each of the target rectangles. + The \a hints parameter can be used to pass in drawing hints. This function is potentially faster than multiple calls to drawPixmap(), since the backend can optimize state changes. diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index 2d6af3b..2df88e2 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -919,8 +919,9 @@ QString QFont::styleName() const /*! \since 4.8 - Sets the style name of the font. When set, other style properties - like \a style() and \a weight() will be ignored for font matching. + Sets the style name of the font to the given \a styleName. + When set, other style properties like style() and weight() will be ignored + for font matching. \sa styleName() */ diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 79503f9..1d463c4 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -1943,8 +1943,9 @@ bool QFontDatabase::isScalable(const QString &family, /*! - Returns a list of the point sizes available for the font that has - family \a family and style \a style. The list may be empty. + \fn QList<int> QFontDatabase::pointSizes(const QString &family, const QString &style) + Returns a list of the point sizes available for the font with the + given \a family and \a style. The list may be empty. \sa smoothSizes(), standardSizes() */ @@ -2052,8 +2053,9 @@ QFont QFontDatabase::font(const QString &family, const QString &style, /*! - Returns the point sizes of a font that has family \a family and - style \a style that will look attractive. The list may be empty. + \fn QList<int> QFontDatabase::smoothSizes(const QString &family, const QString &style) + Returns the point sizes of a font with the given \a family and \a style + that will look attractive. The list may be empty. For non-scalable fonts and bitmap scalable fonts, this function is equivalent to pointSizes(). diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp index f3d4107..1d93d54 100644 --- a/src/gui/text/qfontmetrics.cpp +++ b/src/gui/text/qfontmetrics.cpp @@ -442,9 +442,10 @@ bool QFontMetrics::inFont(QChar ch) const } /*! + \fn bool QFontMetrics::inFontUcs4(uint character) const \since 4.8 - Returns true if the character encoded in UCS-4/UTF-32 is a valid + Returns true if the given \a character encoded in UCS-4/UTF-32 is a valid character in the font; otherwise returns false. */ bool QFontMetrics::inFontUcs4(uint ucs4) const diff --git a/src/gui/text/qglyphrun.cpp b/src/gui/text/qglyphrun.cpp index 2865d91..442f7cc 100644 --- a/src/gui/text/qglyphrun.cpp +++ b/src/gui/text/qglyphrun.cpp @@ -175,7 +175,8 @@ QRawFont QGlyphRun::rawFont() const } /*! - Sets the font in which to look up the glyph indexes to \a font. + Sets the font specified by \a rawFont to be the font used to look up the + glyph indexes. \sa rawFont(), setGlyphIndexes() */ diff --git a/src/gui/text/qplatformfontdatabase_qpa.cpp b/src/gui/text/qplatformfontdatabase_qpa.cpp index d1d1f94..e3eeca5 100644 --- a/src/gui/text/qplatformfontdatabase_qpa.cpp +++ b/src/gui/text/qplatformfontdatabase_qpa.cpp @@ -160,6 +160,9 @@ QSupportedWritingSystems::QSupportedWritingSystems(const QSupportedWritingSystem d->ref.ref(); } +/*! + Assigns the \a other supported writing systems object to this object. +*/ QSupportedWritingSystems &QSupportedWritingSystems::operator=(const QSupportedWritingSystems &other) { if (d != other.d) { @@ -171,6 +174,9 @@ QSupportedWritingSystems &QSupportedWritingSystems::operator=(const QSupportedWr return *this; } +/*! + Destroys the object. +*/ QSupportedWritingSystems::~QSupportedWritingSystems() { if (!d->ref.deref()) @@ -187,12 +193,26 @@ void QSupportedWritingSystems::detach() } } +/*! + Sets the supported state of the writing system given by \a writingSystem to + the value specified by \a support. A value of true indicates that the + writing system is supported; a value of false indicates that it is + unsupported. + + \sa supported() +*/ void QSupportedWritingSystems::setSupported(QFontDatabase::WritingSystem writingSystem, bool support) { detach(); d->vector[writingSystem] = support; } +/*! + Returns true if the writing system given by \a writingSystem is supported; + otherwise returns false. + + \sa setSupported() +*/ bool QSupportedWritingSystems::supported(QFontDatabase::WritingSystem writingSystem) const { return d->vector.at(writingSystem); @@ -295,7 +315,7 @@ QStringList QPlatformFontDatabase::addApplicationFont(const QByteArray &fontData } /*! - + Releases the font handle and deletes any associated data loaded from a file. */ void QPlatformFontDatabase::releaseHandle(void *handle) { @@ -304,7 +324,13 @@ void QPlatformFontDatabase::releaseHandle(void *handle) } /*! + Returns the path to the font directory. + + The font directory is stored in the general Qt settings unless it has been + overridden by the \c QT_QPA_FONTDIR environment variable. + When using builds of Qt that do not support settings, the \c QT_QPA_FONTDIR + environment variable is the only way to specify the font directory. */ QString QPlatformFontDatabase::fontDir() const { diff --git a/src/gui/text/qrawfont.cpp b/src/gui/text/qrawfont.cpp index e3e5c57..60a6cb3 100644 --- a/src/gui/text/qrawfont.cpp +++ b/src/gui/text/qrawfont.cpp @@ -485,7 +485,8 @@ QVector<quint32> QRawFont::glyphIndexesForString(const QString &text) const must be at least \a numChars, if that's still not enough, this function will return false, then you can resize \a glyphIndexes from the size returned in \a numGlyphs. - \sa glyphIndexesForString(), advancesForGlyphIndexes(), QGlyphs, QTextLayout::glyphs(), QTextFragment::glyphs() + \sa glyphIndexesForString(), advancesForGlyphIndexes(), QGlyphRun, + QTextLayout::glyphRuns(), QTextFragment::glyphRuns() */ bool QRawFont::glyphIndexesForChars(const QChar *chars, int numChars, quint32 *glyphIndexes, int *numGlyphs) const { diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 9301f16..9f148ee 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -1534,8 +1534,6 @@ void QTextEngine::itemize() const while (uc < e) { switch (*uc) { case QChar::ObjectReplacementCharacter: - if (analysis->bidiLevel % 2) - --analysis->bidiLevel; analysis->script = QUnicodeTables::Common; analysis->flags = QScriptAnalysis::Object; break; |