diff options
author | Martin Smith <martin.smith@nokia.com> | 2011-04-01 11:04:00 (GMT) |
---|---|---|
committer | Martin Smith <martin.smith@nokia.com> | 2011-04-01 11:04:00 (GMT) |
commit | c49a91a9629122f01df285a0b436c7502abc769c (patch) | |
tree | 446c027aa379b00d3a6b673a4ad5c5600fe2408b | |
parent | 131f429e43a5c382ae208af39bc5f889c39dee8b (diff) | |
parent | 85d854855548497d95bef70af4d650af931a26ac (diff) | |
download | Qt-c49a91a9629122f01df285a0b436c7502abc769c.zip Qt-c49a91a9629122f01df285a0b436c7502abc769c.tar.gz Qt-c49a91a9629122f01df285a0b436c7502abc769c.tar.bz2 |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7
-rw-r--r-- | demos/demos.pro | 21 | ||||
-rw-r--r-- | demos/spectrum/spectrum.pri | 6 | ||||
-rw-r--r-- | dist/changes-4.7.3 | 12 | ||||
-rw-r--r-- | doc/src/demos/guitartuner.qdoc | 1 | ||||
-rw-r--r-- | doc/src/demos/mobiledemos.qdoc | 2 | ||||
-rw-r--r-- | doc/src/demos/qml-qtbubblelevel.qdoc | 2 | ||||
-rw-r--r-- | mkspecs/unsupported/win32-g++-cross/qmake.conf | 4 | ||||
-rw-r--r-- | src/corelib/concurrent/qfutureinterface.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qtextboundaryfinder.cpp | 30 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativegridview.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qsoftkeymanager_s60.cpp | 8 | ||||
-rw-r--r-- | src/gui/styles/qs60style.cpp | 9 | ||||
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp | 5 | ||||
-rw-r--r-- | src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp | 12 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp | 35 | ||||
-rw-r--r-- | tests/auto/qdir/qdir.pro | 2 | ||||
-rw-r--r-- | tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp | 34 | ||||
-rw-r--r-- | tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp | 6 |
18 files changed, 106 insertions, 87 deletions
diff --git a/demos/demos.pro b/demos/demos.pro index 7f85499..b8b743c 100644 --- a/demos/demos.pro +++ b/demos/demos.pro @@ -21,12 +21,9 @@ SUBDIRS = \ symbian: SUBDIRS = \ demos_shared \ demos_deform \ - demos_pathstroke \ - demos_guitartuner \ - demos_qcamera \ - demos_qtbubblelevel \ - demos_quickhit - + demos_pathstroke + + wince*: SUBDIRS = \ demos_shared \ demos_deform \ @@ -43,7 +40,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 } @@ -95,11 +92,11 @@ demos_qtdemo.subdir = qtdemo 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 +#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 +demos_quickhit.subdir = mobile/quickhit demos_browser.subdir = browser 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 } } 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 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 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 = 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() 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/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 546f75e..b890c4f 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); } } 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(); } 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<QAction*> 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<QWidget *>(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 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); 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; } 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(" <s(pac)ey> text |words") << standard[4] << 1 << 4 << QDeclarativeTextInput::SelectWords << 1 << 7 << true; QTest::newRow(" spacey <t(ex)t> |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 <text( )>|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 <te(xt{^ )>}|rtl") -// << standard[4] -// << 15 << 12 << 14 -// << 10 << 15 -// << 14 << 15; + QTest::newRow(" spacey <te(xt{^ )>}|rtl") + << standard[4] + << 15 << 12 << 14 + << 10 << 15 + << 14 << 15; QTest::newRow(" spacey {<te(x^t} )>|ltr") << standard[4] << 12 << 15 << 13 << 10 << 15 << 10 << 14; -// QTBUG-11365 -// QTest::newRow(" spacey {<te(xt^} )>|ltr") -// << standard[4] -// << 12 << 15 << 14 -// << 10 << 15 -// << 10 << 14; + QTest::newRow(" spacey {<te(xt^} )>|ltr") + << standard[4] + << 12 << 15 << 14 + << 10 << 15 + << 10 << 14; } void tst_qdeclarativetextinput::moveCursorSelectionSequence() 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 } 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); 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<int> 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); |