diff options
Diffstat (limited to 'src/gui')
23 files changed, 321 insertions, 327 deletions
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index c9478cb..a6c2883 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -1915,7 +1915,6 @@ int QPixmap::defaultDepth() #elif defined(Q_OS_SYMBIAN) return S60->screenDepth; #endif - } typedef void (*_qt_pixmap_cleanup_hook_64)(qint64); diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri index a8d09b0..8b46dc6 100644 --- a/src/gui/kernel/kernel.pri +++ b/src/gui/kernel/kernel.pri @@ -114,7 +114,7 @@ symbian { kernel/qclipboard_s60.cpp\ kernel/qdnd_s60.cpp \ kernel/qsound_s60.cpp - + HEADERS += \ kernel/qt_s60_p.h \ kernel/qeventdispatcher_s60_p.h @@ -198,7 +198,7 @@ embedded { qcocoaview_mac_p.h \ qcocoaapplication_mac_p.h \ qcocoaapplicationdelegate_mac_p.h \ - qmultitouch_mac_p.h + qmultitouch_mac_p.h OBJECTIVE_SOURCES += \ kernel/qcursor_mac.mm \ @@ -216,7 +216,7 @@ embedded { kernel/qt_cocoa_helpers_mac.mm \ kernel/qdesktopwidget_mac.mm \ kernel/qeventdispatcher_mac.mm \ - kernel/qcocoawindowcustomthemeframe_mac.mm \ + kernel/qcocoawindowcustomthemeframe_mac.mm \ kernel/qmultitouch_mac.mm \ HEADERS += \ @@ -225,10 +225,10 @@ embedded { kernel/qcocoaapplicationdelegate_mac_p.h \ kernel/qeventdispatcher_mac_p.h - MENU_NIB.files = mac/qt_menu.nib - MENU_NIB.path = Resources + MENU_NIB.files = mac/qt_menu.nib + MENU_NIB.path = Resources MENU_NIB.version = Versions - QMAKE_BUNDLE_DATA += MENU_NIB + QMAKE_BUNDLE_DATA += MENU_NIB RESOURCES += mac/macresources.qrc LIBS += -framework AppKit diff --git a/src/gui/kernel/qaction.cpp b/src/gui/kernel/qaction.cpp index fe40ea8..07c40c7 100644 --- a/src/gui/kernel/qaction.cpp +++ b/src/gui/kernel/qaction.cpp @@ -1368,7 +1368,7 @@ QAction::MenuRole QAction::menuRole() const This indicates what softkey action this action is. Usually used on mobile platforms to map QActions to hardware keys. - + The softkey role can be changed any time. */ void QAction::setSoftKeyRole(SoftKeyRole softKeyRole) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 7836238..c831dad 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -124,7 +124,7 @@ private: QS60Beep::~QS60Beep() { - delete iToneUtil; + delete iToneUtil; } QS60Beep* QS60Beep::NewL(TInt aFrequency, TTimeIntervalMicroSeconds aDuration) @@ -153,7 +153,7 @@ void QS60Beep::Play() iState=EBeepPrepared; } } - + iToneUtil->Play(); iState=EBeepPlaying; } @@ -295,7 +295,7 @@ void QLongTapTimer::PointerEventL(const TPointerEvent& event) Cancel(); m_event = event; if (event.iType == TPointerEvent::EButton1Down) - { + { m_pressedCoordinates = QPoint(event.iPosition.iX,event.iPosition.iY); // must be same as KLongTapDelay in aknlongtapdetector.h After(800000); @@ -366,7 +366,7 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent) } if (type == QMouseEvent::None) return; - + // store events for later sending/saving QWidget *alienWidget; typedef QPair<QWidget*,QMouseEvent> Event; @@ -375,7 +375,7 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent) QPoint widgetPos = QPoint(pEvent.iPosition.iX, pEvent.iPosition.iY); TPoint controlScreenPos = PositionRelativeToScreen(); QPoint globalPos = QPoint(controlScreenPos.iX, controlScreenPos.iY) + widgetPos; - + if (type == QEvent::MouseButtonPress || type == QEvent::MouseButtonDblClick) { // get the button press target @@ -406,7 +406,7 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent) events.append(Event(S60->lastPointerEventTarget,mEventLeave)); } QMouseEvent mEventEnter(QEvent::Enter, alienWidget->mapFromGlobal(globalPos), globalPos, - button, QApplicationPrivate::mouse_buttons, mapToQtModifiers(pEvent.iModifiers)); + button, QApplicationPrivate::mouse_buttons, mapToQtModifiers(pEvent.iModifiers)); events.append(Event(alienWidget,mEventEnter)); } @@ -672,14 +672,14 @@ void QSymbianControl::HandleResourceChange(int resourceType) { switch (resourceType) { case KInternalStatusPaneChange: - qwidget->d_func()->setWindowIcon_sys(true); - break; + qwidget->d_func()->setWindowIcon_sys(true); + break; case KUidValueCoeFontChangeEvent: // font change event break; #ifdef Q_WS_S60 case KEikDynamicLayoutVariantSwitch: - { + { if (qwidget->isFullScreen()) { SetExtentToWholeScreen(); } else if (qwidget->isMaximized()) { @@ -944,10 +944,10 @@ void QApplication::beep() QS60Beep* beep=NULL; TRAPD(err, beep=QS60Beep::NewL(frequency, duration)); if(!err) { - beep->Play(); + beep->Play(); } delete beep; - beep=NULL; + beep=NULL; } int QApplication::s60ProcessEvent(TWsEvent *event) @@ -1081,8 +1081,8 @@ void QApplication::symbianResourceChange(int type) case KEikDynamicLayoutVariantSwitch: { if (S60) - S60->updateScreenSize(); - + S60->updateScreenSize(); + #ifndef QT_NO_STYLE_S60 QS60Style *s60Style = 0; @@ -1096,7 +1096,7 @@ void QApplication::symbianResourceChange(int type) if (s60Style) s60Style->handleDynamicLayoutVariantSwitch(); -#endif +#endif } break; @@ -1104,7 +1104,7 @@ void QApplication::symbianResourceChange(int type) case KAknsMessageSkinChange: if (QS60Style *s60Style = qobject_cast<QS60Style*>(QApplication::style())) s60Style->handleSkinChange(); - break; + break; #endif #endif // Q_WS_S60 default: @@ -1175,5 +1175,3 @@ void QSessionManager::cancel() } #endif //QT_NO_SESSIONMANAGER QT_END_NAMESPACE - - diff --git a/src/gui/kernel/qclipboard_s60.cpp b/src/gui/kernel/qclipboard_s60.cpp index 27b4fdb..5536438 100644 --- a/src/gui/kernel/qclipboard_s60.cpp +++ b/src/gui/kernel/qclipboard_s60.cpp @@ -76,10 +76,10 @@ public: QMimeData* source() { return src; } bool connected() - { return connection; } + { return connection; } void clear(); RFs fsSession(); - + private: QMimeData* src; @@ -134,7 +134,7 @@ static QClipboardData *clipboardData() delete internalCbData; internalCbData = 0; } - else + else { qAddPostRoutine(cleanupClipboardData); } @@ -161,7 +161,7 @@ void writeToStreamLX(const QMimeData* aData, RWriteStream& aStream) aStream << TCardinality(ba.size()); aStream.WriteL(reinterpret_cast<const uchar*>(ba.constData()),ba.size()); CleanupStack::PopAndDestroy(stringData); - } + } } void readFromStreamLX(QMimeData* aData,RReadStream& aStream) @@ -169,7 +169,7 @@ void readFromStreamLX(QMimeData* aData,RReadStream& aStream) // This function both leaves and throws exceptions. There must be no destructor // dependencies between cleanup styles, and no cleanup stack dependencies on stacked objects. TCardinality mimeTypeCount; - aStream >> mimeTypeCount; + aStream >> mimeTypeCount; for (int i = 0; i< mimeTypeCount;i++) { // mime type @@ -220,7 +220,7 @@ const QMimeData* QClipboard::mimeData(Mode mode) const if (err != KErrNone){ qDebug()<< "clipboard is empty/err: " << err; } - + } return 0; } @@ -249,7 +249,7 @@ void QClipboard::setMimeData(QMimeData* src, Mode mode) qDebug()<< "clipboard write err :" << err; } } - emitChanged(QClipboard::Clipboard); + emitChanged(QClipboard::Clipboard); } bool QClipboard::supportsMode(Mode mode) const diff --git a/src/gui/kernel/qdnd_s60.cpp b/src/gui/kernel/qdnd_s60.cpp index 07b196e..c7656b0 100644 --- a/src/gui/kernel/qdnd_s60.cpp +++ b/src/gui/kernel/qdnd_s60.cpp @@ -94,8 +94,8 @@ class QShapedPixmapWidget public: QShapedPixmapWidget(RWsSession aWsSession,RWindowTreeNode* aNode) { - sprite = RWsSprite(aWsSession); - cursorSprite.iBitmap = 0; + sprite = RWsSprite(aWsSession); + cursorSprite.iBitmap = 0; cursorSprite.iMaskBitmap = 0; cursorSprite.iInvertMask = EFalse; cursorSprite.iOffset = TPoint(0,0); @@ -127,7 +127,7 @@ public: //### heaplock centralized. QImage temp = pm.toImage(); QSize size = pm.size(); - temp.bits(); + temp.bits(); CFbsBitmap *curbm = q_check_ptr(new CFbsBitmap()); // CBase derived object needs check on new curbm->Create(TSize(size.width(),size.height()),EColor16MA); curbm->LockHeap(ETrue); @@ -188,7 +188,7 @@ bool QDragManager::eventFilter(QObject *o, QEvent *e) switch(e->type()) { case QEvent::MouseButtonPress: { - } + } case QEvent::MouseMove: { if (!object) { //#### this should not happen @@ -211,7 +211,7 @@ bool QDragManager::eventFilter(QObject *o, QEvent *e) if (!cw) return true; TPoint windowPos = cw->effectiveWinId()->PositionRelativeToScreen(); - qt_symbian_dnd_deco->sprite.SetPosition(TPoint(me->globalX()- windowPos.iX,me->globalY()- windowPos.iY)); + qt_symbian_dnd_deco->sprite.SetPosition(TPoint(me->globalX()- windowPos.iX,me->globalY()- windowPos.iY)); while (cw && !cw->acceptDrops() && !cw->isWindow()) cw = cw->parentWidget(); @@ -318,7 +318,7 @@ Qt::DropAction QDragManager::drag(QDrag *o) object->d_func()->target = 0; TPoint windowPos = source()->effectiveWinId()->PositionRelativeToScreen(); qt_symbian_dnd_deco->sprite.SetPosition(TPoint(QCursor::pos().x()- windowPos.iX ,QCursor::pos().y() - windowPos.iY)); - + QPoint hotspot = drag_object->hotSpot(); qt_symbian_dnd_deco->cursorSprite.iOffset = TPoint(- hotspot.x(),- hotspot.y()); qt_symbian_dnd_deco->sprite.UpdateMember(0,qt_symbian_dnd_deco->cursorSprite); diff --git a/src/gui/kernel/qsound_s60.cpp b/src/gui/kernel/qsound_s60.cpp index c9eedf5..75458ec 100644 --- a/src/gui/kernel/qsound_s60.cpp +++ b/src/gui/kernel/qsound_s60.cpp @@ -65,22 +65,22 @@ public: void play(); void stop(); - + inline QSound* sound() const { return m_sound; } - + public: // from MMdaAudioPlayerCallback void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration); - void MapcPlayComplete(TInt aError); + void MapcPlayComplete(TInt aError); private: QSound *m_sound; - QAuServerS60 *m_server; + QAuServerS60 *m_server; bool m_prepared; - bool m_playCalled; - CMdaAudioPlayerUtility* m_playUtility; + bool m_playCalled; + CMdaAudioPlayerUtility* m_playUtility; }; - + class QAuServerS60 : public QAuServer { public: @@ -103,11 +103,11 @@ public: } bool okay() { return true; } - + protected: - void playCompleted(QAuBucketS60* bucket, int error) + void playCompleted(QAuBucketS60* bucket, int error) { - QSound *sound = bucket->sound(); + QSound *sound = bucket->sound(); if(!error) { // We need to handle repeats by ourselves, since with Symbian API we don't // know how many loops have been played when user asks it @@ -119,14 +119,14 @@ protected: // in order that QSound::isFinished will return true; while(decLoop(sound)) {} } - } + } protected: QAuBucketS60* bucket( QSound *s ) { return (QAuBucketS60*)QAuServer::bucket( s ); } - + friend class QAuBucketS60; }; @@ -160,32 +160,32 @@ void QAuBucketS60::play() { if(m_prepared) { // OpenFileL call is completed we can start playing immediately - m_playUtility->Play(); + m_playUtility->Play(); } else { m_playCalled = true; } - + } void QAuBucketS60::stop() { m_playCalled = false; - m_playUtility->Stop(); + m_playUtility->Stop(); } void QAuBucketS60::MapcPlayComplete(TInt aError) { m_server->playCompleted(this, aError); } - -void QAuBucketS60::MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& /*aDuration*/) + +void QAuBucketS60::MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& /*aDuration*/) { if(aError) { m_server->playCompleted(this, aError); } else { - m_prepared = true; + m_prepared = true; if(m_playCalled){ - play(); + play(); } } } @@ -196,7 +196,7 @@ QAuBucketS60::~QAuBucketS60() m_playUtility->Stop(); m_playUtility->Close(); } - + delete m_playUtility; } diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index 802a2f7..f6dd2e1 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -73,10 +73,10 @@ #include <akncontext.h> // CAknContextPane #include <eikspane.h> // CEikStatusPane #endif - + QT_BEGIN_NAMESPACE -// Application internal HandleResourceChangeL events, +// Application internal HandleResourceChangeL events, // system evens seems to start with 0x10 const TInt KInternalStatusPaneChange = 0x50000000; @@ -115,7 +115,7 @@ QS60Data* qGlobalS60Data(); class QAbstractLongTapObserver { public: - virtual void HandleLongTapEventL( const TPoint& aPenEventLocation, + virtual void HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& aPenEventScreenLocation ) = 0; }; class QLongTapTimer; diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index bfcb02b..bca0e9d 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -896,22 +896,22 @@ void QWidget::setAutoFillBackground(bool enabled) \endlist \sa QEvent, QPainter, QGridLayout, QBoxLayout - + \section1 SoftKeys \since 4.6 \preliminary - Softkeys API is a platform independent way of mapping actions to (hardware)keys + Softkeys API is a platform independent way of mapping actions to (hardware)keys and toolbars provided by the underlying platform. - - There are three major use cases supported. First one is a mobile device + + There are three major use cases supported. First one is a mobile device with keypad navigation and no touch ui. Second use case is a mobile - device with touch ui. Third use case is desktop. For now the softkey API is + device with touch ui. Third use case is desktop. For now the softkey API is only implemented for Series60. - - QActions are set to widget(s) via softkey API. Actions in focused widget are + + QActions are set to widget(s) via softkey API. Actions in focused widget are mapped to native toolbar or hardware keys. Even though the API allows to set - any amount of widgets there might be physical restrictions to amount of + any amount of widgets there might be physical restrictions to amount of softkeys that can be used by the device. \o Series60: For series60 menu button is automatically mapped to left @@ -919,7 +919,7 @@ void QWidget::setAutoFillBackground(bool enabled) \sa softKeys() \sa setSoftKey() - + */ QWidgetMapper *QWidgetPrivate::mapper = 0; // widget with wid @@ -5768,7 +5768,7 @@ void QWidget::setFocus(Qt::FocusReason reason) if (!isEnabled()) return; - + QWidget *f = this; while (f->d_func()->extra && f->d_func()->extra->focus_proxy) f = f->d_func()->extra->focus_proxy; @@ -11698,7 +11698,7 @@ void QWidget::clearMask() /*! \preliminary \since 4.6 - + Returns the (possibly empty) list of this widget's softkeys. Returned list cannot be changed. Softkeys should be added and removed via method called setSoftKeys @@ -11719,7 +11719,7 @@ const QList<QAction*>& QWidget::softKeys() const /*! \preliminary \since 4.6 - + Sets the softkey \a softkey to this widget's list of softkeys, Setting 0 as softkey will clear all the existing softkeys set to the widget diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index b206517..ddd2f4c 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -313,14 +313,14 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de QSymbianControl *control= q_check_ptr(new QSymbianControl(q)); QT_TRAP_THROWING(control->ConstructL(true,desktop)); if (!desktop) { - TInt stackingFlags; - if ((q->windowType() & Qt::Popup) == Qt::Popup) { - stackingFlags = ECoeStackFlagRefusesAllKeys | ECoeStackFlagRefusesFocus; - } else { - stackingFlags = ECoeStackFlagStandard; - } - control->ControlEnv()->AppUi()->AddToStackL(control, ECoeStackPriorityDefault, stackingFlags); - + TInt stackingFlags; + if ((q->windowType() & Qt::Popup) == Qt::Popup) { + stackingFlags = ECoeStackFlagRefusesAllKeys | ECoeStackFlagRefusesFocus; + } else { + stackingFlags = ECoeStackFlagStandard; + } + control->ControlEnv()->AppUi()->AddToStackL(control, ECoeStackPriorityDefault, stackingFlags); + QTLWExtra *topExtra = topData(); topExtra->rwindow = control->DrawableWindow(); // Request mouse move events. @@ -349,7 +349,7 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de } else if (q->testAttribute(Qt::WA_NativeWindow) || paintOnScreen()) { // create native child widget QSymbianControl *control = new QSymbianControl(q); QT_TRAP_THROWING(control->ConstructL(!parentWidget)); - + TInt stackingFlags; if ((q->windowType() & Qt::Popup) == Qt::Popup) { stackingFlags = ECoeStackFlagRefusesAllKeys | ECoeStackFlagRefusesFocus; @@ -357,7 +357,7 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de stackingFlags = ECoeStackFlagStandard; } control->ControlEnv()->AppUi()->AddToStackL(control, ECoeStackPriorityDefault, stackingFlags); - + setWinId(control); WId parentw = parentWidget->effectiveWinId(); QT_TRAP_THROWING(control->SetContainerWindowL(*parentw)); @@ -395,12 +395,12 @@ void QWidgetPrivate::show_sys() WId id = q->internalWinId(); if (!extra->topextra->activated) { - QT_TRAP_THROWING(id->ActivateL()); + QT_TRAP_THROWING(id->ActivateL()); extra->topextra->activated = 1; } id->MakeVisible(true); id->SetFocus(true); - + // Force setting of the icon after window is made visible, // this is needed even WA_SetWindowIcon is not set, as in that case we need // to reset to the application level window icon @@ -555,7 +555,7 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f) if (wasCreated && old_winid) { old_winid->MakeVisible(false); if(old_winid->IsFocused()) // Avoid unnecessary calls to FocusChanged() - old_winid->SetFocus(false); + old_winid->SetFocus(false); old_winid->SetParent(0); } @@ -621,7 +621,7 @@ void QWidgetPrivate::s60UpdateIsOpaque() CFbsBitmap* qt_pixmapToNativeBitmap(QPixmap pixmap, bool invert) { - CFbsBitmap* fbsBitmap = q_check_ptr(new CFbsBitmap); // CBase derived object needs check on new + CFbsBitmap* fbsBitmap = q_check_ptr(new CFbsBitmap); // CBase derived object needs check on new TSize size(pixmap.size().width(), pixmap.size().height()); TDisplayMode mode(EColor16MU); @@ -632,7 +632,7 @@ CFbsBitmap* qt_pixmapToNativeBitmap(QPixmap pixmap, bool invert) // Will fix later on when native pixmap is implemented switch(pixmap.depth()) { case 1: - mode = EGray2; + mode = EGray2; break; case 4: mode = EColor16; @@ -662,7 +662,7 @@ CFbsBitmap* qt_pixmapToNativeBitmap(QPixmap pixmap, bool invert) QImage image = pixmap.toImage(); if(invert) - image.invertPixels(); + image.invertPixels(); int height = pixmap.size().height(); for(int i=0;i<height;i++ ) @@ -718,14 +718,14 @@ void QWidgetPrivate::setWindowIcon_sys(bool forceReset) // Context pane does not exist, try setting small icon to title pane TRect titlePaneRect; TBool found = AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::ETitlePane, titlePaneRect ); - CAknTitlePane* titlePane = S60->titlePane(); + CAknTitlePane* titlePane = S60->titlePane(); if (found && titlePane) { // We have title pane with valid metrics - // The API to get title_pane graphics size is not public -> assume square space based + // The API to get title_pane graphics size is not public -> assume square space based // on titlebar font height. CAknBitmap would be optimum, wihtout setting the size, since // then title pane would automatically scale the bitmap. Unfortunately it is not public API const CFont * font = AknLayoutUtils::FontFromId(EAknLogicalFontTitleFont); TSize iconSize(font->HeightInPixels(), font->HeightInPixels()); - + QIcon icon = q->windowIcon(); if (!icon.isNull()) { // Valid icon -> set it as an title pane small picture @@ -750,7 +750,7 @@ void QWidgetPrivate::setWindowIcon_sys(bool forceReset) } } } - + #else Q_UNUSED(forceReset) #endif @@ -764,10 +764,10 @@ void QWidgetPrivate::setWindowTitle_sys(const QString &caption) Q_ASSERT(q->testAttribute(Qt::WA_WState_Created)); CAknTitlePane* titlePane = S60->titlePane(); if(titlePane) { - if(caption.isEmpty()) - titlePane->SetTextToDefaultL(); - else - QT_TRAP_THROWING(titlePane->SetTextL(qt_QString2TPtrC(caption))); + if(caption.isEmpty()) + titlePane->SetTextToDefaultL(); + else + QT_TRAP_THROWING(titlePane->SetTextL(qt_QString2TPtrC(caption))); } } #else @@ -1044,7 +1044,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate) if (isVisible()) { WId id = effectiveWinId(); if(id->IsFocused()) // Avoid unnecessary calls to FocusChanged() - id->SetFocus(false); + id->SetFocus(false); id->MakeVisible(false); } } else { @@ -1052,7 +1052,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate) WId id = effectiveWinId(); id->MakeVisible(true); if(!id->IsFocused()) // Avoid unnecessary calls to FocusChanged() - id->SetFocus(true); + id->SetFocus(true); } const QRect normalGeometry = geometry(); const QRect r = top->normalGeometry; @@ -1115,10 +1115,10 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows) // the next visible window will get keyboard focus WId wid = CEikonEnv::Static()->AppUi()->TopFocusedControl(); if (wid) { - QWidget *widget = QWidget::find(wid); + QWidget *widget = QWidget::find(wid); QApplication::setActiveWindow(widget); // Reset global window title for focusing window - widget->d_func()->setWindowTitle_sys(widget->windowTitle()); + widget->d_func()->setWindowTitle_sys(widget->windowTitle()); } } diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri index d153215..1f52422 100644 --- a/src/gui/painting/painting.pri +++ b/src/gui/painting/painting.pri @@ -233,7 +233,7 @@ contains(QMAKE_MAC_XARCH, no) { win32-g++|!win32:!*-icc* { mmx { - mmx_compiler.commands = $$QMAKE_CXX -c -Winline + mmx_compiler.commands = $$QMAKE_CXX -c -Winline mac { mmx_compiler.commands += -Xarch_i386 -mmmx @@ -375,7 +375,7 @@ symbian { "SOURCE qblendfunctions_armv6_rvct.s" \ "SOURCE qdrawhelper_armv6_rvct.s" \ "$${LITERAL_HASH}endif" - + MMP_RULES += armccIfdefBlock QMAKE_CXXFLAGS.ARMCC *= -O3 } diff --git a/src/gui/painting/qblendfunctions_armv6_rvct.s b/src/gui/painting/qblendfunctions_armv6_rvct.s index 312bd07..64d5aa5 100644 --- a/src/gui/painting/qblendfunctions_armv6_rvct.s +++ b/src/gui/painting/qblendfunctions_armv6_rvct.s @@ -54,13 +54,13 @@ ARM PRESERVE8 - INCLUDE qdrawhelper_armv6_rvct.inc + INCLUDE qdrawhelper_armv6_rvct.inc ;----------------------------------------------------------------------------- ; qt_blend_rgb32_on_rgb32_arm -; -; @brief +; +; @brief ; ; @param dest Destination pixels (r0) ; @param dbpl Destination bytes per line (r1) @@ -69,25 +69,25 @@ ; @param w Width (s0 -> r4) ; @param h Height (s1 -> r5) ; @param const_alpha Constant alpha (s2 -> r6) -; +; ;--------------------------------------------------------------------------- qt_blend_rgb32_on_rgb32_armv6 Function stmfd sp!, {r4-r12, r14} - + ; read arguments off the stack add r8, sp, #10 * 4 ldmia r8, {r9-r11} - + ; Reorganize registers - + mov r4, r10 mov r5, r1 mov r6, r3 - + mov r1, r2 mov r2, r9 mov r3, r11 - + ; Now we have registers ; @param dest Destination pixels (r0) ; @param src Source pixels (r1) @@ -96,53 +96,53 @@ qt_blend_rgb32_on_rgb32_armv6 Function ; @param h Height (r4) ; @param dbpl Destination bytes per line (r5) ; @param sbpl Source bytes per line (r6) - + cmp r3, #256 ; test if we have fully opaque constant alpha value bne rgb32_blend_const_alpha ; branch if not - + rgb32_blend_loop subs r4, r4, #1 bmi rgb32_blend_exit ; while(h--) - -rgb321 PixCpySafe r0, r1, r2 + +rgb321 PixCpySafe r0, r1, r2 add r0, r0, r5 ; dest = dest + dbpl - add r1, r1, r6 ; src = src + sbpl + add r1, r1, r6 ; src = src + sbpl + + b rgb32_blend_loop + - b rgb32_blend_loop - - rgb32_blend_const_alpha ;ldr r14, =ComponentHalf ; load 0x800080 to r14 mov r14, #0x800000 add r14, r14, #0x80 - + sub r3, r3, #1 ; const_alpha -= 1; rgb32_blend_loop_const_alpha subs r4, r4, #1 bmi rgb32_blend_exit ; while(h--) - + rgb322 BlendRowSafe PixelSourceOverConstAlpha add r0, r0, r5 ; dest = dest + dbpl - add r1, r1, r6 ; src = src + sbpl + add r1, r1, r6 ; src = src + sbpl b rgb32_blend_loop_const_alpha - -rgb32_blend_exit - + +rgb32_blend_exit + ldmfd sp!, {r4-r12, pc} ; pop and return - - - + + + ;----------------------------------------------------------------------------- ; qt_blend_argb32_on_argb32_arm -; -; @brief +; +; @brief ; ; @param dest Destination pixels (r0) ; @param dbpl Destination bytes per line (r1) @@ -151,25 +151,25 @@ rgb32_blend_exit ; @param w Width (s0 -> r4) ; @param h Height (s1 -> r5) ; @param const_alpha Constant alpha (s2 -> r6) -; +; ;--------------------------------------------------------------------------- qt_blend_argb32_on_argb32_armv6 Function stmfd sp!, {r4-r12, r14} - + ; read arguments off the stack add r8, sp, #10 * 4 ldmia r8, {r9-r11} - + ; Reorganize registers - + mov r4, r10 mov r5, r1 mov r6, r3 - + mov r1, r2 mov r2, r9 mov r3, r11 - + ; Now we have registers ; @param dest Destination pixels (r0) ; @param src Source pixels (r1) @@ -178,14 +178,14 @@ qt_blend_argb32_on_argb32_armv6 Function ; @param h Height (r4) ; @param dbpl Destination bytes per line (r5) ; @param sbpl Source bytes per line (r6) - + ;ldr r14, =ComponentHalf ; load 0x800080 to r14 mov r14, #0x800000 add r14, r14, #0x80 - + cmp r3, #256 ; test if we have fully opaque constant alpha value bne argb32_blend_const_alpha ; branch if not - + argb32_blend_loop subs r4, r4, #1 @@ -194,10 +194,10 @@ argb32_blend_loop argb321 BlendRowSafe PixelSourceOver add r0, r0, r5 ; dest = dest + dbpl - add r1, r1, r6 ; src = src + sbpl + add r1, r1, r6 ; src = src + sbpl b argb32_blend_loop - + argb32_blend_const_alpha sub r3, r3, #1 ; const_alpha -= 1; @@ -206,18 +206,17 @@ argb32_blend_loop_const_alpha subs r4, r4, #1 bmi argb32_blend_exit ; while(h--) - + argb322 BlendRowSafe PixelSourceOverConstAlpha add r0, r0, r5 ; dest = dest + dbpl - add r1, r1, r6 ; src = src + sbpl + add r1, r1, r6 ; src = src + sbpl b argb32_blend_loop_const_alpha - -argb32_blend_exit - + +argb32_blend_exit + ldmfd sp!, {r4-r12, pc} ; pop and return - - + + END ; File end - diff --git a/src/gui/painting/qcolormap_s60.cpp b/src/gui/painting/qcolormap_s60.cpp index 1b58598..29d340f 100644 --- a/src/gui/painting/qcolormap_s60.cpp +++ b/src/gui/painting/qcolormap_s60.cpp @@ -105,4 +105,3 @@ QColormap &QColormap::operator=(const QColormap &colormap) { qAtomicAssign(d, colormap.d); return *this; } QT_END_NAMESPACE - diff --git a/src/gui/painting/qdrawhelper_armv6_rvct.inc b/src/gui/painting/qdrawhelper_armv6_rvct.inc index b3e0605..1cb316a 100644 --- a/src/gui/painting/qdrawhelper_armv6_rvct.inc +++ b/src/gui/painting/qdrawhelper_armv6_rvct.inc @@ -52,10 +52,10 @@ ;----------------------------------------------------------------------------- ; Globals. -; Earch marcro expects that caller has loaded 0x800080 to r14. +; Earch marcro expects that caller has loaded 0x800080 to r14. ;----------------------------------------------------------------------------- -ComponentHalf EQU 0x800080 +ComponentHalf EQU 0x800080 ;----------------------------------------------------------------------------- ; ARM assembly implementations of accelerated graphics operations. @@ -65,7 +65,7 @@ ComponentHalf EQU 0x800080 ; - r0 = Target buffer pointer ; - r1 = Source buffer pointer ; - r2 = Length of the buffer to blend -; - r3 = Constant alpha for source buffer +; - r3 = Constant alpha for source buffer ; ;----------------------------------------------------------------------------- @@ -78,8 +78,8 @@ $func Function CODE32 $func MEND - - + + ;----------------------------------------------------------------------------- ; Armv6 boosted implementation of BYTE_MUL(...) function found in qdrawhelper_p.h. ; @@ -98,29 +98,29 @@ $func ; uint r8 = (x & 0xff00ff) * a + 0x800080 uxtb16 r8, $x ; r8 = r8 & 0x00FF00FF mla r8, r8, $a, r14 - + ; x = ((r >> 8) & 0xff00ff) * a + 0x800080 uxtb16 $x, $x, ror #8 mla $x, $x, $a, r14 - + ; r8 = (r8 + ((r8 >> 8) & 0xff00ff) ) >> 8 ; r8 &= 0xff00ff uxtab16 r8, r8, r8, ror #8 uxtb16 r8, r8, ror #8 - + ; x = x + ((x >>8) & 0xff00ff) uxtab16 $x, $x, $x, ror #8 - + ; x &= 0xff00ff00 ; x |= r8 uxtb16 $x, $x, ror #8 orr $dst, r8, $x, lsl #8 - + MEND - + ;----------------------------------------------------------------------------- -; Armv6 boosted implementation of INTERPOLATE_PIXEL_255(...) function found in +; Armv6 boosted implementation of INTERPOLATE_PIXEL_255(...) function found in ; qdrawhelper_p.h. ; ; @param dst Destination register where to store the result @@ -129,7 +129,7 @@ $func ; @param y Second value to multiply ; @param b Multiplicator byte for second value ; @param r14 Component half 0x800080 -; +; ; ; @note Trashes x, r8, r14 ;----------------------------------------------------------------------------- @@ -143,40 +143,40 @@ $func ; uint r8 = (((x & 0xff00ff) * a) + 0x800080) uxtb16 r8, $x ; r8 = r8 & 0x00FF00FF mla r8, r8, $a, r14 - + ; x = ((((x >> 8) & 0xff00ff) * a) + 0x800080) uxtb16 $x, $x, ror #8 mla $x, $x, $a, r14 - + ; Now we are trashing r14 to free it for other purposes - + ; uint r14 = (y & 0xff00ff) * b uxtb16 r14, $y ; r14 = y & 0x00FF00FF mul r14, r14, $b - + ; r8 = r8 + r14 add r8, r8, r14 - + ; r8 = (r8 + ((r8 >> 8) & 0xff00ff) ) >> 8 ; r8 &= 0xff00ff uxtab16 r8, r8, r8, ror #8 uxtb16 r8, r8, ror #8 - + ; r14 = ((y >> 8) & 0xff00ff) * b uxtb16 r14, $y, ror #8 ; r14 = ((y >> 8) & 0xFF00FF) mul r14, r14, $b - + ; x = x + r14 add $x, $x, r14 - + ; x = x + ((x >>8) & 0xff00ff) uxtab16 $x, $x, $x, ror #8 - + ; x &= 0xff00ff00 ; x |= r8 uxtb16 $x, $x, ror #8 orr $dst, r8, $x, lsl #8 - + MEND ;----------------------------------------------------------------------------- @@ -184,19 +184,19 @@ $func ;----------------------------------------------------------------------------- MACRO $label Blend4Pixels $BlendPixel - - ; Blend first 4 pixels - + + ; Blend first 4 pixels + ldmia r1!, {r4-r7} ldm r0, {r9-r12} - + b4p1_$label $BlendPixel r9, r4, r3 b4p2_$label $BlendPixel r10, r5, r3 b4p3_$label $BlendPixel r11, r6, r3 b4p4_$label $BlendPixel r12, r7, r3 - + stmia r0!, {r9-r12} - + MEND ;----------------------------------------------------------------------------- @@ -204,43 +204,43 @@ b4p4_$label $BlendPixel r12, r7, r3 ;----------------------------------------------------------------------------- MACRO $label Blend8Pixels $BlendPixel - + b8p1_$label Blend4Pixels $BlendPixel -b8p2_$label Blend4Pixels $BlendPixel - +b8p2_$label Blend4Pixels $BlendPixel + MEND - + ;----------------------------------------------------------------------------- ; ;----------------------------------------------------------------------------- MACRO $label Blend16Pixels $BlendPixel - + b16p1_$label Blend8Pixels $BlendPixel -b16p2_$label Blend8Pixels $BlendPixel - +b16p2_$label Blend8Pixels $BlendPixel + MEND - + ;----------------------------------------------------------------------------- ; ;----------------------------------------------------------------------------- MACRO $label Blend32Pixels $BlendPixel - + b32p1_$label Blend16Pixels $BlendPixel -b32p2_$label Blend16Pixels $BlendPixel - +b32p2_$label Blend16Pixels $BlendPixel + MEND ;----------------------------------------------------------------------------- -; A macro for source over compositing one row of pixels and saving the results +; A macro for source over compositing one row of pixels and saving the results ; to destination buffer. ; ; @param dest Destination buffer (r0) ; @param src Source buffer (r1) ; @param length Length (r2) ; @param const_alpha Constant alpha (r3) -; @param r14 Component Half (0x800080) (r14) +; @param r14 Component Half (0x800080) (r14) ; ; @note Advances r0, r1 ; @note Trashes r2, r4-r12 @@ -260,73 +260,73 @@ brp1_$label Blend32Pixels $BlendPixel b bloop_$label b_remaining_$label - + ; Remaining 31 pixels - + addmi r2, r2, #32 ; Blend 16 pixels tst r2, #16 beq b_remaining8_$label - + brp2_$label Blend16Pixels $BlendPixel - -b_remaining8_$label - + +b_remaining8_$label + ; Blend 8 pixels tst r2, #8 beq b_remaining4_$label - -brp3_$label Blend8Pixels $BlendPixel - -b_remaining4_$label - + +brp3_$label Blend8Pixels $BlendPixel + +b_remaining4_$label + ; Blend 4 pixels tst r2, #4 beq b_remaining3_$label - -brp4_$label Blend4Pixels $BlendPixel + +brp4_$label Blend4Pixels $BlendPixel b_remaining3_$label ; Remaining 3 pixels - + tst r2, #2 beq b_last_$label - + ldmia r1!, {r4-r5} ldm r0, {r9-r10} - + brp5_$label $BlendPixel r9, r4, r3 brp6_$label $BlendPixel r10, r5, r3 - + stmia r0!, {r9-r10} b_last_$label - + tst r2, #1 beq bexit_$label - + ldr r4, [r1] ldr r9, [r0] bpl_$label $BlendPixel r9, r4, r3 - + str r9, [r0] bexit_$label MEND - + ;----------------------------------------------------------------------------- -; A macro for source over compositing one row of pixels and saving the results +; A macro for source over compositing one row of pixels and saving the results ; to destination buffer. Restores all registers. ; ; @param dest Destination buffer (r0) ; @param src Source buffer (r1) ; @param length Length (r2) ; @param const_alpha Constant alpha (r3) -; @param r14 Component Half (0x800080) (r14) +; @param r14 Component Half (0x800080) (r14) ; ; @note Advances r0, r1 ; @note Trashes r2, r4-r12 @@ -336,16 +336,16 @@ $label BlendRowSafe $BlendPixel stmfd sp!, {r0-r6} ; Preserves registers only up to r6 -brs_$label BlendRow $BlendPixel +brs_$label BlendRow $BlendPixel ldmfd sp!, {r0-r6} - MEND - + MEND + ;----------------------------------------------------------------------------- -; Pix Copy. -; NOTE! Cache line size of ARM1136JF-S and ARM1136J-S is 32 bytes (8 pixels). +; Pix Copy. +; NOTE! Cache line size of ARM1136JF-S and ARM1136J-S is 32 bytes (8 pixels). ; ; @param dst Destination pixels (r0) ; @param src Source pixels (r1) @@ -369,7 +369,7 @@ pcpy_loop_$label pcpy_remaining_$label ; Copy up to 7 remaining pixels - + ; Copy 4 pixels tst $len, #4 ldmneia $src!, {r3-r6} @@ -384,9 +384,9 @@ pcpy_remaining_$label strne r3, [$dst] MEND - + ;----------------------------------------------------------------------------- -; General Pix Copy. Maximum 8 pixels at time. Restores all registers. +; General Pix Copy. Maximum 8 pixels at time. Restores all registers. ; ; @param dst Destination pixels (r0) ; @param src Source pixels (r1) @@ -402,10 +402,10 @@ $label PixCpySafe $dst, $src, $len pcs_$label PixCpy $dst, $src, $len ldmfd sp!, {r0-r6} ; pop - + MEND - - + + ;----------------------------------------------------------------------------- ; A macro for source over compositing one pixel and saving the result to ; dst register. @@ -422,7 +422,7 @@ $label PixelSourceOver $dst, $src, $const_alpha ; Negate src and extract alpha mvn $const_alpha, $src ; bitwise not - uxtb $const_alpha, $const_alpha, ror #24 ; r3 = ((r3 & 0xFF000000) >> 24); + uxtb $const_alpha, $const_alpha, ror #24 ; r3 = ((r3 & 0xFF000000) >> 24); ;cmp $const_alpha, #255 ; test for full transparency ( negated ) ;beq exit_$label @@ -430,12 +430,12 @@ $label PixelSourceOver $dst, $src, $const_alpha moveq $dst, $src beq exit_$label - ByteMul $dst, $dst, $const_alpha + ByteMul $dst, $dst, $const_alpha add $dst, $src, $dst - + exit_$label MEND - + ;----------------------------------------------------------------------------- ; A macro for source over compositing one pixel and saving the result to ; dst register. @@ -457,7 +457,7 @@ $label PixelSourceOverConstAlpha $dst, $src, $const_alpha ; Negate src and extract alpha mvn $const_alpha, $src ; bitwise not - uxtb $const_alpha, $const_alpha, ror #24 ; r3 = ((r3 & 0xFF000000) >> 24); + uxtb $const_alpha, $const_alpha, ror #24 ; r3 = ((r3 & 0xFF000000) >> 24); ByteMul $dst, $dst, $const_alpha @@ -466,8 +466,8 @@ $label PixelSourceOverConstAlpha $dst, $src, $const_alpha ; recover alpha ldmfd sp!, {$const_alpha} - MEND - + MEND + ;----------------------------------------------------------------------------- ; A macro for source over compositing one pixel and saving the result to ; a register. @@ -491,6 +491,6 @@ $label PixelSourceConstAlpha $dst, $src, $const_alpha ; recover r2 and r14 ldmfd sp!, {r2, r14} - MEND - + MEND + END ; File end diff --git a/src/gui/painting/qdrawhelper_armv6_rvct.s b/src/gui/painting/qdrawhelper_armv6_rvct.s index 3ffe48b..dd29f80 100644 --- a/src/gui/painting/qdrawhelper_armv6_rvct.s +++ b/src/gui/painting/qdrawhelper_armv6_rvct.s @@ -52,22 +52,22 @@ ARM PRESERVE8 - + INCLUDE qdrawhelper_armv6_rvct.inc - + ;----------------------------------------------------------------------------- ; qt_memfill32_armv6 -; +; ; @brief Not yet in use! ; ; @param dest Destination buffer (r0) ; @param value Value (r1) ; @param count Count (r2) -; +; ;--------------------------------------------------------------------------- qt_memfill32_armv6 Function stmfd sp!, {r4-r12, r14} - + mov r3, r1 mov r4, r1 mov r5, r1 @@ -75,7 +75,7 @@ qt_memfill32_armv6 Function mov r7, r1 mov r8, r1 mov r9, r1 - + mfill_loop ; Fill 32 pixels per loop iteration subs r2, r2, #32 @@ -88,16 +88,16 @@ mfill_loop mfill_remaining ; Fill up to 31 remaining pixels - + ; Fill 16 pixels tst r2, #16 stmneia r0!, {r1, r3, r4, r5, r6, r7, r8, r9} stmneia r0!, {r1, r3, r4, r5, r6, r7, r8, r9} - + ; Fill 8 pixels tst r2, #8 stmneia r0!, {r1, r3, r4, r5, r6, r7, r8, r9} - + ; Fill 4 pixels tst r2, #4 stmneia r0!, {r1, r3, r4, r5} @@ -109,31 +109,31 @@ mfill_remaining ; Fill last one tst r2, #1 strne r1, [r0] - + ldmfd sp!, {r4-r12, pc} ; pop and return - + ;----------------------------------------------------------------------------- ; comp_func_Source_arm -; -; @brief +; +; @brief ; ; @param dest Destination buffer (r0) ; @param src Source buffer (r1) ; @param length Length (r2) ; @param const_alpha Constant alpha (r3) -; +; ;--------------------------------------------------------------------------- comp_func_Source_armv6 Function stmfd sp!, {r4-r12, r14} - + cmp r3, #255 ; if(r3 == 255) bne src2 ; branch if not - + src1 PixCpy r0, r1, r2 ldmfd sp!, {r4-r12, pc} ; pop and return -src2 +src2 ;ldr r14, =ComponentHalf ; load 0x800080 to r14 mov r14, #0x800000 add r14, r14, #0x80 @@ -144,35 +144,34 @@ src22 BlendRow PixelSourceConstAlpha ;----------------------------------------------------------------------------- ; comp_func_SourceOver_arm -; -; @brief +; +; @brief ; ; @param dest Destination buffer (r0) ; @param src Source buffer (r1) ; @param length Length (r2) ; @param const_alpha Constant alpha (r3) -; +; ;--------------------------------------------------------------------------- comp_func_SourceOver_armv6 Function stmfd sp!, {r4-r12, r14} - + ;ldr r14, =ComponentHalf ; load 0x800080 to r14 mov r14, #0x800000 add r14, r14, #0x80 - + cmp r3, #255 ; if(r3 == 255) bne srcovr2 ; branch if not - + srcovr1 BlendRow PixelSourceOver - + ldmfd sp!, {r4-r12, pc} ; pop and return srcovr2 - + srcovr22 BlendRow PixelSourceOverConstAlpha ldmfd sp!, {r4-r12, pc} ; pop and return - - END ; File end - + + END ; File end diff --git a/src/gui/painting/qwindowsurface_s60_p.h b/src/gui/painting/qwindowsurface_s60_p.h index 40a866d..6a31ced 100644 --- a/src/gui/painting/qwindowsurface_s60_p.h +++ b/src/gui/painting/qwindowsurface_s60_p.h @@ -81,7 +81,7 @@ public: static void unlockBitmapHeap(); CFbsBitmap *symbianBitmap() const; - + private: void updatePaintDeviceOnBitmap(); diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 888a6ed..0277d2f 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -280,7 +280,7 @@ void QS60StylePrivate::drawSkinElement(SkinElements element, QPainter *painter, break; case SE_Editor: drawFrame(SF_Editor, painter, rect, flags | SF_PointNorth); - break; + break; default: break; } @@ -796,12 +796,12 @@ void QS60StylePrivate::setThemePaletteHash(QPalette *palette) const s60Color(QS60StyleEnums::CL_QsnTextColors, 24, 0)); QApplication::setPalette(widgetPalette, "QTextEdit"); widgetPalette = *palette; - + widgetPalette.setColor(QPalette::All, QPalette::HighlightedText, s60Color(QS60StyleEnums::CL_QsnTextColors, 24, 0)); QApplication::setPalette(widgetPalette, "QComboBox"); widgetPalette = *palette; - + widgetPalette.setColor(QPalette::WindowText, mainAreaTextColor); widgetPalette.setColor(QPalette::Button, QApplication::palette().color(QPalette::Button)); widgetPalette.setColor(QPalette::Dark, mainAreaTextColor.darker()); diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h index 2eb40de..4bf8143 100644 --- a/src/gui/styles/qs60style_p.h +++ b/src/gui/styles/qs60style_p.h @@ -270,7 +270,7 @@ public: SP_QsnFrButtonSideBInactive, SP_QsnFrButtonSideLInactive, SP_QsnFrButtonSideRInactive, - SP_QsnFrButtonCenterInactive, + SP_QsnFrButtonCenterInactive, SP_QsnFrNotepadCornerTl, SP_QsnFrNotepadCornerTr, SP_QsnFrNotepadCornerBl, diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index 81ee8b1..f304d14 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -80,7 +80,7 @@ enum TSupportRelease { ES60_5_1 = 0x0008, ES60_5_2 = 0x0010, // Add all new releases here - ES60_AllReleases = ES60_3_1 | ES60_3_2 | ES60_5_0 | ES60_5_1 | ES60_5_2 + ES60_AllReleases = ES60_3_1 | ES60_3_2 | ES60_5_0 | ES60_5_1 | ES60_5_2 }; typedef struct { @@ -317,7 +317,7 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = { /* SP_QsnFrButtonSideBInactive */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b6}, /* SP_QsnFrButtonSideLInactive */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b7}, /* SP_QsnFrButtonSideRInactive */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b8}, - /* SP_QsnFrButtonCenterInactive */ {KAknsIIDQsnFrButtonTbCenter, EDrawIcon, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b9}, + /* SP_QsnFrButtonCenterInactive */ {KAknsIIDQsnFrButtonTbCenter, EDrawIcon, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b9}, /* SP_QsnFrNotepadCornerTl */ {KAknsIIDQsnFrNotepadContCornerTl, ENoDraw, ES60_AllReleases, -1,-1}, /* SP_QsnFrNotepadCornerTr */ {KAknsIIDQsnFrNotepadContCornerTr, ENoDraw, ES60_AllReleases, -1,-1}, diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp index 6838d17..8176009 100644 --- a/src/gui/text/qfontdatabase_s60.cpp +++ b/src/gui/text/qfontdatabase_s60.cpp @@ -69,7 +69,7 @@ QFileInfoList alternativeFilePaths(const QString &path, const QStringList &nameF const QString zDriveString("Z:/"); driveStrings.removeAll(zDriveString); driveStrings.prepend(zDriveString); - + QStringList uniqueFileNameList; for (int i = driveStrings.count() - 1; i >= 0; --i) { const QDir dirOnDrive(driveStrings.at(i) + path); @@ -393,7 +393,7 @@ void QFontDatabase::load(const QFontPrivate *d, int script) { QFontEngine *fe = 0; QFontDef req = d->request; - + if (!d->engineData) { const QFontCache::Key key(cleanedFontDef(req), script); getEngineData(d, key); diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp index eb2d92e..18a0a73 100644 --- a/src/gui/util/qdesktopservices.cpp +++ b/src/gui/util/qdesktopservices.cpp @@ -287,10 +287,10 @@ void QDesktopServices::unsetUrlHandler(const QString &scheme) \note The storage location returned can be a directory that does not exist; i.e., it may need to be created by the system or the user. - + \note On Symbian OS, DataLocation and ApplicationsLocation always point to appropriate folder on same drive with executable. FontsLocation always points to folder on ROM drive. - Rest of the standard locations point to folder on same drive with executable, except + Rest of the standard locations point to folder on same drive with executable, except that if executable is in ROM the folder from C drive is returned. \note On Mac OS X, DataLocation does not include QCoreApplication::organizationName. diff --git a/src/gui/util/qdesktopservices_s60.cpp b/src/gui/util/qdesktopservices_s60.cpp index 567b4ee..565dd6e 100644 --- a/src/gui/util/qdesktopservices_s60.cpp +++ b/src/gui/util/qdesktopservices_s60.cpp @@ -113,9 +113,9 @@ static void handleMailtoSchemeLX(const QUrl &url) QStringList bccs = bcc.split(",", QString::SkipEmptyParts); - RSendAs sendAs; - User::LeaveIfError(sendAs.Connect()); - QAutoClose<RSendAs> sendAsCleanup(sendAs); + RSendAs sendAs; + User::LeaveIfError(sendAs.Connect()); + QAutoClose<RSendAs> sendAsCleanup(sendAs); CSendAsAccounts* accounts = CSendAsAccounts::NewL(); @@ -124,43 +124,43 @@ static void handleMailtoSchemeLX(const QUrl &url) TInt count = accounts->Count(); CleanupStack::PopAndDestroy(accounts); - if(!count) { + if(!count) { // TODO: we should try to create account if count == 0 // CSendUi would provide account creation service for us, but it requires ridicilous // capabilities: LocalServices NetworkServices ReadDeviceData ReadUserData WriteDeviceData WriteUserData - User::Leave(KErrNotSupported); - } else { - RSendAsMessage sendAsMessage; + User::Leave(KErrNotSupported); + } else { + RSendAsMessage sendAsMessage; sendAsMessage.CreateL(sendAs, KUidMsgTypeSMTP); QAutoClose<RSendAsMessage> sendAsMessageCleanup(sendAsMessage); - - + + // Subject sendAsMessage.SetSubjectL(qt_QString2TPtrC(subject)); - + // Body sendAsMessage.SetBodyTextL(qt_QString2TPtrC(body)); - + // To foreach(QString item, recipients) sendAsMessage.AddRecipientL(qt_QString2TPtrC(item), RSendAsMessage::ESendAsRecipientTo ); - + foreach(QString item, tos) sendAsMessage.AddRecipientL(qt_QString2TPtrC(item), RSendAsMessage::ESendAsRecipientTo ); - + // Cc foreach(QString item, ccs) sendAsMessage.AddRecipientL(qt_QString2TPtrC(item), RSendAsMessage::ESendAsRecipientCc ); - + // Bcc foreach(QString item, bccs) sendAsMessage.AddRecipientL(qt_QString2TPtrC(item), RSendAsMessage::ESendAsRecipientBcc ); - + // send the message sendAsMessage.LaunchEditorAndCloseL(); // sendAsMessage is already closed sendAsMessageCleanup.Forget(); - } + } } static bool handleMailtoScheme(const QUrl &url) @@ -172,9 +172,9 @@ static bool handleMailtoScheme(const QUrl &url) static void handleOtherSchemesL(const TDesC& aUrl) { // Other schemes are at the moment passed to WEB browser - HBufC* buf16 = HBufC::NewLC( aUrl.Length() + KBrowserPrefix.iTypeLength ); - buf16->Des().Copy( KBrowserPrefix ); // Prefix used to launch correct browser view - buf16->Des().Append( aUrl ); + HBufC* buf16 = HBufC::NewLC( aUrl.Length() + KBrowserPrefix.iTypeLength ); + buf16->Des().Copy( KBrowserPrefix ); // Prefix used to launch correct browser view + buf16->Des().Append( aUrl ); TApaTaskList taskList( CEikonEnv::Static()->WsSession() ); TApaTask task = taskList.FindApp( KUidBrowser ); @@ -189,12 +189,12 @@ static void handleOtherSchemesL(const TDesC& aUrl) else { // Start a new browser instance - RApaLsSession appArcSession; - User::LeaveIfError( appArcSession.Connect() ); - CleanupClosePushL<RApaLsSession>( appArcSession ); - TThreadId id; + RApaLsSession appArcSession; + User::LeaveIfError( appArcSession.Connect() ); + CleanupClosePushL<RApaLsSession>( appArcSession ); + TThreadId id; appArcSession.StartDocument( *buf16, KUidBrowser , id ); - CleanupStack::PopAndDestroy(); // appArcSession + CleanupStack::PopAndDestroy(); // appArcSession } CleanupStack::PopAndDestroy( buf16 ); @@ -255,8 +255,8 @@ static void openDocumentL(const TDesC& aUrl) { #ifndef USE_DOCUMENTHANDLER // Start app associated to file MIME type by using RApaLsSession - // Apparc base method cannot be used to open app in embedded mode, - // but seems to be most stable way at the moment + // Apparc base method cannot be used to open app in embedded mode, + // but seems to be most stable way at the moment RApaLsSession appArcSession; User::LeaveIfError( appArcSession.Connect() ); CleanupClosePushL<RApaLsSession>( appArcSession ); @@ -264,25 +264,25 @@ static void openDocumentL(const TDesC& aUrl) // ESwitchFiles means do not start another instance // Leaves if file does not exist, leave is trapped in openDocument and false returned to user. User::LeaveIfError( appArcSession.StartDocument( aUrl, id, - RApaLsSession::ESwitchFiles ) ); // ELaunchNewApp + RApaLsSession::ESwitchFiles ) ); // ELaunchNewApp CleanupStack::PopAndDestroy(); // appArcSession #else // This is an alternative way to launch app associated to MIME type - // CDocumentHandler would support opening apps in embedded mode, - // but our Qt application window group seems to always get switched on top of embedded one - // -> Cannot use menus etc of embedded app -> used - - CDocumentHandler* docHandler = CDocumentHandler::NewLC(); - TDataType temp; - //Standalone file opening fails for some file-types at least in S60 3.1 emulator - //For example .txt file fails with KErrAlreadyInUse and music files with KERN-EXEC 0 - //Workaround is to use OpenFileEmbeddedL - //docHandler->OpenFileL(aUrl, temp); - - // Opening file with CDocumentHandler will leave if file does not exist - // Leave is trapped in openDocument and false returned to user. - docHandler->OpenFileEmbeddedL(aUrl, temp); - CleanupStack::PopAndDestroy(docHandler); + // CDocumentHandler would support opening apps in embedded mode, + // but our Qt application window group seems to always get switched on top of embedded one + // -> Cannot use menus etc of embedded app -> used + + CDocumentHandler* docHandler = CDocumentHandler::NewLC(); + TDataType temp; + //Standalone file opening fails for some file-types at least in S60 3.1 emulator + //For example .txt file fails with KErrAlreadyInUse and music files with KERN-EXEC 0 + //Workaround is to use OpenFileEmbeddedL + //docHandler->OpenFileL(aUrl, temp); + + // Opening file with CDocumentHandler will leave if file does not exist + // Leave is trapped in openDocument and false returned to user. + docHandler->OpenFileEmbeddedL(aUrl, temp); + CleanupStack::PopAndDestroy(docHandler); #endif } @@ -295,8 +295,8 @@ static void openDocumentL(const TDesC& aUrl) // wide range of schemes and is extensible by plugins static bool handleUrl(const QUrl &url) { - if (!url.isValid()) - return false; + if (!url.isValid()) + return false; QString urlString(url.toString()); TPtrC urlPtr(qt_QString2TPtrC(urlString)); @@ -313,12 +313,12 @@ static void handleUrlL(const TDesC& aUrl) } static bool launchWebBrowser(const QUrl &url) { - return handleUrl(url); + return handleUrl(url); } static bool openDocument(const QUrl &file) { - return handleUrl(url); + return handleUrl(url); } #endif @@ -391,7 +391,7 @@ QString QDesktopServices::storageLocation(StandardLocation type) //return QDir::homePath(); break; break; case DataLocation: - CEikonEnv::Static()->FsSession().PrivatePath( path ); + CEikonEnv::Static()->FsSession().PrivatePath( path ); // TODO: Should we actually return phone mem if data is on ROM? path.Insert( 0, exeDrive().Name() ); break; diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp index 5207cc6..1b21b71 100644 --- a/src/gui/widgets/qmenu_symbian.cpp +++ b/src/gui/widgets/qmenu_symbian.cpp @@ -87,7 +87,7 @@ bool menuExists() { QWidget *w = qApp->activeWindow(); QMenuBarPrivate *mb = menubars()->value(w); - if ((!mb) && !menubars()->count()) + if ((!mb) && !menubars()->count()) return false; return true; } @@ -196,7 +196,7 @@ static void qt_symbian_insert_action(QSymbianMenuAction* action, QList<SymbianMe if (!action->action->isEnabled()){ menuItem->menuItemData.iFlags += EEikMenuItemDimmed; } - + if (action->action->isCheckable()) { if (action->action->isChecked()) menuItem->menuItemData.iFlags += EEikMenuItemCheckBox | EEikMenuItemSymbolOn; @@ -244,7 +244,7 @@ Q_GUI_EXPORT void qt_symbian_show_toplevel( CEikMenuPane* menuPane) return; rebuildMenu(); for (int i = 0; i < symbianMenus.count(); ++i) - QT_TRAP_THROWING(menuPane->AddMenuItemL(symbianMenus.at(i)->menuItemData)); + QT_TRAP_THROWING(menuPane->AddMenuItemL(symbianMenus.at(i)->menuItemData)); } Q_GUI_EXPORT void qt_symbian_show_submenu( CEikMenuPane* menuPane, int id) @@ -252,7 +252,7 @@ Q_GUI_EXPORT void qt_symbian_show_submenu( CEikMenuPane* menuPane, int id) SymbianMenuItem* menu = qt_symbian_find_menu(id, symbianMenus); if (menu) { for (int i = 0; i < menu->children.count(); ++i) - QT_TRAP_THROWING(menuPane->AddMenuItemL(menu->children.at(i)->menuItemData)); + QT_TRAP_THROWING(menuPane->AddMenuItemL(menu->children.at(i)->menuItemData)); } } @@ -262,7 +262,7 @@ void QMenuBarPrivate::symbianCommands(int command) QContextMenuEvent* event = new QContextMenuEvent(QContextMenuEvent::Keyboard, QPoint(0,0)); QCoreApplication::postEvent(widgetWithContextMenu, event); } - + int size = nativeMenuBars.size(); for (int i = 0; i < nativeMenuBars.size(); ++i) { SymbianMenuItem* menu = qt_symbian_find_menu_item(command, symbianMenus); |