Changeset 65124 in webkit


Ignore:
Timestamp:
Aug 10, 2010 10:39:59 PM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-08-10 Anders Bakken <agbakken@gmail.com>

Reviewed by Kenneth Rohde Christiansen.

[Qt] Don't connect to microFocusChanged() if _q_updateMicroFocus is a noop.
https://bugs.webkit.org/show_bug.cgi?id=40580

_q_updateMicroFocus() is a noop unless this ifdef evaluates to true:

#if !defined(QT_NO_IM) && (defined(Q_WS_X11)
defined(Q_WS_QWS) defined(Q_OS_SYMBIAN))

In such cases there's no need to carry the overhead of the extra
signal/slot connection.

  • Api/qgraphicswebview.cpp: (QGraphicsWebViewPrivate::_q_updateMicroFocus): (QGraphicsWebView::setPage):
Location:
trunk/WebKit/qt
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/qt/Api/qgraphicswebview.cpp

    r64965 r65124  
    6868    void _q_scaleChanged();
    6969
     70#if !defined(QT_NO_IM) && (defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN))
    7071    void _q_updateMicroFocus();
     72#endif
    7173    void _q_pageDestroyed();
    7274
     
    101103}
    102104
     105#if !defined(QT_NO_IM) && (defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN))
    103106void QGraphicsWebViewPrivate::_q_updateMicroFocus()
    104107{
    105 #if !defined(QT_NO_IM) && (defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN))
    106108    // Ideally, this should be handled by a common call to an updateMicroFocus function
    107109    // in QGraphicsItem. See http://bugreports.qt.nokia.com/browse/QTBUG-7578.
     
    112114            ic->update();
    113115    }
    114 #endif
    115 }
     116}
     117#endif
    116118
    117119void QGraphicsWebViewPrivate::_q_pageDestroyed()
     
    489491    connect(d->page, SIGNAL(linkClicked(QUrl)),
    490492            this, SIGNAL(linkClicked(QUrl)));
     493    connect(d->page, SIGNAL(destroyed()),
     494            this, SLOT(_q_pageDestroyed()));
     495#if !defined(QT_NO_IM) && (defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN))
    491496    connect(d->page, SIGNAL(microFocusChanged()),
    492497            this, SLOT(_q_updateMicroFocus()));
    493     connect(d->page, SIGNAL(destroyed()),
    494             this, SLOT(_q_pageDestroyed()));
     498#endif
    495499}
    496500
  • trunk/WebKit/qt/Api/qgraphicswebview.h

    r63740 r65124  
    147147private:
    148148    Q_PRIVATE_SLOT(d, void _q_doLoadFinished(bool success))
     149#if !defined(QT_NO_IM) && (defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN))
    149150    Q_PRIVATE_SLOT(d, void _q_updateMicroFocus())
     151#endif
    150152    Q_PRIVATE_SLOT(d, void _q_pageDestroyed())
    151153    // we don't want to change the moc based on USE() macro, so this function is here
  • trunk/WebKit/qt/ChangeLog

    r65107 r65124  
     12010-08-10  Anders Bakken  <agbakken@gmail.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Don't connect to microFocusChanged() if _q_updateMicroFocus is a noop.
     6        https://bugs.webkit.org/show_bug.cgi?id=40580
     7
     8        _q_updateMicroFocus() is a noop unless this ifdef evaluates to true:
     9        #if !defined(QT_NO_IM) && (defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN))
     10
     11        In such cases there's no need to carry the overhead of the extra
     12        signal/slot connection.
     13
     14        * Api/qgraphicswebview.cpp:
     15        (QGraphicsWebViewPrivate::_q_updateMicroFocus):
     16        (QGraphicsWebView::setPage):
     17
    1182010-08-10  Chris Marrin  <cmarrin@apple.com>
    219
Note: See TracChangeset for help on using the changeset viewer.