Changeset 651 for trunk/src/gui/kernel


Ignore:
Timestamp:
Mar 8, 2010, 12:52:58 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.2 sources.

Location:
trunk
Files:
189 edited
3 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/kernel/kernel.pri

    r561 r651  
    88HEADERS += \
    99        kernel/qaction.h \
    10         kernel/qaction_p.h \
     10    kernel/qaction_p.h \
    1111        kernel/qactiongroup.h \
    1212        kernel/qapplication.h \
     
    3838        kernel/qtooltip.h \
    3939        kernel/qwhatsthis.h \
    40         kernel/qwidget.h \
    41         kernel/qwidget_p.h \
     40    kernel/qwidget.h \
     41    kernel/qwidget_p.h \
    4242        kernel/qwidgetaction.h \
    4343        kernel/qwidgetaction_p.h \
     
    5050        kernel/qgesturemanager_p.h \
    5151        kernel/qsoftkeymanager_p.h \
     52    kernel/qsoftkeymanager_common_p.h \
    5253        kernel/qguiplatformplugin_p.h
    5354
     
    8586        kernel/qgesturemanager.cpp \
    8687        kernel/qsoftkeymanager.cpp \
    87         kernel/qdesktopwidget.cpp \
     88    kernel/qdesktopwidget.cpp \
    8889        kernel/qguiplatformplugin.cpp
    8990
     
    9192        DEFINES += QT_NO_DIRECTDRAW
    9293
    93         HEADERS += \
    94                 kernel/qwinnativepangesturerecognizer_win_p.h
     94    HEADERS += \
     95        kernel/qwinnativepangesturerecognizer_win_p.h
    9596
    9697        SOURCES += \
     
    104105                kernel/qwidget_win.cpp \
    105106                kernel/qole_win.cpp \
    106                 kernel/qkeymapper_win.cpp \
    107                 kernel/qwinnativepangesturerecognizer_win.cpp
    108 
    109         !contains(DEFINES, QT_NO_DIRECTDRAW):LIBS += ddraw.lib
     107        kernel/qkeymapper_win.cpp \
     108        kernel/qwinnativepangesturerecognizer_win.cpp
     109
     110    !contains(DEFINES, QT_NO_DIRECTDRAW):LIBS += ddraw.lib
    110111}
    111112
    112113symbian {
    113         SOURCES += \
    114                 kernel/qapplication_s60.cpp \
    115                 kernel/qeventdispatcher_s60.cpp \
    116                 kernel/qwidget_s60.cpp \
    117                 kernel/qcursor_s60.cpp \
    118                 kernel/qdesktopwidget_s60.cpp \
    119                 kernel/qkeymapper_s60.cpp\
    120                 kernel/qclipboard_s60.cpp\
    121                 kernel/qdnd_s60.cpp \
    122                 kernel/qsound_s60.cpp
    123 
    124         HEADERS += \
    125                 kernel/qt_s60_p.h \
    126                 kernel/qeventdispatcher_s60_p.h
    127         LIBS += -lbafl -lestor
    128 
    129         INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
     114    SOURCES += \
     115        kernel/qapplication_s60.cpp \
     116        kernel/qeventdispatcher_s60.cpp \
     117        kernel/qwidget_s60.cpp \
     118        kernel/qcursor_s60.cpp \
     119        kernel/qdesktopwidget_s60.cpp \
     120        kernel/qkeymapper_s60.cpp\
     121        kernel/qclipboard_s60.cpp\
     122        kernel/qdnd_s60.cpp \
     123        kernel/qsound_s60.cpp \
     124        kernel/qsoftkeymanager_s60.cpp
     125
     126    HEADERS += \
     127        kernel/qt_s60_p.h \
     128        kernel/qeventdispatcher_s60_p.h \
     129        kernel/qsoftkeymanager_s60_p.h
     130
     131    LIBS += -lbafl -lestor
     132
     133    INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
     134    INCLUDEPATH += ../3rdparty/s60
    130135}
    131136
  • trunk/src/gui/kernel/qaction.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    716716    icon.
    717717
     718    On Symbian the icons which are passed to softkeys, i.e. to actions with
     719    softkey role, need to have pixmap alpha channel correctly set otherwise
     720    drawing artifacts will appear when softkey is pressed down.
     721
    718722    If a null icon (QIcon::isNull() is passed into this function,
    719723    the icon of the action is cleared.
  • trunk/src/gui/kernel/qaction.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qaction_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qactiongroup.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qactiongroup.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qapplication.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    122122static void initResources()
    123123{
    124 #ifdef Q_WS_WINCE
     124#if defined(Q_WS_WINCE)
    125125    Q_INIT_RESOURCE(qstyle_wince);
     126#elif defined(Q_OS_SYMBIAN)
     127    Q_INIT_RESOURCE(qstyle_s60);
    126128#else
    127129    Q_INIT_RESOURCE(qstyle);
  • trunk/src/gui/kernel/qapplication.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qapplication_mac.mm

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    228228static void qt_mac_read_fontsmoothing_settings()
    229229{
    230     NSInteger appleFontSmoothing = [[NSUserDefaults standardUserDefaults] integerForKey:@"AppleFontSmoothing"];
    231     qt_applefontsmoothing_enabled = (appleFontSmoothing > 0);
     230    qt_applefontsmoothing_enabled = true;
     231    int w = 10, h = 10;
     232    QImage image(w, h, QImage::Format_RGB32);
     233    image.fill(0xffffffff);
     234    QPainter p(&image);
     235    p.drawText(0, h, "X\\");
     236    p.end();
     237
     238    const int *bits = (const int *) ((const QImage &) image).bits();
     239    int bpl = image.bytesPerLine() / 4;
     240    for (int y=0; y<w; ++y) {
     241        for (int x=0; x<h; ++x) {
     242            int r = qRed(bits[x]);
     243            int g = qGreen(bits[x]);
     244            int b = qBlue(bits[x]);
     245            if (r != g || r != b) {
     246                qt_applefontsmoothing_enabled = true;
     247                return;
     248            }
     249        }
     250        bits += bpl;
     251    }
     252    qt_applefontsmoothing_enabled = false;
    232253}
    233254
     
    773794            it->lastUpdateWidget = widget;
    774795        } else if (it->lastUpdateWidget == widget) {
    775             // Update the gl wigets that the widget intersected the last time around, 
    776             // and that we are not intersecting now. This prevents paint errors when the 
     796            // Update the gl wigets that the widget intersected the last time around,
     797            // and that we are not intersecting now. This prevents paint errors when the
    777798            // intersecting widget leaves a gl widget.
    778799            qt_post_window_change_event(glWidget);
    779             it->lastUpdateWidget = 0;           
     800            it->lastUpdateWidget = 0;
    780801        }
    781802    }
     
    809830    // don't remove this line!
    810831    qt_event_request_window_change();
    811    
    812     // Post update request on gl widgets unconditionally. 
     832
     833    // Post update request on gl widgets unconditionally.
    813834    if (qt_widget_private(widget)->isGLWidget == true) {
    814835        qt_post_window_change_event(widget);
     
    12151236        QApplicationPrivate::qt_mac_apply_settings();
    12161237
    1217     qt_mac_read_fontsmoothing_settings();
    1218 
    12191238    // Cocoa application delegate
    12201239#ifdef QT_MAC_USE_COCOA
     
    12541273   priv->native_modal_dialog_active = false;
    12551274
     1275   qt_mac_read_fontsmoothing_settings();
    12561276}
    12571277
     
    17061726            // (actually two events; one for horizontal and one for vertical).
    17071727            // As a results of this, and to make sure we dont't receive duplicate events,
    1708             // we try to detect when this happend by checking the 'compatibilityEvent'. 
     1728            // we try to detect when this happend by checking the 'compatibilityEvent'.
    17091729            SInt32 mdelt = 0;
    17101730            GetEventParameter(event, kEventParamMouseWheelSmoothHorizontalDelta, typeSInt32, 0,
     
    25772597        delete QApplicationPrivate::popupWidgets;
    25782598        QApplicationPrivate::popupWidgets = 0;
    2579        
     2599
    25802600        // Special case for Tool windows: since they are activated and deactived together
    25812601        // with a normal window they never become the QApplicationPrivate::active_window.
  • trunk/src/gui/kernel/qapplication_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    503503    QSet<WId> nativeWindows;
    504504
    505     int symbianProcessWsEvent(const TWsEvent *event);
    506     int symbianHandleCommand(int command);
    507     int symbianResourceChange(int type);
     505    int symbianProcessWsEvent(const QSymbianEvent *symbianEvent);
     506    int symbianHandleCommand(const QSymbianEvent *symbianEvent);
     507    int symbianResourceChange(const QSymbianEvent *symbianEvent);
    508508
    509509#endif
  • trunk/src/gui/kernel/qapplication_qws.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qapplication_s60.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    7272# endif
    7373# include <private/qs60mainapplication_p.h>
     74# include <centralrepository.h>
    7475#endif
    7576
     
    808809void QSymbianControl::Draw(const TRect& controlRect) const
    809810{
     811    // Set flag to avoid calling DrawNow in window surface
     812    QWidget *window = qwidget->window();
     813    Q_ASSERT(window);
     814    QTLWExtra *topExtra = window->d_func()->maybeTopData();
     815    Q_ASSERT(topExtra);
     816    if (!topExtra->inExpose) {
     817        topExtra->inExpose = true;
     818        QRect exposeRect = qt_TRect2QRect(controlRect);
     819        qwidget->d_func()->syncBackingStore(exposeRect);
     820        topExtra->inExpose = false;
     821    }
     822
    810823    QWindowSurface *surface = qwidget->windowSurface();
    811824    QPaintEngine *engine = surface ? surface->paintDevice()->paintEngine() : NULL;
     
    856869            Q_ASSERT(false);
    857870        }
    858     } else {
    859         surface->flush(qwidget, QRegion(qt_TRect2QRect(backingStoreRect)), QPoint());
    860871    }
    861872
     
    917928        qwidget->data->crect = cr;
    918929        QTLWExtra *top = qwidget->d_func()->maybeTopData();
    919         if (top)
    920             top->normalGeometry = cr;
     930        if (top && (qwidget->windowState() & (~Qt::WindowActive)) == Qt::WindowNoState)
     931            top->normalGeometry.moveTopLeft(newPos);
    921932        if (qwidget->isVisible()) {
    922933            QMoveEvent e(newPos, oldPos);
     
    931942void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */)
    932943{
    933     if (m_ignoreFocusChanged)
     944    if (m_ignoreFocusChanged || (qwidget->windowType() & Qt::WindowType_Mask) == Qt::Desktop)
    934945        return;
    935946
     
    953964        qwidget->d_func()->setWindowTitle_sys(qwidget->windowTitle());
    954965#ifdef Q_WS_S60
    955         // If widget is fullscreen, hide status pane and button container
    956         // otherwise show them.
     966        // If widget is fullscreen/minimized, hide status pane and button container otherwise show them.
    957967        CEikStatusPane* statusPane = S60->statusPane();
    958968        CEikButtonGroupContainer* buttonGroup = S60->buttonGroupContainer();
    959         bool isFullscreen = qwidget->windowState() & Qt::WindowFullScreen;
    960         if (statusPane && (bool)statusPane->IsVisible() == isFullscreen)
    961             statusPane->MakeVisible(!isFullscreen);
    962         if (buttonGroup && (bool)buttonGroup->IsVisible() == isFullscreen)
    963             buttonGroup->MakeVisible(!isFullscreen);
     969        TBool visible = !(qwidget->windowState() & (Qt::WindowFullScreen | Qt::WindowMinimized));
     970        if (statusPane)
     971            statusPane->MakeVisible(visible);
     972        if (buttonGroup)
     973            buttonGroup->MakeVisible(visible);
    964974#endif
    965975    } else if (QApplication::activeWindow() == qwidget->window()) {
     
    11981208    }
    11991209
     1210    S60->avkonComponentsSupportTransparency = false;
     1211
     1212#ifdef Q_WS_S60
     1213    TUid KCRUidAvkon = { 0x101F876E };
     1214    TUint32 KAknAvkonTransparencyEnabled = 0x0000000D;
     1215
     1216    CRepository* repository = 0;
     1217    TRAP(err, repository = CRepository::NewL(KCRUidAvkon));
     1218
     1219    if(err == KErrNone) {
     1220        TInt value = 0;
     1221        err = repository->Get(KAknAvkonTransparencyEnabled, value);
     1222        if(err == KErrNone) {
     1223            S60->avkonComponentsSupportTransparency = (value==1) ? true : false;
     1224        }
     1225    }
     1226#endif   
     1227
    12001228    if (touch) {
    12011229        QApplicationPrivate::navigationMode = Qt::NavigationModeNone;
     
    15221550}
    15231551
     1552static inline bool callSymbianEventFilters(const QSymbianEvent *event)
     1553{
     1554    long unused;
     1555    return qApp->filterEvent(const_cast<QSymbianEvent *>(event), &unused);
     1556}
     1557
    15241558/*!
    15251559    \warning This function is only available on Symbian.
     
    15381572    QScopedLoopLevelCounter counter(d->threadData);
    15391573
     1574    if (d->eventDispatcher->filterEvent(const_cast<QSymbianEvent *>(event)))
     1575        return 1;
     1576
    15401577    QWidget *w = qApp ? qApp->focusWidget() : 0;
    15411578    if (w) {
     
    15501587    switch (event->type()) {
    15511588    case QSymbianEvent::WindowServerEvent:
    1552         return d->symbianProcessWsEvent(event->windowServerEvent());
     1589        return d->symbianProcessWsEvent(event);
    15531590    case QSymbianEvent::CommandEvent:
    1554         return d->symbianHandleCommand(event->command());
     1591        return d->symbianHandleCommand(event);
    15551592    case QSymbianEvent::ResourceChangeEvent:
    1556         return d->symbianResourceChange(event->resourceChangeType());
     1593        return d->symbianResourceChange(event);
    15571594    default:
    15581595        return -1;
     
    15601597}
    15611598
    1562 int QApplicationPrivate::symbianProcessWsEvent(const TWsEvent *event)
     1599int QApplicationPrivate::symbianProcessWsEvent(const QSymbianEvent *symbianEvent)
    15631600{
    15641601    // Qt event handling. Handle some events regardless of if the handle is in our
    15651602    // widget map or not.
     1603    const TWsEvent *event = symbianEvent->windowServerEvent();
    15661604    CCoeControl* control = reinterpret_cast<CCoeControl*>(event->Handle());
    15671605    const bool controlInMap = QWidgetPrivate::mapper && QWidgetPrivate::mapper->contains(control);
    15681606    switch (event->Type()) {
    15691607    case EEventPointerEnter:
    1570         if (controlInMap)
     1608        if (controlInMap) {
     1609            callSymbianEventFilters(symbianEvent);
    15711610            return 1; // Qt::Enter will be generated in HandlePointerL
     1611        }
    15721612        break;
    15731613    case EEventPointerExit:
    15741614        if (controlInMap) {
     1615            if (callSymbianEventFilters(symbianEvent))
     1616                return 1;
    15751617            if (S60) {
    15761618                // mouseEvent outside our window, send leave event to last focused widget
     
    15851627        break;
    15861628    case EEventScreenDeviceChanged:
     1629        if (callSymbianEventFilters(symbianEvent))
     1630            return 1;
    15871631        if (S60)
    15881632            S60->updateScreenSize();
     
    15971641    case EEventWindowVisibilityChanged:
    15981642        if (controlInMap) {
     1643            if (callSymbianEventFilters(symbianEvent))
     1644                return 1;
    15991645            const TWsVisibilityChangedEvent *visChangedEvent = event->VisibilityChanged();
    16001646            QWidget *w = QWidgetPrivate::mapper->value(control);
     
    16041650                delete w->d_func()->topData()->backingStore;
    16051651                w->d_func()->topData()->backingStore = 0;
     1652                // In order to ensure that any resources used by the window surface
     1653                // are immediately freed, we flush the WSERV command buffer.
     1654                S60->wsSession().Flush();
    16061655            } else if ((visChangedEvent->iFlags & TWsVisibilityChangedEvent::EPartiallyVisible)
    16071656                       && !w->d_func()->maybeBackingStore()) {
     
    16141663        break;
    16151664    case EEventFocusGained:
     1665        if (callSymbianEventFilters(symbianEvent))
     1666            return 1;
    16161667#ifndef QT_NO_CURSOR
    16171668        //re-enable mouse interaction
     
    16271678        break;
    16281679    case EEventFocusLost:
     1680        if (callSymbianEventFilters(symbianEvent))
     1681            return 1;
    16291682#ifndef QT_NO_CURSOR
    16301683        //disable mouse as may be moving to application that does not support it
     
    16781731  \sa s60EventFilter(), s60ProcessEvent()
    16791732*/
    1680 int QApplicationPrivate::symbianHandleCommand(int command)
     1733int QApplicationPrivate::symbianHandleCommand(const QSymbianEvent *symbianEvent)
    16811734{
    16821735    Q_Q(QApplication);
    16831736    int ret = 0;
     1737
     1738    if (callSymbianEventFilters(symbianEvent))
     1739        return 1;
     1740
     1741    int command = symbianEvent->command();
    16841742
    16851743    switch (command) {
     
    17221780  KAknsMessageSkinChange are handled.
    17231781 */
    1724 int QApplicationPrivate::symbianResourceChange(int type)
     1782int QApplicationPrivate::symbianResourceChange(const QSymbianEvent *symbianEvent)
    17251783{
    17261784    int ret = 0;
     1785
     1786    int type = symbianEvent->resourceChangeType();
    17271787
    17281788    switch (type) {
     
    17301790    case KEikDynamicLayoutVariantSwitch:
    17311791        {
     1792        if (callSymbianEventFilters(symbianEvent))
     1793            return 1;
    17321794        if (S60)
    17331795            S60->updateScreenSize();
     
    17541816#ifndef QT_NO_STYLE_S60
    17551817    case KAknsMessageSkinChange:
     1818        if (callSymbianEventFilters(symbianEvent))
     1819            return 1;
    17561820        if (QS60Style *s60Style = qobject_cast<QS60Style*>(QApplication::style())) {
    17571821            s60Style->d_func()->handleSkinChange();
  • trunk/src/gui/kernel/qapplication_win.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qapplication_x11.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qboxlayout.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qboxlayout.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qclipboard.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qclipboard.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qclipboard_mac.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qclipboard_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qclipboard_qws.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qclipboard_s60.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qclipboard_win.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qclipboard_x11.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcocoaapplication_mac.mm

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcocoaapplication_mac_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcocoaapplicationdelegate_mac.mm

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcocoaapplicationdelegate_mac_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcocoamenuloader_mac.mm

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcocoamenuloader_mac_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcocoapanel_mac.mm

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcocoapanel_mac_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcocoaview_mac.mm

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    508508    } else {
    509509        [self setNeedsDisplay:YES];
     510    }
     511
     512    // Make sure the opengl context is updated on resize.
     513    if (qwidgetprivate->isGLWidget) {
     514        qwidgetprivate->needWindowChange = true;
     515        QEvent event(QEvent::MacGLWindowChange);
     516        qApp->sendEvent(qwidget, &event);
    510517    }
    511518}
  • trunk/src/gui/kernel/qcocoaview_mac_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcocoawindow_mac.mm

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcocoawindow_mac_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcocoawindowcustomthemeframe_mac.mm

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcocoawindowcustomthemeframe_mac_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcocoawindowdelegate_mac.mm

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcocoawindowdelegate_mac_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcursor.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcursor.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcursor_mac.mm

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcursor_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcursor_qws.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcursor_s60.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcursor_win.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qcursor_x11.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qdesktopwidget.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    4848const QRect QDesktopWidget::screenGeometry(const QWidget *widget) const
    4949{
     50    if (!widget) {
     51        qWarning("QDesktopWidget::screenGeometry(): Attempt "
     52                 "to get the screen geometry of a null widget");
     53        return QRect();
     54    }
    5055    QRect rect = QWidgetPrivate::screenGeometry(widget);
    5156    if (rect.isNull())
     
    5661const QRect QDesktopWidget::availableGeometry(const QWidget *widget) const
    5762{
     63    if (!widget) {
     64        qWarning("QDesktopWidget::availableGeometry(): Attempt "
     65                 "to get the available geometry of a null widget");
     66        return QRect();
     67    }
    5868    QRect rect = QWidgetPrivate::screenGeometry(widget);
    5969    if (rect.isNull())
  • trunk/src/gui/kernel/qdesktopwidget.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qdesktopwidget.qdoc

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qdesktopwidget_mac.mm

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qdesktopwidget_mac_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qdesktopwidget_qws.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qdesktopwidget_s60.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qdesktopwidget_win.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qdesktopwidget_x11.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qdnd.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qdnd_mac.mm

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qdnd_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qdnd_qws.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qdnd_s60.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qdnd_win.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qdnd_x11.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qdrag.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qdrag.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qevent.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qevent.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qevent_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qeventdispatcher_glib_qws.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qeventdispatcher_glib_qws_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qeventdispatcher_mac.mm

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    570570            if (NSModalSession session = d->currentModalSession()) {
    571571                QBoolBlocker execGuard(d->currentExecIsNSAppRun, false);
    572                 while (!d->interrupt && [NSApp runModalSession:session] == NSRunContinuesResponse)
     572                while ([NSApp runModalSession:session] == NSRunContinuesResponse && !d->interrupt)
    573573                    qt_mac_waitForMoreModalSessionEvents();
    574574                if (!d->interrupt && session == d->currentModalSessionCached) {
  • trunk/src/gui/kernel/qeventdispatcher_mac_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qeventdispatcher_qws.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qeventdispatcher_qws_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qeventdispatcher_s60.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qeventdispatcher_s60_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qeventdispatcher_x11.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qeventdispatcher_x11_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qformlayout.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    19261926                    If the field on the right-hand side is tall,
    19271927                    we want the label to be top-aligned, but not too
    1928                     much. So we introduce a 5 / 4 factor so that it
    1929                     gets a few extra pixels at the top.
     1928                    much. So we introduce a 7 / 4 factor so that it
     1929                    gets some extra pixels at the top.
    19301930                */
    19311931                height = qMin(height,
    1932                               qMin(label->sizeHint.height() * 5 / 4,
     1932                              qMin(label->sizeHint.height() * 7 / 4,
    19331933                                   label->maxSize.height()));
    19341934            }
  • trunk/src/gui/kernel/qformlayout.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qgesture.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qgesture.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qgesture_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qgesturemanager.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qgesturemanager_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qgesturerecognizer.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qgesturerecognizer.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qgridlayout.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qgridlayout.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qguieventdispatcher_glib.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qguieventdispatcher_glib_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qguifunctions_wince.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qguifunctions_wince.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qguiplatformplugin.cpp

    r569 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qguiplatformplugin_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qguivariant.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qkde.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qkde_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qkeymapper.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qkeymapper_mac.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qkeymapper_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qkeymapper_qws.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qkeymapper_s60.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qkeymapper_win.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qkeymapper_x11.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qkeymapper_x11_p.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qkeysequence.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qkeysequence.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qkeysequence_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qlayout.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qlayout.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qlayout_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qlayoutengine.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qlayoutengine_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qlayoutitem.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qlayoutitem.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qmacdefines_mac.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qmacgesturerecognizer_mac.mm

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qmacgesturerecognizer_mac_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qmime.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qmime.h

    r580 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qmime_mac.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qmime_win.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qmotifdnd_x11.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qmultitouch_mac.mm

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qmultitouch_mac_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qnsframeview_mac_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qnsthemeframe_mac_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qnstitledframe_mac_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qole_win.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qpalette.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qpalette.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qsessionmanager.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qsessionmanager_qws.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qshortcut.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qshortcut.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qshortcutmap.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qshortcutmap_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qsizepolicy.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qsizepolicy.qdoc

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qsoftkeymanager.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    4242#include "qapplication.h"
    4343#include "qevent.h"
    44 #ifdef Q_WS_S60
    45 #include "qstyle.h"
    46 #include "private/qt_s60_p.h"
    47 #endif
     44#include "qbitmap.h"
    4845#include "private/qsoftkeymanager_p.h"
    4946#include "private/qobject_p.h"
     47#include "private/qsoftkeymanager_common_p.h"
     48
     49#ifdef Q_WS_S60
     50#include "private/qsoftkeymanager_s60_p.h"
     51#endif
    5052
    5153#ifndef QT_NO_SOFTKEYMANAGER
    5254QT_BEGIN_NAMESPACE
    5355
    54 #ifdef Q_WS_S60
    55 static const int s60CommandStart = 6000;
    56 #endif
    57 
    58 class QSoftKeyManagerPrivate : public QObjectPrivate
    59 {
    60     Q_DECLARE_PUBLIC(QSoftKeyManager)
    61 
    62 public:
    63     static void updateSoftKeys_sys(const QList<QAction*> &softKeys);
    64 
    65 private:
    66     QHash<QAction*, Qt::Key> keyedActions;
    67     static QSoftKeyManager *self;
    68     static QWidget *softKeySource;
    69 };
    70 
    71 QWidget *QSoftKeyManagerPrivate::softKeySource = 0;
    7256QSoftKeyManager *QSoftKeyManagerPrivate::self = 0;
    7357
     
    10690}
    10791
    108 QSoftKeyManager::QSoftKeyManager() : QObject(*(new QSoftKeyManagerPrivate), 0)
     92QSoftKeyManager::QSoftKeyManager() :
     93#ifdef Q_WS_S60
     94    QObject(*(new QSoftKeyManagerPrivateS60), 0)
     95#else
     96    QObject(*(new QSoftKeyManagerPrivate), 0)
     97#endif
    10998{
    11099}
     
    116105    QAction::SoftKeyRole softKeyRole = QAction::NoSoftKey;
    117106    switch (standardKey) {
     107    case MenuSoftKey: // FALL-THROUGH
     108        action->setProperty(MENU_ACTION_PROPERTY, QVariant(true)); // TODO: can be refactored away to use _q_action_menubar
    118109    case OkSoftKey:
    119110    case SelectSoftKey:
    120111    case DoneSoftKey:
    121     case MenuSoftKey:
    122112        softKeyRole = QAction::PositiveSoftKey;
    123113        break;
     
    148138}
    149139
    150 void QSoftKeyManager::cleanupHash(QObject* obj)
     140void QSoftKeyManager::cleanupHash(QObject *obj)
    151141{
    152142    Q_D(QSoftKeyManager);
     
    176166}
    177167
     168bool QSoftKeyManager::appendSoftkeys(const QWidget &source, int level)
     169{
     170    Q_D(QSoftKeyManager);
     171    bool ret = false;
     172    QList<QAction*> actions = source.actions();
     173    for (int i = 0; i < actions.count(); ++i) {
     174        if (actions.at(i)->softKeyRole() != QAction::NoSoftKey) {
     175            d->requestedSoftKeyActions.insert(level, actions.at(i));
     176            ret = true;
     177        }
     178    }
     179    return ret;
     180}
     181
     182QWidget *QSoftKeyManager::softkeySource(QWidget *previousSource, bool& recursiveMerging)
     183{
     184    Q_D(QSoftKeyManager);
     185    QWidget *source = NULL;
     186    if (!previousSource) {
     187        // Initial source is primarily focuswidget and secondarily activeWindow
     188        source = QApplication::focusWidget();
     189        if (!source)
     190            source = QApplication::activeWindow();
     191    } else {
     192        // Softkey merging is based on four criterias
     193        // 1. Implicit merging is used whenever focus widget does not specify any softkeys
     194        bool implicitMerging = d->requestedSoftKeyActions.isEmpty();
     195        // 2. Explicit merging with parent is used whenever WA_MergeSoftkeys widget attribute is set
     196        bool explicitMerging = previousSource->testAttribute(Qt::WA_MergeSoftkeys);
     197        // 3. Explicit merging with all parents
     198        recursiveMerging |= previousSource->testAttribute(Qt::WA_MergeSoftkeysRecursively);
     199        // 4. Implicit and explicit merging always stops at window boundary
     200        bool merging = (implicitMerging || explicitMerging || recursiveMerging) && !previousSource->isWindow();
     201
     202        source = merging ? previousSource->parentWidget() : NULL;
     203    }
     204    return source;
     205}
     206
     207bool QSoftKeyManager::handleUpdateSoftKeys()
     208{
     209    Q_D(QSoftKeyManager);
     210    int level = 0;
     211    d->requestedSoftKeyActions.clear();
     212    bool recursiveMerging = false;
     213    QWidget *source = softkeySource(NULL, recursiveMerging);
     214    do {
     215        if (source) {
     216            bool added = appendSoftkeys(*source, level);
     217            source = softkeySource(source, recursiveMerging);
     218            level = added ? ++level : level;
     219        }
     220    } while (source);
     221
     222    d->updateSoftKeys_sys();
     223    return true;
     224}
     225
    178226bool QSoftKeyManager::event(QEvent *e)
    179227{
    180228#ifndef QT_NO_ACTION
    181     if (e->type() == QEvent::UpdateSoftKeys) {
    182         QList<QAction*> softKeys;
    183         QWidget *source = QApplication::focusWidget();
    184         do {
    185             if (source) {
    186                 QList<QAction*> actions = source->actions();
    187                 for (int i = 0; i < actions.count(); ++i) {
    188                     if (actions.at(i)->softKeyRole() != QAction::NoSoftKey)
    189                         softKeys.append(actions.at(i));
    190                 }
    191 
    192                 QWidget *parent = source->parentWidget();
    193                 if (parent && softKeys.isEmpty() && !source->isWindow())
    194                     source = parent;
    195                 else
    196                     break;
    197             } else {
    198                 source = QApplication::activeWindow();
    199             }
    200         } while (source);
    201 
    202         QSoftKeyManagerPrivate::softKeySource = source;
    203         QSoftKeyManagerPrivate::updateSoftKeys_sys(softKeys);
    204         return true;
    205     }
     229    if (e->type() == QEvent::UpdateSoftKeys)
     230        return handleUpdateSoftKeys();
    206231#endif //QT_NO_ACTION
    207232    return false;
     
    209234
    210235#ifdef Q_WS_S60
    211 void QSoftKeyManagerPrivate::updateSoftKeys_sys(const QList<QAction*> &softkeys)
    212 {
    213     // lets not update softkeys if s60 native dialog or menu is shown
    214     if (QApplication::testAttribute(Qt::AA_S60DontConstructApplicationPanes)
    215             || CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog())
    216         return;
    217 
    218     CEikButtonGroupContainer* nativeContainer = S60->buttonGroupContainer();
    219     nativeContainer->DrawableWindow()->SetOrdinalPosition(0);
    220     nativeContainer->DrawableWindow()->SetPointerCapturePriority(1); //keep softkeys available in modal dialog
    221     nativeContainer->DrawableWindow()->SetFaded(EFalse, RWindowTreeNode::EFadeIncludeChildren);
    222 
    223     int position = -1;
    224     bool needsExitButton = true;
    225     QT_TRAP_THROWING(
    226         //Using -1 instead of EAknSoftkeyEmpty to avoid flickering.
    227         nativeContainer->SetCommandL(0, -1, KNullDesC);
    228         nativeContainer->SetCommandL(2, -1, KNullDesC);
    229     );
    230 
    231     for (int index = 0; index < softkeys.count(); index++) {
    232         const QAction* softKeyAction = softkeys.at(index);
    233         switch (softKeyAction->softKeyRole()) {
    234         // Positive Actions on the LSK
    235         case QAction::PositiveSoftKey:
    236             position = 0;
    237             break;
    238         case QAction::SelectSoftKey:
    239             position = 0;
    240             break;
    241         // Negative Actions on the RSK
    242         case QAction::NegativeSoftKey:
    243             needsExitButton = false;
    244             position = 2;
    245             break;
    246         default:
    247             break;
    248         }
    249 
    250         int command = (softKeyAction->objectName().contains(QLatin1String("_q_menuSoftKeyAction")))
    251                     ? EAknSoftkeyOptions
    252                     : s60CommandStart + index;
    253 
    254         // _q_menuSoftKeyAction action is set to "invisible" and all invisible actions are by default
    255         // disabled. However we never want to dim options softkey, even it is set to "invisible"
    256         bool dimmed = (command == EAknSoftkeyOptions) ? false : !softKeyAction->isEnabled();
    257 
    258         if (position != -1) {
    259             const int underlineShortCut = QApplication::style()->styleHint(QStyle::SH_UnderlineShortcut);
    260             QString iconText = softKeyAction->iconText();
    261             TPtrC text = qt_QString2TPtrC( underlineShortCut ? softKeyAction->text() : iconText);
    262             QT_TRAP_THROWING(
    263                 nativeContainer->SetCommandL(position, command, text);
    264                 nativeContainer->DimCommand(command, dimmed);
    265             );
    266         }
    267     }
    268 
    269     const Qt::WindowType sourceWindowType = QSoftKeyManagerPrivate::softKeySource
    270         ?   QSoftKeyManagerPrivate::softKeySource->window()->windowType()
    271         :   Qt::Widget;
    272 
    273     if (needsExitButton && sourceWindowType != Qt::Dialog && sourceWindowType != Qt::Popup)
    274         QT_TRAP_THROWING(
    275             nativeContainer->SetCommandL(2, EAknSoftkeyExit, qt_QString2TPtrC(QSoftKeyManager::tr("Exit"))));
    276 
    277     nativeContainer->DrawDeferred(); // 3.1 needs an extra invitation
    278 }
    279 
    280236bool QSoftKeyManager::handleCommand(int command)
    281237{
    282     if (command >= s60CommandStart && QSoftKeyManagerPrivate::softKeySource) {
    283         int index = command - s60CommandStart;
    284         const QList<QAction*>& softKeys = QSoftKeyManagerPrivate::softKeySource->actions();
    285         for (int i = 0, j = 0; i < softKeys.count(); ++i) {
    286             QAction *action = softKeys.at(i);
    287             if (action->softKeyRole() != QAction::NoSoftKey) {
    288                 if (j == index) {
    289                     QWidget *parent = action->parentWidget();
    290                     if (parent && parent->isEnabled()) {
    291                         action->activate(QAction::Trigger);
    292                         return true;
    293                     }
    294                 }
    295                 j++;
    296             }
    297         }
    298     }
    299 
    300     return false;
    301 }
    302 
    303 #else
    304 
    305 void QSoftKeyManagerPrivate::updateSoftKeys_sys(const QList<QAction*> &)
    306 {
    307 }
    308 
     238    return static_cast<QSoftKeyManagerPrivateS60*>(QSoftKeyManager::instance()->d_func())->handleCommand(command);
     239}
    309240#endif
    310241
  • trunk/src/gui/kernel/qsoftkeymanager_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    6464class QSoftKeyManagerPrivate;
    6565
     66const char MENU_ACTION_PROPERTY[] = "_q_menuaction";
     67
    6668class Q_AUTOTEST_EXPORT QSoftKeyManager : public QObject
    6769{
     
    8082
    8183    static void updateSoftKeys();
     84#ifdef Q_WS_S60
     85    static bool handleCommand(int);
     86#endif
     87
    8288    static QAction *createAction(StandardSoftKey standardKey, QWidget *actionWidget);
    8389    static QAction *createKeyedAction(StandardSoftKey standardKey, Qt::Key key, QWidget *actionWidget);
    8490
    85 #ifdef Q_WS_S60
    86     static bool handleCommand(int);
    87 #endif
     91protected:
     92    bool event(QEvent *e);
    8893
    8994private:
     
    9196    static QSoftKeyManager *instance();
    9297    static const char *standardSoftKeyText(StandardSoftKey standardKey);
    93 
    94 protected:
    95     bool event(QEvent *e);
    96 
    97     Q_DISABLE_COPY(QSoftKeyManager)
     98    bool appendSoftkeys(const QWidget &source, int level);
     99    QWidget *softkeySource(QWidget *previousSource, bool& recursiveMerging);
     100    bool handleUpdateSoftKeys();
    98101
    99102private Q_SLOTS:
    100103    void cleanupHash(QObject* obj);
    101104    void sendKeyEvent();
     105
     106private:
     107    Q_DISABLE_COPY(QSoftKeyManager)
    102108};
    103109
  • trunk/src/gui/kernel/qsound.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qsound.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qsound_mac.mm

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qsound_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qsound_qws.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qsound_s60.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qsound_win.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qsound_x11.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qstackedlayout.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qstackedlayout.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qstandardgestures.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qstandardgestures_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qt_cocoa_helpers_mac.mm

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qt_cocoa_helpers_mac_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qt_gui_pch.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qt_mac.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qt_mac_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qt_s60_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    122122    int qtOwnsS60Environment : 1;
    123123    int supportsPremultipliedAlpha : 1;
     124    int avkonComponentsSupportTransparency : 1;
    124125    QApplication::QS60MainApplicationFactory s60ApplicationFactory; // typedef'ed pointer type
    125126    static inline void updateScreenSize();
     
    128129    static inline CWsScreenDevice* screenDevice();
    129130    static inline CCoeAppUi* appUi();
     131    static inline CEikMenuBar* menuBar();
    130132#ifdef Q_WS_S60
    131133    static inline CEikStatusPane* statusPane();
     
    270272}
    271273
     274inline CEikMenuBar* QS60Data::menuBar()
     275{
     276    return CEikonEnv::Static()->AppUiFactory()->MenuBar();
     277}
     278
    272279#ifdef Q_WS_S60
    273280inline CEikStatusPane* QS60Data::statusPane()
  • trunk/src/gui/kernel/qt_x11_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qtooltip.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qtooltip.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qwhatsthis.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qwhatsthis.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qwidget.cpp

    r569 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    14461446#endif
    14471447
    1448     if (QWidgetBackingStore *bs = d->maybeBackingStore()) {
     1448    if (d->extra && d->extra->topextra && d->extra->topextra->backingStore) {
     1449        // Okay, we are about to destroy the top-level window that owns
     1450        // the backing store. Make sure we delete the backing store right away
     1451        // before the window handle is invalid. This is important because
     1452        // the backing store will delete its window surface, which may or may
     1453        // not have a reference to this widget that will be used later to
     1454        // notify the window it no longer has a surface.
     1455        delete d->extra->topextra->backingStore;
     1456        d->extra->topextra->backingStore = 0;
     1457    } else if (QWidgetBackingStore *bs = d->maybeBackingStore()) {
    14491458        bs->removeDirtyWidget(this);
    14501459        if (testAttribute(Qt::WA_StaticContents))
     
    20332042#endif
    20342043
     2044#ifdef Q_WS_S60
     2045    if (q->windowType() == Qt::Dialog && q->testAttribute(Qt::WA_TranslucentBackground)
     2046                && S60->avkonComponentsSupportTransparency) {
     2047        setOpaque(false);
     2048        return;
     2049    }
     2050#endif
     2051
    20352052    if (q->testAttribute(Qt::WA_OpaquePaintEvent) || q->testAttribute(Qt::WA_PaintOnScreen)) {
    20362053        setOpaque(true);
     
    30953112        QInputContext *qic = focusWidget->d_func()->inputContext();
    30963113        if (enable) {
    3097             qic->setFocusWidget(focusWidget);
     3114            if (focusWidget->testAttribute(Qt::WA_InputMethodEnabled))
     3115                qic->setFocusWidget(focusWidget);
    30983116        } else {
    30993117            qic->reset();
     
    64126430    }
    64136431
     6432    if (fp == second)
     6433        return;
    64146434
    64156435    if (QWidget *sp = second->focusProxy())
     
    1039910419        QWidget *focusWidget = d->effectiveFocusWidget();
    1040010420        QInputContext *ic = 0;
    10401         if (on && !internalWinId() && testAttribute(Qt::WA_InputMethodEnabled) && hasFocus()) {
     10421        if (on && !internalWinId() && hasFocus()
     10422            && focusWidget->testAttribute(Qt::WA_InputMethodEnabled)) {
    1040210423            ic = focusWidget->d_func()->inputContext();
    10403             ic->reset();
    10404             ic->setFocusWidget(0);
     10424            if (ic) {
     10425                ic->reset();
     10426                ic->setFocusWidget(0);
     10427            }
    1040510428        }
    10406 #endif
    1040710429        if (!qApp->testAttribute(Qt::AA_DontCreateNativeWidgetSiblings) && parentWidget())
    1040810430            parentWidget()->d_func()->enforceNativeChildren();
    1040910431        if (on && !internalWinId() && testAttribute(Qt::WA_WState_Created))
    1041010432            d->createWinId();
    10411 #ifndef QT_NO_IM
    10412         if (ic && isEnabled())
     10433        if (ic && isEnabled() && focusWidget->isEnabled()
     10434            && focusWidget->testAttribute(Qt::WA_InputMethodEnabled)) {
    1041310435            ic->setFocusWidget(focusWidget);
     10436        }
    1041410437#endif //QT_NO_IM
    1041510438        break;
     
    1044910472        if (ic) {
    1045010473            if (on && hasFocus() && ic->focusWidget() != focusWidget && isEnabled()) {
     10474                && focusWidget->testAttribute(Qt::WA_InputMethodEnabled)) {
    1045110475                ic->setFocusWidget(focusWidget);
    1045210476            } else if (!on && ic->focusWidget() == focusWidget) {
  • trunk/src/gui/kernel/qwidget.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qwidget_mac.mm

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    111111#include "qdnd_p.h"
    112112#include <QtGui/qgraphicsproxywidget.h>
     113#include "qmainwindow.h"
    113114
    114115QT_BEGIN_NAMESPACE
     
    404405    qt_mac_app_fullscreen = b;
    405406    if (b) {
    406         SetSystemUIMode(kUIModeAllSuppressed, 0);
     407        SetSystemUIMode(kUIModeAllHidden, kUIOptionAutoShowMenuBar);
    407408    } else {
    408409        SetSystemUIMode(kUIModeNormal, 0);
     
    17221723{
    17231724    Q_Q(QWidget);
     1725#if !defined(QT_NO_MAINWINDOW) && !defined(QT_NO_TOOLBAR)
     1726    // Make sure that QMainWindow has the MacWindowToolBarButtonHint when the
     1727    // unifiedTitleAndToolBarOnMac property is ON. This is to avoid reentry of
     1728    // setParent() triggered by the QToolBar::event(QEvent::ParentChange).
     1729    QMainWindow *mainWindow = qobject_cast<QMainWindow *>(q);
     1730    if (mainWindow && mainWindow->unifiedTitleAndToolBarOnMac()) {
     1731        data.window_flags |= Qt::MacWindowToolBarButtonHint;
     1732    }
     1733#endif
    17241734#ifndef QT_MAC_USE_COCOA
    17251735// ### COCOA:Interleave these better!
     
    27442754        if (wasWindow) {
    27452755            oldToolbar = [oldWindow toolbar];
     2756            [oldToolbar retain];
    27462757            oldToolbarVisible = [oldToolbar isVisible];
     2758            [oldWindow setToolbar:nil];
    27472759        }
    27482760#endif
     
    27882800                OSWindowRef newWindow = qt_mac_window_for(q);
    27892801                [newWindow setToolbar:oldToolbar];
     2802                [oldToolbar release];
    27902803                [oldToolbar setVisible:oldToolbarVisible];
    27912804            }
     
    34023415#else
    34033416            [window orderOut:window];
     3417            // Unfortunately it is not as easy as just hiding the window, we need
     3418            // to find out if we were in full screen mode. If we were and this is
     3419            // the last window in full screen mode then we need to unset the full screen
     3420            // mode. If this is not the last visible window in full screen mode then we
     3421            // don't change the full screen mode.
     3422            if(q->isFullScreen())
     3423            {
     3424                bool keepFullScreen = false;
     3425                QWidgetList windowList = qApp->topLevelWidgets();
     3426                int windowCount = windowList.count();
     3427                for(int i = 0; i < windowCount; i++)
     3428                {
     3429                    QWidget *w = windowList[i];
     3430                    // If it is the same window, we don't need to check :-)
     3431                    if(q == w)
     3432                        continue;
     3433                    // If they are not visible or if they are minimized then
     3434                    // we just ignore them.
     3435                    if(!w->isVisible() || w->isMinimized())
     3436                        continue;
     3437                    // Is it full screen?
     3438                    // Notice that if there is one window in full screen mode then we
     3439                    // cannot switch the full screen mode off, therefore we just abort.
     3440                    if(w->isFullScreen()) {
     3441                        keepFullScreen = true;
     3442                        break;
     3443                    }
     3444                }
     3445                // No windows in full screen mode, so let just unset that flag.
     3446                if(!keepFullScreen)
     3447                    qt_mac_set_fullscreen_mode(false);
     3448            }
    34043449#endif
    34053450            toggleDrawers(false);
     
    36723717
    36733718#if QT_MAC_USE_COCOA
     3719    QMacCocoaAutoReleasePool pool;
    36743720    if (isRealWindow()) {
    36753721        // Calling orderFront shows the window on Cocoa too.
  • trunk/src/gui/kernel/qwidget_p.h

    r569 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    178178    QWSManager *qwsManager;
    179179#endif
     180#elif defined(Q_OS_SYMBIAN)
     181    uint inExpose : 1; // Prevents drawing recursion
    180182#elif defined(Q_WS_PM)
    181183    HWND fId;
  • trunk/src/gui/kernel/qwidget_qws.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qwidget_s60.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    390390            if (!isOpaque) {
    391391                RWindow *const window = static_cast<RWindow *>(drawableWindow);
     392#ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE
     393                window->SetSurfaceTransparency(true);
     394#else
    392395                const TDisplayMode displayMode = static_cast<TDisplayMode>(window->SetRequiredDisplayMode(EColor16MA));
    393396                if (window->SetTransparencyAlphaChannel() == KErrNone)
    394397                    window->SetBackgroundColor(TRgb(255, 255, 255, 0));
     398#endif
    395399            }
    396400        }
     
    708712    RWindow *const window = static_cast<RWindow *>(q->effectiveWinId()->DrawableWindow());
    709713
     714#ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE
     715    window->SetSurfaceTransparency(!isOpaque);
     716#else
    710717    if (!isOpaque) {
    711718        const TDisplayMode displayMode = static_cast<TDisplayMode>(window->SetRequiredDisplayMode(EColor16MA));
     
    714721    } else
    715722        window->SetTransparentRegion(TRegionFix<1>());
     723#endif
    716724}
    717725
     
    871879{
    872880    extra->topextra->backingStore = 0;
     881    extra->topextra->inExpose = 0;
    873882}
    874883
     
    10381047
    10391048    if (isWindow()) {
     1049
     1050        QSymbianControl *window = static_cast<QSymbianControl *>(effectiveWinId());
     1051        if (window && newstate & Qt::WindowMinimized) {
     1052            window->setFocusSafely(false);
     1053            window->MakeVisible(false);
     1054        } else if (window && oldstate & Qt::WindowMinimized) {
     1055            window->setFocusSafely(true);
     1056            window->MakeVisible(true);
     1057        }
     1058
    10401059#ifdef Q_WS_S60
    1041         // Change window decoration visibility if switching to or from fullsccreen
    1042         // In addition decoration visibility is changed when the initial has been
    1043         // WindowNoState.
    1044         // The window decoration visibility has to be changed before doing actual
    1045         // window state change since in that order the availableGeometry will return
    1046         // directly the right size and we will avoid unnecessarty redraws
    1047         if ((oldstate & Qt::WindowFullScreen) != (newstate & Qt::WindowFullScreen) ||
    1048             oldstate == Qt::WindowNoState) {
    1049             CEikStatusPane* statusPane = S60->statusPane();
    1050             CEikButtonGroupContainer* buttonGroup = S60->buttonGroupContainer();
    1051             if (newstate & Qt::WindowFullScreen) {
    1052                 if (statusPane)
    1053                     statusPane->MakeVisible(false);
    1054                 if (buttonGroup)
    1055                     buttonGroup->MakeVisible(false);
    1056             } else {
    1057                 if (statusPane)
    1058                     statusPane->MakeVisible(true);
    1059                 if (buttonGroup)
    1060                     buttonGroup->MakeVisible(true);
    1061             }
    1062 
    1063         }
     1060        // Hide window decoration when switching to fullsccreen / minimized otherwise show decoration.
     1061        // The window decoration visibility has to be changed before doing actual window state
     1062        // change since in that order the availableGeometry will return directly the right size and
     1063        // we will avoid unnecessarty redraws
     1064        CEikStatusPane* statusPane = S60->statusPane();
     1065        CEikButtonGroupContainer* buttonGroup = S60->buttonGroupContainer();
     1066        TBool visible = !(newstate & (Qt::WindowFullScreen | Qt::WindowMinimized));
     1067        if (statusPane)
     1068            statusPane->MakeVisible(visible);
     1069        if (buttonGroup)
     1070            buttonGroup->MakeVisible(visible);
    10641071#endif // Q_WS_S60
    10651072
    10661073        createWinId();
    10671074        Q_ASSERT(testAttribute(Qt::WA_WState_Created));
    1068         QTLWExtra *top = d->topData();
    1069 
    10701075        // Ensure the initial size is valid, since we store it as normalGeometry below.
    10711076        if (!testAttribute(Qt::WA_Resized) && !isVisible())
    10721077            adjustSize();
    10731078
    1074         if ((oldstate & Qt::WindowMaximized) != (newstate & Qt::WindowMaximized)) {
    1075             if ((newstate & Qt::WindowMaximized)) {
    1076                 const QRect normalGeometry = geometry();
    1077 
    1078                 const QRect r = top->normalGeometry;
    1079                 setGeometry(qApp->desktop()->availableGeometry(this));
    1080                 top->normalGeometry = r;
    1081 
    1082                 if (top->normalGeometry.width() < 0)
    1083                     top->normalGeometry = normalGeometry;
    1084             } else {
    1085                 // restore original geometry
    1086                 setGeometry(top->normalGeometry);
    1087             }
    1088         }
    1089         if ((oldstate & Qt::WindowFullScreen) != (newstate & Qt::WindowFullScreen)) {
    1090             if (newstate & Qt::WindowFullScreen) {
    1091                 const QRect normalGeometry = geometry();
    1092                 const QRect r = top->normalGeometry;
    1093                 setGeometry(qApp->desktop()->screenGeometry(this));
    1094 
    1095                 top->normalGeometry = r;
    1096                 if (top->normalGeometry.width() < 0)
    1097                     top->normalGeometry = normalGeometry;
    1098             } else {
    1099                 if (newstate & Qt::WindowMaximized) {
    1100                     const QRect r = top->normalGeometry;
    1101                     setGeometry(qApp->desktop()->availableGeometry(this));
    1102                     top->normalGeometry = r;
    1103                 } else {
    1104                     setGeometry(top->normalGeometry);
    1105                 }
    1106             }
    1107         }
    1108         if ((oldstate & Qt::WindowMinimized) != (newstate & Qt::WindowMinimized)) {
    1109             if (newstate & Qt::WindowMinimized) {
    1110                 if (isVisible()) {
    1111                     QSymbianControl *id = static_cast<QSymbianControl *>(effectiveWinId());
    1112                     if (id->IsFocused()) // Avoid unnecessary calls to FocusChanged()
    1113                         id->setFocusSafely(false);
    1114                     id->MakeVisible(false);
    1115                 }
    1116             } else {
    1117                 if (isVisible()) {
    1118                     QSymbianControl *id = static_cast<QSymbianControl *>(effectiveWinId());
    1119                     id->MakeVisible(true);
    1120                     if (!id->IsFocused()) // Avoid unnecessary calls to FocusChanged()
    1121                         id->setFocusSafely(true);
    1122                 }
    1123                 const QRect normalGeometry = geometry();
    1124                 const QRect r = top->normalGeometry;
    1125                 top->normalGeometry = r;
    1126                 if (top->normalGeometry.width() < 0)
    1127                     top->normalGeometry = normalGeometry;
    1128             }
    1129         }
     1079        QTLWExtra *top = d->topData();
     1080        const QRect normalGeometry = (top->normalGeometry.width() < 0) ? geometry() : top->normalGeometry;
     1081
     1082        if (newstate & Qt::WindowFullScreen)
     1083            setGeometry(qApp->desktop()->screenGeometry(this));
     1084        else if (newstate & Qt::WindowMaximized)
     1085            setGeometry(qApp->desktop()->availableGeometry(this));
     1086        else
     1087            setGeometry(normalGeometry);
     1088
     1089        //restore normal geometry
     1090        top->normalGeometry = normalGeometry;
    11301091    }
    11311092
     
    11871148    if (destroyWindow) {
    11881149        delete id;
     1150        // At this point the backing store should already be destroyed
     1151        // so we flush the command buffer to ensure that the freeing of
     1152        // those resources and deleting the window can happen "atomically"
     1153        S60->wsSession().Flush();
    11891154    }
    11901155}
  • trunk/src/gui/kernel/qwidget_win.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qwidget_wince.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qwidget_x11.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qwidgetaction.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qwidgetaction.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qwidgetaction_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qwidgetcreate_x11.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qwindowdefs.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qwindowdefs_win.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qwinnativepangesturerecognizer_win.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qx11embed_x11.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qx11embed_x11.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qx11info_x11.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/src/gui/kernel/qx11info_x11.h

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
Note: See TracChangeset for help on using the changeset viewer.