diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 7 | ||||
-rw-r--r-- | src/xmlpatterns/api/qxmlquery.cpp | 5 | ||||
-rw-r--r-- | src/xmlpatterns/functions/qsequencegeneratingfns.cpp | 20 |
3 files changed, 30 insertions, 2 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index b830d50..e7084ac 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -1083,6 +1083,9 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints) } else if (hints & ImhNoAutoUppercase) { m_fepState->SetDefaultCase(EAknEditorLowerCase); m_fepState->SetCurrentCase(EAknEditorLowerCase); + } else if (hints & ImhHiddenText) { + m_fepState->SetDefaultCase(EAknEditorLowerCase); + m_fepState->SetCurrentCase(EAknEditorLowerCase); } else { m_fepState->SetDefaultCase(EAknEditorTextCase); m_fepState->SetCurrentCase(EAknEditorTextCase); @@ -1094,6 +1097,10 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints) if (hints & ImhLowercaseOnly) { flags |= EAknEditorLowerCase; } + if (hints & ImhHiddenText) { + flags = EAknEditorAllCaseModes; + flags &= ~EAknEditorTextCase; + } if (flags == 0) { flags = EAknEditorAllCaseModes; if (hints & ImhNoAutoUppercase) { diff --git a/src/xmlpatterns/api/qxmlquery.cpp b/src/xmlpatterns/api/qxmlquery.cpp index e69fe50..e5e901d 100644 --- a/src/xmlpatterns/api/qxmlquery.cpp +++ b/src/xmlpatterns/api/qxmlquery.cpp @@ -988,7 +988,12 @@ bool setFocusHelper(QXmlQuery *const queryInstance, const QXmlItem focusItem(focusResult.next()); if(focusItem.isNull() || focusResult.hasError()) + { + /* The previous focus must be cleared in error situations. + * Otherwise the query may be left in an inconsistent state. */ + queryInstance->setFocus(QXmlItem()); return false; + } else { queryInstance->setFocus(focusItem); diff --git a/src/xmlpatterns/functions/qsequencegeneratingfns.cpp b/src/xmlpatterns/functions/qsequencegeneratingfns.cpp index 6215f3d..3f3dbbb 100644 --- a/src/xmlpatterns/functions/qsequencegeneratingfns.cpp +++ b/src/xmlpatterns/functions/qsequencegeneratingfns.cpp @@ -41,6 +41,7 @@ #include <QStack> #include <QStringList> +#include <QFileInfo> #include "qanyuri_p.h" #include "qboolean_p.h" @@ -207,6 +208,21 @@ Item::Iterator::Ptr IdrefFN::evaluateSequence(const DynamicContext::Ptr &context return CommonValues::emptyIterator; /* TODO Haven't implemented further. */ } +/*! + * Attemps to resolve scheme if URL does not have scheme defined. + */ +static QUrl resolveScheme(const QUrl &url) +{ + // On Windows and Symbian the drive letter is detected as the scheme. + if (url.scheme().isEmpty() || (url.scheme().length() == 1)) { + QString filename = url.toString(); + QFileInfo file(filename); + if (file.exists()) + return QUrl::fromLocalFile(filename); + } + return url; +} + Item DocFN::evaluateSingleton(const DynamicContext::Ptr &context) const { const Item itemURI(m_operands.first()->evaluateSingleton(context)); @@ -219,7 +235,7 @@ Item DocFN::evaluateSingleton(const DynamicContext::Ptr &context) const * as part of a workaround for solaris-cc-64. DocFN::typeCheck() is in qsequencefns.cpp * as part of that workaround. */ const QUrl mayRela(AnyURI::toQUrl<ReportContext::FODC0005>(itemURI.stringValue(), context, this)); - const QUrl uri(context->resolveURI(mayRela, staticBaseURI())); + const QUrl uri(resolveScheme(context->resolveURI(mayRela, staticBaseURI()))); Q_ASSERT(uri.isValid()); Q_ASSERT(!uri.isRelative()); @@ -251,7 +267,7 @@ bool DocAvailableFN::evaluateEBV(const DynamicContext::Ptr &context) const /* These two lines are duplicated in DocFN::evaluateSingleton(), as part * of a workaround for solaris-cc-64. */ const QUrl mayRela(AnyURI::toQUrl<ReportContext::FODC0005>(itemURI.stringValue(), context, this)); - const QUrl uri(context->resolveURI(mayRela, staticBaseURI())); + const QUrl uri(resolveScheme(context->resolveURI(mayRela, staticBaseURI()))); Q_ASSERT(!uri.isRelative()); return context->resourceLoader()->isDocumentAvailable(uri); |