Changeset 128158 in webkit
- Timestamp:
- Sep 11, 2012 2:18:27 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/qt/ChangeLog
r128006 r128158 1 2012-09-11 Andras Becsi <andras.becsi@nokia.com> 2 3 [Qt][WK2] Fix the build with recent Qt5 4 https://bugs.webkit.org/show_bug.cgi?id=96283 5 6 Reviewed by Simon Hausmann. 7 8 We should not use deprecated Qt API because doing that results 9 in build failure since all the deprecated API was disabled 10 in qtbase (https://codereview.qt-project.org/#change,24890). 11 12 * tests/qgraphicswebview/tst_qgraphicswebview.cpp: 13 (tst_QGraphicsWebView::widgetsRenderingThroughCache): 14 (tst_QGraphicsWebView::setPalette): 15 (tst_QGraphicsWebView::compareCanvasToImage): 16 * tests/qobjectbridge/tst_qobjectbridge.cpp: 17 (tst_QObjectBridge::ownership): 18 * tests/qwebframe/tst_qwebframe.cpp: 19 (tst_QWebFrame::popupFocus): 20 (tst_QWebFrame::inputFieldFocus): 21 (tst_QWebFrame::evaluateWillCauseRepaint): 22 * tests/qwebpage/tst_qwebpage.cpp: 23 (Navigation): 24 (PluginCounterPage): 25 * tests/qwebview/tst_qwebview.cpp: 26 (tst_QWebView::reusePage): 27 (tst_QWebView::focusInputTypes): 28 (tst_QWebView::setPalette): 29 (tst_QWebView::renderingAfterMaxAndBack): 30 1 31 2012-09-09 Emil A Eklund <eae@chromium.org> 2 32 -
trunk/Source/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
r125603 r128158 185 185 view.setGeometry(QRect(0, 0, 500, 500)); 186 186 QWidget *const widget = &view; 187 QTest::qWaitForWindow Shown(widget);187 QTest::qWaitForWindowExposed(widget); 188 188 189 189 // 1. Reference without tiling. … … 410 410 QVERIFY(webView1.page()->palette() == palette1); 411 411 412 QTest::qWaitForWindow Shown(&view1);412 QTest::qWaitForWindowExposed(&view1); 413 413 414 414 if (!active) { 415 415 controlView.show(); 416 QTest::qWaitForWindow Shown(&controlView);416 QTest::qWaitForWindowExposed(&controlView); 417 417 QApplication::setActiveWindow(&controlView); 418 418 activeView = &controlView; … … 465 465 view2.show(); 466 466 467 QTest::qWaitForWindow Shown(&view2);467 QTest::qWaitForWindowExposed(&view2); 468 468 469 469 if (!active) { 470 470 controlView.show(); 471 QTest::qWaitForWindow Shown(&controlView);471 QTest::qWaitForWindowExposed(&controlView); 472 472 QApplication::setActiveWindow(&controlView); 473 473 activeView = &controlView; … … 611 611 GraphicsView view; 612 612 view.show(); 613 QTest::qWaitForWindow Shown(&view);613 QTest::qWaitForWindowExposed(&view); 614 614 615 615 QGraphicsWebView* const graphicsWebView = view.m_webView; … … 621 621 view.render(&painter); 622 622 } 623 QApplication::syncX();624 623 625 624 const QSize imageSize = reference.size(); -
trunk/Source/WebKit/qt/tests/qobjectbridge/tst_qobjectbridge.cpp
r126976 r128158 2040 2040 // test ownership 2041 2041 { 2042 Q WeakPointer<QObject> ptr = new QObject();2042 QPointer<QObject> ptr = new QObject(); 2043 2043 QVERIFY(ptr); 2044 2044 { … … 2050 2050 } 2051 2051 { 2052 Q WeakPointer<QObject> ptr = new QObject();2052 QPointer<QObject> ptr = new QObject(); 2053 2053 QVERIFY(ptr); 2054 2054 QObject* before = ptr.data(); … … 2074 2074 } 2075 2075 { 2076 Q WeakPointer<QObject> ptr = new QObject();2076 QPointer<QObject> ptr = new QObject(); 2077 2077 QVERIFY(ptr); 2078 2078 { … … 2086 2086 { 2087 2087 QObject* parent = new QObject(); 2088 Q WeakPointer<QObject> child = new QObject(parent);2088 QPointer<QObject> child = new QObject(parent); 2089 2089 QVERIFY(child); 2090 2090 { -
trunk/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
r125603 r128158 602 602 view.setFocus(); 603 603 view.show(); 604 QTest::qWaitForWindow Shown(&view);604 QTest::qWaitForWindowExposed(&view); 605 605 view.activateWindow(); 606 606 QTRY_VERIFY(view.hasFocus()); … … 626 626 view.resize(400, 100); 627 627 view.show(); 628 QTest::qWaitForWindow Shown(&view);628 QTest::qWaitForWindowExposed(&view); 629 629 view.activateWindow(); 630 630 view.setFocus(); … … 1028 1028 view.show(); 1029 1029 1030 QTest::qWaitForWindow Shown(&view);1030 QTest::qWaitForWindowExposed(&view); 1031 1031 view.page()->mainFrame()->evaluateJavaScript( 1032 1032 "document.getElementById('junk').style.display = 'none';"); -
trunk/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
r125603 r128158 396 396 397 397 struct Navigation { 398 Q WeakPointer<QWebFrame> frame;398 QPointer<QWebFrame> frame; 399 399 QNetworkRequest request; 400 400 NavigationType type; … … 894 894 public: 895 895 int m_count; 896 Q WeakPointer<QObject> m_widget;896 QPointer<QObject> m_widget; 897 897 QObject* m_pluginParent; 898 898 PluginCounterPage(QObject* parent = 0) -
trunk/Source/WebKit/qt/tests/qwebview/tst_qwebview.cpp
r125603 r128158 140 140 QFETCH(QString, html); 141 141 QWebView* view1 = new QWebView; 142 Q WeakPointer<QWebPage> page = new QWebPage;142 QPointer<QWebPage> page = new QWebPage; 143 143 view1->setPage(page.data()); 144 144 page.data()->settings()->setAttribute(QWebSettings::PluginsEnabled, true); … … 151 151 152 152 view1->show(); 153 QTest::qWaitForWindow Shown(view1);153 QTest::qWaitForWindowExposed(view1); 154 154 delete view1; 155 155 QVERIFY(page != 0); // deleting view must not have deleted the page, since it's not a child of view … … 158 158 view2->setPage(page.data()); 159 159 view2->show(); // in Windowless mode, you should still be able to see the plugin here 160 QTest::qWaitForWindow Shown(view2);160 QTest::qWaitForWindowExposed(view2); 161 161 delete view2; 162 162 … … 235 235 QWebView webView; 236 236 webView.show(); 237 QTest::qWaitForWindow Shown(&webView);237 QTest::qWaitForWindowExposed(&webView); 238 238 239 239 QUrl url("qrc:///resources/input_types.html"); … … 361 361 view1.show(); 362 362 363 QTest::qWaitForWindow Shown(&view1);363 QTest::qWaitForWindowExposed(&view1); 364 364 365 365 if (!active) { 366 366 controlView.show(); 367 QTest::qWaitForWindow Shown(&controlView);367 QTest::qWaitForWindowExposed(&controlView); 368 368 activeView = &controlView; 369 369 controlView.activateWindow(); … … 408 408 view2.show(); 409 409 410 QTest::qWaitForWindow Shown(&view2);410 QTest::qWaitForWindowExposed(&view2); 411 411 412 412 if (!active) { 413 413 controlView.show(); 414 QTest::qWaitForWindow Shown(&controlView);414 QTest::qWaitForWindowExposed(&controlView); 415 415 activeView = &controlView; 416 416 controlView.activateWindow(); … … 450 450 view.page()->settings()->setMaximumPagesInCache(3); 451 451 452 QTest::qWaitForWindow Shown(&view);452 QTest::qWaitForWindowExposed(&view); 453 453 454 454 QPixmap reference(view.page()->viewportSize()); … … 471 471 view.showMaximized(); 472 472 473 QTest::qWaitForWindow Shown(&view);473 QTest::qWaitForWindowExposed(&view); 474 474 475 475 QPixmap reference2(view.page()->viewportSize()); -
trunk/Source/WebKit2/ChangeLog
r128157 r128158 1 2012-09-11 Andras Becsi <andras.becsi@nokia.com> 2 3 [Qt][WK2] Fix the build with recent Qt5 4 https://bugs.webkit.org/show_bug.cgi?id=96283 5 6 Reviewed by Simon Hausmann. 7 8 We should not use deprecated Qt API because doing that results 9 in build failure since all the deprecated API was disabled 10 in qtbase (https://codereview.qt-project.org/#change,24890). 11 12 * UIProcess/API/qt/qwebnavigationhistory.cpp: 13 (QWebNavigationListModel::roleNames): 14 (QWebNavigationListModel::reset): 15 * UIProcess/API/qt/qwebnavigationhistory_p.h: 16 * UIProcess/API/qt/tests/qrawwebview/tst_qrawwebview.cpp: 17 (WebView::load): 18 * UIProcess/qt/WebPopupMenuProxyQt.cpp: 19 (PopupMenuItemModel): 20 (WebKit::PopupMenuItemModel::PopupMenuItemModel): 21 (WebKit::PopupMenuItemModel::roleNames): 22 (WebKit): 23 1 24 2012-09-11 Christophe Dumez <christophe.dumez@intel.com> 2 25 -
trunk/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory.cpp
r113330 r128158 97 97 } 98 98 99 QWebNavigationListModel::QWebNavigationListModel() 100 : QAbstractListModel() 99 QHash<int, QByteArray> QWebNavigationListModel::roleNames() const 101 100 { 102 101 QHash<int, QByteArray> roles; 103 102 roles[QWebNavigationHistory::UrlRole] = "url"; 104 103 roles[QWebNavigationHistory::TitleRole] = "title"; 105 setRoleNames(roles);104 return roles; 106 105 } 107 106 … … 138 137 } 139 138 139 void QWebNavigationListModel::reset() 140 { 141 beginResetModel(); 142 endResetModel(); 143 } 144 140 145 QWebNavigationHistory::QWebNavigationHistory() 141 146 : QObject() -
trunk/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory_p.h
r123456 r128158 49 49 int rowCount(const QModelIndex& parent = QModelIndex()) const; 50 50 QVariant data(const QModelIndex& index, int role) const; 51 QHash<int, QByteArray> roleNames() const; 52 void reset(); 51 53 52 54 private: 53 QWebNavigationListModel(); 55 QWebNavigationListModel() 56 : QAbstractListModel() 57 { } 58 54 59 QWebNavigationListModelPrivate* d; 55 60 friend class QWebNavigationListModelPrivate; -
trunk/Source/WebKit2/UIProcess/API/qt/tests/qrawwebview/tst_qrawwebview.cpp
r128031 r128158 83 83 { 84 84 m_frameLoaded = false; 85 WKPageLoadURL(m_webView->pageRef(), WKURLCreateWithUTF8CString(html.to Ascii().data()));85 WKPageLoadURL(m_webView->pageRef(), WKURLCreateWithUTF8CString(html.toLocal8Bit().data())); 86 86 QVERIFY(::waitForSignal(this, SIGNAL(loaded()), 5000)); 87 87 } -
trunk/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp
r124758 r128158 56 56 virtual int rowCount(const QModelIndex& parent = QModelIndex()) const { return m_items.size(); } 57 57 virtual QVariant data(const QModelIndex&, int role = Qt::DisplayRole) const; 58 virtual QHash<int, QByteArray> roleNames() const; 58 59 59 60 Q_INVOKABLE void select(int); … … 168 169 , m_allowMultiples(multiple) 169 170 { 171 buildItems(webPopupItems); 172 } 173 174 QHash<int, QByteArray> PopupMenuItemModel::roleNames() const 175 { 170 176 static QHash<int, QByteArray> roles = createRoleNamesHash(); 171 setRoleNames(roles); 172 buildItems(webPopupItems); 177 return roles; 173 178 } 174 179 -
trunk/Tools/ChangeLog
r128157 r128158 1 2012-09-11 Andras Becsi <andras.becsi@nokia.com> 2 3 [Qt][WK2] Fix the build with recent Qt5 4 https://bugs.webkit.org/show_bug.cgi?id=96283 5 6 Reviewed by Simon Hausmann. 7 8 We should not use deprecated Qt API because doing that results 9 in build failure since all the deprecated API was disabled 10 in qtbase (https://codereview.qt-project.org/#change,24890). 11 12 * DumpRenderTree/qt/main.cpp: 13 (main): 14 * MiniBrowser/qt/MiniBrowserApplication.cpp: 15 (MiniBrowserApplication::notify): 16 * MiniBrowser/qt/raw/View.cpp: 17 (View::exposeEvent): 18 (main): 19 1 20 2012-09-11 Christophe Dumez <christophe.dumez@intel.com> 2 21 -
trunk/Tools/DumpRenderTree/qt/main.cpp
r125776 r128158 118 118 WebKit::initializeTestFonts(); 119 119 120 QApplication::setGraphicsSystem("raster");121 120 QApplication::setStyle(new QWindowsStyle); 122 121 QApplication::setDesktopSettingsAware(false); -
trunk/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp
r124877 r128158 95 95 return QGuiApplication::notify(target, event); 96 96 97 if (isTouchEvent(event) && static_cast<QTouchEvent*>(event)->deviceType() == QTouchEvent::TouchScreen) {97 if (isTouchEvent(event)) { 98 98 if (m_pendingFakeTouchEventCount) 99 99 --m_pendingFakeTouchEventCount; -
trunk/Tools/MiniBrowser/qt/raw/View.cpp
r121620 r128158 79 79 if (!m_active) { 80 80 m_active = true; 81 WKPageLoadURL(m_webView->pageRef(), WKURLCreateWithUTF8CString(m_url.to Ascii().data()));81 WKPageLoadURL(m_webView->pageRef(), WKURLCreateWithUTF8CString(m_url.toLocal8Bit().data())); 82 82 83 83 m_webView->setFocused(true); … … 132 132 QGuiApplication app(argc, argv); 133 133 134 View view(app.arguments().size() > 1 ? app.arguments().at(1) : QString ::fromAscii("http://www.google.com"));134 View view(app.arguments().size() > 1 ? app.arguments().at(1) : QStringLiteral("http://www.google.com")); 135 135 view.show(); 136 136 return app.exec();
Note: See TracChangeset
for help on using the changeset viewer.