summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkku Luukkainen <markku.luukkainen@digia.com>2009-05-19 13:46:04 (GMT)
committerMarkku Luukkainen <markku.luukkainen@digia.com>2009-05-19 13:46:04 (GMT)
commit40fc74c780be1069ed6e7f8cf7e4ac3c70d4c20c (patch)
tree3f7467b1a75bb2564c4c1ca3261cf8027b96968b
parent3cfd4e97aa8f5e8c7b9eda9d7847b3f236d3efb5 (diff)
parentd7fda9c7aef17ed79fd656f197fb179acb4ec54a (diff)
downloadQt-40fc74c780be1069ed6e7f8cf7e4ac3c70d4c20c.zip
Qt-40fc74c780be1069ed6e7f8cf7e4ac3c70d4c20c.tar.gz
Qt-40fc74c780be1069ed6e7f8cf7e4ac3c70d4c20c.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into softkeys
-rw-r--r--src/gui/kernel/qapplication_s60.cpp40
-rw-r--r--src/gui/kernel/qt_s60_p.h1
-rw-r--r--src/gui/styles/qs60style.cpp52
-rw-r--r--src/network/socket/qabstractsocket.cpp2
-rw-r--r--src/s60installs/qt_libs.pro2
-rw-r--r--src/src.pro3
-rw-r--r--src/testlib/qtest_global.h4
-rw-r--r--tests/auto/qftp/tst_qftp.cpp4
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp7
-rwxr-xr-xtests/benchmarks/qiodevice/main.cpp2
-rwxr-xr-xtests/benchmarks/qiodevice/qiodevice.pro1
11 files changed, 78 insertions, 40 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 8cf2f8f..db67fd8 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -305,7 +305,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;
@@ -324,6 +323,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;
@@ -371,27 +371,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<QEventDispatcherS60 *>(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<QEventDispatcherS60 *>(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)
@@ -675,6 +678,10 @@ void QSymbianControl::HandleResourceChange(int resourceType)
CCoeControl::HandleResourceChange(resourceType);
}
+void QSymbianControl::CancelLongTapTimer()
+{
+ m_longTapDetector->Cancel();
+}
TTypeUid::Ptr QSymbianControl::MopSupplyObject(TTypeUid id)
{
@@ -789,6 +796,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;
}
@@ -800,6 +808,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<QSymbianControl*>(fw->effectiveWinId())->CancelLongTapTimer();
QFocusEvent e(QEvent::FocusOut, Qt::PopupFocusReason);
q_func()->sendEvent(fw, &e);
}
@@ -819,6 +828,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;
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 0ca3344..7ed53f2 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<QDial *> (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<const QStyleOptionSlider *>(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;
}
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();
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)"
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
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)
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();
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index c5c2942..acc1d42 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -2197,7 +2197,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());
@@ -2677,6 +2677,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");
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 += .