From 4b37d772cd5c1098d38944a125b48751f4bb1280 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Wed, 3 Jun 2009 21:25:38 +0300 Subject: Fix to tst_QDateTimeEdit::mousePress test case. Checked datetimedit spinbox up location from style, instead of trying to guess the difference offsets. --- tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp index b975405..624d193 100644 --- a/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp +++ b/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp @@ -2213,21 +2213,16 @@ void tst_QDateTimeEdit::mousePress() testWidget->setDate(QDate(2004, 6, 23)); testWidget->setCurrentSection(QDateTimeEdit::YearSection); QCOMPARE(testWidget->currentSection(), QDateTimeEdit::YearSection); - int offset = 10; -#if defined(Q_OS_WINCE) - offset = 20; - if (qt_wince_is_pocket_pc()) { - // depending on wether the display is double-pixeld, we need - // to click at a different position - bool doubledSize = false; - int dpi = GetDeviceCaps(GetDC(0), LOGPIXELSX); - if ((dpi < 1000) && (dpi > 0)) - doubledSize = true; - offset = doubledSize ? 50 : 25; // On CE buttons are aligned horizontal - } -#endif - QTest::mouseClick(testWidget, Qt::LeftButton, 0, QPoint(testWidget->width() - offset, 5)); - QCOMPARE(testWidget->date().year(), 2005); + + // Ask the SC_SpinBoxUp button location from style + QStyleOptionSpinBox so; + so.rect = testWidget->rect(); + QRect rectUp = testWidget->style()->subControlRect(QStyle::CC_SpinBox, &so, QStyle::SC_SpinBoxUp, testWidget); + + // Send mouseClick to center of SC_SpinBoxUp + QTest::mouseClick(testWidget, Qt::LeftButton, 0, rectUp.center()); + QCOMPARE(testWidget->date().year(), 2005); + } void tst_QDateTimeEdit::stepHourAMPM_data() -- cgit v0.12 From ed0156a4269cd5c4ee13368b8c366bb7af2f489f Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Fri, 5 Jun 2009 11:35:34 +0200 Subject: Compile on newer SDKs >= S60 5.0. Semi-colons, colons, they all look the same to me. --- src/gui/image/qpixmap_s60.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp index 879c980..3ea50ff 100644 --- a/src/gui/image/qpixmap_s60.cpp +++ b/src/gui/image/qpixmap_s60.cpp @@ -140,7 +140,7 @@ CFbsBitmap *QPixmap::toSymbianCFbsBitmap() const case QImage::Format_ARGB32_Premultiplied: #if !defined(__SERIES60_31__) && !defined(__S60_32__) // ### TODO: Add runtime detection as well? - mode = EColor16MAP: + mode = EColor16MAP; break; #endif destFormat = QImage::Format_ARGB32; -- cgit v0.12 From c2fe2efd1ee04a02858b7551fad07009d763f960 Mon Sep 17 00:00:00 2001 From: Espen Riskedal Date: Fri, 5 Jun 2009 13:07:12 +0200 Subject: make it more obvious where the Open C plugins are located --- doc/src/installation.qdoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/src/installation.qdoc b/doc/src/installation.qdoc index 7cd7b0c..befc7b6 100644 --- a/doc/src/installation.qdoc +++ b/doc/src/installation.qdoc @@ -516,12 +516,12 @@ in the \l{Qt for Windows CE Requirements} document. Install this to all S60 SDKs you plan to use Qt with. \endlist - Make sure you have the following packages installed on any device you want to use to run Qt applications. - These packages can be found under \c nokia_plugin directory in any S60 SDK where you have installed Open C/C++: + Make sure you have the following plugins installed on your device. The packages can be found + in the S60 SDK where you installed Open C/C++: \list - \o pips_s60_.sis - \o openc_ssl_s60_.sis - \o stdcpp_s60_.sis + \o nokia_plugin\openc\s60opencsis\pips_s60_.sis + \o nokia_plugin\openc\s60opencsis\openc_ssl_s60_.sis + \o nokia_plugin\opencpp\s60opencppsis\stdcpp_s60_.sis \endlist These instructions assume the above tools are installed and -- cgit v0.12 From 72c003655c2009279d7360acce88d536122c8795 Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 5 Jun 2009 13:10:31 +0200 Subject: Made Selection updates relative to the block. Otherwise the update would always end up with the selection being in the first block. --- src/gui/text/qtextcontrol.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index 6647558..69e1ee4 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -1841,8 +1841,9 @@ void QTextControlPrivate::inputMethodEvent(QInputMethodEvent *e) const QInputMethodEvent::Attribute &a = e->attributes().at(i); if (a.type == QInputMethodEvent::Selection) { QTextCursor oldCursor = cursor; - cursor.setPosition(a.start, QTextCursor::MoveAnchor); - cursor.setPosition(a.start + a.length, QTextCursor::KeepAnchor); + int blockStart = a.start + cursor.block().position(); + cursor.setPosition(blockStart, QTextCursor::MoveAnchor); + cursor.setPosition(blockStart + a.length, QTextCursor::KeepAnchor); q->ensureCursorVisible(); repaintOldAndNewSelection(oldCursor); } -- cgit v0.12