diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-07-06 22:09:23 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-07-06 22:09:23 (GMT) |
commit | 0242f458be0a8ed4693606ba853f75c1e656821c (patch) | |
tree | 9b7f4bdc58e778499e67172c992edf23bd7ca3a3 | |
parent | 1f556d6059472466d0437094af6c9a669b6331e4 (diff) | |
parent | dbd6d9d6b46b37f13482dea9edfe40772a2aaab6 (diff) | |
download | Qt-0242f458be0a8ed4693606ba853f75c1e656821c.zip Qt-0242f458be0a8ed4693606ba853f75c1e656821c.tar.gz Qt-0242f458be0a8ed4693606ba853f75c1e656821c.tar.bz2 |
Merge branch '4.7' of git://scm.dev.nokia.troll.no/qt/qt-water-team
* '4.7' of git://scm.dev.nokia.troll.no/qt/qt-water-team:
On symbian QMessageBox does not look like native dialog
HTTP internals: continue gzip decompression if buffer fills exactly
HTTP internals: do not discard data if not receiving gzip end marker
Support partial input mode - documentation update
Add a null check for the backend in QNetworkReplyImpl.
Support partial input mode
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 16 | ||||
-rw-r--r-- | src/gui/dialogs/qmessagebox.cpp | 7 | ||||
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_p.h | 1 | ||||
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 16 | ||||
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 4 | ||||
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel.cpp | 7 | ||||
-rw-r--r-- | src/network/access/qhttpnetworkreply.cpp | 12 | ||||
-rw-r--r-- | src/network/access/qhttpnetworkreply_p.h | 1 | ||||
-rw-r--r-- | src/network/access/qnetworkreplyimpl.cpp | 2 |
9 files changed, 49 insertions, 17 deletions
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 87b8255..eabaf10 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -156,12 +156,16 @@ whole lifetime. This attribute must be set before QApplication is constructed. - \omitvalue AA_S60DisablePartialScreenInputMode By default in Symbian^3, - a separate editing window is opened on top of an application. This is exactly - like editing on previous versions of Symbian behave. When this attribute - is true, a virtual keyboard window is shown on top of application and it - is ensured that the focused text widget is visible. This is only supported in - Symbian^3. (internal) + \value AA_S60DisablePartialScreenInputMode By default in Symbian^3, a separate + editing window is opened on top of an application. This is exactly like + editing on previous versions of Symbian behave. When this attribute is false, + a non-fullscreen virtual keyboard window is shown on top of application and + it is ensured that the focused text input widget is visible. + The auto-translation of input widget is only supported for applications + based on QGraphicsView, but the non-fullscreen virtual keyboard will + work for any kind of application (i.e. QWidgets-based). By default this + attribute is true. This attribute must be set after QApplication is + constructed. This is only supported in Symbian^3 and later Symbian releases. \omitvalue AA_AttributeCount */ diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp index 6a1c04a..f18fe60 100644 --- a/src/gui/dialogs/qmessagebox.cpp +++ b/src/gui/dialogs/qmessagebox.cpp @@ -2507,7 +2507,12 @@ void QMessageBox::setInformativeText(const QString &text) label->hide(); QTextBrowser *textBrowser = new QTextBrowser(this); textBrowser->setOpenExternalLinks(true); - grid->addWidget(textBrowser, 1, 1, 1, 1); +#if defined(Q_OS_SYMBIAN) + const int preferredTextColumn = (QApplication::layoutDirection() == Qt::LeftToRight) ? 0 : 1; +#else + const int preferredTextColumn = 1; +#endif + grid->addWidget(textBrowser, 1, preferredTextColumn, 1, 1); d->textBrowser = textBrowser; #else grid->addWidget(label, 1, 1, 1, 1); diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h index e929880..9fd2703 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_p.h +++ b/src/gui/inputmethod/qcoefepinputcontext_p.h @@ -108,6 +108,7 @@ private: bool needsInputPanel(); void commitTemporaryPreeditString(); bool isWidgetVisible(QWidget *widget, int offset = 0); + bool isPartialKeyboardSupported(); private Q_SLOTS: void ensureInputCapabilitiesChanged(); diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 602c734..567f83b 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -83,6 +83,8 @@ Q_GUI_EXPORT void qt_s60_setPartialScreenInputMode(bool enable) { S60->partial_keyboard = enable; + QApplication::setAttribute(Qt::AA_S60DisablePartialScreenInputMode, !S60->partial_keyboard); + QInputContext *ic = 0; if (QApplication::focusWidget()) { ic = QApplication::focusWidget()->inputContext(); @@ -111,7 +113,7 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent) m_fepState->SetObjectProvider(this); int defaultFlags = EAknEditorFlagDefault; if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0) { - if (S60->partial_keyboard) { + if (isPartialKeyboardSupported()) { defaultFlags |= QT_EAknEditorFlagEnablePartialScreen; } defaultFlags |= QT_EAknEditorFlagSelectionVisible; @@ -420,7 +422,8 @@ void QCoeFepInputContext::mouseHandler(int x, QMouseEvent *event) //If splitview is open and T9 word is tapped, pass the pointer event to pointer handler. //This will open the "suggested words" list. Pass pointer position always as zero, to make //full word replacement in case user makes a selection. - if (S60->partial_keyboard && S60->partialKeyboardOpen + if (isPartialKeyboardSupported() + && S60->partialKeyboardOpen && m_pointerHandler && !(currentHints & Qt::ImhNoPredictiveText) && (x > 0 && x < m_preeditString.length())) { @@ -534,6 +537,11 @@ bool QCoeFepInputContext::isWidgetVisible(QWidget *widget, int offset) return visible; } +bool QCoeFepInputContext::isPartialKeyboardSupported() +{ + return (S60->partial_keyboard || !QApplication::testAttribute(Qt::AA_S60DisablePartialScreenInputMode)); +} + // Ensure that the input widget is visible in the splitview rect. void QCoeFepInputContext::ensureFocusWidgetVisible(QWidget *widget) @@ -644,7 +652,7 @@ void QCoeFepInputContext::updateHints(bool mustUpdateInputCapabilities) // we need to update its state separately. if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0) { TInt currentFlags = m_fepState->Flags(); - if (S60->partial_keyboard) + if (isPartialKeyboardSupported()) currentFlags |= QT_EAknEditorFlagEnablePartialScreen; else currentFlags &= ~QT_EAknEditorFlagEnablePartialScreen; @@ -761,7 +769,7 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints) flags = 0; if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0) { - if (S60->partial_keyboard) + if (isPartialKeyboardSupported()) flags |= QT_EAknEditorFlagEnablePartialScreen; flags |= QT_EAknEditorFlagSelectionVisible; } diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 4552255..34ce9a8 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -1017,6 +1017,10 @@ void QApplicationPrivate::initialize() QApplicationPrivate::wheel_scroll_lines = 3; #endif +#ifdef Q_WS_S60 + q->setAttribute(Qt::AA_S60DisablePartialScreenInputMode); +#endif + if (qt_is_gui_used) initializeMultitouch(); } diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 63f923f..7c2e2a1 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -599,8 +599,11 @@ bool QHttpNetworkConnectionChannel::expand(bool dataComplete) int ret = Z_OK; if (content.size()) ret = reply->d_func()->gunzipBodyPartially(content, inflated); - int retCheck = (dataComplete) ? Z_STREAM_END : Z_OK; - if (ret >= retCheck) { + if (ret >= Z_OK) { + if (dataComplete && ret == Z_OK && !reply->d_func()->streamEnd) { + reply->d_func()->gunzipBodyPartiallyEnd(); + reply->d_func()->streamEnd = true; + } if (inflated.size()) { reply->d_func()->totalProgress += inflated.size(); reply->d_func()->appendUncompressedReplyData(inflated); diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp index 516841a..0f2fcba 100644 --- a/src/network/access/qhttpnetworkreply.cpp +++ b/src/network/access/qhttpnetworkreply.cpp @@ -431,15 +431,21 @@ int QHttpNetworkReplyPrivate::gunzipBodyPartially(QByteArray &compressed, QByteA } have = sizeof(out) - inflateStrm.avail_out; inflated.append(QByteArray((const char *)out, have)); - } while (inflateStrm.avail_out == 0); + } while (inflateStrm.avail_out == 0 && inflateStrm.avail_in > 0); // clean up and return if (ret <= Z_ERRNO || ret == Z_STREAM_END) { - inflateEnd(&inflateStrm); - initInflate = false; + gunzipBodyPartiallyEnd(); } streamEnd = (ret == Z_STREAM_END); return ret; } + +void QHttpNetworkReplyPrivate::gunzipBodyPartiallyEnd() +{ + inflateEnd(&inflateStrm); + initInflate = false; +} + #endif qint64 QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket) diff --git a/src/network/access/qhttpnetworkreply_p.h b/src/network/access/qhttpnetworkreply_p.h index 05feaa9..365308f 100644 --- a/src/network/access/qhttpnetworkreply_p.h +++ b/src/network/access/qhttpnetworkreply_p.h @@ -200,6 +200,7 @@ public: #ifndef QT_NO_COMPRESS bool gzipCheckHeader(QByteArray &content, int &pos); int gunzipBodyPartially(QByteArray &compressed, QByteArray &inflated); + void gunzipBodyPartiallyEnd(); #endif void removeAutoDecompressHeader(); diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index 574b6e9..8a0a944 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -924,7 +924,7 @@ bool QNetworkReplyImplPrivate::migrateBackend() return true; // Backend does not support resuming download. - if (!backend->canResume()) + if (backend && !backend->canResume()) return false; state = QNetworkReplyImplPrivate::Reconnecting; |