From a2709ef3f4410a1d1755e00353e6f969f8bb5613 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Wed, 17 Aug 2011 12:57:14 +0300 Subject: Symbian: Fix backspace on empty lines of multiline textedits Backspace on empty lines of multiline textedits didn't work because in Symbian the virtual keyboard only gets one block of text at a time, and there is some internal optimization in FEP that if the document is empty, backspace doesn't get generated. Fixed by faking document lenght to be one in cases where it is actually zero, except for password fields with hidden text, as an extra asterisk would be generated in those cases. Typically password fields are not multiline so this shouldn't be a problem. Task-number: QTBUG-20444 Reviewed-by: Sami Merila --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 2202d3a..e22e27c 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -1089,7 +1089,18 @@ TInt QCoeFepInputContext::DocumentLengthForFep() const return 0; QVariant variant = w->inputMethodQuery(Qt::ImSurroundingText); - return variant.value().size() + m_preeditString.size(); + + int size = variant.value().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 @@ -1172,6 +1183,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))); } -- cgit v0.12 From 744415e5e0f0e7084821599be99da504e2606032 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 17 Aug 2011 17:04:31 +0200 Subject: fix copying webkit guide under windows patch by Rob Tomek. Task-number: QTBUG-19155 --- doc/doc.pri | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/doc.pri b/doc/doc.pri index 253e1b4..9d67386 100644 --- a/doc/doc.pri +++ b/doc/doc.pri @@ -14,6 +14,8 @@ win32:!win32-g++* { } COPYWEBKITGUIDE = $$QT_SOURCE_TREE/examples/webkit/webkit-guide +COPYWEBKITTARGA = $$QT_BUILD_TREE/doc-build/html-qt +COPYWEBKITTARGB = $$QT_BUILD_TREE/doc/html $$unixstyle { QDOC = cd $$QT_SOURCE_TREE/tools/qdoc3/test && QT_BUILD_TREE=$$QT_BUILD_TREE QT_SOURCE_TREE=$$QT_SOURCE_TREE $$QT_BUILD_TREE/bin/qdoc3 $$DOCS_GENERATION_DEFINES @@ -21,12 +23,14 @@ $$unixstyle { QDOC = cd $$QT_SOURCE_TREE/tools/qdoc3/test && set QT_BUILD_TREE=$$QT_BUILD_TREE&& set QT_SOURCE_TREE=$$QT_SOURCE_TREE&& $$QT_BUILD_TREE/bin/qdoc3.exe $$DOCS_GENERATION_DEFINES QDOC = $$replace(QDOC, "/", "\\") COPYWEBKITGUIDE = $$replace(COPYWEBKITGUIDE, "/", "\\") + COPYWEBKITTARGA = $$replace(COPYWEBKITTARGA, "/", "\\") + COPYWEBKITTARGB = $$replace(COPYWEBKITTARGB, "/", "\\") } ADP_DOCS_QDOCCONF_FILE = qt-build-docs-online.qdocconf QT_DOCUMENTATION = ($$QDOC qt-api-only.qdocconf assistant.qdocconf designer.qdocconf \ linguist.qdocconf qmake.qdocconf qdeclarative.qdocconf) && \ (cd $$QT_BUILD_TREE && \ - $$QMAKE_COPY_DIR $$COPYWEBKITGUIDE $$QT_BUILD_TREE/doc-build/html-qt && \ + $$QMAKE_COPY_DIR $$COPYWEBKITGUIDE $$COPYWEBKITTARGA && \ $$GENERATOR doc-build/html-qt/qt.qhp -o doc/qch/qt.qch && \ $$GENERATOR doc-build/html-assistant/assistant.qhp -o doc/qch/assistant.qch && \ $$GENERATOR doc-build/html-designer/designer.qhp -o doc/qch/designer.qch && \ @@ -52,7 +56,7 @@ win32-g++*:isEmpty(QMAKE_SH) { } # Build rules: -adp_docs.commands = ($$QDOC $$ADP_DOCS_QDOCCONF_FILE && $$QMAKE_COPY_DIR $$COPYWEBKITGUIDE $$QT_BUILD_TREE/doc/html) +adp_docs.commands = ($$QDOC $$ADP_DOCS_QDOCCONF_FILE && $$QMAKE_COPY_DIR $$COPYWEBKITGUIDE $$COPYWEBKITTARGB) adp_docs.depends += sub-qdoc3 # qdoc3 qch_docs.commands = $$QT_DOCUMENTATION qch_docs.depends += sub-qdoc3 -- cgit v0.12 From 95df5be87b37da139dba33b06aaf6e2a251be698 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Thu, 18 Aug 2011 09:24:13 +0300 Subject: Compile fix for Symbian 5th and earlier Additional fix to enable compilation of Qt GUI to succeed on earlier Symbian SDKs. Task-number: QTBUG-20033 Reviewed-by: Kalle Lehtonen --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index e22e27c..d545f2e 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; } -- cgit v0.12 From ad35bf83f9bd1d6b978243051e3d10a7fc61eec7 Mon Sep 17 00:00:00 2001 From: Xizhi Zhu Date: Thu, 18 Aug 2011 13:34:00 +0300 Subject: Fix non-ascii name issues in ICD. PMO Bug 275663. Developed by Aapo Makela, reviewed by me. --- src/plugins/bearer/icd/dbusdispatcher.cpp | 4 ++-- src/plugins/bearer/icd/iapconf.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/bearer/icd/dbusdispatcher.cpp b/src/plugins/bearer/icd/dbusdispatcher.cpp index 60e4640..62dec62 100644 --- a/src/plugins/bearer/icd/dbusdispatcher.cpp +++ b/src/plugins/bearer/icd/dbusdispatcher.cpp @@ -195,7 +195,7 @@ static bool appendVariantToDBusMessage(const QVariant& argument, break; case QVariant::String: { - QByteArray data = argument.toString().toLatin1(); + QByteArray data = argument.toString().toUtf8(); str_data = data.data(); dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_STRING, &str_data); @@ -363,7 +363,7 @@ static QVariant getVariantFromDBusMessage(DBusMessageIter *iter) { case DBUS_TYPE_STRING: { dbus_message_iter_get_basic(iter, &str_data); - QString str(str_data); + QString str(QString::fromUtf8(str_data)); QVariant variant(str); return variant; } diff --git a/src/plugins/bearer/icd/iapconf.cpp b/src/plugins/bearer/icd/iapconf.cpp index a29e326..e326edf 100644 --- a/src/plugins/bearer/icd/iapconf.cpp +++ b/src/plugins/bearer/icd/iapconf.cpp @@ -143,7 +143,7 @@ QVariant IAPConfPrivate::valueToVariant(ConnSettingsValue *value) return QVariant(value->value.bool_val ? true : false); case CONN_SETTINGS_VALUE_STRING: - return QVariant(QString(value->value.string_val)); + return QVariant(QString::fromUtf8(value->value.string_val)); case CONN_SETTINGS_VALUE_DOUBLE: return QVariant(value->value.double_val); -- cgit v0.12