Changeset 57327 in webkit


Ignore:
Timestamp:
Apr 9, 2010 3:55:22 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-04-09 Tasuku Suzuki <tasuku.suzuki@nokia.com>

Reviewed by Simon Hausmann.

[Qt] Fix compile error with QT_NO_ACTION
https://bugs.webkit.org/show_bug.cgi?id=36529

Make sure QT_NO_ACTION is not defined to use QAction

  • Api/qgraphicswebview.cpp: (QGraphicsWebView::pageAction):
  • Api/qwebpage.cpp: (QWebPagePrivate::updateAction): (QWebPage::updatePositionDependentActions):
  • Api/qwebpage.h:
  • Api/qwebview.cpp:
  • Api/qwebview.h:
Location:
trunk/WebKit/qt
Files:
6 edited

Legend:

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

    r56837 r57327  
    10621062QAction *QGraphicsWebView::pageAction(QWebPage::WebAction action) const
    10631063{
     1064#ifdef QT_NO_ACTION
     1065    Q_UNUSED(action)
     1066    return 0;
     1067#else
    10641068    return page()->action(action);
     1069#endif
    10651070}
    10661071
  • trunk/WebKit/qt/Api/qwebpage.cpp

    r57323 r57327  
    620620#endif // QT_NO_CONTEXTMENU
    621621
     622#ifndef QT_NO_ACTION
    622623void QWebPagePrivate::_q_webActionTriggered(bool checked)
    623624{
     
    628629    q->triggerAction(action, checked);
    629630}
     631#endif // QT_NO_ACTION
    630632
    631633void QWebPagePrivate::_q_cleanupLeakMessages()
     
    639641void QWebPagePrivate::updateAction(QWebPage::WebAction action)
    640642{
     643#ifdef QT_NO_ACTION
     644    Q_UNUSED(action)
     645#else
    641646    QAction *a = actions[action];
    642647    if (!a || !mainFrame)
     
    698703    if (a->isCheckable())
    699704        a->setChecked(checked);
     705#endif // QT_NO_ACTION
    700706}
    701707
     
    23112317}
    23122318
     2319#ifndef QT_NO_ACTION
    23132320/*!
    23142321   Returns a QAction for the specified WebAction \a action.
     
    25832590    return a;
    25842591}
     2592#endif // QT_NO_ACTION
    25852593
    25862594/*!
     
    28522860void QWebPage::updatePositionDependentActions(const QPoint &pos)
    28532861{
     2862#ifndef QT_NO_ACTION
    28542863    // First we disable all actions, but keep track of which ones were originally enabled.
    28552864    QBitArray originallyEnabledWebActions(QWebPage::WebActionCount);
     
    28612870        }
    28622871    }
     2872#endif // QT_NO_ACTION
    28632873
    28642874    d->createMainFrame();
     
    28872897#endif // QT_NO_CONTEXTMENU
    28882898
     2899#ifndef QT_NO_ACTION
    28892900    // Finally, we restore the original enablement for the actions that were not put into the menu.
    28902901    originallyEnabledWebActions &= ~visitedWebActions; // Mask out visited actions (they're part of the menu)
     
    28952906        }
    28962907    }
     2908#endif // QT_NO_ACTION
    28972909
    28982910    // This whole process ensures that any actions put into to the context menu has the right
  • trunk/WebKit/qt/Api/qwebpage.h

    r56450 r57327  
    221221    QString selectedText() const;
    222222
     223#ifndef QT_NO_ACTION
    223224    QAction *action(WebAction action) const;
     225#endif
    224226    virtual void triggerAction(WebAction action, bool checked = false);
    225227
     
    349351private:
    350352    Q_PRIVATE_SLOT(d, void _q_onLoadProgressChanged(int))
     353#ifndef QT_NO_ACTION
    351354    Q_PRIVATE_SLOT(d, void _q_webActionTriggered(bool checked))
     355#endif
    352356    Q_PRIVATE_SLOT(d, void _q_cleanupLeakMessages())
    353357
  • trunk/WebKit/qt/Api/qwebview.cpp

    r56450 r57327  
    586586}
    587587
     588#ifndef QT_NO_ACTION
    588589/*!
    589590    Returns a pointer to a QAction that encapsulates the specified web action \a action.
     
    593594    return page()->action(action);
    594595}
     596#endif
    595597
    596598/*!
  • trunk/WebKit/qt/Api/qwebview.h

    r52065 r57327  
    7676    QString selectedText() const;
    7777
     78#ifndef QT_NO_ACTION
    7879    QAction* pageAction(QWebPage::WebAction action) const;
     80#endif
    7981    void triggerPageAction(QWebPage::WebAction action, bool checked = false);
    8082
  • trunk/WebKit/qt/ChangeLog

    r57323 r57327  
     12010-04-09  Tasuku Suzuki  <tasuku.suzuki@nokia.com>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        [Qt] Fix compile error with QT_NO_ACTION
     6        https://bugs.webkit.org/show_bug.cgi?id=36529
     7
     8        Make sure QT_NO_ACTION is not defined to use QAction
     9
     10        * Api/qgraphicswebview.cpp:
     11        (QGraphicsWebView::pageAction):
     12        * Api/qwebpage.cpp:
     13        (QWebPagePrivate::updateAction):
     14        (QWebPage::updatePositionDependentActions):
     15        * Api/qwebpage.h:
     16        * Api/qwebview.cpp:
     17        * Api/qwebview.h:
     18
    1192010-04-09  Simon Hausmann  <simon.hausmann@nokia.com>
    220
Note: See TracChangeset for help on using the changeset viewer.