diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-09-22 14:17:52 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-09-23 11:23:36 +0200 |
commit | c5a3e5edd9e63b18abf1838c86a27a662224b02c (patch) | |
tree | 9a367c113d9b586da73439cb100744d616ce6399 /src/plugins/platforms/qnx | |
parent | 3312ac91692c3a4a033d123eecbf982d3ff10471 (diff) | |
parent | a5df2e7120412dfdedb9f4951cdb061c0f218bf7 (diff) |
Merge remote-tracking branch 'origin/5.3' into 5.4
The isAlwaysAskOption was removed in 38621713150b663355ebeb799a5a50d8e39a3c38
so manually removed code in
src/plugins/bearer/connman/qconnmanengine.cpp
Conflicts:
src/corelib/global/qglobal.h
src/corelib/tools/qcollator_macx.cpp
src/corelib/tools/qstring.cpp
src/gui/kernel/qwindow.cpp
src/gui/kernel/qwindow_p.h
src/gui/text/qtextengine.cpp
src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h
src/plugins/platforms/android/qandroidinputcontext.cpp
src/plugins/platforms/xcb/qglxintegration.cpp
src/plugins/platforms/xcb/qglxintegration.h
src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
src/testlib/qtestcase.cpp
src/testlib/qtestlog.cpp
src/widgets/dialogs/qfiledialog.cpp
src/widgets/kernel/qwindowcontainer.cpp
tests/auto/corelib/tools/qcollator/tst_qcollator.cpp
tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
Change-Id: Ic5d4187f682257a17509f6cd28d2836c6cfe2fc8
Diffstat (limited to 'src/plugins/platforms/qnx')
-rw-r--r-- | src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp | 66 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxrasterbackingstore.h | 12 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp | 8 |
3 files changed, 26 insertions, 60 deletions
diff --git a/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp b/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp index 7ae042cb50..c986a960f3 100644 --- a/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp +++ b/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp @@ -58,7 +58,8 @@ QT_BEGIN_NAMESPACE QQnxRasterBackingStore::QQnxRasterBackingStore(QWindow *window) : QPlatformBackingStore(window), - m_hasUnflushedPaintOperations(false) + m_needsPosting(false), + m_scrolled(false) { qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << window; @@ -85,10 +86,10 @@ void QQnxRasterBackingStore::flush(QWindow *window, const QRegion ®ion, const qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << this->window(); // Sometimes this method is called even though there is nothing to be - // flushed, for instance, after an expose event directly follows a - // geometry change event. - if (!m_hasUnflushedPaintOperations) - return; + // flushed (posted in "screen" parlance), for instance, after an expose + // event directly follows a geometry change event. + if (!m_needsPosting) + return; QQnxWindow *targetWindow = 0; if (window) @@ -99,25 +100,11 @@ void QQnxRasterBackingStore::flush(QWindow *window, const QRegion ®ion, const // child windows, are performed; conceptually ,child windows have no buffers // (actually they do have a 1x1 placeholder buffer due to libscreen limitations), // since Qt will only draw to the backing store of the top-level window. - if (!targetWindow || targetWindow == platformWindow()) { + if (!targetWindow || targetWindow == platformWindow()) + platformWindow()->post(region); // update the display with newly rendered content - // visit all pending scroll operations - for (int i = m_scrollOpList.size() - 1; i >= 0; i--) { - - // do the scroll operation - ScrollOp &op = m_scrollOpList[i]; - QRegion srcArea = op.totalArea.intersected( op.totalArea.translated(-op.dx, -op.dy) ); - platformWindow()->scroll(srcArea, op.dx, op.dy); - } - - // clear all pending scroll operations - m_scrollOpList.clear(); - - // update the display with newly rendered content - platformWindow()->post(region); - } - - m_hasUnflushedPaintOperations = false; + m_needsPosting = false; + m_scrolled = false; } void QQnxRasterBackingStore::resize(const QSize &size, const QRegion &staticContents) @@ -134,31 +121,14 @@ bool QQnxRasterBackingStore::scroll(const QRegion &area, int dx, int dy) { qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << window(); - // calculate entire region affected by scroll operation (src + dst) - QRegion totalArea = area.translated(dx, dy); - totalArea += area; - m_hasUnflushedPaintOperations = true; - - // visit all pending scroll operations - for (int i = m_scrollOpList.size() - 1; i >= 0; i--) { - - ScrollOp &op = m_scrollOpList[i]; - if (op.totalArea == totalArea) { - // same area is being scrolled again - update delta - op.dx += dx; - op.dy += dy; - return true; - } else if (op.totalArea.intersects(totalArea)) { - // current scroll overlaps previous scroll but is - // not equal in area - just paint everything - qWarning("QQNX: pending scroll operations overlap but not equal"); - return false; - } - } + m_needsPosting = true; - // create new scroll operation - m_scrollOpList.append( ScrollOp(totalArea, dx, dy) ); - return true; + if (!m_scrolled) { + platformWindow()->scroll(area, dx, dy, true); + m_scrolled = true; + return true; + } + return false; } void QQnxRasterBackingStore::beginPaint(const QRegion ®ion) @@ -166,7 +136,7 @@ void QQnxRasterBackingStore::beginPaint(const QRegion ®ion) Q_UNUSED(region); qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << window(); - m_hasUnflushedPaintOperations = true; + m_needsPosting = true; platformWindow()->adjustBufferSize(); diff --git a/src/plugins/platforms/qnx/qqnxrasterbackingstore.h b/src/plugins/platforms/qnx/qqnxrasterbackingstore.h index 35efd68571..d71e274a1d 100644 --- a/src/plugins/platforms/qnx/qqnxrasterbackingstore.h +++ b/src/plugins/platforms/qnx/qqnxrasterbackingstore.h @@ -64,19 +64,11 @@ public: void endPaint(); private: - class ScrollOp { - public: - ScrollOp(const QRegion &a, int x, int y) : totalArea(a), dx(x), dy(y) {} - QRegion totalArea; - int dx; - int dy; - }; - QQnxRasterWindow *platformWindow() const; QWindow *m_window; - QList<ScrollOp> m_scrollOpList; - bool m_hasUnflushedPaintOperations; + bool m_needsPosting; + bool m_scrolled; }; QT_END_NAMESPACE diff --git a/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp b/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp index 08de94a082..232bd80fd0 100644 --- a/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp +++ b/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp @@ -46,7 +46,7 @@ #include <bps/event.h> #include <bps/locale.h> #include <bps/virtualkeyboard.h> -#if defined(Q_OS_BLACKBERRY) +#if defined(Q_OS_BLACKBERRY) && !defined(Q_OS_BLACKBERRY_TABLET) #include <bbndk.h> #endif @@ -126,17 +126,21 @@ virtualkeyboard_layout_t QQnxVirtualKeyboardBps::keyboardLayout() const return VIRTUALKEYBOARD_LAYOUT_WEB; case NumPunc: return VIRTUALKEYBOARD_LAYOUT_NUM_PUNC; +#ifndef Q_OS_BLACKBERRY_TABLET case Number: return VIRTUALKEYBOARD_LAYOUT_NUMBER; +#endif case Symbol: return VIRTUALKEYBOARD_LAYOUT_SYMBOL; case Phone: return VIRTUALKEYBOARD_LAYOUT_PHONE; case Pin: return VIRTUALKEYBOARD_LAYOUT_PIN; +#ifndef Q_OS_BLACKBERRY_TABLET case Password: return VIRTUALKEYBOARD_LAYOUT_PASSWORD; -#if defined(Q_OS_BLACKBERRY) +#endif +#if defined(Q_OS_BLACKBERRY) && !defined(Q_OS_BLACKBERRY_TABLET) #if BBNDK_VERSION_AT_LEAST(10, 2, 1) case Alphanumeric: return VIRTUALKEYBOARD_LAYOUT_ALPHANUMERIC; |