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