From 51a5901a26169276131c88aab3184fb0fa5b814c Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Wed, 12 May 2010 15:54:50 +0300 Subject: Double-click support for virtual cursor in Symbian This makes it possible to use itemviews with S60 style, as activation of items requires a double-click there. Task-number: QTBUG-8138 Reviewed-by: Shane Kearns --- src/gui/kernel/qapplication_s60.cpp | 12 +++++++++++- src/gui/kernel/qt_s60_p.h | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index f4c7304..387762f 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -364,6 +364,7 @@ void QSymbianControl::ConstructL(bool isWindowOwning, bool desktop) SetFocusing(true); m_longTapDetector = QLongTapTimer::NewL(this); + m_doubleClickTimer.invalidate(); DrawableWindow()->SetPointerGrab(ETrue); } @@ -642,6 +643,7 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod QPoint pos = QCursor::pos(); TPointerEvent fakeEvent; + fakeEvent.iModifiers = keyEvent.iModifiers; TInt x = pos.x(); TInt y = pos.y(); if (type == EEventKeyUp) { @@ -668,6 +670,8 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod } } else if (type == EEventKey) { + if (keyCode != Qt::Key_Select) + m_doubleClickTimer.invalidate(); switch (keyCode) { case Qt::Key_Left: S60->virtualMousePressedKeys |= QS60Data::Left; @@ -700,6 +704,13 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod } else { S60->virtualMousePressedKeys |= QS60Data::Select; fakeEvent.iType = TPointerEvent::EButton1Down; + if (m_doubleClickTimer.isValid() + && !m_doubleClickTimer.hasExpired(QApplication::doubleClickInterval())) { + fakeEvent.iModifiers |= EModifierDoubleClick; + m_doubleClickTimer.invalidate(); + } else { + m_doubleClickTimer.start(); + } } break; } @@ -715,7 +726,6 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod y = S60->screenHeightInPixels - 1; TPoint epos(x, y); TPoint cpos = epos - PositionRelativeToScreen(); - fakeEvent.iModifiers = keyEvent.iModifiers; fakeEvent.iPosition = cpos; fakeEvent.iParentPosition = epos; HandlePointerEvent(fakeEvent); diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index 58da302..1af8eeb 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -62,6 +62,7 @@ #include "QtGui/qevent.h" #include "qpointer.h" #include "qapplication.h" +#include "qelapsedtimer.h" #include #include #include @@ -222,6 +223,7 @@ private: private: QWidget *qwidget; QLongTapTimer* m_longTapDetector; + QElapsedTimer m_doubleClickTimer; bool m_ignoreFocusChanged : 1; bool m_symbianPopupIsOpen : 1; -- cgit v0.12 From f699d9af27c8450a36266d8542c54d53a6d57f15 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Wed, 12 May 2010 15:55:27 +0200 Subject: Add 'runonphone' target for symbian / makefile This new target simply takes a sis file and runs the app on phone. Reviewed-by: Shane Kearns --- mkspecs/common/symbian/symbian-makefile.conf | 1 + mkspecs/features/symbian/run_on_phone.prf | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 mkspecs/features/symbian/run_on_phone.prf diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf index 2397c96..66b3d7f 100644 --- a/mkspecs/common/symbian/symbian-makefile.conf +++ b/mkspecs/common/symbian/symbian-makefile.conf @@ -26,6 +26,7 @@ include(../../common/unix.conf) QMAKE_PREFIX_SHLIB = QMAKE_EXTENSION_SHLIB = dll CONFIG *= no_plugin_name_prefix +CONFIG += run_on_phone QMAKE_EXTENSION_PLUGIN = dll QMAKE_PREFIX_STATICLIB = QMAKE_EXTENSION_STATICLIB = lib diff --git a/mkspecs/features/symbian/run_on_phone.prf b/mkspecs/features/symbian/run_on_phone.prf new file mode 100644 index 0000000..c4c7baf --- /dev/null +++ b/mkspecs/features/symbian/run_on_phone.prf @@ -0,0 +1,9 @@ +# make sure we have a sis file and then call 'runonphone' to execute it on the phone + +contains(TEMPLATE, app) { + run_target.target = runonphone + run_target.depends = sis + run_target.commands = runonphone $(QT_RUN_ON_PHONE_OPTIONS) --sis "$${sis_destdir}$${TARGET}.sis" "$${TARGET}.exe" $(QT_RUN_OPTIONS) + + QMAKE_EXTRA_TARGETS += run_target +} -- cgit v0.12 From 25107b9b08dbb97363181eeb5768e7769cbb98c7 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Wed, 12 May 2010 17:26:03 +0100 Subject: Fix spurious mouse click when dismissing a native menu Native menus are dismissed by the key press event. The Qt application then receives the key up event, as it now has keyboard focus. The virtual mouse implementation now filters out select key press/release which don't match the expected mouse button state. Task-number: QTBUG-9860 Reviewed-by: Alessandro Portale --- src/gui/kernel/qapplication_s60.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 387762f..ea5c14c 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -643,11 +643,13 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod QPoint pos = QCursor::pos(); TPointerEvent fakeEvent; + fakeEvent.iType = (TPointerEvent::TType)(-1); fakeEvent.iModifiers = keyEvent.iModifiers; TInt x = pos.x(); TInt y = pos.y(); if (type == EEventKeyUp) { - if (keyCode == Qt::Key_Select) + if (keyCode == Qt::Key_Select && + (S60->virtualMousePressedKeys & QS60Data::Select)) fakeEvent.iType = TPointerEvent::EButton1Up; S60->virtualMouseAccel = 1; S60->virtualMouseLastKey = 0; @@ -698,8 +700,7 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod // example for drag'n'drop), Symbian starts producing spurious up and // down messages for some keys. Therefore, make sure we have a clean slate // of pressed keys before starting a new button press. - if (S60->virtualMousePressedKeys != 0) { - S60->virtualMousePressedKeys |= QS60Data::Select; + if (S60->virtualMousePressedKeys & QS60Data::Select) { return EKeyWasConsumed; } else { S60->virtualMousePressedKeys |= QS60Data::Select; @@ -728,7 +729,8 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod TPoint cpos = epos - PositionRelativeToScreen(); fakeEvent.iPosition = cpos; fakeEvent.iParentPosition = epos; - HandlePointerEvent(fakeEvent); + if(fakeEvent.iType != -1) + HandlePointerEvent(fakeEvent); return EKeyWasConsumed; } else { -- cgit v0.12 From d64bd955c26af3b204df567245429ddd3f32bcb8 Mon Sep 17 00:00:00 2001 From: Iain Date: Thu, 13 May 2010 23:08:12 +0200 Subject: Update Symbian DEF files for WINSCW and EABI Reviewed-by: TrustMe --- src/s60installs/bwins/QtDeclarativeu.def | 38 +++++++++++++++++++++++--------- src/s60installs/bwins/QtGuiu.def | 3 +++ src/s60installs/bwins/QtOpenVGu.def | 3 ++- src/s60installs/eabi/QtDeclarativeu.def | 20 ++++++++--------- src/s60installs/eabi/QtGuiu.def | 3 +++ src/s60installs/eabi/QtOpenVGu.def | 2 +- 6 files changed, 47 insertions(+), 22 deletions(-) diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def index 18372a4..f43eadf 100644 --- a/src/s60installs/bwins/QtDeclarativeu.def +++ b/src/s60installs/bwins/QtDeclarativeu.def @@ -180,11 +180,11 @@ EXPORTS ??0QDeclarativeView@@QAE@ABVQUrl@@PAVQWidget@@@Z @ 179 NONAME ; QDeclarativeView::QDeclarativeView(class QUrl const &, class QWidget *) ??0QDeclarativeView@@QAE@PAVQWidget@@@Z @ 180 NONAME ; QDeclarativeView::QDeclarativeView(class QWidget *) ??0QDeclarativeViewSection@@QAE@PAVQObject@@@Z @ 181 NONAME ; QDeclarativeViewSection::QDeclarativeViewSection(class QObject *) - ??0QDeclarativeVisualDataModel@@QAE@PAVQDeclarativeContext@@@Z @ 182 NONAME ; QDeclarativeVisualDataModel::QDeclarativeVisualDataModel(class QDeclarativeContext *) + ??0QDeclarativeVisualDataModel@@QAE@PAVQDeclarativeContext@@@Z @ 182 NONAME ABSENT ; QDeclarativeVisualDataModel::QDeclarativeVisualDataModel(class QDeclarativeContext *) ??0QDeclarativeVisualDataModel@@QAE@XZ @ 183 NONAME ; QDeclarativeVisualDataModel::QDeclarativeVisualDataModel(void) - ??0QDeclarativeVisualItemModel@@QAE@XZ @ 184 NONAME ; QDeclarativeVisualItemModel::QDeclarativeVisualItemModel(void) + ??0QDeclarativeVisualItemModel@@QAE@XZ @ 184 NONAME ABSENT ; QDeclarativeVisualItemModel::QDeclarativeVisualItemModel(void) ??0QDeclarativeVisualModel@@IAE@AAVQObjectPrivate@@PAVQObject@@@Z @ 185 NONAME ; QDeclarativeVisualModel::QDeclarativeVisualModel(class QObjectPrivate &, class QObject *) - ??0QDeclarativeVisualModel@@QAE@XZ @ 186 NONAME ; QDeclarativeVisualModel::QDeclarativeVisualModel(void) + ??0QDeclarativeVisualModel@@QAE@XZ @ 186 NONAME ABSENT ; QDeclarativeVisualModel::QDeclarativeVisualModel(void) ??0QDeclarativeWebPage@@QAE@PAVQDeclarativeWebView@@@Z @ 187 NONAME ABSENT ; QDeclarativeWebPage::QDeclarativeWebPage(class QDeclarativeWebView *) ??0QDeclarativeWebView@@QAE@PAVQDeclarativeItem@@@Z @ 188 NONAME ABSENT ; QDeclarativeWebView::QDeclarativeWebView(class QDeclarativeItem *) ??0QDeclarativeXmlListModel@@QAE@PAVQObject@@@Z @ 189 NONAME ; QDeclarativeXmlListModel::QDeclarativeXmlListModel(class QObject *) @@ -1127,10 +1127,10 @@ EXPORTS ?flags@QMetaObjectBuilder@@QBE?AV?$QFlags@W4MetaObjectFlag@QMetaObjectBuilder@@@@XZ @ 1126 NONAME ; class QFlags QMetaObjectBuilder::flags(void) const ?flickDeceleration@QDeclarativeFlickable@@QBEMXZ @ 1127 NONAME ; float QDeclarativeFlickable::flickDeceleration(void) const ?flickDecelerationChanged@QDeclarativeFlickable@@IAEXXZ @ 1128 NONAME ; void QDeclarativeFlickable::flickDecelerationChanged(void) - ?flickDirection@QDeclarativeFlickable@@QBE?AW4FlickDirection@1@XZ @ 1129 NONAME ; enum QDeclarativeFlickable::FlickDirection QDeclarativeFlickable::flickDirection(void) const - ?flickDirectionChanged@QDeclarativeFlickable@@IAEXXZ @ 1130 NONAME ; void QDeclarativeFlickable::flickDirectionChanged(void) - ?flickEnded@QDeclarativeFlickable@@IAEXXZ @ 1131 NONAME ; void QDeclarativeFlickable::flickEnded(void) - ?flickStarted@QDeclarativeFlickable@@IAEXXZ @ 1132 NONAME ; void QDeclarativeFlickable::flickStarted(void) + ?flickDirection@QDeclarativeFlickable@@QBE?AW4FlickDirection@1@XZ @ 1129 NONAME ABSENT ; enum QDeclarativeFlickable::FlickDirection QDeclarativeFlickable::flickDirection(void) const + ?flickDirectionChanged@QDeclarativeFlickable@@IAEXXZ @ 1130 NONAME ABSENT ; void QDeclarativeFlickable::flickDirectionChanged(void) + ?flickEnded@QDeclarativeFlickable@@IAEXXZ @ 1131 NONAME ABSENT ; void QDeclarativeFlickable::flickEnded(void) + ?flickStarted@QDeclarativeFlickable@@IAEXXZ @ 1132 NONAME ABSENT ; void QDeclarativeFlickable::flickStarted(void) ?flickableChildren@QDeclarativeFlickable@@QAE?AU?$QDeclarativeListProperty@VQDeclarativeItem@@@@XZ @ 1133 NONAME ABSENT ; struct QDeclarativeListProperty QDeclarativeFlickable::flickableChildren(void) ?flickableData@QDeclarativeFlickable@@QAE?AU?$QDeclarativeListProperty@VQObject@@@@XZ @ 1134 NONAME ABSENT ; struct QDeclarativeListProperty QDeclarativeFlickable::flickableData(void) ?flickingChanged@QDeclarativeFlickable@@IAEXXZ @ 1135 NONAME ; void QDeclarativeFlickable::flickingChanged(void) @@ -1746,9 +1746,9 @@ EXPORTS ?moveCurrentIndexUp@QDeclarativeGridView@@QAEXXZ @ 1745 NONAME ; void QDeclarativeGridView::moveCurrentIndexUp(void) ?moveCursor@QDeclarativeTextInput@@AAEXXZ @ 1746 NONAME ; void QDeclarativeTextInput::moveCursor(void) ?moveCursorDelegate@QDeclarativeTextEdit@@AAEXXZ @ 1747 NONAME ; void QDeclarativeTextEdit::moveCursorDelegate(void) - ?movementEnded@QDeclarativeFlickable@@IAEXXZ @ 1748 NONAME ; void QDeclarativeFlickable::movementEnded(void) + ?movementEnded@QDeclarativeFlickable@@IAEXXZ @ 1748 NONAME ABSENT ; void QDeclarativeFlickable::movementEnded(void) ?movementEnding@QDeclarativeFlickable@@IAEXXZ @ 1749 NONAME ; void QDeclarativeFlickable::movementEnding(void) - ?movementStarted@QDeclarativeFlickable@@IAEXXZ @ 1750 NONAME ; void QDeclarativeFlickable::movementStarted(void) + ?movementStarted@QDeclarativeFlickable@@IAEXXZ @ 1750 NONAME ABSENT ; void QDeclarativeFlickable::movementStarted(void) ?movementStarting@QDeclarativeFlickable@@IAEXXZ @ 1751 NONAME ; void QDeclarativeFlickable::movementStarting(void) ?movieRequestFinished@QDeclarativeAnimatedImage@@AAEXXZ @ 1752 NONAME ; void QDeclarativeAnimatedImage::movieRequestFinished(void) ?movieUpdate@QDeclarativeAnimatedImage@@AAEXXZ @ 1753 NONAME ; void QDeclarativeAnimatedImage::movieUpdate(void) @@ -2416,7 +2416,7 @@ EXPORTS ?setFillMode@QDeclarativeImage@@QAEXW4FillMode@1@@Z @ 2415 NONAME ; void QDeclarativeImage::setFillMode(enum QDeclarativeImage::FillMode) ?setFlags@QMetaObjectBuilder@@QAEXV?$QFlags@W4MetaObjectFlag@QMetaObjectBuilder@@@@@Z @ 2416 NONAME ; void QMetaObjectBuilder::setFlags(class QFlags) ?setFlickDeceleration@QDeclarativeFlickable@@QAEXM@Z @ 2417 NONAME ; void QDeclarativeFlickable::setFlickDeceleration(float) - ?setFlickDirection@QDeclarativeFlickable@@QAEXW4FlickDirection@1@@Z @ 2418 NONAME ; void QDeclarativeFlickable::setFlickDirection(enum QDeclarativeFlickable::FlickDirection) + ?setFlickDirection@QDeclarativeFlickable@@QAEXW4FlickDirection@1@@Z @ 2418 NONAME ABSENT ; void QDeclarativeFlickable::setFlickDirection(enum QDeclarativeFlickable::FlickDirection) ?setFlow@QDeclarativeFlow@@QAEXW4Flow@1@@Z @ 2419 NONAME ; void QDeclarativeFlow::setFlow(enum QDeclarativeFlow::Flow) ?setFlow@QDeclarativeGridView@@QAEXW4Flow@1@@Z @ 2420 NONAME ; void QDeclarativeGridView::setFlow(enum QDeclarativeGridView::Flow) ?setFocus@QDeclarativeItem@@QAEX_N@Z @ 2421 NONAME ; void QDeclarativeItem::setFocus(bool) @@ -3994,4 +3994,22 @@ EXPORTS ?top@QDeclarativeItemPrivate@@QBE?AVQDeclarativeAnchorLine@@XZ @ 3993 NONAME ; class QDeclarativeAnchorLine QDeclarativeItemPrivate::top(void) const ?transitions@QDeclarativeItemPrivate@@QAE?AV?$QDeclarativeListProperty@VQDeclarativeTransition@@@@XZ @ 3994 NONAME ; class QDeclarativeListProperty QDeclarativeItemPrivate::transitions(void) ?verticalCenter@QDeclarativeItemPrivate@@QBE?AVQDeclarativeAnchorLine@@XZ @ 3995 NONAME ; class QDeclarativeAnchorLine QDeclarativeItemPrivate::verticalCenter(void) const + ?flickDirection@QDeclarativeFlickable@@QBE?AW4FlickableDirection@1@XZ @ 3996 NONAME ; enum QDeclarativeFlickable::FlickableDirection QDeclarativeFlickable::flickDirection(void) const + ?flickingHorizontallyChanged@QDeclarativeFlickable@@IAEXXZ @ 3997 NONAME ; void QDeclarativeFlickable::flickingHorizontallyChanged(void) + ?flickableDirection@QDeclarativeFlickable@@QBE?AW4FlickableDirection@1@XZ @ 3998 NONAME ; enum QDeclarativeFlickable::FlickableDirection QDeclarativeFlickable::flickableDirection(void) const + ?setFlickableDirection@QDeclarativeFlickable@@QAEXW4FlickableDirection@1@@Z @ 3999 NONAME ; void QDeclarativeFlickable::setFlickableDirection(enum QDeclarativeFlickable::FlickableDirection) + ?isMovingVertically@QDeclarativeFlickable@@QBE_NXZ @ 4000 NONAME ; bool QDeclarativeFlickable::isMovingVertically(void) const + ?movingHorizontallyChanged@QDeclarativeFlickable@@IAEXXZ @ 4001 NONAME ; void QDeclarativeFlickable::movingHorizontallyChanged(void) + ?d_func@QDeclarativeView@@AAEPAVQDeclarativeViewPrivate@@XZ @ 4002 NONAME ; class QDeclarativeViewPrivate * QDeclarativeView::d_func(void) + ?d_func@QDeclarativeView@@ABEPBVQDeclarativeViewPrivate@@XZ @ 4003 NONAME ; class QDeclarativeViewPrivate const * QDeclarativeView::d_func(void) const + ??0QDeclarativeVisualDataModel@@QAE@PAVQDeclarativeContext@@PAVQObject@@@Z @ 4004 NONAME ; QDeclarativeVisualDataModel::QDeclarativeVisualDataModel(class QDeclarativeContext *, class QObject *) + ?movingVerticallyChanged@QDeclarativeFlickable@@IAEXXZ @ 4005 NONAME ; void QDeclarativeFlickable::movingVerticallyChanged(void) + ?isFlickingHorizontally@QDeclarativeFlickable@@QBE_NXZ @ 4006 NONAME ; bool QDeclarativeFlickable::isFlickingHorizontally(void) const + ??0QDeclarativeVisualItemModel@@QAE@PAVQObject@@@Z @ 4007 NONAME ; QDeclarativeVisualItemModel::QDeclarativeVisualItemModel(class QObject *) + ?flickingVerticallyChanged@QDeclarativeFlickable@@IAEXXZ @ 4008 NONAME ; void QDeclarativeFlickable::flickingVerticallyChanged(void) + ?isMovingHorizontally@QDeclarativeFlickable@@QBE_NXZ @ 4009 NONAME ; bool QDeclarativeFlickable::isMovingHorizontally(void) const + ??0QDeclarativeVisualModel@@QAE@PAVQObject@@@Z @ 4010 NONAME ; QDeclarativeVisualModel::QDeclarativeVisualModel(class QObject *) + ?setFlickDirection@QDeclarativeFlickable@@QAEXW4FlickableDirection@1@@Z @ 4011 NONAME ; void QDeclarativeFlickable::setFlickDirection(enum QDeclarativeFlickable::FlickableDirection) + ?flickableDirectionChanged@QDeclarativeFlickable@@IAEXXZ @ 4012 NONAME ; void QDeclarativeFlickable::flickableDirectionChanged(void) + ?isFlickingVertically@QDeclarativeFlickable@@QBE_NXZ @ 4013 NONAME ; bool QDeclarativeFlickable::isFlickingVertically(void) const diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index e574c31..73dafee 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -12800,4 +12800,7 @@ EXPORTS ?iconName@QIconEngineV2@@QAE?AVQString@@XZ @ 12799 NONAME ; class QString QIconEngineV2::iconName(void) ?updateRectF@QGraphicsViewPrivate@@QAE_NABVQRectF@@@Z @ 12800 NONAME ; bool QGraphicsViewPrivate::updateRectF(class QRectF const &) ?updateRegion@QGraphicsViewPrivate@@QAE_NABVQRectF@@ABVQTransform@@@Z @ 12801 NONAME ; bool QGraphicsViewPrivate::updateRegion(class QRectF const &, class QTransform const &) + ?totalUsed@QPixmapCache@@SAHXZ @ 12802 NONAME ; int QPixmapCache::totalUsed(void) + ?allPixmaps@QPixmapCache@@SA?AV?$QList@U?$QPair@VQString@@VQPixmap@@@@@@XZ @ 12803 NONAME ; class QList > QPixmapCache::allPixmaps(void) + ?flushDetachedPixmaps@QPixmapCache@@SAXXZ @ 12804 NONAME ; void QPixmapCache::flushDetachedPixmaps(void) diff --git a/src/s60installs/bwins/QtOpenVGu.def b/src/s60installs/bwins/QtOpenVGu.def index 28b9e62..f398055 100644 --- a/src/s60installs/bwins/QtOpenVGu.def +++ b/src/s60installs/bwins/QtOpenVGu.def @@ -166,9 +166,10 @@ EXPORTS ?hibernate@QVGPixmapData@@UAEXXZ @ 165 NONAME ; void QVGPixmapData::hibernate(void) ?drawStaticTextItem@QVGPaintEngine@@UAEXPAVQStaticTextItem@@@Z @ 166 NONAME ; void QVGPaintEngine::drawStaticTextItem(class QStaticTextItem *) ?drawPixmapFragments@QVGPaintEngine@@UAEXPBVPixmapFragment@QPainter@@HABVQPixmap@@V?$QFlags@W4PixmapFragmentHint@QPainter@@@@@Z @ 167 NONAME ; void QVGPaintEngine::drawPixmapFragments(class QPainter::PixmapFragment const *, int, class QPixmap const &, class QFlags) - ?drawCachedGlyphs@QVGPaintEngine@@QAE_NHPBIABVQFont@@PAVQFontEngine@@ABVQPointF@@@Z @ 168 NONAME ; bool QVGPaintEngine::drawCachedGlyphs(int, unsigned int const *, class QFont const &, class QFontEngine *, class QPointF const &) + ?drawCachedGlyphs@QVGPaintEngine@@QAE_NHPBIABVQFont@@PAVQFontEngine@@ABVQPointF@@@Z @ 168 NONAME ABSENT ; bool QVGPaintEngine::drawCachedGlyphs(int, unsigned int const *, class QFont const &, class QFontEngine *, class QPointF const &) ?supportsStaticContents@QVGEGLWindowSurfaceDirect@@UBE_NXZ @ 169 NONAME ; bool QVGEGLWindowSurfaceDirect::supportsStaticContents(void) const ?scroll@QVGEGLWindowSurfacePrivate@@UAE_NPAVQWidget@@ABVQRegion@@HH@Z @ 170 NONAME ; bool QVGEGLWindowSurfacePrivate::scroll(class QWidget *, class QRegion const &, int, int) ?scroll@QVGEGLWindowSurfaceDirect@@UAE_NPAVQWidget@@ABVQRegion@@HH@Z @ 171 NONAME ; bool QVGEGLWindowSurfaceDirect::scroll(class QWidget *, class QRegion const &, int, int) ?supportsStaticContents@QVGEGLWindowSurfacePrivate@@UBE_NXZ @ 172 NONAME ; bool QVGEGLWindowSurfacePrivate::supportsStaticContents(void) const + ?drawCachedGlyphs@QVGPaintEngine@@QAE_NHPBIABVQFont@@PAVQFontEngine@@ABVQPointF@@PBUQFixedPoint@@@Z @ 173 NONAME ; bool QVGPaintEngine::drawCachedGlyphs(int, unsigned int const *, class QFont const &, class QFontEngine *, class QPointF const &, struct QFixedPoint const *) diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def index e1d8e96..34f8b9e 100644 --- a/src/s60installs/eabi/QtDeclarativeu.def +++ b/src/s60installs/eabi/QtDeclarativeu.def @@ -1008,7 +1008,7 @@ EXPORTS _ZN21QDeclarativeDomObjectD1Ev @ 1007 NONAME _ZN21QDeclarativeDomObjectD2Ev @ 1008 NONAME _ZN21QDeclarativeDomObjectaSERKS_ @ 1009 NONAME - _ZN21QDeclarativeFlickable10flickEndedEv @ 1010 NONAME + _ZN21QDeclarativeFlickable10flickEndedEv @ 1010 NONAME ABSENT _ZN21QDeclarativeFlickable10timerEventEP11QTimerEvent @ 1011 NONAME _ZN21QDeclarativeFlickable10wheelEventEP24QGraphicsSceneWheelEvent @ 1012 NONAME _ZN21QDeclarativeFlickable11cancelFlickEv @ 1013 NONAME @@ -1018,10 +1018,10 @@ EXPORTS _ZN21QDeclarativeFlickable11setContentXEf @ 1017 NONAME _ZN21QDeclarativeFlickable11setContentYEf @ 1018 NONAME _ZN21QDeclarativeFlickable11visibleAreaEv @ 1019 NONAME - _ZN21QDeclarativeFlickable12flickStartedEv @ 1020 NONAME + _ZN21QDeclarativeFlickable12flickStartedEv @ 1020 NONAME ABSENT _ZN21QDeclarativeFlickable12setOverShootEb @ 1021 NONAME _ZN21QDeclarativeFlickable13flickableDataEv @ 1022 NONAME - _ZN21QDeclarativeFlickable13movementEndedEv @ 1023 NONAME + _ZN21QDeclarativeFlickable13movementEndedEv @ 1023 NONAME ABSENT _ZN21QDeclarativeFlickable13movingChangedEv @ 1024 NONAME _ZN21QDeclarativeFlickable13setPressDelayEi @ 1025 NONAME _ZN21QDeclarativeFlickable13viewportMovedEv @ 1026 NONAME @@ -1034,7 +1034,7 @@ EXPORTS _ZN21QDeclarativeFlickable15flickingChangedEv @ 1033 NONAME _ZN21QDeclarativeFlickable15geometryChangedERK6QRectFS2_ @ 1034 NONAME _ZN21QDeclarativeFlickable15mousePressEventEP24QGraphicsSceneMouseEvent @ 1035 NONAME - _ZN21QDeclarativeFlickable15movementStartedEv @ 1036 NONAME + _ZN21QDeclarativeFlickable15movementStartedEv @ 1036 NONAME ABSENT _ZN21QDeclarativeFlickable15setContentWidthEf @ 1037 NONAME _ZN21QDeclarativeFlickable16movementStartingEv @ 1038 NONAME _ZN21QDeclarativeFlickable16overShootChangedEv @ 1039 NONAME @@ -1044,14 +1044,14 @@ EXPORTS _ZN21QDeclarativeFlickable17flickableChildrenEv @ 1043 NONAME _ZN21QDeclarativeFlickable17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 1044 NONAME _ZN21QDeclarativeFlickable17pressDelayChangedEv @ 1045 NONAME - _ZN21QDeclarativeFlickable17setFlickDirectionENS_14FlickDirectionE @ 1046 NONAME + _ZN21QDeclarativeFlickable17setFlickDirectionENS_14FlickDirectionE @ 1046 NONAME ABSENT _ZN21QDeclarativeFlickable18interactiveChangedEv @ 1047 NONAME _ZN21QDeclarativeFlickable19contentWidthChangedEv @ 1048 NONAME _ZN21QDeclarativeFlickable19getStaticMetaObjectEv @ 1049 NONAME _ZN21QDeclarativeFlickable19isAtBoundaryChangedEv @ 1050 NONAME _ZN21QDeclarativeFlickable20contentHeightChangedEv @ 1051 NONAME _ZN21QDeclarativeFlickable20setFlickDecelerationEf @ 1052 NONAME - _ZN21QDeclarativeFlickable21flickDirectionChangedEv @ 1053 NONAME + _ZN21QDeclarativeFlickable21flickDirectionChangedEv @ 1053 NONAME ABSENT _ZN21QDeclarativeFlickable23setMaximumFlickVelocityEf @ 1054 NONAME _ZN21QDeclarativeFlickable23verticalVelocityChangedEv @ 1055 NONAME _ZN21QDeclarativeFlickable24flickDecelerationChangedEv @ 1056 NONAME @@ -1941,9 +1941,9 @@ EXPORTS _ZN27QDeclarativeVisualDataModel7setPartERK7QString @ 1940 NONAME _ZN27QDeclarativeVisualDataModel8evaluateEiRK7QStringP7QObject @ 1941 NONAME _ZN27QDeclarativeVisualDataModel8setModelERK8QVariant @ 1942 NONAME - _ZN27QDeclarativeVisualDataModelC1EP19QDeclarativeContext @ 1943 NONAME + _ZN27QDeclarativeVisualDataModelC1EP19QDeclarativeContext @ 1943 NONAME ABSENT _ZN27QDeclarativeVisualDataModelC1Ev @ 1944 NONAME - _ZN27QDeclarativeVisualDataModelC2EP19QDeclarativeContext @ 1945 NONAME + _ZN27QDeclarativeVisualDataModelC2EP19QDeclarativeContext @ 1945 NONAME ABSENT _ZN27QDeclarativeVisualDataModelC2Ev @ 1946 NONAME _ZN27QDeclarativeVisualDataModelD0Ev @ 1947 NONAME _ZN27QDeclarativeVisualDataModelD1Ev @ 1948 NONAME @@ -1960,8 +1960,8 @@ EXPORTS _ZN27QDeclarativeVisualItemModel7releaseEP16QDeclarativeItem @ 1959 NONAME _ZN27QDeclarativeVisualItemModel8childrenEv @ 1960 NONAME _ZN27QDeclarativeVisualItemModel8evaluateEiRK7QStringP7QObject @ 1961 NONAME - _ZN27QDeclarativeVisualItemModelC1Ev @ 1962 NONAME - _ZN27QDeclarativeVisualItemModelC2Ev @ 1963 NONAME + _ZN27QDeclarativeVisualItemModelC1Ev @ 1962 NONAME ABSENT + _ZN27QDeclarativeVisualItemModelC2Ev @ 1963 NONAME ABSENT _ZN28QDeclarativeCustomParserNodeC1ERKS_ @ 1964 NONAME _ZN28QDeclarativeCustomParserNodeC1Ev @ 1965 NONAME _ZN28QDeclarativeCustomParserNodeC2ERKS_ @ 1966 NONAME diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index 8987470..4f3200a 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -11999,4 +11999,7 @@ EXPORTS _ZNK14QWindowSurface23hasPartialUpdateSupportEv @ 11998 NONAME _ZNK5QIcon4nameEv @ 11999 NONAME _ZN20QGraphicsViewPrivate12updateRegionERK6QRectFRK10QTransform @ 12000 NONAME + _ZN12QPixmapCache10allPixmapsEv @ 12001 NONAME + _ZN12QPixmapCache20flushDetachedPixmapsEv @ 12002 NONAME + _ZN12QPixmapCache9totalUsedEv @ 12003 NONAME diff --git a/src/s60installs/eabi/QtOpenVGu.def b/src/s60installs/eabi/QtOpenVGu.def index 5db9dce..04f7876 100644 --- a/src/s60installs/eabi/QtOpenVGu.def +++ b/src/s60installs/eabi/QtOpenVGu.def @@ -196,7 +196,7 @@ EXPORTS _ZN13QVGPixmapData19detachImageFromPoolEv @ 195 NONAME _ZTI12QVGImagePool @ 196 NONAME _ZTV12QVGImagePool @ 197 NONAME - _ZN14QVGPaintEngine16drawCachedGlyphsEiPKjRK5QFontP11QFontEngineRK7QPointF @ 198 NONAME + _ZN14QVGPaintEngine16drawCachedGlyphsEiPKjRK5QFontP11QFontEngineRK7QPointF @ 198 NONAME ABSENT _ZN14QVGPaintEngine18drawStaticTextItemEP15QStaticTextItem @ 199 NONAME _ZN14QVGPaintEngine19drawPixmapFragmentsEPKN8QPainter14PixmapFragmentEiRK7QPixmap6QFlagsINS0_18PixmapFragmentHintEE @ 200 NONAME _ZN25QVGEGLWindowSurfaceDirect6scrollEP7QWidgetRK7QRegionii @ 201 NONAME -- cgit v0.12 From cd719dee504dc70d53a6b24e746caf9e69d83ddb Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 14 May 2010 11:39:39 +0300 Subject: Support device aliases in EPOCDEVICE Qmake now understands use of device aliases in EPOCDEVICE environment variable. Task-number: QTBUG-9108 Reviewed-by: Janne Anttila --- tools/shared/symbian/epocroot.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/shared/symbian/epocroot.cpp b/tools/shared/symbian/epocroot.cpp index 071477d..064e056 100644 --- a/tools/shared/symbian/epocroot.cpp +++ b/tools/shared/symbian/epocroot.cpp @@ -153,10 +153,13 @@ QString epocRoot() while (!(xml.isEndElement() && xml.name() == "devices") && !xml.atEnd()) { xml.readNext(); if (xml.isStartElement() && xml.name() == "device") { - const bool isDefault = xml.attributes().value("default") == "yes"; + const bool isDefault = xml.attributes().value("default") == "yes"; const QString id = xml.attributes().value("id").toString(); - const QString name = xml.attributes().value("name").toString(); - const bool epocDeviceMatch = (id + ":" + name) == epocDeviceValue; + const QString name = xml.attributes().value("name").toString(); + const QString alias = xml.attributes().value("alias").toString(); + bool epocDeviceMatch = (id + ":" + name) == epocDeviceValue; + if (!alias.isEmpty()) + epocDeviceMatch |= alias == epocDeviceValue; epocDeviceFound |= epocDeviceMatch; if((epocDeviceValue.isEmpty() && isDefault) || epocDeviceMatch) { -- cgit v0.12 From 61e66e8ce4a7c1412939efb47663078a2184ffb2 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 14 May 2010 15:02:51 +0300 Subject: Fix requires keyword handling in qmake in Symbian Now qmake doesn't generate bld.inf etc. files for projects that fail requires check. An error message is also printed. Task-number: QTBUG-10698 Reviewed-by: Iain --- qmake/generators/symbian/symmake.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index faafb20..1dee4ac 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -175,6 +175,12 @@ void SymbianMakefileGenerator::writeHeader(QTextStream &t) bool SymbianMakefileGenerator::writeMakefile(QTextStream &t) { + if(!project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) { + fprintf(stderr, "Project files not generated because all requirements are not met:\n\t%s\n", + qPrintable(var("QMAKE_FAILED_REQUIREMENTS"))); + return false; + } + writeHeader(t); QString numberOfIcons; -- cgit v0.12 From 0f13a088538f42faa3634c6541d9cf461764ab25 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 14 May 2010 15:32:46 +0300 Subject: Omit building declarative/painting benchmark if no OpenGL configured Task-number: QTBUG-10665 Reviewed-by: Janne Anttila --- tests/benchmarks/declarative/declarative.pro | 5 ++++- tests/benchmarks/declarative/painting/painting.pro | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/benchmarks/declarative/declarative.pro b/tests/benchmarks/declarative/declarative.pro index a7d426c..54b2a45 100644 --- a/tests/benchmarks/declarative/declarative.pro +++ b/tests/benchmarks/declarative/declarative.pro @@ -2,10 +2,13 @@ TEMPLATE = subdirs SUBDIRS += \ binding \ creation \ - painting \ pointers \ qdeclarativecomponent \ qdeclarativeimage \ qdeclarativemetaproperty \ script \ qmltime + +contains(QT_CONFIG, opengl): SUBDIRS += painting + + diff --git a/tests/benchmarks/declarative/painting/painting.pro b/tests/benchmarks/declarative/painting/painting.pro index a228ea7..69c0006 100644 --- a/tests/benchmarks/declarative/painting/painting.pro +++ b/tests/benchmarks/declarative/painting/painting.pro @@ -2,6 +2,8 @@ # Automatically generated by qmake (2.01a) fr 29. jan 13:57:52 2010 ###################################################################### +requires(contains(QT_CONFIG,opengl)) + TEMPLATE = app TARGET = DEPENDPATH += . -- cgit v0.12 From 60c715cd3a9eaa7f02dd93a083f51997b5303597 Mon Sep 17 00:00:00 2001 From: Iain Date: Fri, 14 May 2010 13:52:23 +0200 Subject: Re-enable suppression of --export_all_vtbl for static libraries Revert fix for QTBUG-10680 - the reasoning in the original fix was wrong. Internal typeinfo and vtable exports should be suppressed even for static libraries, as these will leak through into the final DLL when it links against that static lib (my testing at the time must have been faulty, as I thought I had found that they didn't). This change may cause problems if anyone has already frozen (internal) TI and VT symbols into their DEF files through linking with a static library. However, it should be perfectly safe to mark those symbols as ABSENT in the DEF file. An alternate solution must be found for QTBUG-10680. Task-number: QTBUG-10678 Reviewed-by: Alessandro Portale --- mkspecs/features/static.prf | 5 ----- 1 file changed, 5 deletions(-) diff --git a/mkspecs/features/static.prf b/mkspecs/features/static.prf index ef3af07..288852d 100644 --- a/mkspecs/features/static.prf +++ b/mkspecs/features/static.prf @@ -11,9 +11,4 @@ mac { QMAKE_LFLAGS += $$QMAKE_LFLAGS_STATIC_LIB } -symbian { - # we don't care about exports from static libraries, as they don't end up in DEF files - MMP_RULES -= $$MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA -} - !static_and_shared:fix_output_dirs:fixExclusiveOutputDirs(static, shared) -- cgit v0.12 From f752b927c6f7115646da7e86209e60e7c17e7d95 Mon Sep 17 00:00:00 2001 From: Iain Date: Fri, 14 May 2010 14:32:04 +0200 Subject: Shadow building on Symbian fixes: part 1 - files to right place First in a set of fixes for shadow building on Symbian - make sure we generate all the files into the shadow directory, *not* the source directory Task-number: QTBUG-10432 Reviewed-by: Miikka Heikkinen --- qmake/generators/symbian/initprojectdeploy_symbian.cpp | 9 +++++---- qmake/generators/symbian/symbiancommon.cpp | 11 +++++------ qmake/generators/symbian/symmake.cpp | 10 ++++------ 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp index 6407412..4552185 100644 --- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp +++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp @@ -91,12 +91,13 @@ static void createPluginStub(const QFileInfo& info, QStringList& generatedDirs, QStringList& generatedFiles) { - QDir().mkpath(QLatin1String(PLUGIN_STUB_DIR)); - if (!generatedDirs.contains(PLUGIN_STUB_DIR)) - generatedDirs << PLUGIN_STUB_DIR; + QString pluginStubDir = Option::output_dir + QLatin1Char('/') + QLatin1String(PLUGIN_STUB_DIR); + QDir().mkpath(pluginStubDir); + if (!generatedDirs.contains(pluginStubDir)) + generatedDirs << pluginStubDir; // Plugin stubs must have different name from the actual plugins, because // the toolchain for creating ROM images cannot handle non-binary .dll files properly. - QFile stubFile(QLatin1String(PLUGIN_STUB_DIR "/") + info.completeBaseName() + "." SUFFIX_QTPLUGIN); + QFile stubFile(pluginStubDir + QLatin1Char('/') + info.completeBaseName() + QLatin1Char('.') + QLatin1String(SUFFIX_QTPLUGIN)); if (stubFile.open(QIODevice::WriteOnly)) { if (!generatedFiles.contains(stubFile.fileName())) generatedFiles << stubFile.fileName(); diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp index b730d9e..adbd009 100644 --- a/qmake/generators/symbian/symbiancommon.cpp +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -150,9 +150,8 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB pkgTarget = project->first("TARGET"); pkgTarget = generator->unescapeFilePath(pkgTarget); pkgTarget = removePathSeparators(pkgTarget); - QString pkgFilename = QString("%1_template.%2").arg(pkgTarget).arg("pkg"); - if (!Option::output_dir.isEmpty()) - pkgFilename = Option::output_dir + '/' + pkgFilename; + QString pkgFilename = Option::output_dir + QLatin1Char('/') + QString("%1_template.%2") + .arg(pkgTarget).arg("pkg"); QFile pkgFile(pkgFilename); if (!pkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) { @@ -173,9 +172,9 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB QString dateStr = QDateTime::currentDateTime().toString(Qt::ISODate); // Header info - QString wrapperPkgFilename = QString("%1_installer.%2") - .arg(pkgTarget) - .arg("pkg"); + QString wrapperPkgFilename = Option::output_dir + QLatin1Char('/') + QString("%1_installer.%2") + .arg(pkgTarget).arg("pkg"); + QString headerComment = "; %1 generated by qmake at %2\n" "; This file is generated by qmake and should not be modified by the user\n" ";\n\n"; diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index 1dee4ac..1006e39 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -214,7 +214,7 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t) // Generate empty wrapper makefile here, because wrapper makefile must exist before writeMkFile, // but all required data is not yet available. bool isPrimaryMakefile = true; - QString wrapperFileName("Makefile"); + QString wrapperFileName = Option::output_dir + QLatin1Char('/') + QLatin1String("Makefile"); QString outputFileName = fileInfo(Option::output.fileName()).fileName(); if (outputFileName != BLD_INF_FILENAME) { wrapperFileName.append(".").append(outputFileName.startsWith(BLD_INF_FILENAME) @@ -246,10 +246,8 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t) shortProFilename.replace(0, shortProFilename.lastIndexOf("/") + 1, QString("")); shortProFilename.replace(Option::pro_ext, QString("")); - QString mmpFilename = shortProFilename; - mmpFilename.append("_"); - mmpFilename.append(uid3); - mmpFilename.append(Option::mmp_ext); + QString mmpFilename = Option::output_dir + QLatin1Char('/') + shortProFilename + QLatin1Char('_') + + uid3 + Option::mmp_ext; writeMmpFile(mmpFilename, symbianLangCodes); if (targetType == TypeExe) { @@ -270,7 +268,7 @@ void SymbianMakefileGenerator::writeCustomDefFile() { if (targetType == TypePlugin && !project->isActiveConfig("stdbinary")) { // Create custom def file for plugin - QFile ft(QLatin1String(PLUGIN_COMMON_DEF_FILE_ACTUAL)); + QFile ft(Option::output_dir + QLatin1Char('/') + QLatin1String(PLUGIN_COMMON_DEF_FILE_ACTUAL)); if (ft.open(QIODevice::WriteOnly)) { generatedFiles << ft.fileName(); -- cgit v0.12 From 217cd535974720ea082f900d9adeb06cca2c530d Mon Sep 17 00:00:00 2001 From: Iain Date: Fri, 14 May 2010 14:46:52 +0200 Subject: Shadow building on Symbian fixes: part 2 - populate bin dir correctly Second in a set of fixes for shadow building on Symbian - create links in the shadow bin dir to the Symbian specific scripts we've added to the bin directory Task-number: QTBUG-10432 Reviewed-by: Alessandro Portale --- tools/configure/configureapp.cpp | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index e264426..beaf9bd 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -195,10 +195,37 @@ Configure::Configure( int& argc, char** argv ) } } + // make patch_capabilities and createpackage scripts for Symbian that can be used from the shadow build + QFile patch_capabilities(buildPath + "/bin/patch_capabilities"); + if(patch_capabilities.open(QFile::WriteOnly)) { + QTextStream stream(&patch_capabilities); + stream << "#!/usr/bin/perl -w" << endl + << "require \"" << sourcePath + "/bin/patch_capabilities\";" << endl; + } + QFile patch_capabilities_bat(buildPath + "/bin/patch_capabilities.bat"); + if(patch_capabilities_bat.open(QFile::WriteOnly)) { + QTextStream stream(&patch_capabilities_bat); + stream << "@echo off" << endl + << "call " << fixSeparators(sourcePath) << fixSeparators("/bin/patch_capabilities.bat %*") << endl; + patch_capabilities_bat.close(); + } + QFile createpackage(buildPath + "/bin/createpackage"); + if(createpackage.open(QFile::WriteOnly)) { + QTextStream stream(&createpackage); + stream << "#!/usr/bin/perl -w" << endl + << "require \"" << sourcePath + "/bin/createpackage\";" << endl; + } + QFile createpackage_bat(buildPath + "/bin/createpackage.bat"); + if(createpackage_bat.open(QFile::WriteOnly)) { + QTextStream stream(&createpackage_bat); + stream << "@echo off" << endl + << "call " << fixSeparators(sourcePath) << fixSeparators("/bin/createpackage.bat %*") << endl; + createpackage_bat.close(); + } + // For Windows CE and shadow builds we need to copy these to the // build directory. QFile::copy(sourcePath + "/bin/setcepaths.bat" , buildPath + "/bin/setcepaths.bat"); - //copy the mkspecs buildDir.mkpath("mkspecs"); if(!Environment::cpdir(sourcePath + "/mkspecs", buildPath + "/mkspecs")){ -- cgit v0.12 From f4ffb4b082a43ba267855fbe915da9f934f59043 Mon Sep 17 00:00:00 2001 From: Iain Date: Fri, 14 May 2010 15:06:27 +0200 Subject: Shadow building on Symbian fixes: part 3 - unchanged source tree Stop symbiancommon.obj being generated in the source directory even when shadow building (make has a rule to make .obj files, and quite happily makes the .obj in the source dir when it sees it as a dependency....) Also, correct spaces instead of tabs - this is a makefile! Task-number: QTBUG-10432 Reviewed-by: Miikka Heikkinen --- qmake/Makefile.win32 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32 index 956fa9c..b58757c 100644 --- a/qmake/Makefile.win32 +++ b/qmake/Makefile.win32 @@ -200,7 +200,7 @@ clean:: -del symmake.obj -del symmake_abld.obj -del symmake_sbsv2.obj - -del symbiancommon.obj + -del symbiancommon.obj -del initprojectdeploy_symbian.obj -del registry.obj -del epocroot.obj @@ -442,7 +442,7 @@ pbuilder_pbx.obj: $(SOURCE_PATH)/qmake/generators/mac/pbuilder_pbx.cpp makefiledeps.obj: $(SOURCE_PATH)/qmake/generators/makefiledeps.cpp $(CXX) $(CXXFLAGS) generators/makefiledeps.cpp -metamakefile.obj: $(SOURCE_PATH)/qmake/generators/metamakefile.cpp $(SOURCE_PATH)/qmake/generators/symbian/symbiancommon.obj +metamakefile.obj: $(SOURCE_PATH)/qmake/generators/metamakefile.cpp $(CXX) $(CXXFLAGS) generators/metamakefile.cpp xmloutput.obj: $(SOURCE_PATH)/qmake/generators/xmloutput.cpp -- cgit v0.12 From 18af9ef6074c33f7416629007ef5d24a39a55cbe Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 14 May 2010 16:37:35 +0300 Subject: Fix SRCDIR and DEPLOYMENT usage in declarative benchmarks These tests were either not compiling, were deploying incorrectly, or looking for data files from wrong place. Task-number: QTBUG-10661 Task-number: QTBUG-10666 Task-number: QTBUG-10667 Reviewed-by: Shane Kearns --- tests/benchmarks/declarative/binding/binding.pro | 12 ++++++------ tests/benchmarks/declarative/binding/tst_binding.cpp | 5 +++++ .../benchmarks/declarative/compilation/compilation.pro | 8 +++++++- .../declarative/compilation/tst_compilation.cpp | 5 ++--- tests/benchmarks/declarative/creation/creation.pro | 6 +++--- tests/benchmarks/declarative/creation/tst_creation.cpp | 8 ++++---- .../qdeclarativecomponent/qdeclarativecomponent.pro | 17 +++++++---------- .../qdeclarativecomponent/tst_qdeclarativecomponent.cpp | 4 ++++ .../qdeclarativeimage/tst_qdeclarativeimage.cpp | 3 +-- .../qdeclarativemetaproperty.pro | 11 +++++++++-- .../tst_qdeclarativemetaproperty.cpp | 4 ++++ tests/benchmarks/declarative/qmltime/qmltime.pro | 16 ++++------------ .../declarative/typeimports/tst_typeimports.cpp | 9 ++++----- .../benchmarks/declarative/typeimports/typeimports.pro | 8 ++++---- 14 files changed, 64 insertions(+), 52 deletions(-) diff --git a/tests/benchmarks/declarative/binding/binding.pro b/tests/benchmarks/declarative/binding/binding.pro index 5ceaf34..7fc0a23 100644 --- a/tests/benchmarks/declarative/binding/binding.pro +++ b/tests/benchmarks/declarative/binding/binding.pro @@ -7,12 +7,12 @@ macx:CONFIG -= app_bundle SOURCES += tst_binding.cpp testtypes.cpp HEADERS += testtypes.h -# Define SRCDIR equal to test's source directory -DEFINES += SRCDIR=\\\"$$PWD\\\" - -symbian* { - data.sources = data/* - data.path = data +symbian { + data.sources = data + data.path = . DEPLOYMENT = data +} else { + # Define SRCDIR equal to test's source directory + DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/benchmarks/declarative/binding/tst_binding.cpp b/tests/benchmarks/declarative/binding/tst_binding.cpp index dbddac3..6e3e146 100644 --- a/tests/benchmarks/declarative/binding/tst_binding.cpp +++ b/tests/benchmarks/declarative/binding/tst_binding.cpp @@ -48,6 +48,11 @@ //TESTED_FILES= +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_binding : public QObject { Q_OBJECT diff --git a/tests/benchmarks/declarative/compilation/compilation.pro b/tests/benchmarks/declarative/compilation/compilation.pro index 32f4aba..9277187 100644 --- a/tests/benchmarks/declarative/compilation/compilation.pro +++ b/tests/benchmarks/declarative/compilation/compilation.pro @@ -8,4 +8,10 @@ CONFIG += release SOURCES += tst_compilation.cpp -DEFINES += SRCDIR=\\\"$$PWD\\\" +symbian { + data.sources += data + data.path = . + DEPLOYMENT += data +} else { + DEFINES += SRCDIR=\\\"$$PWD\\\" +} diff --git a/tests/benchmarks/declarative/compilation/tst_compilation.cpp b/tests/benchmarks/declarative/compilation/tst_compilation.cpp index 5694d5b..0c6e917 100644 --- a/tests/benchmarks/declarative/compilation/tst_compilation.cpp +++ b/tests/benchmarks/declarative/compilation/tst_compilation.cpp @@ -46,8 +46,7 @@ #ifdef Q_OS_SYMBIAN // In Symbian OS test data is located in applications private dir -// Application private dir is default serach path for files, so SRCDIR can be set to empty -#define SRCDIR "" +#define SRCDIR "." #endif class tst_compilation : public QObject @@ -63,7 +62,7 @@ private: QDeclarativeEngine engine; }; -tst_compilation::tst_compilation() +tst_compilation::tst_compilation() { } diff --git a/tests/benchmarks/declarative/creation/creation.pro b/tests/benchmarks/declarative/creation/creation.pro index 3e0caf6..a5df676 100644 --- a/tests/benchmarks/declarative/creation/creation.pro +++ b/tests/benchmarks/declarative/creation/creation.pro @@ -7,9 +7,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_creation.cpp symbian* { - data.sources = data/* - data.path = data - DEPLOYMENT += addFiles + data.sources = data + data.path = . + DEPLOYMENT += data } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } \ No newline at end of file diff --git a/tests/benchmarks/declarative/creation/tst_creation.cpp b/tests/benchmarks/declarative/creation/tst_creation.cpp index 99324f4..a253671 100644 --- a/tests/benchmarks/declarative/creation/tst_creation.cpp +++ b/tests/benchmarks/declarative/creation/tst_creation.cpp @@ -53,7 +53,7 @@ #ifdef Q_OS_SYMBIAN // In Symbian OS test data is located in applications private dir // Application private dir is default serach path for files, so SRCDIR can be set to empty -#define SRCDIR "" +#define SRCDIR "." #endif class tst_creation : public QObject @@ -97,8 +97,8 @@ public: TestType(QObject *parent = 0) : QObject(parent) {} - QDeclarativeListProperty resources() { - return QDeclarativeListProperty(this, 0, resources_append); + QDeclarativeListProperty resources() { + return QDeclarativeListProperty(this, 0, resources_append); } static void resources_append(QDeclarativeListProperty *p, QObject *o) { @@ -106,7 +106,7 @@ public: } }; -tst_creation::tst_creation() +tst_creation::tst_creation() { qmlRegisterType("Qt.test", 1, 0, "TestType"); } diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro b/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro index 30ef235..917040d 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro +++ b/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro @@ -7,16 +7,13 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativecomponent.cpp testtypes.cpp HEADERS += testtypes.h -# Define SRCDIR equal to test's source directory -DEFINES += SRCDIR=\\\"$$PWD\\\" -symbian* { - data.sources = data/* - data.path = data - samegame.sources = data/samegame/* - samegame.path = data/samegame - samegame_pics.sources = data/samegame/pics/* - samegame_pics.path = data/samegame/pics - DEPLOYMENT += data samegame samegame_pics +symbian { + data.sources = data + data.path = . + DEPLOYMENT += data +} else { + # Define SRCDIR equal to test's source directory + DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp b/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp index 4b1456e..13420ff 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp +++ b/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp @@ -48,6 +48,10 @@ //TESTED_FILES= +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif class tst_qmlcomponent : public QObject { diff --git a/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp index e2e8c8a..2d9744e 100644 --- a/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp +++ b/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp @@ -46,8 +46,7 @@ #ifdef Q_OS_SYMBIAN // In Symbian OS test data is located in applications private dir -// Application private dir is default serach path for files, so SRCDIR can be set to empty -#define SRCDIR "" +#define SRCDIR "." #endif class tst_qmlgraphicsimage : public QObject diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro b/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro index 79fdd26..1b72fc5 100644 --- a/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro +++ b/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro @@ -6,5 +6,12 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativemetaproperty.cpp -# Define SRCDIR equal to test's source directory -DEFINES += SRCDIR=\\\"$$PWD\\\" +symbian { + data.sources += data + data.path = . + DEPLOYMENT += data +} else { + # Define SRCDIR equal to test's source directory + DEFINES += SRCDIR=\\\"$$PWD\\\" +} + diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp b/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp index 8a5f4ae..6e71e7d 100644 --- a/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp +++ b/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp @@ -48,6 +48,10 @@ //TESTED_FILES= +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif class tst_qmlmetaproperty : public QObject { diff --git a/tests/benchmarks/declarative/qmltime/qmltime.pro b/tests/benchmarks/declarative/qmltime/qmltime.pro index 9352f3b..6f5ad5e 100644 --- a/tests/benchmarks/declarative/qmltime/qmltime.pro +++ b/tests/benchmarks/declarative/qmltime/qmltime.pro @@ -6,18 +6,10 @@ macx:CONFIG -= app_bundle SOURCES += qmltime.cpp -symbian* { +symbian { TARGET.CAPABILITY = "All -TCB" - example.sources = example.qml - esample.path = . - tests.sources = tests/* - tests.path = tests - anshors.sources = tests/anchors/* - anchors.path = tests/anchors - item_creation.sources = tests/item_creation/* - item_creation.path = tests/item_creation - positioner_creation.sources = tests/positioner_creation/* - positioner_creation.path = tests/positioner_creation - DEPLOYMENT += example tests anchors item_creation positioner_creation + example.sources = example.qml tests + example.path = . + DEPLOYMENT += example } diff --git a/tests/benchmarks/declarative/typeimports/tst_typeimports.cpp b/tests/benchmarks/declarative/typeimports/tst_typeimports.cpp index b92ab46..f4c4c1f 100644 --- a/tests/benchmarks/declarative/typeimports/tst_typeimports.cpp +++ b/tests/benchmarks/declarative/typeimports/tst_typeimports.cpp @@ -46,8 +46,7 @@ #ifdef Q_OS_SYMBIAN // In Symbian OS test data is located in applications private dir -// Application private dir is default serach path for files, so SRCDIR can be set to empty -#define SRCDIR "" +#define SRCDIR "." #endif class tst_typeimports : public QObject @@ -72,8 +71,8 @@ class TestType1 : public QObject public: TestType1(QObject *parent = 0) : QObject(parent) {} - QDeclarativeListProperty resources() { - return QDeclarativeListProperty(this, 0, resources_append); + QDeclarativeListProperty resources() { + return QDeclarativeListProperty(this, 0, resources_append); } static void resources_append(QDeclarativeListProperty *p, QObject *o) { @@ -104,7 +103,7 @@ public: }; -tst_typeimports::tst_typeimports() +tst_typeimports::tst_typeimports() { qmlRegisterType("Qt.test", 1, 0, "TestType1"); qmlRegisterType("Qt.test", 1, 0, "TestType2"); diff --git a/tests/benchmarks/declarative/typeimports/typeimports.pro b/tests/benchmarks/declarative/typeimports/typeimports.pro index 8a74e0d..a5df3f0 100644 --- a/tests/benchmarks/declarative/typeimports/typeimports.pro +++ b/tests/benchmarks/declarative/typeimports/typeimports.pro @@ -6,10 +6,10 @@ macx:CONFIG -= app_bundle SOURCES += tst_typeimports.cpp -symbian* { - data.sources = data/* - data.path = data - DEPLOYMENT += addFiles +symbian { + data.sources = data + data.path = . + DEPLOYMENT += data } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } \ No newline at end of file -- cgit v0.12 From 8fe40ca28e88d156b9a0ef9cc4c818a666499231 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Fri, 14 May 2010 16:59:11 +0100 Subject: Fix generation of stub sis files Convert paths in DEPLOYMENT to the rom drive (z:) Filter out unwanted parts of the header (dependencies) Task-number: QTBUG-10118 Reviewed-by: Alessandro Portale --- bin/createpackage.pl | 2 +- mkspecs/features/sis_targets.prf | 2 +- qmake/generators/symbian/symbiancommon.cpp | 83 +++++++++++++++++++++++++----- 3 files changed, 71 insertions(+), 16 deletions(-) diff --git a/bin/createpackage.pl b/bin/createpackage.pl index 7453ba5..0cc1a9c 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -181,7 +181,7 @@ if ($signed_sis_name eq "") { } my $unsigned_sis_name = $sisoutputbasename."_unsigned.sis"; -my $stub_sis_name = $sisoutputbasename."_stub.sis"; +my $stub_sis_name = $sisoutputbasename.".sis"; # Store some utility variables my $scriptpath = dirname(__FILE__); diff --git a/mkspecs/features/sis_targets.prf b/mkspecs/features/sis_targets.prf index 7d70fc6..da2d250 100644 --- a/mkspecs/features/sis_targets.prf +++ b/mkspecs/features/sis_targets.prf @@ -59,7 +59,7 @@ contains(TEMPLATE, app)|!count(DEPLOYMENT, 1) { ) ok_stub_sis_target.target = ok_stub_sis - ok_stub_sis_target.commands = createpackage.bat -s $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \ + ok_stub_sis_target.commands = createpackage.bat -s $(QT_SIS_OPTIONS) $$basename(TARGET)_stub.pkg \ $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) QMAKE_EXTRA_TARGETS += sis_target \ diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp index adbd009..ce796c3 100644 --- a/qmake/generators/symbian/symbiancommon.cpp +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -142,6 +142,13 @@ void SymbianCommonGenerator::removeEpocSpecialCharacters(QString& str) removeSpecialCharacters(str); } +QString romPath(const QString& path) +{ + if(path.length() > 2 && path[1] == ':') + return QLatin1String("z:") + path.mid(2); + return QLatin1String("z:") + path; +} + void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocBuild) { QMakeProject *project = generator->project; @@ -150,8 +157,8 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB pkgTarget = project->first("TARGET"); pkgTarget = generator->unescapeFilePath(pkgTarget); pkgTarget = removePathSeparators(pkgTarget); - QString pkgFilename = Option::output_dir + QLatin1Char('/') + QString("%1_template.%2") - .arg(pkgTarget).arg("pkg"); + QString pkgFilename = Option::output_dir + QLatin1Char('/') + + QString("%1_template.pkg").arg(pkgTarget); QFile pkgFile(pkgFilename); if (!pkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) { @@ -159,8 +166,19 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB return; } + QString stubPkgFileName = Option::output_dir + QLatin1Char('/') + + QString("%1_stub.pkg").arg(pkgTarget); + + QFile stubPkgFile(stubPkgFileName); + if (!stubPkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) { + PRINT_FILE_CREATE_ERROR(stubPkgFileName); + return; + } + generatedFiles << pkgFile.fileName(); QTextStream t(&pkgFile); + generatedFiles << stubPkgFile.fileName(); + QTextStream ts(&stubPkgFile); QString installerSisHeader = project->values("DEPLOYMENT.installer_header").join("\n"); if (installerSisHeader.isEmpty()) @@ -180,6 +198,7 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB ";\n\n"; t << headerComment.arg(pkgFilename).arg(dateStr); tw << headerComment.arg(wrapperPkgFilename).arg(dateStr); + ts << headerComment.arg(stubPkgFileName).arg(dateStr); // Construct QStringList from pkg_prerules since we need search it before printed to file // Note: Though there can't be more than one language or header line, use stringlists @@ -229,6 +248,7 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB t << languageRules.join("\n") << endl; tw << languageRules.join("\n") << endl; + ts << languageRules.join("\n") << endl; // name of application, UID and version QString applicationVersion = project->first("VERSION").isEmpty() ? "1,0,0" : project->first("VERSION").replace('.', ','); @@ -244,10 +264,14 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB tw << installerSisHeader << endl; } - if (headerRules.isEmpty()) + if (headerRules.isEmpty()) { t << sisHeader.arg(visualTarget).arg(uid3).arg(applicationVersion); - else + ts << sisHeader.arg(visualTarget).arg(uid3).arg(applicationVersion); + } + else { t << headerRules.join("\n") << endl; + ts << headerRules.join("\n") << endl; + } // Localized vendor name QString vendorName; @@ -262,22 +286,38 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB t << vendorName; tw << vendorName; + ts << vendorName; // PKG pre-rules - these are added before actual file installations i.e. SIS package body if (rawPkgPreRules.size()) { QString comment = "\n; Manual PKG pre-rules from PRO files\n"; t << comment; tw << comment; + ts << comment; foreach(QString item, rawPkgPreRules) { - // Only regular pkg file should have package dependencies or pkg header if that is - // defined using prerules. - if (!item.startsWith("(") && !item.startsWith("#")) { + // Only regular pkg file should have package dependencies + if (item.startsWith("(")) { + t << item << endl; + } + // stub pkg file should not have platform dependencies + else if (item.startsWith("[")) { + t << item << endl; + tw << item << endl; + } + // Only regular and stub should have pkg header if that is defined using prerules. + else if (!item.startsWith("#")) { + t << item << endl; + ts << item << endl; + } + else { + t << item << endl; + ts << item << endl; tw << item << endl; } - t << item << endl; } t << endl; + ts << endl; tw << endl; } @@ -319,41 +359,54 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB // deploy .exe file t << "; Executable and default resource files" << endl; QString exeFile = fixedTarget + ".exe"; - t << QString("\"%1/%2\" - \"%3\\%4\"") + t << QString("\"%1/%2\" - \"%3\\%4\"") .arg(destDirBin) .arg(exeFile) .arg(installPathBin) .arg(exeFile) << endl; + ts << QString("\"\" - \"%1\\%2\"") + .arg(romPath(installPathBin)) + .arg(exeFile) << endl; // deploy rsc & reg_rsc file if (!project->isActiveConfig("no_icon")) { - t << QString("\"%1/%2\" - \"%3\\%4\"") + t << QString("\"%1/%2\" - \"%3\\%4\"") .arg(destDirResource) .arg(fixedTarget + ".rsc") .arg(installPathResource) .arg(fixedTarget + ".rsc") << endl; + ts << QString("\"\" - \"%1\\%2\"") + .arg(romPath(installPathResource)) + .arg(fixedTarget + ".rsc") << endl; - t << QString("\"%1/%2\" - \"%3\\%4\"") + t << QString("\"%1/%2\" - \"%3\\%4\"") .arg(destDirRegResource) .arg(fixedTarget + "_reg.rsc") .arg(installPathRegResource) .arg(fixedTarget + "_reg.rsc") << endl; + ts << QString("\"\" - \"%1\\%2\"") + .arg(romPath(installPathRegResource)) + .arg(fixedTarget + "_reg.rsc") << endl; if (!iconFile.isEmpty()) { if (epocBuild) { - t << QString("\"%1epoc32/data/z%2\" - \"!:%3\"") + t << QString("\"%1epoc32/data/z%2\" - \"!:%3\"") .arg(epocRoot()) .arg(iconFile) .arg(QDir::toNativeSeparators(iconFile)) << endl << endl; + ts << QString("\"\" - \"%1\"") + .arg(romPath(QDir::toNativeSeparators(iconFile))) << endl << endl; } else { QDir mifIconDir(project->first("DESTDIR")); QFileInfo mifIcon(mifIconDir.relativeFilePath(project->first("TARGET"))); QString mifIconFileName = mifIcon.fileName(); mifIconFileName.append(".mif"); - t << QString("\"%1/%2\" - \"!:%3\"") + t << QString("\"%1/%2\" - \"!:%3\"") .arg(mifIcon.path()) .arg(mifIconFileName) .arg(QDir::toNativeSeparators(iconFile)) << endl << endl; + ts << QString("\"\" - \"%1\"") + .arg(romPath(QDir::toNativeSeparators(iconFile))) << endl << endl; } } } @@ -389,9 +442,11 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB } } - t << QString("\"%1\" - \"%2\"").arg(from.replace('\\','/')).arg(to) << endl; + t << QString("\"%1\" - \"%2\"").arg(from.replace('\\','/')).arg(to) << endl; + ts << QString("\"\" - \"%1\"").arg(romPath(to)) << endl; } t << endl; + ts << endl; // PKG post-rules - these are added after actual file installations i.e. SIS package body t << "; Manual PKG post-rules from PRO files" << endl; -- cgit v0.12 From cd68abc3df40d8c6b03d9f0f1c8fc78f2e984ffe Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 17 May 2010 21:16:25 +0200 Subject: Fix 'chapter5_plugins.dll.sym contains initialized writable data' That's an error that you get when building a qml plugin for a Symbian device. Solution: Add 'TARGET.EPOCALLOWDLLDATA = 1' to the plugin .pro file --- .../tutorials/extending/chapter5-plugins/chapter5-plugins.pro | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/declarative/tutorials/extending/chapter5-plugins/chapter5-plugins.pro b/examples/declarative/tutorials/extending/chapter5-plugins/chapter5-plugins.pro index 7ec68e9..a8fb565 100644 --- a/examples/declarative/tutorials/extending/chapter5-plugins/chapter5-plugins.pro +++ b/examples/declarative/tutorials/extending/chapter5-plugins/chapter5-plugins.pro @@ -13,3 +13,8 @@ SOURCES += musician.cpp \ DESTDIR = lib OBJECTS_DIR = tmp MOC_DIR = tmp + +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.EPOCALLOWDLLDATA = 1 +} -- cgit v0.12 From 8665f4ba8cbf63740cfb379c8f98d8d68d089bf5 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 18 May 2010 10:31:42 +0300 Subject: Fix weatherinfo and flightinfo to only request WLAN connection once New bearer implementation will only keep connection alive as long as the QNetworkAccessManager instance is alive, so changed the demos to have single manager instance instead of recreating it for each request. Task-number: QTBUG-10151 Reviewed-by: Janne Anttila --- demos/embedded/flightinfo/flightinfo.cpp | 56 ++++++++++-------------------- demos/embedded/weatherinfo/weatherinfo.cpp | 17 +++------ 2 files changed, 23 insertions(+), 50 deletions(-) diff --git a/demos/embedded/flightinfo/flightinfo.cpp b/demos/embedded/flightinfo/flightinfo.cpp index 10d3f02..6cc1876 100644 --- a/demos/embedded/flightinfo/flightinfo.cpp +++ b/demos/embedded/flightinfo/flightinfo.cpp @@ -43,10 +43,6 @@ #include #include -#if defined (Q_OS_SYMBIAN) -#include "sym_iap_util.h" -#endif - #include "ui_form.h" #define FLIGHTVIEW_URL "http://mobile.flightview.com/TrackByFlight.aspx" @@ -100,6 +96,8 @@ private: QUrl m_url; QDate m_searchDate; QPixmap m_map; + QNetworkAccessManager m_manager; + QList mapReplies; public: @@ -115,7 +113,6 @@ public: connect(ui.flightEdit, SIGNAL(returnPressed()), SLOT(startSearch())); setWindowTitle("Flight Info"); - QTimer::singleShot(0, this, SLOT(delayedInit())); // Rendered from the public-domain vectorized aircraft // http://openclipart.org/media/people/Jarno @@ -127,6 +124,8 @@ public: connect(searchTodayAction, SIGNAL(triggered()), SLOT(today())); connect(searchYesterdayAction, SIGNAL(triggered()), SLOT(yesterday())); connect(randomAction, SIGNAL(triggered()), SLOT(randomFlight())); + connect(&m_manager, SIGNAL(finished(QNetworkReply*)), + this, SLOT(handleNetworkData(QNetworkReply*))); #if defined(Q_OS_SYMBIAN) menuBar()->addAction(searchTodayAction); menuBar()->addAction(searchYesterdayAction); @@ -140,31 +139,21 @@ public: } private slots: - void delayedInit() { -#if defined(Q_OS_SYMBIAN) - qt_SetDefaultIap(); -#endif - } - void handleNetworkData(QNetworkReply *networkReply) { if (!networkReply->error()) { - // Assume UTF-8 encoded - QByteArray data = networkReply->readAll(); - QString xml = QString::fromUtf8(data); - digest(xml); - } - networkReply->deleteLater(); - networkReply->manager()->deleteLater(); - } - - void handleMapData(QNetworkReply *networkReply) { - if (!networkReply->error()) { - m_map.loadFromData(networkReply->readAll()); - update(); + if (!mapReplies.contains(networkReply)) { + // Assume UTF-8 encoded + QByteArray data = networkReply->readAll(); + QString xml = QString::fromUtf8(data); + digest(xml); + } else { + mapReplies.removeOne(networkReply); + m_map.loadFromData(networkReply->readAll()); + update(); + } } networkReply->deleteLater(); - networkReply->manager()->deleteLater(); } void today() { @@ -224,10 +213,7 @@ public slots: ui.flightName->setText("Getting a random flight..."); } - QNetworkAccessManager *manager = new QNetworkAccessManager(this); - connect(manager, SIGNAL(finished(QNetworkReply*)), - this, SLOT(handleNetworkData(QNetworkReply*))); - manager->get(QNetworkRequest(m_url)); + m_manager.get(QNetworkRequest(m_url)); } @@ -248,10 +234,7 @@ private: regex.indexIn(href); QString airport = regex.cap(1); m_url.addEncodedQueryItem("dpap", QUrl::toPercentEncoding(airport)); - QNetworkAccessManager *manager = new QNetworkAccessManager(this); - connect(manager, SIGNAL(finished(QNetworkReply*)), - this, SLOT(handleNetworkData(QNetworkReply*))); - manager->get(QNetworkRequest(m_url)); + m_manager.get(QNetworkRequest(m_url)); return; } @@ -287,12 +270,9 @@ private: } if (xml.name() == "img" && inFlightMap) { QString src = xml.attributes().value("src").toString(); - src.prepend("http://mobile.flightview.com"); + src.prepend("http://mobile.flightview.com/"); QUrl url = QUrl::fromPercentEncoding(src.toAscii()); - QNetworkAccessManager *manager = new QNetworkAccessManager(this); - connect(manager, SIGNAL(finished(QNetworkReply*)), - this, SLOT(handleMapData(QNetworkReply*))); - manager->get(QNetworkRequest(url)); + mapReplies.append(m_manager.get(QNetworkRequest(url))); } } diff --git a/demos/embedded/weatherinfo/weatherinfo.cpp b/demos/embedded/weatherinfo/weatherinfo.cpp index 42b685e..3e0226a 100644 --- a/demos/embedded/weatherinfo/weatherinfo.cpp +++ b/demos/embedded/weatherinfo/weatherinfo.cpp @@ -44,10 +44,6 @@ #include #include -#if defined (Q_OS_SYMBIAN) -#include "sym_iap_util.h" -#endif - class WeatherInfo: public QMainWindow { Q_OBJECT @@ -67,6 +63,7 @@ private: QList m_rangeItems; QTimeLine m_timeLine; QHash m_icons; + QNetworkAccessManager m_manager; public: WeatherInfo(QWidget *parent = 0): QMainWindow(parent) { @@ -98,14 +95,14 @@ public: } setContextMenuPolicy(Qt::ActionsContextMenu); + connect(&m_manager, SIGNAL(finished(QNetworkReply*)), + this, SLOT(handleNetworkData(QNetworkReply*))); + QTimer::singleShot(0, this, SLOT(delayedInit())); } private slots: void delayedInit() { -#if defined(Q_OS_SYMBIAN) - qt_SetDefaultIap(); -#endif request("Oslo"); } @@ -122,7 +119,6 @@ private slots: if (!networkReply->error()) digest(QString::fromUtf8(networkReply->readAll())); networkReply->deleteLater(); - networkReply->manager()->deleteLater(); } void animate(int frame) { @@ -185,10 +181,7 @@ private: url.addEncodedQueryItem("hl", "en"); url.addEncodedQueryItem("weather", QUrl::toPercentEncoding(location)); - QNetworkAccessManager *manager = new QNetworkAccessManager(this); - connect(manager, SIGNAL(finished(QNetworkReply*)), - this, SLOT(handleNetworkData(QNetworkReply*))); - manager->get(QNetworkRequest(url)); + m_manager.get(QNetworkRequest(url)); city = QString(); setWindowTitle("Loading..."); -- cgit v0.12 From acee77966603ed968e68ed36337b90fa32c5062b Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 18 May 2010 11:37:04 +0300 Subject: Fix pkg_prerules handling for installer packages The removed check was causing dropping of vendor info from installer package files. No need to check for header in rawPkgPreRules as it would never get there in the first place; it gets placed into headerRules instead. Reviewed-by: Shane Kearns --- qmake/generators/symbian/symbiancommon.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp index ce796c3..aa44afc 100644 --- a/qmake/generators/symbian/symbiancommon.cpp +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -305,11 +305,6 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB t << item << endl; tw << item << endl; } - // Only regular and stub should have pkg header if that is defined using prerules. - else if (!item.startsWith("#")) { - t << item << endl; - ts << item << endl; - } else { t << item << endl; ts << item << endl; -- cgit v0.12 From 2313126fc721c9e42f429848bce54a11b5de6659 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 18 May 2010 13:16:01 +0300 Subject: Do not autopatch _installer.pkg when self-signing _installer.pkg produces self-signable packages by default, so no need to patch it. Task-number: QTBUG-10746 Reviewed-by: Janne Koskinen --- bin/createpackage.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/createpackage.pl b/bin/createpackage.pl index 0cc1a9c..939c38e 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -292,7 +292,7 @@ if($stub) { # Create stub SIS. system ("makesis -s $pkgoutput $stub_sis_name"); } else { - if ($certtext eq "Self Signed" && !@certificates) { + if ($certtext eq "Self Signed" && !@certificates && $templatepkg !~ m/_installer\.pkg$/i) { print("Auto-patching capabilities for self signed package.\n"); system ("patch_capabilities $pkgoutput"); } -- cgit v0.12 From 3335882eaa8ef3531a87d42a3400d06baa60380b Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Tue, 18 May 2010 13:46:54 +0200 Subject: Update symbian def files for 4.7 --- src/s60installs/bwins/QtCoreu.def | 14 ++++++++++++++ src/s60installs/bwins/QtDeclarativeu.def | 10 +++++++++- src/s60installs/bwins/QtGuiu.def | 23 +++++++++++++++++++---- src/s60installs/bwins/QtNetworku.def | 1 + src/s60installs/eabi/QtCoreu.def | 7 +++++++ src/s60installs/eabi/QtDeclarativeu.def | 28 ++++++++++++++++++++++++++-- src/s60installs/eabi/QtGuiu.def | 14 ++++++++++++-- src/s60installs/eabi/QtNetworku.def | 1 + 8 files changed, 89 insertions(+), 9 deletions(-) diff --git a/src/s60installs/bwins/QtCoreu.def b/src/s60installs/bwins/QtCoreu.def index 13b8157..c6d7a2c 100644 --- a/src/s60installs/bwins/QtCoreu.def +++ b/src/s60installs/bwins/QtCoreu.def @@ -4465,4 +4465,18 @@ EXPORTS ?selectThread@QEventDispatcherSymbian@@AAEAAVQSelectThread@@XZ @ 4464 NONAME ; class QSelectThread & QEventDispatcherSymbian::selectThread(void) ?setRawData@QByteArray@@QAEAAV1@PBDI@Z @ 4465 NONAME ; class QByteArray & QByteArray::setRawData(char const *, unsigned int) ?setRawData@QString@@QAEAAV1@PBVQChar@@H@Z @ 4466 NONAME ; class QString & QString::setRawData(class QChar const *, int) + ?getStaticMetaObject@QEventDispatcherSymbian@@SAABUQMetaObject@@XZ @ 4467 NONAME ; struct QMetaObject const & QEventDispatcherSymbian::getStaticMetaObject(void) + ?isHighSurrogate@QChar@@SA_NI@Z @ 4468 NONAME ; bool QChar::isHighSurrogate(unsigned int) + ?isLowSurrogate@QChar@@SA_NI@Z @ 4469 NONAME ; bool QChar::isLowSurrogate(unsigned int) + ?metaObject@QEventDispatcherSymbian@@UBEPBUQMetaObject@@XZ @ 4470 NONAME ; struct QMetaObject const * QEventDispatcherSymbian::metaObject(void) const + ?msecsTo@QDateTime@@QBE_JABV1@@Z @ 4471 NONAME ; long long QDateTime::msecsTo(class QDateTime const &) const + ?qt_metacall@QEventDispatcherSymbian@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 4472 NONAME ; int QEventDispatcherSymbian::qt_metacall(enum QMetaObject::Call, int, void * *) + ?qt_metacast@QEventDispatcherSymbian@@UAEPAXPBD@Z @ 4473 NONAME ; void * QEventDispatcherSymbian::qt_metacast(char const *) + ?requiresSurrogates@QChar@@SA_NI@Z @ 4474 NONAME ; bool QChar::requiresSurrogates(unsigned int) + ?symbianInit@QCoreApplicationPrivate@@QAEXXZ @ 4475 NONAME ; void QCoreApplicationPrivate::symbianInit(void) + ?tr@QEventDispatcherSymbian@@SA?AVQString@@PBD0@Z @ 4476 NONAME ; class QString QEventDispatcherSymbian::tr(char const *, char const *) + ?tr@QEventDispatcherSymbian@@SA?AVQString@@PBD0H@Z @ 4477 NONAME ; class QString QEventDispatcherSymbian::tr(char const *, char const *, int) + ?trUtf8@QEventDispatcherSymbian@@SA?AVQString@@PBD0@Z @ 4478 NONAME ; class QString QEventDispatcherSymbian::trUtf8(char const *, char const *) + ?trUtf8@QEventDispatcherSymbian@@SA?AVQString@@PBD0H@Z @ 4479 NONAME ; class QString QEventDispatcherSymbian::trUtf8(char const *, char const *, int) + ?staticMetaObject@QEventDispatcherSymbian@@2UQMetaObject@@B @ 4480 NONAME ; struct QMetaObject const QEventDispatcherSymbian::staticMetaObject diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def index f43eadf..3f2f7a0 100644 --- a/src/s60installs/bwins/QtDeclarativeu.def +++ b/src/s60installs/bwins/QtDeclarativeu.def @@ -3563,7 +3563,7 @@ EXPORTS ?computeTransformOrigin@QDeclarativeItemPrivate@@QBE?AVQPointF@@XZ @ 3562 NONAME ; class QPointF QDeclarativeItemPrivate::computeTransformOrigin(void) const ?contextObject@QDeclarativeContext@@QBEPAVQObject@@XZ @ 3563 NONAME ; class QObject * QDeclarativeContext::contextObject(void) const ?copyOriginals@QDeclarativeAnchorChanges@@UAEXPAVQDeclarativeActionEvent@@@Z @ 3564 NONAME ; void QDeclarativeAnchorChanges::copyOriginals(class QDeclarativeActionEvent *) - ?copyOriginals@QDeclarativeParentChange@@UAEXPAVQDeclarativeActionEvent@@@Z @ 3565 NONAME ; void QDeclarativeParentChange::copyOriginals(class QDeclarativeActionEvent *) + ?copyOriginals@QDeclarativeParentChange@@UAEXPAVQDeclarativeActionEvent@@@Z @ 3565 NONAME ABSENT ; void QDeclarativeParentChange::copyOriginals(class QDeclarativeActionEvent *) ?countChanged@QDeclarativeListModel@@IAEXXZ @ 3566 NONAME ; void QDeclarativeListModel::countChanged(void) ?countChanged@QDeclarativePathView@@IAEXXZ @ 3567 NONAME ; void QDeclarativePathView::countChanged(void) ?create@QDeclarativeType@@QBEXPAPAVQObject@@PAPAXI@Z @ 3568 NONAME ; void QDeclarativeType::create(class QObject * *, void * *, unsigned int) const @@ -4012,4 +4012,12 @@ EXPORTS ?setFlickDirection@QDeclarativeFlickable@@QAEXW4FlickableDirection@1@@Z @ 4011 NONAME ; void QDeclarativeFlickable::setFlickDirection(enum QDeclarativeFlickable::FlickableDirection) ?flickableDirectionChanged@QDeclarativeFlickable@@IAEXXZ @ 4012 NONAME ; void QDeclarativeFlickable::flickableDirectionChanged(void) ?isFlickingVertically@QDeclarativeFlickable@@QBE_NXZ @ 4013 NONAME ; bool QDeclarativeFlickable::isFlickingVertically(void) const + ?componentComplete@QDeclarativeLoader@@MAEXXZ @ 4014 NONAME ; void QDeclarativeLoader::componentComplete(void) + ?decrementCurrentIndex@QDeclarativePathView@@QAEXXZ @ 4015 NONAME ; void QDeclarativePathView::decrementCurrentIndex(void) + ?incrementCurrentIndex@QDeclarativePathView@@QAEXXZ @ 4016 NONAME ; void QDeclarativePathView::incrementCurrentIndex(void) + ?inputMethodPreHandler@QDeclarativeItem@@IAEXPAVQInputMethodEvent@@@Z @ 4017 NONAME ; void QDeclarativeItem::inputMethodPreHandler(class QInputMethodEvent *) + ?keyPressPreHandler@QDeclarativeItem@@IAEXPAVQKeyEvent@@@Z @ 4018 NONAME ; void QDeclarativeItem::keyPressPreHandler(class QKeyEvent *) + ?keyReleasePreHandler@QDeclarativeItem@@IAEXPAVQKeyEvent@@@Z @ 4019 NONAME ; void QDeclarativeItem::keyReleasePreHandler(class QKeyEvent *) + ?loaded@QDeclarativeLoader@@IAEXXZ @ 4020 NONAME ; void QDeclarativeLoader::loaded(void) + ?needsCopy@QDeclarativeAnchorChanges@@UAE_NXZ @ 4021 NONAME ; bool QDeclarativeAnchorChanges::needsCopy(void) diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index a67f9b8..15addf6 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -2125,7 +2125,7 @@ EXPORTS ?addText@QPainterPath@@QAEXMMABVQFont@@ABVQString@@@Z @ 2124 NONAME ; void QPainterPath::addText(float, float, class QFont const &, class QString const &) ?addToGroup@QGraphicsItemGroup@@QAEXPAVQGraphicsItem@@@Z @ 2125 NONAME ; void QGraphicsItemGroup::addToGroup(class QGraphicsItem *) ?addToIndex@QGraphicsItem@@IAEXXZ @ 2126 NONAME ; void QGraphicsItem::addToIndex(void) - ?addToPolygon@QBezier@@QBEXPAVQPolygonF@@@Z @ 2127 NONAME ; void QBezier::addToPolygon(class QPolygonF *) const + ?addToPolygon@QBezier@@QBEXPAVQPolygonF@@@Z @ 2127 NONAME ABSENT ; void QBezier::addToPolygon(class QPolygonF *) const ?addToPolygonIterative@QBezier@@QBEXPAVQPolygonF@@@Z @ 2128 NONAME ABSENT ; void QBezier::addToPolygonIterative(class QPolygonF *) const ?addToPolygonMixed@QBezier@@QBEXPAVQPolygonF@@@Z @ 2129 NONAME ABSENT ; void QBezier::addToPolygonMixed(class QPolygonF *) const ?addToolBar@QMainWindow@@QAEPAVQToolBar@@ABVQString@@@Z @ 2130 NONAME ; class QToolBar * QMainWindow::addToolBar(class QString const &) @@ -3207,7 +3207,7 @@ EXPORTS ?cursorWordForward@QLineControl@@QAEX_N@Z @ 3206 NONAME ; void QLineControl::cursorWordForward(bool) ?cursorWordForward@QLineEdit@@QAEX_N@Z @ 3207 NONAME ; void QLineEdit::cursorWordForward(bool) ?curveThreshold@QPainterPathStroker@@QBEMXZ @ 3208 NONAME ; float QPainterPathStroker::curveThreshold(void) const - ?curveThreshold@QStroker@@QBEMXZ @ 3209 NONAME ; float QStroker::curveThreshold(void) const + ?curveThreshold@QStroker@@QBEMXZ @ 3209 NONAME ABSENT ; float QStroker::curveThreshold(void) const ?customButtonClicked@QWizard@@IAEXH@Z @ 3210 NONAME ; void QWizard::customButtonClicked(int) ?customColor@QColorDialog@@SAIH@Z @ 3211 NONAME ; unsigned int QColorDialog::customColor(int) ?customContextMenuRequested@QWidget@@IAEXABVQPoint@@@Z @ 3212 NONAME ; void QWidget::customContextMenuRequested(class QPoint const &) @@ -8769,7 +8769,7 @@ EXPORTS ?setCursorWidth@QTextEdit@@QAEXH@Z @ 8768 NONAME ; void QTextEdit::setCursorWidth(int) ?setCursor_sys@QWidgetPrivate@@QAEXABVQCursor@@@Z @ 8769 NONAME ; void QWidgetPrivate::setCursor_sys(class QCursor const &) ?setCurveThreshold@QPainterPathStroker@@QAEXM@Z @ 8770 NONAME ; void QPainterPathStroker::setCurveThreshold(float) - ?setCurveThreshold@QStroker@@QAEXM@Z @ 8771 NONAME ; void QStroker::setCurveThreshold(float) + ?setCurveThreshold@QStroker@@QAEXM@Z @ 8771 NONAME ABSENT ; void QStroker::setCurveThreshold(float) ?setCustomColor@QColorDialog@@SAXHI@Z @ 8772 NONAME ; void QColorDialog::setCustomColor(int, unsigned int) ?setDashOffset@QDashStroker@@QAEXM@Z @ 8773 NONAME ; void QDashStroker::setDashOffset(float) ?setDashOffset@QPainterPathStroker@@QAEXM@Z @ 8774 NONAME ; void QPainterPathStroker::setDashOffset(float) @@ -10990,7 +10990,7 @@ EXPORTS ?toPointF@QVector2D@@QBE?AVQPointF@@XZ @ 10989 NONAME ; class QPointF QVector2D::toPointF(void) const ?toPointF@QVector3D@@QBE?AVQPointF@@XZ @ 10990 NONAME ; class QPointF QVector3D::toPointF(void) const ?toPointF@QVector4D@@QBE?AVQPointF@@XZ @ 10991 NONAME ; class QPointF QVector4D::toPointF(void) const - ?toPolygon@QBezier@@QBE?AVQPolygonF@@XZ @ 10992 NONAME ; class QPolygonF QBezier::toPolygon(void) const + ?toPolygon@QBezier@@QBE?AVQPolygonF@@XZ @ 10992 NONAME ABSENT ; class QPolygonF QBezier::toPolygon(void) const ?toPolygon@QPolygonF@@QBE?AVQPolygon@@XZ @ 10993 NONAME ; class QPolygon QPolygonF::toPolygon(void) const ?toPrevious@QDataWidgetMapper@@QAEXXZ @ 10994 NONAME ; void QDataWidgetMapper::toPrevious(void) ?toReversed@QPainterPath@@QBE?AV1@XZ @ 10995 NONAME ; class QPainterPath QPainterPath::toReversed(void) const @@ -12803,4 +12803,19 @@ EXPORTS ?totalUsed@QPixmapCache@@SAHXZ @ 12802 NONAME ; int QPixmapCache::totalUsed(void) ?allPixmaps@QPixmapCache@@SA?AV?$QList@U?$QPair@VQString@@VQPixmap@@@@@@XZ @ 12803 NONAME ; class QList > QPixmapCache::allPixmaps(void) ?flushDetachedPixmaps@QPixmapCache@@SAXXZ @ 12804 NONAME ; void QPixmapCache::flushDetachedPixmaps(void) + ??0QImageTextureGlyphCache@@QAE@W4Type@QFontEngineGlyphCache@@ABVQTransform@@@Z @ 12805 NONAME ; QImageTextureGlyphCache::QImageTextureGlyphCache(enum QFontEngineGlyphCache::Type, class QTransform const &) + ??1QImageTextureGlyphCache@@UAE@XZ @ 12806 NONAME ; QImageTextureGlyphCache::~QImageTextureGlyphCache(void) + ??_EQImageTextureGlyphCache@@UAE@I@Z @ 12807 NONAME ; QImageTextureGlyphCache::~QImageTextureGlyphCache(unsigned int) + ?addToPolygon@QBezier@@QBEXPAVQPolygonF@@M@Z @ 12808 NONAME ; void QBezier::addToPolygon(class QPolygonF *, float) const + ?createTextureData@QImageTextureGlyphCache@@UAEXHH@Z @ 12809 NONAME ; void QImageTextureGlyphCache::createTextureData(int, int) + ?curveThreshold@QStrokerOps@@QBEMXZ @ 12810 NONAME ; float QStrokerOps::curveThreshold(void) const + ?fillTexture@QImageTextureGlyphCache@@UAEXABUCoord@QTextureGlyphCache@@I@Z @ 12811 NONAME ; void QImageTextureGlyphCache::fillTexture(struct QTextureGlyphCache::Coord const &, unsigned int) + ?glyphMargin@QImageTextureGlyphCache@@UBEHXZ @ 12812 NONAME ; int QImageTextureGlyphCache::glyphMargin(void) const + ?image@QImageTextureGlyphCache@@QBEABVQImage@@XZ @ 12813 NONAME ; class QImage const & QImageTextureGlyphCache::image(void) const + ?resizeTextureData@QImageTextureGlyphCache@@UAEXHH@Z @ 12814 NONAME ; void QImageTextureGlyphCache::resizeTextureData(int, int) + ?setCurveThreshold@QStrokerOps@@QAEXM@Z @ 12815 NONAME ; void QStrokerOps::setCurveThreshold(float) + ?setCurveThresholdFromTransform@QStrokerOps@@QAEXABVQTransform@@@Z @ 12816 NONAME ; void QStrokerOps::setCurveThresholdFromTransform(class QTransform const &) + ?setUpdateClip@QGraphicsViewPrivate@@QAEXPAVQGraphicsItem@@@Z @ 12817 NONAME ; void QGraphicsViewPrivate::setUpdateClip(class QGraphicsItem *) + ?toPolygon@QBezier@@QBE?AVQPolygonF@@M@Z @ 12818 NONAME ; class QPolygonF QBezier::toPolygon(float) const + ?updatePaintedViewBoundingRects@QGraphicsItemPrivate@@QAEX_N@Z @ 12819 NONAME ; void QGraphicsItemPrivate::updatePaintedViewBoundingRects(bool) diff --git a/src/s60installs/bwins/QtNetworku.def b/src/s60installs/bwins/QtNetworku.def index 9391ad5..9d4507b 100644 --- a/src/s60installs/bwins/QtNetworku.def +++ b/src/s60installs/bwins/QtNetworku.def @@ -1143,4 +1143,5 @@ EXPORTS ?setNetworkAccessible@QNetworkAccessManager@@QAEXW4NetworkAccessibility@1@@Z @ 1142 NONAME ; void QNetworkAccessManager::setNetworkAccessible(enum QNetworkAccessManager::NetworkAccessibility) ?startPolling@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1143 NONAME ; void QNetworkConfigurationManagerPrivate::startPolling(void) ?capabilities@QNetworkConfigurationManagerPrivate@@QAE?AV?$QFlags@W4Capability@QNetworkConfigurationManager@@@@XZ @ 1144 NONAME ; class QFlags QNetworkConfigurationManagerPrivate::capabilities(void) + ?addPendingConnection@QTcpServer@@IAEXPAVQTcpSocket@@@Z @ 1145 NONAME ; void QTcpServer::addPendingConnection(class QTcpSocket *) diff --git a/src/s60installs/eabi/QtCoreu.def b/src/s60installs/eabi/QtCoreu.def index dc9431b..48ba8d2 100644 --- a/src/s60installs/eabi/QtCoreu.def +++ b/src/s60installs/eabi/QtCoreu.def @@ -3700,4 +3700,11 @@ EXPORTS _ZN23QEventDispatcherSymbian12selectThreadEv @ 3699 NONAME _ZN10QByteArray10setRawDataEPKcj @ 3700 NONAME _ZN7QString10setRawDataEPK5QChari @ 3701 NONAME + _ZN23QCoreApplicationPrivate11symbianInitEv @ 3702 NONAME + _ZN23QEventDispatcherSymbian11qt_metacallEN11QMetaObject4CallEiPPv @ 3703 NONAME + _ZN23QEventDispatcherSymbian11qt_metacastEPKc @ 3704 NONAME + _ZN23QEventDispatcherSymbian16staticMetaObjectE @ 3705 NONAME DATA 16 + _ZN23QEventDispatcherSymbian19getStaticMetaObjectEv @ 3706 NONAME + _ZNK23QEventDispatcherSymbian10metaObjectEv @ 3707 NONAME + _ZNK9QDateTime7msecsToERKS_ @ 3708 NONAME diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def index 34f8b9e..086e1b2 100644 --- a/src/s60installs/eabi/QtDeclarativeu.def +++ b/src/s60installs/eabi/QtDeclarativeu.def @@ -1602,7 +1602,7 @@ EXPORTS _ZN24QDeclarativeParentChange11qt_metacastEPKc @ 1601 NONAME _ZN24QDeclarativeParentChange11setRotationEf @ 1602 NONAME _ZN24QDeclarativeParentChange12isReversableEv @ 1603 NONAME - _ZN24QDeclarativeParentChange13copyOriginalsEP23QDeclarativeActionEvent @ 1604 NONAME + _ZN24QDeclarativeParentChange13copyOriginalsEP23QDeclarativeActionEvent @ 1604 NONAME ABSENT _ZN24QDeclarativeParentChange13saveOriginalsEv @ 1605 NONAME _ZN24QDeclarativeParentChange16staticMetaObjectE @ 1606 NONAME DATA 16 _ZN24QDeclarativeParentChange17saveCurrentValuesEv @ 1607 NONAME @@ -3306,7 +3306,7 @@ EXPORTS _ZThn8_N23QDeclarativePaintedItemD0Ev @ 3305 NONAME _ZThn8_N23QDeclarativePaintedItemD1Ev @ 3306 NONAME _ZThn8_N24QDeclarativeParentChange12isReversableEv @ 3307 NONAME - _ZThn8_N24QDeclarativeParentChange13copyOriginalsEP23QDeclarativeActionEvent @ 3308 NONAME + _ZThn8_N24QDeclarativeParentChange13copyOriginalsEP23QDeclarativeActionEvent @ 3308 NONAME ABSENT _ZThn8_N24QDeclarativeParentChange13saveOriginalsEv @ 3309 NONAME _ZThn8_N24QDeclarativeParentChange17saveCurrentValuesEv @ 3310 NONAME _ZThn8_N24QDeclarativeParentChange6rewindEv @ 3311 NONAME @@ -3578,4 +3578,28 @@ EXPORTS _ZThn8_N23QDeclarativeConnections10classBeginEv @ 3577 NONAME _ZThn8_N23QDeclarativePaintedItem10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 3578 NONAME _ZThn8_N24QDeclarativeWorkerScript10classBeginEv @ 3579 NONAME + _ZN16QDeclarativeItem18keyPressPreHandlerEP9QKeyEvent @ 3580 NONAME + _ZN16QDeclarativeItem20keyReleasePreHandlerEP9QKeyEvent @ 3581 NONAME + _ZN16QDeclarativeItem21inputMethodPreHandlerEP17QInputMethodEvent @ 3582 NONAME + _ZN18QDeclarativeLoader17componentCompleteEv @ 3583 NONAME + _ZN18QDeclarativeLoader6loadedEv @ 3584 NONAME + _ZN20QDeclarativePathView21decrementCurrentIndexEv @ 3585 NONAME + _ZN20QDeclarativePathView21incrementCurrentIndexEv @ 3586 NONAME + _ZN21QDeclarativeFlickable17setFlickDirectionENS_18FlickableDirectionE @ 3587 NONAME + _ZN21QDeclarativeFlickable21setFlickableDirectionENS_18FlickableDirectionE @ 3588 NONAME + _ZN21QDeclarativeFlickable23movingVerticallyChangedEv @ 3589 NONAME + _ZN21QDeclarativeFlickable25flickableDirectionChangedEv @ 3590 NONAME + _ZN21QDeclarativeFlickable25flickingVerticallyChangedEv @ 3591 NONAME + _ZN21QDeclarativeFlickable25movingHorizontallyChangedEv @ 3592 NONAME + _ZN21QDeclarativeFlickable27flickingHorizontallyChangedEv @ 3593 NONAME + _ZN27QDeclarativeVisualDataModelC1EP19QDeclarativeContextP7QObject @ 3594 NONAME + _ZN27QDeclarativeVisualDataModelC2EP19QDeclarativeContextP7QObject @ 3595 NONAME + _ZN27QDeclarativeVisualItemModelC1EP7QObject @ 3596 NONAME + _ZN27QDeclarativeVisualItemModelC2EP7QObject @ 3597 NONAME + _ZNK21QDeclarativeFlickable18flickableDirectionEv @ 3598 NONAME + _ZNK21QDeclarativeFlickable18isMovingVerticallyEv @ 3599 NONAME + _ZNK21QDeclarativeFlickable20isFlickingVerticallyEv @ 3600 NONAME + _ZNK21QDeclarativeFlickable20isMovingHorizontallyEv @ 3601 NONAME + _ZNK21QDeclarativeFlickable22isFlickingHorizontallyEv @ 3602 NONAME + _ZThn16_N18QDeclarativeLoader17componentCompleteEv @ 3603 NONAME diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index 3eaa8c3..6b05e9b 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -9899,7 +9899,7 @@ EXPORTS _ZNK7QAction9statusTipEv @ 9898 NONAME _ZNK7QAction9whatsThisEv @ 9899 NONAME _ZNK7QBezier10addIfCloseEPff @ 9900 NONAME - _ZNK7QBezier12addToPolygonEP9QPolygonF @ 9901 NONAME + _ZNK7QBezier12addToPolygonEP9QPolygonF @ 9901 NONAME ABSENT _ZNK7QBezier16bezierOnIntervalEff @ 9902 NONAME _ZNK7QBezier17addToPolygonMixedEP9QPolygonF @ 9903 NONAME ABSENT _ZNK7QBezier17stationaryYPointsERfS0_ @ 9904 NONAME @@ -9909,7 +9909,7 @@ EXPORTS _ZNK7QBezier6lengthEf @ 9908 NONAME _ZNK7QBezier7shiftedEPS_iff @ 9909 NONAME _ZNK7QBezier9tAtLengthEf @ 9910 NONAME - _ZNK7QBezier9toPolygonEv @ 9911 NONAME + _ZNK7QBezier9toPolygonEv @ 9911 NONAME ABSENT _ZNK7QBitmap11transformedERK10QTransform @ 9912 NONAME _ZNK7QBitmap11transformedERK7QMatrix @ 9913 NONAME _ZNK7QBitmapcv8QVariantEv @ 9914 NONAME @@ -12002,4 +12002,14 @@ EXPORTS _ZN12QPixmapCache10allPixmapsEv @ 12001 NONAME _ZN12QPixmapCache20flushDetachedPixmapsEv @ 12002 NONAME _ZN12QPixmapCache9totalUsedEv @ 12003 NONAME + _ZN20QGraphicsItemPrivate30updatePaintedViewBoundingRectsEb @ 12004 NONAME + _ZN20QGraphicsViewPrivate13setUpdateClipEP13QGraphicsItem @ 12005 NONAME + _ZN23QImageTextureGlyphCache11fillTextureERKN18QTextureGlyphCache5CoordEj @ 12006 NONAME + _ZN23QImageTextureGlyphCache17createTextureDataEii @ 12007 NONAME + _ZN23QImageTextureGlyphCache17resizeTextureDataEii @ 12008 NONAME + _ZNK23QImageTextureGlyphCache11glyphMarginEv @ 12009 NONAME + _ZNK7QBezier12addToPolygonEP9QPolygonFf @ 12010 NONAME + _ZNK7QBezier9toPolygonEf @ 12011 NONAME + _ZTI23QImageTextureGlyphCache @ 12012 NONAME + _ZTV23QImageTextureGlyphCache @ 12013 NONAME diff --git a/src/s60installs/eabi/QtNetworku.def b/src/s60installs/eabi/QtNetworku.def index 2566415..87e0805 100644 --- a/src/s60installs/eabi/QtNetworku.def +++ b/src/s60installs/eabi/QtNetworku.def @@ -1167,4 +1167,5 @@ EXPORTS _ZNK13QBearerEngine19configurationsInUseEv @ 1166 NONAME _ZNK21QNetworkAccessManager17networkAccessibleEv @ 1167 NONAME _ZN35QNetworkConfigurationManagerPrivate12capabilitiesEv @ 1168 NONAME + _ZN10QTcpServer20addPendingConnectionEP10QTcpSocket @ 1169 NONAME -- cgit v0.12 From 61a211e45dd01751acb0adcbb3ae5496aa4bf3b9 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 18 May 2010 16:06:18 +0300 Subject: Set edit focus to proper control in flightinfo demo Set edit focus to line edit control when user needs to input flight number. Task-number: QTBUG-10124 Reviewed-by: Shane Kearns --- demos/embedded/flightinfo/flightinfo.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/demos/embedded/flightinfo/flightinfo.cpp b/demos/embedded/flightinfo/flightinfo.cpp index 6cc1876..425d6aa 100644 --- a/demos/embedded/flightinfo/flightinfo.cpp +++ b/demos/embedded/flightinfo/flightinfo.cpp @@ -174,6 +174,10 @@ private slots: ui.infoBox->hide(); ui.flightStatus->hide(); ui.flightName->setText("Enter flight number"); + ui.flightEdit->setFocus(); +#ifdef QT_KEYPAD_NAVIGATION + ui.flightEdit->setEditFocus(true); +#endif m_map = QPixmap(); update(); } -- cgit v0.12 From 68177eeeecaabb46ab01326c268690fcde2ef367 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Wed, 19 May 2010 10:57:47 +0300 Subject: Fix build break in Symbian Fix this makefile syntax error when building Qt from root: "makefile:60: *** target pattern contains no `%'. Stop." Break was caused by having absolute path in $(MAKEFILE) variable, which broke subdir targets. Reviewed-by: Janne Koskinen --- qmake/generators/symbian/symmake_abld.cpp | 2 +- qmake/generators/symbian/symmake_sbsv2.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp index 0ba1a3c..7e3fb45 100644 --- a/qmake/generators/symbian/symmake_abld.cpp +++ b/qmake/generators/symbian/symmake_abld.cpp @@ -199,7 +199,7 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool t << "# ==============================================================================" << "\n" << endl; t << endl; - t << "MAKEFILE = " << wrapperFile.fileName() << endl; + t << "MAKEFILE = " << fileInfo(wrapperFile.fileName()).fileName() << endl; t << "QMAKE = " << var("QMAKE_QMAKE") << endl; t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index 3a6706a..feacbef 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -143,7 +143,7 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo t << "#" << endl; t << "# ==============================================================================" << "\n" << endl; t << endl; - t << "MAKEFILE = " << wrapperFile.fileName() << endl; + t << "MAKEFILE = " << fileInfo(wrapperFile.fileName()).fileName() << endl; t << "QMAKE = " << var("QMAKE_QMAKE") << endl; t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; -- cgit v0.12 From 5ba7b062c3c124f4f9669ec70295a21c84c9fd82 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Wed, 19 May 2010 10:57:40 +0200 Subject: Improve virtual mouse on E72 optical joystick Uses scancodes instead of keycodes, to get access to the 8-way cursor keys introduced in S60 3.2. (EStdKeyDevice10-13) Doubled the rate of acceleration and top speed of the cursor (this applies to all phones, but feedback was that the cursor was too slow) Multiple key presses within 500ms of each other are treated the same as key repeat events. This is because the E72 optical joystick sends pulsed key presses. Task-number: QTBUG-5711 Reviewed-by: Sami Merila --- src/gui/kernel/qapplication_s60.cpp | 203 +++++++++++++++++++++++------------- src/gui/kernel/qt_s60_p.h | 13 ++- 2 files changed, 138 insertions(+), 78 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index ea5c14c..fa07b1a 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -590,57 +590,12 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod case EEventKeyUp: case EEventKey: { - // S60 has a confusing way of delivering key events. There are three types of - // events: EKeyEvent, EKeyEventDown and EKeyEventUp. When a key is pressed, the - // two first events are generated. When releasing the key, the last one is - // generated. - // Because S60 does not generate keysyms for EKeyEventDown and EKeyEventUp events, - // we need to do some special tricks to map it to the Qt way. First, we completely - // discard EKeyEventDown events, since they are redundant. Second, since - // EKeyEventUp does not give us a keysym, we need to cache the keysyms from - // the EKeyEvent events. This is what resolveS60ScanCode does. - - - // ### hackish way to send Qt application to background when pressing right softkey - /* - if( keyEvent.iScanCode == EStdKeyDevice1 ) { - S60->window_group->SetOrdinalPosition(-1); - qApp->setActiveWindow(0); - return EKeyWasNotConsumed; - } - */ - - TUint s60Keysym = QApplicationPrivate::resolveS60ScanCode(keyEvent.iScanCode, - keyEvent.iCode); - int keyCode; - if (s60Keysym == EKeyNull){ //some key events have 0 in iCode, for them iScanCode should be used - keyCode = qt_keymapper_private()->mapS60ScanCodesToQt(keyEvent.iScanCode); - } else if (s60Keysym >= 0x20 && s60Keysym < ENonCharacterKeyBase) { - // Normal characters keys. - keyCode = s60Keysym; - } else { - // Special S60 keys. - keyCode = qt_keymapper_private()->mapS60KeyToQt(s60Keysym); - } - #ifndef QT_NO_CURSOR if (S60->mouseInteractionEnabled && S60->virtualMouseRequired) { //translate keys to pointer - if (keyCode >= Qt::Key_Left && keyCode <= Qt::Key_Down || keyCode == Qt::Key_Select) { - /*Explanation about virtualMouseAccel: - Tapping an arrow key allows precise pixel positioning - Holding an arrow key down, acceleration is applied to allow cursor - to be quickly moved to another part of the screen by key repeats. - */ - if (S60->virtualMouseLastKey == keyCode) { - S60->virtualMouseAccel *= 2; - if (S60->virtualMouseAccel > S60->virtualMouseMaxAccel) - S60->virtualMouseAccel = S60->virtualMouseMaxAccel; - } - else - S60->virtualMouseAccel = 1; - S60->virtualMouseLastKey = keyCode; - + if ((keyEvent.iScanCode >= EStdKeyLeftArrow && keyEvent.iScanCode <= EStdKeyDownArrow) || + (keyEvent.iScanCode >= EStdKeyDevice10 && keyEvent.iScanCode <= EStdKeyDevice13) || + keyEvent.iScanCode == EStdKeyDevice3) { QPoint pos = QCursor::pos(); TPointerEvent fakeEvent; fakeEvent.iType = (TPointerEvent::TType)(-1); @@ -648,54 +603,100 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod TInt x = pos.x(); TInt y = pos.y(); if (type == EEventKeyUp) { - if (keyCode == Qt::Key_Select && - (S60->virtualMousePressedKeys & QS60Data::Select)) - fakeEvent.iType = TPointerEvent::EButton1Up; - S60->virtualMouseAccel = 1; - S60->virtualMouseLastKey = 0; - switch (keyCode) { - case Qt::Key_Left: + S60->virtualMouseAccelTimeout.start(); + switch (keyEvent.iScanCode) { + case EStdKeyLeftArrow: S60->virtualMousePressedKeys &= ~QS60Data::Left; break; - case Qt::Key_Right: + case EStdKeyRightArrow: S60->virtualMousePressedKeys &= ~QS60Data::Right; break; - case Qt::Key_Up: + case EStdKeyUpArrow: S60->virtualMousePressedKeys &= ~QS60Data::Up; break; - case Qt::Key_Down: + case EStdKeyDownArrow: S60->virtualMousePressedKeys &= ~QS60Data::Down; break; - case Qt::Key_Select: + // diagonal keys (named aliases don't exist in 3.1 SDK) + case EStdKeyDevice10: + S60->virtualMousePressedKeys &= ~QS60Data::LeftUp; + break; + case EStdKeyDevice11: + S60->virtualMousePressedKeys &= ~QS60Data::RightUp; + break; + case EStdKeyDevice12: + S60->virtualMousePressedKeys &= ~QS60Data::RightDown; + break; + case EStdKeyDevice13: + S60->virtualMousePressedKeys &= ~QS60Data::LeftDown; + break; + case EStdKeyDevice3: //select + if (S60->virtualMousePressedKeys & QS60Data::Select) + fakeEvent.iType = TPointerEvent::EButton1Up; S60->virtualMousePressedKeys &= ~QS60Data::Select; break; } } else if (type == EEventKey) { - if (keyCode != Qt::Key_Select) + int dx = 0; + int dy = 0; + if (keyEvent.iScanCode != EStdKeyDevice3) { m_doubleClickTimer.invalidate(); - switch (keyCode) { - case Qt::Key_Left: + //reset mouse accelleration after a short time with no moves + const int maxTimeBetweenKeyEventsMs = 500; + if (S60->virtualMouseAccelTimeout.isValid() && + S60->virtualMouseAccelTimeout.hasExpired(maxTimeBetweenKeyEventsMs)) { + S60->virtualMouseAccelDX = 0; + S60->virtualMouseAccelDY = 0; + } + S60->virtualMouseAccelTimeout.invalidate(); + } + switch (keyEvent.iScanCode) { + case EStdKeyLeftArrow: S60->virtualMousePressedKeys |= QS60Data::Left; - x -= S60->virtualMouseAccel; + dx = -1; fakeEvent.iType = TPointerEvent::EMove; break; - case Qt::Key_Right: + case EStdKeyRightArrow: S60->virtualMousePressedKeys |= QS60Data::Right; - x += S60->virtualMouseAccel; + dx = 1; fakeEvent.iType = TPointerEvent::EMove; break; - case Qt::Key_Up: + case EStdKeyUpArrow: S60->virtualMousePressedKeys |= QS60Data::Up; - y -= S60->virtualMouseAccel; + dy = -1; fakeEvent.iType = TPointerEvent::EMove; break; - case Qt::Key_Down: + case EStdKeyDownArrow: S60->virtualMousePressedKeys |= QS60Data::Down; - y += S60->virtualMouseAccel; + dy = 1; + fakeEvent.iType = TPointerEvent::EMove; + break; + case EStdKeyDevice10: + S60->virtualMousePressedKeys |= QS60Data::LeftUp; + dx = -1; + dy = -1; fakeEvent.iType = TPointerEvent::EMove; break; - case Qt::Key_Select: + case EStdKeyDevice11: + S60->virtualMousePressedKeys |= QS60Data::RightUp; + dx = 1; + dy = -1; + fakeEvent.iType = TPointerEvent::EMove; + break; + case EStdKeyDevice12: + S60->virtualMousePressedKeys |= QS60Data::RightDown; + dx = 1; + dy = 1; + fakeEvent.iType = TPointerEvent::EMove; + break; + case EStdKeyDevice13: + S60->virtualMousePressedKeys |= QS60Data::LeftDown; + dx = -1; + dy = 1; + fakeEvent.iType = TPointerEvent::EMove; + break; + case EStdKeyDevice3: // Platform bug. If you start pressing several keys simultaneously (for // example for drag'n'drop), Symbian starts producing spurious up and // down messages for some keys. Therefore, make sure we have a clean slate @@ -715,6 +716,32 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod } break; } + if (dx) { + int cdx = S60->virtualMouseAccelDX; + //reset accel on change of sign, else double accel + if (dx * cdx <= 0) + cdx = dx; + else + cdx *= 4; + //cap accelleration + if (dx * cdx > S60->virtualMouseMaxAccel) + cdx = dx * S60->virtualMouseMaxAccel; + //move mouse position + x += cdx; + S60->virtualMouseAccelDX = cdx; + } + + if (dy) { + int cdy = S60->virtualMouseAccelDY; + if (dy * cdy <= 0) + cdy = dy; + else + cdy *= 4; + if (dy * cdy > S60->virtualMouseMaxAccel) + cdy = dy * S60->virtualMouseMaxAccel; + y += cdy; + S60->virtualMouseAccelDY = cdy; + } } //clip to screen size (window server allows a sprite hotspot to be outside the screen) if (x < 0) @@ -733,12 +760,40 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod HandlePointerEvent(fakeEvent); return EKeyWasConsumed; } - else { - S60->virtualMouseLastKey = keyCode; - S60->virtualMouseAccel = 1; - } } #endif + // S60 has a confusing way of delivering key events. There are three types of + // events: EKeyEvent, EKeyEventDown and EKeyEventUp. When a key is pressed, the + // two first events are generated. When releasing the key, the last one is + // generated. + // Because S60 does not generate keysyms for EKeyEventDown and EKeyEventUp events, + // we need to do some special tricks to map it to the Qt way. First, we completely + // discard EKeyEventDown events, since they are redundant. Second, since + // EKeyEventUp does not give us a keysym, we need to cache the keysyms from + // the EKeyEvent events. This is what resolveS60ScanCode does. + + + // ### hackish way to send Qt application to background when pressing right softkey + /* + if( keyEvent.iScanCode == EStdKeyDevice1 ) { + S60->window_group->SetOrdinalPosition(-1); + qApp->setActiveWindow(0); + return EKeyWasNotConsumed; + } + */ + + TUint s60Keysym = QApplicationPrivate::resolveS60ScanCode(keyEvent.iScanCode, + keyEvent.iCode); + int keyCode; + if (s60Keysym == EKeyNull){ //some key events have 0 in iCode, for them iScanCode should be used + keyCode = qt_keymapper_private()->mapS60ScanCodesToQt(keyEvent.iScanCode); + } else if (s60Keysym >= 0x20 && s60Keysym < ENonCharacterKeyBase) { + // Normal characters keys. + keyCode = s60Keysym; + } else { + // Special S60 keys. + keyCode = qt_keymapper_private()->mapS60KeyToQt(s60Keysym); + } Qt::KeyboardModifiers mods = mapToQtModifiers(keyEvent.iModifiers); QKeyEventEx qKeyEvent(type == EEventKeyUp ? QEvent::KeyRelease : QEvent::KeyPress, keyCode, diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index 1af8eeb..f560458 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -103,16 +103,21 @@ public: int defaultDpiX; int defaultDpiY; WId curWin; - int virtualMouseLastKey; enum PressedKeys { Select = 0x1, Right = 0x2, Down = 0x4, Left = 0x8, - Up = 0x10 + Up = 0x10, + LeftUp = 0x20, + RightUp = 0x40, + RightDown = 0x80, + LeftDown = 0x100 }; int virtualMousePressedKeys; // of the above type, but avoids casting problems - int virtualMouseAccel; + int virtualMouseAccelDX; + int virtualMouseAccelDY; + QElapsedTimer virtualMouseAccelTimeout; int virtualMouseMaxAccel; #ifndef Q_SYMBIAN_FIXED_POINTER_CURSORS int brokenPointerCursors : 1; @@ -248,7 +253,7 @@ inline void QS60Data::updateScreenSize() S60->screenWidthInTwips = params.iTwipsSize.iWidth; S60->screenHeightInTwips = params.iTwipsSize.iHeight; - S60->virtualMouseMaxAccel = qMax(S60->screenHeightInPixels, S60->screenWidthInPixels) / 20; + S60->virtualMouseMaxAccel = qMax(S60->screenHeightInPixels, S60->screenWidthInPixels) / 10; TReal inches = S60->screenHeightInTwips / (TReal)KTwipsPerInch; S60->defaultDpiY = S60->screenHeightInPixels / inches; -- cgit v0.12 From 78ff4ffadd7160b4e354dedafbaccfdbdef21995 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Wed, 19 May 2010 12:03:38 +0200 Subject: Update QtDeclarative .def files for 4.7 Reviewed-by: Trust Me --- src/s60installs/bwins/QtDeclarativeu.def | 8 ++++---- src/s60installs/eabi/QtDeclarativeu.def | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def index 3f2f7a0..c960614 100644 --- a/src/s60installs/bwins/QtDeclarativeu.def +++ b/src/s60installs/bwins/QtDeclarativeu.def @@ -1129,8 +1129,8 @@ EXPORTS ?flickDecelerationChanged@QDeclarativeFlickable@@IAEXXZ @ 1128 NONAME ; void QDeclarativeFlickable::flickDecelerationChanged(void) ?flickDirection@QDeclarativeFlickable@@QBE?AW4FlickDirection@1@XZ @ 1129 NONAME ABSENT ; enum QDeclarativeFlickable::FlickDirection QDeclarativeFlickable::flickDirection(void) const ?flickDirectionChanged@QDeclarativeFlickable@@IAEXXZ @ 1130 NONAME ABSENT ; void QDeclarativeFlickable::flickDirectionChanged(void) - ?flickEnded@QDeclarativeFlickable@@IAEXXZ @ 1131 NONAME ABSENT ; void QDeclarativeFlickable::flickEnded(void) - ?flickStarted@QDeclarativeFlickable@@IAEXXZ @ 1132 NONAME ABSENT ; void QDeclarativeFlickable::flickStarted(void) + ?flickEnded@QDeclarativeFlickable@@IAEXXZ @ 1131 NONAME ; void QDeclarativeFlickable::flickEnded(void) + ?flickStarted@QDeclarativeFlickable@@IAEXXZ @ 1132 NONAME ; void QDeclarativeFlickable::flickStarted(void) ?flickableChildren@QDeclarativeFlickable@@QAE?AU?$QDeclarativeListProperty@VQDeclarativeItem@@@@XZ @ 1133 NONAME ABSENT ; struct QDeclarativeListProperty QDeclarativeFlickable::flickableChildren(void) ?flickableData@QDeclarativeFlickable@@QAE?AU?$QDeclarativeListProperty@VQObject@@@@XZ @ 1134 NONAME ABSENT ; struct QDeclarativeListProperty QDeclarativeFlickable::flickableData(void) ?flickingChanged@QDeclarativeFlickable@@IAEXXZ @ 1135 NONAME ; void QDeclarativeFlickable::flickingChanged(void) @@ -1746,9 +1746,9 @@ EXPORTS ?moveCurrentIndexUp@QDeclarativeGridView@@QAEXXZ @ 1745 NONAME ; void QDeclarativeGridView::moveCurrentIndexUp(void) ?moveCursor@QDeclarativeTextInput@@AAEXXZ @ 1746 NONAME ; void QDeclarativeTextInput::moveCursor(void) ?moveCursorDelegate@QDeclarativeTextEdit@@AAEXXZ @ 1747 NONAME ; void QDeclarativeTextEdit::moveCursorDelegate(void) - ?movementEnded@QDeclarativeFlickable@@IAEXXZ @ 1748 NONAME ABSENT ; void QDeclarativeFlickable::movementEnded(void) + ?movementEnded@QDeclarativeFlickable@@IAEXXZ @ 1748 NONAME ; void QDeclarativeFlickable::movementEnded(void) ?movementEnding@QDeclarativeFlickable@@IAEXXZ @ 1749 NONAME ; void QDeclarativeFlickable::movementEnding(void) - ?movementStarted@QDeclarativeFlickable@@IAEXXZ @ 1750 NONAME ABSENT ; void QDeclarativeFlickable::movementStarted(void) + ?movementStarted@QDeclarativeFlickable@@IAEXXZ @ 1750 NONAME ; void QDeclarativeFlickable::movementStarted(void) ?movementStarting@QDeclarativeFlickable@@IAEXXZ @ 1751 NONAME ; void QDeclarativeFlickable::movementStarting(void) ?movieRequestFinished@QDeclarativeAnimatedImage@@AAEXXZ @ 1752 NONAME ; void QDeclarativeAnimatedImage::movieRequestFinished(void) ?movieUpdate@QDeclarativeAnimatedImage@@AAEXXZ @ 1753 NONAME ; void QDeclarativeAnimatedImage::movieUpdate(void) diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def index 086e1b2..a26e193 100644 --- a/src/s60installs/eabi/QtDeclarativeu.def +++ b/src/s60installs/eabi/QtDeclarativeu.def @@ -1008,7 +1008,7 @@ EXPORTS _ZN21QDeclarativeDomObjectD1Ev @ 1007 NONAME _ZN21QDeclarativeDomObjectD2Ev @ 1008 NONAME _ZN21QDeclarativeDomObjectaSERKS_ @ 1009 NONAME - _ZN21QDeclarativeFlickable10flickEndedEv @ 1010 NONAME ABSENT + _ZN21QDeclarativeFlickable10flickEndedEv @ 1010 NONAME _ZN21QDeclarativeFlickable10timerEventEP11QTimerEvent @ 1011 NONAME _ZN21QDeclarativeFlickable10wheelEventEP24QGraphicsSceneWheelEvent @ 1012 NONAME _ZN21QDeclarativeFlickable11cancelFlickEv @ 1013 NONAME @@ -1018,10 +1018,10 @@ EXPORTS _ZN21QDeclarativeFlickable11setContentXEf @ 1017 NONAME _ZN21QDeclarativeFlickable11setContentYEf @ 1018 NONAME _ZN21QDeclarativeFlickable11visibleAreaEv @ 1019 NONAME - _ZN21QDeclarativeFlickable12flickStartedEv @ 1020 NONAME ABSENT + _ZN21QDeclarativeFlickable12flickStartedEv @ 1020 NONAME _ZN21QDeclarativeFlickable12setOverShootEb @ 1021 NONAME _ZN21QDeclarativeFlickable13flickableDataEv @ 1022 NONAME - _ZN21QDeclarativeFlickable13movementEndedEv @ 1023 NONAME ABSENT + _ZN21QDeclarativeFlickable13movementEndedEv @ 1023 NONAME _ZN21QDeclarativeFlickable13movingChangedEv @ 1024 NONAME _ZN21QDeclarativeFlickable13setPressDelayEi @ 1025 NONAME _ZN21QDeclarativeFlickable13viewportMovedEv @ 1026 NONAME @@ -1034,7 +1034,7 @@ EXPORTS _ZN21QDeclarativeFlickable15flickingChangedEv @ 1033 NONAME _ZN21QDeclarativeFlickable15geometryChangedERK6QRectFS2_ @ 1034 NONAME _ZN21QDeclarativeFlickable15mousePressEventEP24QGraphicsSceneMouseEvent @ 1035 NONAME - _ZN21QDeclarativeFlickable15movementStartedEv @ 1036 NONAME ABSENT + _ZN21QDeclarativeFlickable15movementStartedEv @ 1036 NONAME _ZN21QDeclarativeFlickable15setContentWidthEf @ 1037 NONAME _ZN21QDeclarativeFlickable16movementStartingEv @ 1038 NONAME _ZN21QDeclarativeFlickable16overShootChangedEv @ 1039 NONAME -- cgit v0.12 From e8bf969172647406cc400a5368a5eb624b2e1ec1 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Wed, 19 May 2010 15:12:19 +0200 Subject: Make the 'freeze' target work for linux/symbian. Users can type 'make freeze' to get the def files updated right in the git source tree --- mkspecs/features/symbian/def_files.prf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf index a1f0c8d..8bcd096 100644 --- a/mkspecs/features/symbian/def_files.prf +++ b/mkspecs/features/symbian/def_files.prf @@ -64,14 +64,14 @@ symbian-abld|symbian-sbsv2 { freeze_target.depends = first # The perl part is to convert to unix line endings and remove comments, which the s60 tools refuse to do. freeze_target.commands = perl -n -e \'next if (/; NEW/); s/\r//g; if (/MISSING:(.*)/x) { print(\"\$\$1 ABSENT\\n\"); } else { print; }\' < $$symbianObjdir/$${TARGET}.def > $$elf2e32FileToAdd - #QMAKE_EXTRA_TARGETS += freeze_target + QMAKE_EXTRA_TARGETS += freeze_target } else:contains(TEMPLATE, subdirs) { freeze_target.target = freeze freeze_target.CONFIG = recursive freeze_target.recurse = $$SUBDIRS - #QMAKE_EXTRA_TARGETS += freeze_target + QMAKE_EXTRA_TARGETS += freeze_target } else { freeze_target.target = freeze freeze_target.commands = - #QMAKE_EXTRA_TARGETS += freeze_target + QMAKE_EXTRA_TARGETS += freeze_target } -- cgit v0.12 From 6bdba9c7909d8f53e28823b16e82f89650eea16d Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Wed, 19 May 2010 15:43:38 +0200 Subject: Disable compiling unsupported classes for Symbian The accessibility classes are currently unsupported on Symbian, so don't compile them in. The various styles will not be pretty on symbian either, so don't compile them in. --- configure | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/configure b/configure index d357fde..dc0434f 100755 --- a/configure +++ b/configure @@ -607,7 +607,7 @@ mkdir -p "$outpath/config.tests" rm -f "$outpath/config.tests/.qmake.cache" cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache" -QMakeVar add styles "cde mac motif plastique cleanlooks windows s60" +QMakeVar add styles "cde mac motif plastique cleanlooks windows" QMakeVar add decorations "default windows styled" QMakeVar add mouse-drivers "pc" if [ "$UNAME_SYSTEM" = "Linux" ] ; then @@ -4699,6 +4699,8 @@ if [ "$CFG_ZLIB" = "auto" ]; then fi case "$XPLATFORM" in *symbian*) + QMakeVar set styles "windows s60" #overwrite previous default + if test -z "$EPOCROOT"; then echo "Please export EPOCROOT. It should point to the sdk install dir" exit 1 @@ -4828,7 +4830,14 @@ fi # detect accessibility if [ "$CFG_ACCESSIBILITY" = "auto" ]; then - CFG_ACCESSIBILITY=yes + case "$XPLATFORM" in + symbian*) + # accessibility is currently unsupported + CFG_ACCESSIBILITY=no + ;; + *) + CFG_ACCESSIBILITY=yes + esac fi # auto-detect SQL-modules support -- cgit v0.12 From 219a7248733a8f9dce8674aab405e5223693f0a2 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Wed, 19 May 2010 16:37:02 +0200 Subject: Freetype is not used on symbian, don't use it. --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 79eb75a..e461fa1 100755 --- a/configure +++ b/configure @@ -4677,6 +4677,7 @@ fi case "$XPLATFORM" in *symbian*) QMakeVar set styles "windows s60" #overwrite previous default + CFG_LIBFREETYPE=no if test -z "$EPOCROOT"; then echo "Please export EPOCROOT. It should point to the sdk install dir" -- cgit v0.12