From 85360044130a13f7041e5291334423ad0b180cb3 Mon Sep 17 00:00:00 2001 From: Titta Heikkala Date: Mon, 28 Mar 2011 09:50:22 +0300 Subject: Removed useless Exit button in Symbian^3 In Symbian^3 clearing softkeys with -1 value resulted useless Exit button. EAknSoftkeyEmpty is used instead to remove the extra button. There is no flickering with softkeys when using EAknSoftkeyEmtpy with Symbian^3. Task-number: QT-4557 Reviewed-by: Sami Merila --- src/gui/kernel/qsoftkeymanager_s60.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gui/kernel/qsoftkeymanager_s60.cpp b/src/gui/kernel/qsoftkeymanager_s60.cpp index 3496297..09e2b5f 100644 --- a/src/gui/kernel/qsoftkeymanager_s60.cpp +++ b/src/gui/kernel/qsoftkeymanager_s60.cpp @@ -113,12 +113,20 @@ void QSoftKeyManagerPrivateS60::ensureCbaVisibilityAndResponsiviness(CEikButtonG void QSoftKeyManagerPrivateS60::clearSoftkeys(CEikButtonGroupContainer &cba) { +#ifdef SYMBIAN_VERSION_SYMBIAN3 + QT_TRAP_THROWING( + //EAknSoftkeyEmpty is used, because using -1 adds softkeys without actions on Symbian3 + cba.SetCommandL(0, EAknSoftkeyEmpty, KNullDesC); + cba.SetCommandL(2, EAknSoftkeyEmpty, KNullDesC); + ); +#else QT_TRAP_THROWING( //Using -1 instead of EAknSoftkeyEmpty to avoid flickering. cba.SetCommandL(0, -1, KNullDesC); // TODO: Should we clear also middle SK? cba.SetCommandL(2, -1, KNullDesC); ); +#endif realSoftKeyActions.clear(); } -- cgit v0.12 From 818ef0c6c0202b5dffd0e8ab045f48687546d5dd Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 20 Feb 2011 15:44:20 +0100 Subject: Report that an update is needed if no update was done --- src/corelib/concurrent/qfutureinterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/concurrent/qfutureinterface.cpp b/src/corelib/concurrent/qfutureinterface.cpp index 627d0c7..c5bd802 100644 --- a/src/corelib/concurrent/qfutureinterface.cpp +++ b/src/corelib/concurrent/qfutureinterface.cpp @@ -219,7 +219,7 @@ QString QFutureInterfaceBase::progressText() const bool QFutureInterfaceBase::isProgressUpdateNeeded() const { QMutexLocker locker(&d->m_mutex); - return (d->progressTime.elapsed() > (1000 / MaxProgressEmitsPerSecond)); + return !d->progressTime.isValid() || (d->progressTime.elapsed() > (1000 / MaxProgressEmitsPerSecond)); } void QFutureInterfaceBase::reportStarted() -- cgit v0.12 From 1dac22d30849f0dfb38f281c59afc886b1046bb3 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Mon, 28 Mar 2011 13:33:58 +0200 Subject: fix -enable-stdcall-fixup usage the leading "-Wl," was apparently accidentally split off to the wrong line. Originally done in 0953ee3 for mkspecs/win32-g++. Merge-request: 1154 Reviewed-by: Oswald Buddenhagen --- mkspecs/unsupported/win32-g++-cross/qmake.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkspecs/unsupported/win32-g++-cross/qmake.conf b/mkspecs/unsupported/win32-g++-cross/qmake.conf index 7e077a1..efc3de2 100644 --- a/mkspecs/unsupported/win32-g++-cross/qmake.conf +++ b/mkspecs/unsupported/win32-g++-cross/qmake.conf @@ -52,8 +52,8 @@ QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< QMAKE_LINK = i686-pc-mingw32-g++ QMAKE_LINK_C = i686-pc-mingw32-gcc -QMAKE_LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads -Wl +QMAKE_LFLAGS = -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc +QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads QMAKE_LFLAGS_EXCEPTIONS_OFF = QMAKE_LFLAGS_RELEASE = -Wl,-s QMAKE_LFLAGS_DEBUG = -- cgit v0.12 From 760bb7ad3c955f55ab23fb16eb5a247d644b07cc Mon Sep 17 00:00:00 2001 From: Denis Oliver Kropp Date: Mon, 28 Mar 2011 15:28:26 +0200 Subject: directfb: avoid version dependency by setting DSPD_DST blend functions manually Merge-request: 2558 Reviewed-by: Marcel Schuette --- src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index dc74c4e..6d6fb02 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -1025,11 +1025,10 @@ void QDirectFBPaintEnginePrivate::setCompositionMode(QPainter::CompositionMode m case QPainter::CompositionMode_DestinationOut: surface->SetPorterDuff(surface, DSPD_DST_OUT); break; -#if (Q_DIRECTFB_VERSION >= 0x010209) case QPainter::CompositionMode_Destination: - surface->SetPorterDuff(surface, DSPD_DST); + surface->SetSrcBlendFunction(surface, DSBF_ZERO); + surface->SetDstBlendFunction(surface, DSBF_ONE); break; -#endif #if (Q_DIRECTFB_VERSION >= 0x010000) case QPainter::CompositionMode_SourceAtop: surface->SetPorterDuff(surface, DSPD_SRC_ATOP); -- cgit v0.12 From f5592ef682ce18e7e6fd3770de722a5255a34ef7 Mon Sep 17 00:00:00 2001 From: Sami Kyostila Date: Mon, 28 Mar 2011 18:08:29 +0200 Subject: QMeeGoLivePixmapData: Verify dimensions of locked pixmap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a switch from HW rendering to SW rendering is done, all EGL surfaces backing a live pixmap become invalid because EGL is terminated. Thanks to a recent patch, all live images are now automatically invalidated when SW rendering is activated. Even with this mechanism in place, it is possible for the underlying EGL surface to be different than what the live pixmap is expecting. This can happen, for instance, if the X pixmap gets destroyed and a different X drawable is created using the same XID. Even though this is an unlikely scenario, it can result in a complete system failure if the surface dimensions do not match and the live pixmap user ends up writing over internal graphics driver structures. This patch adds a safeguard which disallows locking EGL surfaces with non-matching dimensions. Fixes Harmattan bug NB#237138. Merge-request: 2583 Reviewed-by: Samuel Rødal --- src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp b/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp index 0970b89..b6ba7ec 100644 --- a/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp +++ b/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp @@ -194,6 +194,8 @@ QImage* QMeeGoLivePixmapData::lock(EGLSyncKHR fenceSync) void *data = 0; int pitch = 0; + int surfaceWidth = 0; + int surfaceHeight = 0; EGLSurface surface = 0; QImage::Format format; lockedImage = QImage(); @@ -206,9 +208,11 @@ QImage* QMeeGoLivePixmapData::lock(EGLSyncKHR fenceSync) eglQuerySurface(QEgl::display(), surface, EGL_BITMAP_POINTER_KHR, (EGLint*) &data); eglQuerySurface(QEgl::display(), surface, EGL_BITMAP_PITCH_KHR, (EGLint*) &pitch); + eglQuerySurface(QEgl::display(), surface, EGL_WIDTH, (EGLint*) &surfaceWidth); + eglQuerySurface(QEgl::display(), surface, EGL_HEIGHT, (EGLint*) &surfaceHeight); // Ok, here we know we just support those two formats. Real solution would be: - // uqery also the format. + // query also the format. if (backingX11Pixmap->depth() > 16) format = QImage::Format_ARGB32_Premultiplied; else @@ -219,6 +223,12 @@ QImage* QMeeGoLivePixmapData::lock(EGLSyncKHR fenceSync) return &lockedImage; } + if (width() != surfaceWidth || height() != surfaceHeight) { + qWarning("Live texture dimensions don't match!"); + QMeeGoExtensions::eglUnlockSurfaceKHR(QEgl::display(), surface); + return &lockedImage; + } + lockedImage = QImage((uchar *) data, width(), height(), pitch, format); return &lockedImage; } -- cgit v0.12 From 45c4c792c48605de4cbc28637a39bce5a65b1613 Mon Sep 17 00:00:00 2001 From: Timo Turunen Date: Mon, 28 Mar 2011 21:18:40 +0300 Subject: Update changes for 4.7.3 Reviewed-by: Trust Me --- dist/changes-4.7.3 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dist/changes-4.7.3 b/dist/changes-4.7.3 index fa8a71e..1ff23c6 100644 --- a/dist/changes-4.7.3 +++ b/dist/changes-4.7.3 @@ -16,6 +16,16 @@ Qt Bug Tracker: http://bugreports.qt.nokia.com Merge Request: http://qt.gitorious.org **************************************************************************** +* Library * +**************************************************************************** + +QtNetwork +--------- + +- SSL +* [QTBUG-18338] blacklist fraudulent SSL certificates + +**************************************************************************** * Platform Specific Changes * **************************************************************************** @@ -38,6 +48,8 @@ QtMobility QtBearer depending applications * [QTBUG-17786] BC between Qt 4.7.3 and 4.6.3 QTreeView::indexRowSizeHint doesn't return correct value on Symbian for row when QPushButton widget is inserted in the treeview +* [QTBUG-4953] QMessageBox can not be closed/dismissed on touch phones if any +widget is fullscreen - Painting * [QTBUG-17907] tst_QGraphicsTransform::rotation3d test case from -- cgit v0.12 From 4f8d4492b8cafcdef71b5b40482c1eddb23062ab Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Tue, 29 Mar 2011 10:03:35 +0300 Subject: Fix for failing autotest QToolBar/Symbian QS60Style was calculating the minimum size of a toolbutton inside a toolbar based on number of visible buttons. Of course, when the non-visible buttons become visible and we are limiting the toolbar width to screen width it fails (since the orginally visible button is already claiming to take whole width of toolbar and now-visible button is taking half the button width). As a fix, calculate minimum size based on number buttons only, irregardless of their visibility. Task-number: QTBUG-17777 Reviewed-by: Miikka Heikkinen --- src/gui/styles/qs60style.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index aa68c23..da1528e 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -2556,17 +2556,16 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt, tb->sizePolicy().horizontalPolicy() == QSizePolicy::Maximum) && tb->orientation() == Qt::Horizontal; if (parentCanGrowHorizontally) { - int visibleButtons = 0; + int buttons = 0; //Make the auto-stretch to happen only for horizontal orientation if (tb && tb->orientation() == Qt::Horizontal) { QList actionList = tb->actions(); for (int i = 0; i < actionList.count(); i++) { - if (actionList.at(i)->isVisible()) - visibleButtons++; + buttons++; } } - if (widget->parentWidget() && visibleButtons > 0) { + if (widget->parentWidget() && buttons > 0) { QWidget *w = const_cast(widget); int toolBarMaxWidth = 0; int totalMargin = 0; @@ -2589,7 +2588,7 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt, toolBarMaxWidth -= totalMargin; //ensure that buttons are side-by-side and not on top of each other - const int toolButtonWidth = (toolBarMaxWidth / visibleButtons) + const int toolButtonWidth = (toolBarMaxWidth / buttons) - pixelMetric(QStyle::PM_ToolBarItemSpacing) - pixelMetric(QStyle::PM_ToolBarItemMargin) //toolbar frame needs to be reduced again, since QToolBarLayout adds it for each toolbar action -- cgit v0.12 From 3af5af16c6b7d2af8b12d1def27472c1d087b7cf Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Tue, 29 Mar 2011 13:51:26 +0100 Subject: Fixed pro file syntax in demos/spectrum Reviewed-by: Daniel Teske --- demos/spectrum/spectrum.pri | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/demos/spectrum/spectrum.pri b/demos/spectrum/spectrum.pri index 5773900..75c0113 100644 --- a/demos/spectrum/spectrum.pri +++ b/demos/spectrum/spectrum.pri @@ -41,9 +41,9 @@ win32 { # ..$${spectrum_build_dir} # without the result having a trailing slash where spectrum_build_dir # is undefined. - spectrum_build_dir = /release - if (!debug_and_release|build_pass): CONFIG(debug, debug|release) { - spectrum_build_dir = /debug + build_pass { + CONFIG(release, release|debug): spectrum_build_dir = /release + CONFIG(debug, release|debug): spectrum_build_dir = /debug } } -- cgit v0.12 From 2edaa9e52da494703df219a6b7672e0a33fc7031 Mon Sep 17 00:00:00 2001 From: axis Date: Tue, 29 Mar 2011 15:52:03 +0200 Subject: Corrected case mismatch. RevBy: Trust me --- tests/auto/qdir/qdir.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/qdir/qdir.pro b/tests/auto/qdir/qdir.pro index cf612f1..d81e428 100644 --- a/tests/auto/qdir/qdir.pro +++ b/tests/auto/qdir/qdir.pro @@ -4,7 +4,7 @@ RESOURCES += qdir.qrc QT = core wince*|symbian { - DirFiles.sources = testdir testdata searchdir resources entrylist types tst_qdir.cpp + DirFiles.sources = testdir testData searchdir resources entrylist types tst_qdir.cpp DirFiles.path = . DEPLOYMENT += DirFiles } -- cgit v0.12 From f0c6b3eefdf342bbb71e9409ea050da3c92ac861 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 30 Mar 2011 08:57:32 +1000 Subject: GridView jumps to beginning of list when resized Introduced by RTL changes. The list position should only be reset when the view is completely regenerated, e.g. when the orientation changes. Change-Id: I748333529c113d95eaebfb8ac9bb9cf543413d3b Task-number: QTBUG-18441 Reviewed-by: Bea Lam --- src/declarative/graphicsitems/qdeclarativegridview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index c0cbed0..b409f87 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -197,6 +197,7 @@ public: if (q->isComponentComplete()) { clear(); updateGrid(); + setPosition(0); q->refill(); updateCurrent(currentIndex); } @@ -689,7 +690,6 @@ void QDeclarativeGridViewPrivate::updateGrid() q->setContentHeight(endPosition() - startPosition()); else q->setContentWidth(lastPosition() - originPosition()); - setPosition(0); } } -- cgit v0.12 From 84413a25bc025f099a075387fb6ab8449d9ef217 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Thu, 3 Mar 2011 15:20:17 +1000 Subject: Return correct boundaries reasons from QTextBoundaryFinder. The next character after a boundary is at pos, not pos + 1. Also consider whether the previous and next character are whitespace in combination when determing word boudaries otherwise positions between whitespace characters will return both StartWord and EndWord. And since there's no need to look ahead one character don't shortcut` the regular logic for the boundary before the last character. Change-Id: I2efbf3947066767945f96bf8456ef518d2149191 Task-number: QTBUG-11365 Reviewed-by: Denis Dzyubenko Reviewed-by: Ritt Konstantin --- src/corelib/tools/qtextboundaryfinder.cpp | 30 +++++++------------ .../tst_qdeclarativetextinput.cpp | 35 ++++++++++------------ .../tst_qtextboundaryfinder.cpp | 6 ++-- 3 files changed, 28 insertions(+), 43 deletions(-) diff --git a/src/corelib/tools/qtextboundaryfinder.cpp b/src/corelib/tools/qtextboundaryfinder.cpp index c2bb094..34bc406 100644 --- a/src/corelib/tools/qtextboundaryfinder.cpp +++ b/src/corelib/tools/qtextboundaryfinder.cpp @@ -457,33 +457,23 @@ QTextBoundaryFinder::BoundaryReasons QTextBoundaryFinder::boundaryReasons() cons return NotAtBoundary; return StartWord; } - if (pos >= length - 1) { + if (pos == length) { if (d->attributes[length-1].whiteSpace) return NotAtBoundary; return EndWord; } - BoundaryReasons answer; - const bool nextIsSpace = d->attributes[pos + 1].whiteSpace; + const bool nextIsSpace = d->attributes[pos].whiteSpace; const bool prevIsSpace = d->attributes[pos - 1].whiteSpace; - if (d->attributes[pos].whiteSpace) - answer = EndWord; - else if (!prevIsSpace) { - answer = StartWord; - answer |= EndWord; - } - - if (prevIsSpace) - answer |= StartWord; - if (nextIsSpace) - answer |= EndWord; - if (answer == 0) { - answer = StartWord; - answer |= EndWord; - } - - return answer; + if (prevIsSpace && !nextIsSpace) + return StartWord; + else if (!prevIsSpace && nextIsSpace) + return EndWord; + else if (!prevIsSpace && !nextIsSpace) + return BoundaryReasons(StartWord | EndWord); + else + return NotAtBoundary; } QT_END_NAMESPACE diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index 45f38a4..a35a2c9 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -604,10 +604,8 @@ void tst_qdeclarativetextinput::moveCursorSelection_data() << standard[2] << 13 << 6 << QDeclarativeTextInput::SelectWords << 6 << 13 << false; QTest::newRow("Hello<(, world!)>|words") << standard[2] << 5 << 13 << QDeclarativeTextInput::SelectWords << 5 << 13 << true; - // Fails due to an issue with QTextBoundaryFinder and punctuation at the end of strings. - // QTBUG-11365 - // QTest::newRow("world<(!)>|words") - // << standard[2] << 12 << 13 << QDeclarativeTextInput::SelectWords << 12 << 13 << true; + QTest::newRow("world<(!)>|words") + << standard[2] << 12 << 13 << QDeclarativeTextInput::SelectWords << 12 << 13 << true; QTest::newRow("world!<()>)|words") << standard[2] << 13 << 13 << QDeclarativeTextInput::SelectWords << 13 << 13 << true; QTest::newRow("world<()>!)|words") @@ -653,16 +651,15 @@ void tst_qdeclarativetextinput::moveCursorSelection_data() QTest::newRow(" text |words") << standard[4] << 1 << 4 << QDeclarativeTextInput::SelectWords << 1 << 7 << true; QTest::newRow(" spacey |words") - << standard[4] << 11 << 13 << QDeclarativeTextInput::SelectWords << 10 << 14 << false; // Should be reversible. QTBUG-11365 + << standard[4] << 11 << 13 << QDeclarativeTextInput::SelectWords << 10 << 14 << true; QTest::newRow("<( )>spacey text |words|ltr") << standard[4] << 0 << 1 << QDeclarativeTextInput::SelectWords << 0 << 1 << false; QTest::newRow("<( )spacey> text |words|rtl") << standard[4] << 1 << 0 << QDeclarativeTextInput::SelectWords << 0 << 7 << false; QTest::newRow("spacey |words|ltr") << standard[4] << 14 << 15 << QDeclarativeTextInput::SelectWords << 10 << 15 << false; -// QTBUG-11365 -// QTest::newRow("spacey text<( )>|words|rtl") -// << standard[4] << 15 << 14 << QDeclarativeTextInput::SelectWords << 14 << 15 << false; + QTest::newRow("spacey text<( )>|words|rtl") + << standard[4] << 15 << 14 << QDeclarativeTextInput::SelectWords << 14 << 15 << false; QTest::newRow("<()> spacey text |words") << standard[4] << 0 << 0 << QDeclarativeTextInput::SelectWords << 0 << 0 << false; QTest::newRow(" spacey text <()>|words") @@ -857,23 +854,21 @@ void tst_qdeclarativetextinput::moveCursorSelectionSequence_data() << 15 << 12 << 15 << 10 << 15 << 15 << 15; -// QTBUG-11365 -// QTest::newRow(" spacey }|rtl") -// << standard[4] -// << 15 << 12 << 14 -// << 10 << 15 -// << 14 << 15; + QTest::newRow(" spacey }|rtl") + << standard[4] + << 15 << 12 << 14 + << 10 << 15 + << 14 << 15; QTest::newRow(" spacey {|ltr") << standard[4] << 12 << 15 << 13 << 10 << 15 << 10 << 14; -// QTBUG-11365 -// QTest::newRow(" spacey {|ltr") -// << standard[4] -// << 12 << 15 << 14 -// << 10 << 15 -// << 10 << 14; + QTest::newRow(" spacey {|ltr") + << standard[4] + << 12 << 15 << 14 + << 10 << 15 + << 10 << 14; } void tst_qdeclarativetextinput::moveCursorSelectionSequence() diff --git a/tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp b/tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp index 6157004..8003c44 100644 --- a/tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp +++ b/tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp @@ -257,10 +257,10 @@ void tst_QTextBoundaryFinder::sentenceBoundaries() void tst_QTextBoundaryFinder::isAtWordStart() { - QString txt("The quick brown fox jumped over $the lazy. dog "); + QString txt("The quick brown fox jumped over $the lazy. dog I win!"); QList start, end; - start << 0 << 4 << 10 << 16 << 20 << 27 << 32 << 33 << 37 << 41 << 43; - end << 3 << 9 << 15 << 19 << 26 << 31 << 33 << 36 << 41 << 42 << 46; + start << 0 << 4 << 10 << 16 << 20 << 27 << 32 << 33 << 37 << 41 << 43 << 48 << 50 << 53; + end << 3 << 9 << 15 << 19 << 26 << 31 << 33 << 36 << 41 << 42 << 46 << 49 << 53 << 54; QTextBoundaryFinder finder(QTextBoundaryFinder::Word, txt); for(int i=0; i < txt.length(); ++i) { finder.setPosition(i); -- cgit v0.12 From 0b2446df2908a17496aadb70f403ba361cfc2142 Mon Sep 17 00:00:00 2001 From: Titta Heikkala Date: Mon, 28 Mar 2011 11:49:04 +0300 Subject: QSoftkeyManager auto test update Updated correct values to simulateSymbianCommand function calls. It is defined in QSoftKeyManagerPrivateS60 that left and right softkeys are 0 and 2, now these values are used in test also. The signal spy actions have been updated to track the correct button in checkSoftkeyEnableStates-function. Task-number: QTBUG-18375 Reviewed-by: Sami Merila --- tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp | 34 ++++++++++++---------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp b/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp index 910d437..bd19afb 100644 --- a/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp +++ b/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp @@ -179,8 +179,8 @@ void tst_QSoftKeyManager::handleCommand() // QTest::keyPress(&w, Qt::Key_Context1); // QTest::keyPress(&w, Qt::Key_Context2); - simulateSymbianCommand(6000); - simulateSymbianCommand(6001); + simulateSymbianCommand(s60CommandStart); //0 = LSK position + simulateSymbianCommand(s60CommandStart + 2); //2 = RSK position QApplication::processEvents(); @@ -205,28 +205,32 @@ void tst_QSoftKeyManager::checkSoftkeyEnableStates() w.show(); QApplication::processEvents(); - QSignalSpy spy0(w.actions()[0], SIGNAL(triggered())); //restore defaults action - QSignalSpy spy1(w.actions()[1], SIGNAL(triggered())); //disabled help action + //According to StandardButton enum in QDialogButtonBox the Help action + //is inserted before RestoreDefaults and thus help action is in index 0 + QSignalSpy spy0(w.actions()[0], SIGNAL(triggered())); //disabled help action + QSignalSpy spy1(w.actions()[1], SIGNAL(triggered())); //restore defaults action //Verify that enabled button gets all the action trigger signals and //disabled button gets none. for (int i = 0; i < 10; i++) { - //simulate "Restore Defaults" softkey press - simulateSymbianCommand(s60CommandStart); //simulate "help" softkey press - simulateSymbianCommand(s60CommandStart + 1); + simulateSymbianCommand(s60CommandStart); + //simulate "Restore Defaults" softkey press + simulateSymbianCommand(s60CommandStart + 2); } QApplication::processEvents(); - QCOMPARE(spy0.count(), 10); - QCOMPARE(spy1.count(), 0); + //Restore defaults button is enabled and its signals are recorded to spy1 + QCOMPARE(spy0.count(), 0); + QCOMPARE(spy1.count(), 10); + spy0.clear(); spy1.clear(); for (int i = 0; i < 10; i++) { - //simulate "Restore Defaults" softkey press - simulateSymbianCommand(s60CommandStart); //simulate "help" softkey press - simulateSymbianCommand(s60CommandStart + 1); + simulateSymbianCommand(s60CommandStart); + //simulate "Restore Defaults" softkey press + simulateSymbianCommand(s60CommandStart + 2); //switch enabled button to disabled and vice versa pBHelp->setEnabled(!pBHelp->isEnabled()); pBDefaults->setEnabled(!pBDefaults->isEnabled()); @@ -261,7 +265,7 @@ void tst_QSoftKeyManager::noMergingOverWindowBoundary() //Verify that both base softkeys emit triggered signals simulateSymbianCommand(s60CommandStart); - simulateSymbianCommand(s60CommandStart + 1); + simulateSymbianCommand(s60CommandStart + 2); QCOMPARE(baseLeftSpy.count(), 1); QCOMPARE(baseRightSpy.count(), 1); @@ -275,7 +279,7 @@ void tst_QSoftKeyManager::noMergingOverWindowBoundary() QApplication::processEvents(); simulateSymbianCommand(s60CommandStart); - simulateSymbianCommand(s60CommandStart + 1); + simulateSymbianCommand(s60CommandStart + 2); QCOMPARE(baseLeftSpy.count(), 0); QCOMPARE(baseRightSpy.count(), 0); @@ -291,7 +295,7 @@ void tst_QSoftKeyManager::noMergingOverWindowBoundary() QApplication::processEvents(); simulateSymbianCommand(s60CommandStart); - simulateSymbianCommand(s60CommandStart + 1); + simulateSymbianCommand(s60CommandStart + 2); QCOMPARE(baseLeftSpy.count(), 0); QCOMPARE(baseRightSpy.count(), 0); -- cgit v0.12 From f910b7cc12301e72b67fb85328cac878c2ad9994 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Wed, 30 Mar 2011 15:08:58 +0200 Subject: Fixed demo subdirs for mobile examples. --- demos/demos.pro | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/demos/demos.pro b/demos/demos.pro index 7f85499..7f70cbb 100644 --- a/demos/demos.pro +++ b/demos/demos.pro @@ -26,7 +26,7 @@ symbian: SUBDIRS = \ demos_qcamera \ demos_qtbubblelevel \ demos_quickhit - + wince*: SUBDIRS = \ demos_shared \ demos_deform \ @@ -43,7 +43,7 @@ wince*: SUBDIRS = \ demos_embeddeddialogs \ demos_undo \ demos_sub-attaq - + contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles1):!contains(QT_CONFIG, opengles2):{ SUBDIRS += demos_boxes } @@ -96,10 +96,10 @@ demos_mediaplayer.subdir = qmediaplayer demos_declarative.subdir = declarative #mobile demos -demos_guitartuner = mobile/guitartuner -demos_qcamera = mobile/qcamera -demos_qtbubblelevel = mobile/qtbubblelevel -demos_quickhit = mobile/quickhit +demos_guitartuner.subdir = mobile/guitartuner +demos_qcamera.subdir = mobile/qcamera +demos_qtbubblelevel.subdir = mobile/qtbubblelevel +demos_quickhit.subdir = mobile/quickhit demos_browser.subdir = browser -- cgit v0.12 From 85d854855548497d95bef70af4d650af931a26ac Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Fri, 1 Apr 2011 12:03:39 +0200 Subject: Removed mobile demos from the Symbian build in demos.pro The demos require QtMobility libraries. Added notices in the demo pages about the requirement. Reviewed-by: Casper van Donderen --- demos/demos.pro | 9 +++------ doc/src/demos/guitartuner.qdoc | 1 + doc/src/demos/mobiledemos.qdoc | 2 ++ doc/src/demos/qml-qtbubblelevel.qdoc | 2 ++ 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/demos/demos.pro b/demos/demos.pro index 7f70cbb..b8b743c 100644 --- a/demos/demos.pro +++ b/demos/demos.pro @@ -21,11 +21,8 @@ SUBDIRS = \ symbian: SUBDIRS = \ demos_shared \ demos_deform \ - demos_pathstroke \ - demos_guitartuner \ - demos_qcamera \ - demos_qtbubblelevel \ - demos_quickhit + demos_pathstroke + wince*: SUBDIRS = \ demos_shared \ @@ -95,7 +92,7 @@ demos_qtdemo.subdir = qtdemo demos_mediaplayer.subdir = qmediaplayer demos_declarative.subdir = declarative -#mobile demos +#mobile demos. Requires QtMobility sources. Not included in demo build demos_guitartuner.subdir = mobile/guitartuner demos_qcamera.subdir = mobile/qcamera demos_qtbubblelevel.subdir = mobile/qtbubblelevel diff --git a/doc/src/demos/guitartuner.qdoc b/doc/src/demos/guitartuner.qdoc index c669765..8678db1 100644 --- a/doc/src/demos/guitartuner.qdoc +++ b/doc/src/demos/guitartuner.qdoc @@ -40,5 +40,6 @@ code to the Qt Quick UI. The example is hosted in Projects Forum Nokia: https://projects.forum.nokia.com/guitartuner +\note This demonstration requires QtMobility libraries. \image qml-guitartuner-example.png */ diff --git a/doc/src/demos/mobiledemos.qdoc b/doc/src/demos/mobiledemos.qdoc index 47241a6..15fac7e 100644 --- a/doc/src/demos/mobiledemos.qdoc +++ b/doc/src/demos/mobiledemos.qdoc @@ -34,6 +34,8 @@ capabilities. Uses the multimedia and systeminfo modules of \l{external: Qt Mobility Manual}{Qt Mobility}. + \note This demonstration requires QtMobility libraries. + */ diff --git a/doc/src/demos/qml-qtbubblelevel.qdoc b/doc/src/demos/qml-qtbubblelevel.qdoc index 63ac286..82ea4dc 100644 --- a/doc/src/demos/qml-qtbubblelevel.qdoc +++ b/doc/src/demos/qml-qtbubblelevel.qdoc @@ -37,6 +37,8 @@ as atraditional bubble level. The application provides a calibration feature to handle any possible errors in accelerometer readings. The example is hosted in Projects Forum Nokia: https://projects.forum.nokia.com/qtbubblelevel +\note This demonstration requires QtMobility libraries. + \image qml-qtbubblelevel-demo.png \section1 Initialising the application -- cgit v0.12