From 37930d767ad67912b58332a87b6b6efc942a3082 Mon Sep 17 00:00:00 2001 From: Janne Koskinen Date: Fri, 15 May 2009 17:47:46 +0200 Subject: modified qiodevice benchmark dataset to be smaller on Symbian --- tests/benchmarks/qiodevice/main.cpp | 2 ++ tests/benchmarks/qiodevice/qiodevice.pro | 1 + 2 files changed, 3 insertions(+) diff --git a/tests/benchmarks/qiodevice/main.cpp b/tests/benchmarks/qiodevice/main.cpp index fa41f1c..5c459a8 100755 --- a/tests/benchmarks/qiodevice/main.cpp +++ b/tests/benchmarks/qiodevice/main.cpp @@ -66,8 +66,10 @@ void tst_qiodevice::read_data() QTest::newRow("100k") << qint64(100 * 1024); QTest::newRow("1000k") << qint64(1000 * 1024); QTest::newRow("10000k") << qint64(10000 * 1024); +#ifndef Q_OS_SYMBIAN // Symbian devices don't (yet) have enough available RAM to run these QTest::newRow("100000k") << qint64(100000 * 1024); QTest::newRow("1000000k") << qint64(1000000 * 1024); +#endif } void tst_qiodevice::read_old() diff --git a/tests/benchmarks/qiodevice/qiodevice.pro b/tests/benchmarks/qiodevice/qiodevice.pro index 59b6302..749a4d6 100755 --- a/tests/benchmarks/qiodevice/qiodevice.pro +++ b/tests/benchmarks/qiodevice/qiodevice.pro @@ -1,6 +1,7 @@ load(qttest_p4) TEMPLATE = app TARGET = tst_qiodevice +TARGET.EPOCHEAPSIZE = 0x100000 0x2000000 DEPENDPATH += . INCLUDEPATH += . -- cgit v0.12 From 4e463e50ace02f31f4d23a5b414f86d62c43eb25 Mon Sep 17 00:00:00 2001 From: Aleksandar Sasha Babic Date: Mon, 18 May 2009 15:46:35 +0200 Subject: Our ftp server removes windiws line ending. --- tests/auto/qftp/tst_qftp.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/auto/qftp/tst_qftp.cpp b/tests/auto/qftp/tst_qftp.cpp index 3f1c511..0f6702c 100644 --- a/tests/auto/qftp/tst_qftp.cpp +++ b/tests/auto/qftp/tst_qftp.cpp @@ -1556,14 +1556,16 @@ void tst_QFtp::binaryAscii() ResMapIt it2 = resultMap.find(QFtp::Get); QVERIFY(it2 != resultMap.end()); QVERIFY(it2.value().success); +/* #ifdef Q_OS_SYMBIAN QVERIFY(getData.size() == putData.size()); #else +*/ // most modern ftp servers leave the file as it is by default // (and do not remove the windows line ending), the -1 below could be // deleted in the future QVERIFY(getData.size() == putData.size()-1); -#endif +//#endi ////////////////////////////////////////////////////////////////// // cleanup (i.e. remove the file) -- this also tests the remove command init(); -- cgit v0.12 From 9d984a25f7433aeff0b2a5976bce7341796a701e Mon Sep 17 00:00:00 2001 From: Frans Englich Date: Mon, 18 May 2009 15:56:29 +0200 Subject: Second attempt at enabling Phonon. Reviewed-by: Janne Koskinen --- src/src.pro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/src.pro b/src/src.pro index 667df9c..3e63e6e 100644 --- a/src/src.pro +++ b/src/src.pro @@ -31,11 +31,12 @@ contains(QT_CONFIG, webkit) { #exists($$QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro): SRC_SUBDIRS += src_javascriptcore SRC_SUBDIRS += src_webkit } -contains(QT_CONFIG, phonon): SRC_SUBDIRS += src_phonon contains(QT_CONFIG, scripttools): SRC_SUBDIRS += src_scripttools SRC_SUBDIRS += src_plugins } +contains(QT_CONFIG, phonon): SRC_SUBDIRS += src_phonon + src_s60main.subdir = $$QT_SOURCE_TREE/src/s60main src_s60main.target = sub-s60main src_winmain.subdir = $$QT_SOURCE_TREE/src/winmain -- cgit v0.12 From dc06f947f5a2b300c4396a8ec1d8793f594e2d86 Mon Sep 17 00:00:00 2001 From: Aleksandar Sasha Babic Date: Mon, 18 May 2009 18:01:33 +0200 Subject: Testing on symbina requires more time. --- tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index d7faa73..8a12b0b 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -2146,7 +2146,7 @@ void tst_QNetworkReply::ioGetWithManyProxies() #ifndef Q_OS_SYMBIAN QTestEventLoop::instance().enterLoop(10); #else - QTestEventLoop::instance().enterLoop(30); + QTestEventLoop::instance().enterLoop(60); #endif QVERIFY(!QTestEventLoop::instance().timeout()); -- cgit v0.12 From d050d43c27b25ad7914f2970ef9933655caa0d44 Mon Sep 17 00:00:00 2001 From: Aleksandar Sasha Babic Date: Mon, 18 May 2009 18:04:22 +0200 Subject: Performance on Symbian with Open C 1.5.3 pre-release is bad and I needed some progress display to see if test is alive or not. I print line every 500 iteration. --- tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index 8a12b0b..f07bb6e 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -2626,6 +2626,11 @@ void tst_QNetworkReply::downloadProgress() QFETCH(int, loopCount); for (int i = 1; i <= loopCount; ++i) { +#ifdef Q_OS_SYMBIAN + if(i % 500 == 0) { + qWarning("iteration %d", i); + } +#endif sender->write(data); QVERIFY2(sender->waitForBytesWritten(2000), "Network timeout"); -- cgit v0.12 From 1441dabcbbe21c7feba2e9335b19ab99235a6958 Mon Sep 17 00:00:00 2001 From: Janne Koskinen Date: Tue, 19 May 2009 09:51:02 +0200 Subject: fixed bug where pointer down outside modal dialog causes access violation --- src/gui/kernel/qapplication_s60.cpp | 40 +++++++++++++++++++++++-------------- src/gui/kernel/qt_s60_p.h | 1 + 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 72c2855..dd51fcd 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -302,7 +302,6 @@ void QSymbianControl::HandleLongTapEventL( const TPoint& aPenEventLocation, cons QWidget *alienWidget; QPoint widgetPos = QPoint(aPenEventLocation.iX, aPenEventLocation.iY); QPoint globalPos = QPoint(aPenEventScreenLocation.iX,aPenEventScreenLocation.iY); - //### possible bug, within manhattan lenght if the target is slipped outside .... alienWidget = qwidget->childAt(widgetPos); if (!alienWidget) alienWidget = qwidget; @@ -321,6 +320,7 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent) QMouseEvent::Type type; Qt::MouseButton button; mapS60MouseEventTypeToQt(&type, &button, &pEvent); + if (m_previousEventLongTap) if (type == QEvent::MouseButtonRelease){ button = Qt::RightButton; @@ -368,27 +368,30 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent) button, QApplicationPrivate::mouse_buttons, mapToQtModifiers(pEvent.iModifiers)); events.append(Event(S60->lastPointerEventTarget,mEventLeave)); } - QMouseEvent mEventEnter(QEvent::Enter, alienWidget->mapFrom(qwidget, widgetPos), globalPos, + QMouseEvent mEventEnter(QEvent::Enter, alienWidget->mapFromGlobal(globalPos), globalPos, button, QApplicationPrivate::mouse_buttons, mapToQtModifiers(pEvent.iModifiers)); + events.append(Event(alienWidget,mEventEnter)); } S60->lastCursorPos = globalPos; S60->lastPointerEventPos = widgetPos; S60->lastPointerEventTarget = alienWidget; - - QMouseEvent mEvent(type, alienWidget->mapFrom(qwidget, widgetPos), globalPos, - button, QApplicationPrivate::mouse_buttons, mapToQtModifiers(pEvent.iModifiers)); - events.append(Event(alienWidget,mEvent)); - QEventDispatcherS60 *dispatcher; - // It is theoretically possible for someone to install a different event dispatcher. - if (dispatcher = qobject_cast(alienWidget->d_func()->threadData->eventDispatcher)) { - if (dispatcher->excludeUserInputEvents()) { - for (int i=0;i < events.count();++i) - { - Event next = events[i]; - dispatcher->saveInputEvent(this, next.first, new QMouseEvent(next.second)); + if (alienWidget) + { + QMouseEvent mEvent(type, alienWidget->mapFromGlobal(globalPos), globalPos, + button, QApplicationPrivate::mouse_buttons, mapToQtModifiers(pEvent.iModifiers)); + events.append(Event(alienWidget,mEvent)); + QEventDispatcherS60 *dispatcher; + // It is theoretically possible for someone to install a different event dispatcher. + if (dispatcher = qobject_cast(alienWidget->d_func()->threadData->eventDispatcher)) { + if (dispatcher->excludeUserInputEvents()) { + for (int i=0;i < events.count();++i) + { + Event next = events[i]; + dispatcher->saveInputEvent(this, next.first, new QMouseEvent(next.second)); + } + return; } - return; } } for (int i=0;i < events.count();++i) @@ -672,6 +675,10 @@ void QSymbianControl::HandleResourceChange(int resourceType) CCoeControl::HandleResourceChange(resourceType); } +void QSymbianControl::CancelLongTapTimer() +{ + m_longTapDetector->Cancel(); +} TTypeUid::Ptr QSymbianControl::MopSupplyObject(TTypeUid id) { @@ -786,6 +793,7 @@ void QApplicationPrivate::openPopup(QWidget *popup) Q_ASSERT(popup->testAttribute(Qt::WA_WState_Created)); WId id = popup->effectiveWinId(); id->SetPointerCapture(true); + id->SetGloballyCapturing(true); autoGrabWindow = id; } @@ -797,6 +805,7 @@ void QApplicationPrivate::openPopup(QWidget *popup) popup->focusWidget()->setFocus(Qt::PopupFocusReason); } else if (QApplicationPrivate::popupWidgets->count() == 1) { // this was the first popup if (QWidget *fw = QApplication::focusWidget()) { + static_cast(fw->effectiveWinId())->CancelLongTapTimer(); QFocusEvent e(QEvent::FocusOut, Qt::PopupFocusReason); q_func()->sendEvent(fw, &e); } @@ -816,6 +825,7 @@ void QApplicationPrivate::closePopup(QWidget *popup) Q_ASSERT(popup->testAttribute(Qt::WA_WState_Created)); WId id = popup->effectiveWinId(); id->SetPointerCapture(false); + id->SetGloballyCapturing(false); if (QWidgetPrivate::mouseGrabber != 0) QWidgetPrivate::mouseGrabber->grabMouse(); diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index 35755c3..4eac35e 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -108,6 +108,7 @@ public: void setWidget(QWidget *w); void sendInputEvent(QWidget *widget, QInputEvent *inputEvent); void setIgnoreFocusChanged(bool enabled) { m_ignoreFocusChanged = enabled; } + void CancelLongTapTimer(); protected: void Draw(const TRect& aRect) const; -- cgit v0.12 From 4fc19dd2632a846477c8cb223350165c1c4ff8cb Mon Sep 17 00:00:00 2001 From: Frans Englich Date: Tue, 19 May 2009 10:00:48 +0200 Subject: Unbreak build, spotted by various people. Not tested, but should work(TM). --- src/s60installs/qt_libs.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s60installs/qt_libs.pro b/src/s60installs/qt_libs.pro index 99fde62..9aadfc0 100644 --- a/src/s60installs/qt_libs.pro +++ b/src/s60installs/qt_libs.pro @@ -66,7 +66,7 @@ symbian: { } contains(QT_CONFIG, phonon): { - qtlibraries.sources += QtPhonon.dll + qtlibraries.sources += Phonon.dll } BLD_INF_RULES.prj_exports += "qt.iby $$CORE_MW_LAYER_IBY_EXPORT_PATH(qt.iby)" -- cgit v0.12 From 073c403cf3453818563c3a0e69e29fb403d22c22 Mon Sep 17 00:00:00 2001 From: Aleksandar Sasha Babic Date: Tue, 19 May 2009 10:03:29 +0200 Subject: This lines are not needed as we monitor events in exception fd_set and map them to read / write notifications. --- src/network/socket/qabstractsocket.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index 8ae247c..67e32fe 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -991,7 +991,6 @@ void QAbstractSocketPrivate::_q_connectToNextAddress() // Wait for a write notification that will eventually call // _q_testConnection(). socketEngine->setWriteNotificationEnabled(true); - socketEngine->setExceptionNotificationEnabled(true); break; } while (state != QAbstractSocket::ConnectedState); } @@ -1052,7 +1051,6 @@ void QAbstractSocketPrivate::_q_abortConnectionAttempt() #endif if (socketEngine) { socketEngine->setWriteNotificationEnabled(false); - socketEngine->setExceptionNotificationEnabled(false); } connectTimer->stop(); -- cgit v0.12 From 16887d14b975c4740f037366dc7e45d59731fb47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Meril=C3=A4?= Date: Tue, 19 May 2009 16:01:56 +0300 Subject: S60Style: Styling QDial. --- src/gui/styles/qs60style.cpp | 52 +++++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 6f27de5..c082125 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -10,33 +10,37 @@ ****************************************************************************/ #include "qs60style_p.h" + #include "qapplication.h" #include "qpainter.h" #include "qstyleoption.h" #include "qresizeevent" #include "qpixmapcache" -#include "qlistview.h" + #include "qcalendarwidget.h" -#include "qtabbar.h" +#include "qdial.h" +#include "qdialog.h" +#include "qerrormessage.h" +#include "qgroupbox.h" +#include "qheaderview.h" +#include "qlist.h" #include "qlistwidget.h" +#include "qlistview.h" #include "qmenu.h" -#include "qpushbutton.h" #include "qmenubar.h" +#include "qmessagebox.h" +#include "qpushbutton.h" +#include "qscrollbar.h" +#include "qtabbar.h" #include "qtablewidget.h" +#include "qtableview.h" #include "qtoolbar.h" -#include "qgroupbox.h" #include "qtoolbutton.h" +#include "qtreeview.h" + #include "private/qtoolbarextension_p.h" #include "private/qcombobox_p.h" #include "private/qwidget_p.h" -#include "qscrollbar.h" -#include "qlist.h" -#include "qtableview.h" -#include "qheaderview.h" -#include "qtreeview.h" -#include "qdialog.h" -#include "qmessagebox.h" -#include "qerrormessage.h" #if !defined(QT_NO_STYLE_S60) || defined(QT_PLUGIN) @@ -524,7 +528,7 @@ void QS60StylePrivate::setThemePalette(QApplication *app) const widgetPalette.setBrush(QPalette::Window, QS60StylePrivate::backgroundTexture()); widgetPalette.setColor(QPalette::Base, Qt::transparent); // set button and tooltipbase based on pixel colors - QColor buttonColor = colorFromFrameGraphics(QS60StylePrivate::SF_ButtonNormal); + const QColor buttonColor = colorFromFrameGraphics(QS60StylePrivate::SF_ButtonNormal); widgetPalette.setColor(QPalette::Button, buttonColor ); widgetPalette.setColor(QPalette::Light, widgetPalette.color(QPalette::Button).lighter()); widgetPalette.setColor(QPalette::Dark, widgetPalette.color(QPalette::Button).darker()); @@ -633,7 +637,14 @@ void QS60Style::polish(QWidget *widget) widgetPalette.setColor(QPalette::All, QPalette::HighlightedText, QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnTextColors, 24, 0)); QApplication::setPalette(widgetPalette, "QLineEdit"); - + } else if (qobject_cast (widget)) { + const QColor color(QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnTextColors, 6, 0)); + widgetPalette.setColor(QPalette::WindowText, color); + widgetPalette.setColor(QPalette::Button, QApplication::palette().color(QPalette::Button)); + widgetPalette.setColor(QPalette::Dark, color.darker()); + widgetPalette.setColor(QPalette::Light, color.lighter()); + QApplication::setPalette(widgetPalette, "QDial"); + } } } @@ -1124,15 +1135,20 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom } break; #endif //QT_NO_GROUPBOX +#ifndef QT_NO_DIAL + case CC_Dial: + if (const QStyleOptionSlider *slider = qstyleoption_cast(option)) { + QStyleOptionSlider optionSlider = *slider; + QCommonStyle::drawComplexControl(control, &optionSlider, painter, widget); + } + break; +#endif //QT_NO_DIAL //todo: remove non-used complex widgets in final version case CC_TitleBar: #ifdef QT3_SUPPORT case CC_Q3ListView: #endif //QT3_SUPPORT -#ifndef QT_NO_DIAL - case CC_Dial: -#endif //QT_NO_DIAL #ifndef QT_NO_WORKSPACE case CC_MdiControls: #endif //QT_NO_WORKSPACE @@ -2276,6 +2292,8 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w case SH_ComboBox_PopupFrameStyle: retValue = QFrame::NoFrame; break; + case SH_Dial_BackgroundRole: + retValue = QPalette::Base; default: break; } -- cgit v0.12 From ae85bab1ec5d66d4bfb628da4f0e5514dc85f5a5 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 19 May 2009 16:04:58 +0300 Subject: Importing macros for testlib did not get defined properly for RVCT. RevBy: axis --- src/testlib/qtest_global.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/testlib/qtest_global.h b/src/testlib/qtest_global.h index ebfdae1..ba7da2a 100644 --- a/src/testlib/qtest_global.h +++ b/src/testlib/qtest_global.h @@ -52,7 +52,7 @@ QT_MODULE(Test) #ifdef QTEST_EMBED # define Q_TESTLIB_EXPORT -#elif !defined(QT_SHARED) +#elif !defined(QT_SHARED) && !(defined(Q_OS_SYMBIAN) && defined(Q_CC_RVCT)) # define Q_TESTLIB_EXPORT #else # ifdef QTESTLIB_MAKEDLL @@ -64,7 +64,7 @@ QT_MODULE(Test) #if (defined (Q_CC_MSVC) && _MSC_VER < 1310) || defined (Q_CC_SUN) || defined (Q_CC_XLC) || (defined (Q_CC_GNU) && (__GNUC__ - 0 < 3)) || defined (Q_CC_NOKIAX86) # define QTEST_NO_SPECIALIZATIONS -#endif +#endif #if (defined Q_CC_HPACC) && (defined __ia64) -- cgit v0.12