+2011-09-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Fix build against Qt5 after refactor of widgets out of QtGUi
+
+ QWidget and friends now live in the QtWidgets library. We update
+ includes in implementation files and private headers to us the
+ non-module-prefixed path, and leave the lookup for the include
+ path. For public headers we have to ifdef the includes as the
+ user might now have the modules we need in his QT config.
+
+ Finally, QSGCanvas is no longer a QWidget but a QWindow, so we
+ have to update our code and use windowHandle() for setting the
+ parent relationships.
+
+ https://bugs.webkit.org/show_bug.cgi?id=68687
+
+ Reviewed by Andreas Kling.
+
+ * Source/WebKit.pro:
+
2011-09-29 Sergio Villar Senin <svillar@igalia.com>
[GTK] Bump version to 1.7.0
+2011-09-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Fix build against Qt5 after refactor of widgets out of QtGUi
+
+ QWidget and friends now live in the QtWidgets library. We update
+ includes in implementation files and private headers to us the
+ non-module-prefixed path, and leave the lookup for the include
+ path. For public headers we have to ifdef the includes as the
+ user might now have the modules we need in his QT config.
+
+ Finally, QSGCanvas is no longer a QWidget but a QWindow, so we
+ have to update our code and use windowHandle() for setting the
+ parent relationships.
+
+ https://bugs.webkit.org/show_bug.cgi?id=68687
+
+ Reviewed by Andreas Kling.
+
+ * WebCore.pri:
+ * platform/graphics/qt/GraphicsLayerQt.cpp:
+
2011-09-29 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r96340.
unix:!mac:*-g++*:QMAKE_LFLAGS += -Wl,--gc-sections
linux*-g++*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
-unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui QtNetwork
+unix|win32-g++* {
+ QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui QtNetwork
+ greaterThan(QT_MAJOR_VERSION, 4): QMAKE_PKGCONFIG_REQUIRES += QtWidgets
+}
unix:!mac:!symbian:CONFIG += link_pkgconfig
# Disable C++0x mode in WebCore for those who enabled it in their Qt's mkspec
#include "RefCounted.h"
#include "TranslateTransformOperation.h"
#include "UnitBezier.h"
+#include <qgraphicseffect.h>
+#include <qgraphicsitem.h>
+#include <qgraphicsscene.h>
+#include <qgraphicsview.h>
+#include <qgraphicswidget.h>
+#include <qstyleoption.h>
#include <QtCore/qabstractanimation.h>
#include <QtCore/qdatetime.h>
#include <QtCore/qdebug.h>
#include <QtCore/qset.h>
#include <QtCore/qtimer.h>
#include <QtGui/qcolor.h>
-#include <QtGui/qgraphicseffect.h>
-#include <QtGui/qgraphicsitem.h>
-#include <QtGui/qgraphicsscene.h>
-#include <QtGui/qgraphicsview.h>
-#include <QtGui/qgraphicswidget.h>
#include <QtGui/qpainter.h>
#include <QtGui/qpixmap.h>
#include <QtGui/qpixmapcache.h>
-#include <QtGui/qstyleoption.h>
#if ENABLE(TILED_BACKING_STORE)
#include "TiledBackingStore.h"
exists($$PWD/WebKit2/WebKit2.pro): SUBDIRS += WebKit2/WebKit2.pro
}
+greaterThan(QT_MAJOR_VERSION, 4) {
+ isEmpty(QT.widgets.name)|isEmpty(QT.printsupport.name) {
+ message("Building WebKit against Qt 5.0 requires the QtWidgets and QtPrintSupport modules.")
+ error("Aborting build.")
+ }
+}
+
SUBDIRS += WebCore
SUBDIRS += WebKit/qt/QtWebKit.pro
#include "GraphicsContext.h"
#include "IntRect.h"
#include "TiledBackingStore.h"
+#include <qapplication.h>
+#include <qgraphicsscene.h>
+#include <qgraphicssceneevent.h>
+#include <qgraphicsview.h>
+#include <qscrollbar.h>
+#include <qstyleoption.h>
+#include <qinputcontext.h>
#include <QtCore/qmetaobject.h>
#include <QtCore/qsharedpointer.h>
#include <QtCore/qtimer.h>
-#include <QtGui/qapplication.h>
-#include <QtGui/qgraphicsscene.h>
-#include <QtGui/qgraphicssceneevent.h>
-#include <QtGui/qgraphicsview.h>
#include <QtGui/qpixmapcache.h>
-#include <QtGui/qscrollbar.h>
-#include <QtGui/qstyleoption.h>
-#include <QtGui/qinputcontext.h>
+
#if defined(Q_WS_X11)
#include <QX11Info>
#endif
#include "qwebkitglobal.h"
#include "qwebpage.h"
#include <QtCore/qurl.h>
-#include <QtGui/qevent.h>
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QtWidgets/qgraphicswidget.h>
+#include <QtWidgets/qicon.h>
+#else
#include <QtGui/qgraphicswidget.h>
#include <QtGui/qicon.h>
+#endif
+#include <QtGui/qevent.h>
#include <QtGui/qpainter.h>
#include <QtNetwork/qnetworkaccessmanager.h>
#include <QtCore/qobject.h>
#include <QtCore/qurl.h>
#include <QtCore/qvariant.h>
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QtWidgets/qicon.h>
+#else
#include <QtGui/qicon.h>
+#endif
#include <QtScript/qscriptengine.h>
#include <QtNetwork/qnetworkaccessmanager.h>
#include "qwebkitglobal.h"
#include <QtCore/qurl.h>
#include <QtCore/qstring.h>
-#include <QtGui/qicon.h>
#include <QtCore/qdatetime.h>
#include <QtCore/qshareddata.h>
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QtWidgets/qicon.h>
+#else
+#include <QtGui/qicon.h>
+#endif
#include "qwebkitglobal.h"
#include <QtCore/qobject.h>
#include <QtCore/qurl.h>
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QtWidgets/qwidget.h>
+#else
#include <QtGui/qwidget.h>
+#endif
QT_BEGIN_NAMESPACE
class QNetworkProxy;
#include <QtCore/qstring.h>
#include <QtGui/qpixmap.h>
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QtWidgets/qicon.h>
+#else
#include <QtGui/qicon.h>
+#endif
#include <QtCore/qshareddata.h>
namespace WebCore {
#include "qwebkitglobal.h"
#include "qwebpage.h"
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QtWidgets/qwidget.h>
+#include <QtWidgets/qicon.h>
+#else
#include <QtGui/qwidget.h>
#include <QtGui/qicon.h>
+#endif
#include <QtGui/qpainter.h>
#include <QtCore/qurl.h>
#include <QtNetwork/qnetworkaccessmanager.h>
+2011-09-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Fix build against Qt5 after refactor of widgets out of QtGUi
+
+ QWidget and friends now live in the QtWidgets library. We update
+ includes in implementation files and private headers to us the
+ non-module-prefixed path, and leave the lookup for the include
+ path. For public headers we have to ifdef the includes as the
+ user might now have the modules we need in his QT config.
+
+ Finally, QSGCanvas is no longer a QWidget but a QWindow, so we
+ have to update our code and use windowHandle() for setting the
+ parent relationships.
+
+ https://bugs.webkit.org/show_bug.cgi?id=68687
+
+ Reviewed by Andreas Kling.
+
+ * Api/qgraphicswebview.cpp:
+ * Api/qgraphicswebview.h:
+ * Api/qwebframe.h:
+ * Api/qwebhistory.h:
+ * Api/qwebpage.h:
+ * Api/qwebsettings.h:
+ * Api/qwebview.h:
+ * QtWebKit.pro:
+ * WebCoreSupport/PageClientQt.h:
+ * WebCoreSupport/QtWebComboBox.cpp:
+ * WebCoreSupport/QtWebComboBox.h:
+ * declarative/qdeclarativewebview.cpp:
+ * declarative/qdeclarativewebview_p.h:
+ * docs/webkitsnippets/webpage/main.cpp:
+ * examples/platformplugin/WebNotificationPresenter.h:
+
2011-09-27 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r96108, r96111, r96113, and r96116.
# the generated includes are containing the dependencies.
# It used to be in WebCore.pro but now that this is the main pro file it has to be here.
QT += network
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../..
#include "qwebframe_p.h"
#include "qwebpage.h"
#include "qwebpage_p.h"
+#include <qgraphicsscene.h>
+#include <qgraphicsview.h>
+#include <qgraphicswidget.h>
+#include <qscrollbar.h>
+#include <qstyleoption.h>
+#include <qwidget.h>
#include <QtCore/qmetaobject.h>
-#include <QtGui/qgraphicsscene.h>
-#include <QtGui/qgraphicsview.h>
-#include <QtGui/qgraphicswidget.h>
-#include <QtGui/qscrollbar.h>
-#include <QtGui/qstyleoption.h>
-#include <QtGui/qwidget.h>
#include <Settings.h>
#ifndef QT_NO_COMBOBOX
-#include <QtGui/QAbstractItemView>
-#include <QtGui/QApplication>
+#include <QAbstractItemView>
+#include <QApplication>
#include <QtGui/QMouseEvent>
namespace WebCore {
#include "Platform.h"
-#include <QtGui/QComboBox>
+#include <QComboBox>
#ifndef QT_NO_COMBOBOX
include(../../../WebKit.pri)
QT += declarative
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
contains(QT_CONFIG, qtquick1): {
QT += qtquick1
#include "qdeclarativewebview_p.h"
+#include <QApplication>
+#include <QGraphicsSceneMouseEvent>
#include <QtCore/QDebug>
#include <QtCore/QEvent>
#include <QtCore/QFile>
#include <QtDeclarative/QDeclarativeContext>
#include <QtDeclarative/QDeclarativeEngine>
#include <QtDeclarative/qdeclarative.h>
-#include <QtGui/QApplication>
-#include <QtGui/QGraphicsSceneMouseEvent>
#include <QtGui/QKeyEvent>
#include <QtGui/QMouseEvent>
#include <QtGui/QPen>
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
#include <QtQuick1/QDeclarativeItem>
+#include <QtWidgets/QAction>
#else
#include <QtDeclarative/QDeclarativeItem>
+#include <QtGui/QAction>
#endif
-#include <QtGui/QAction>
#include <QtNetwork/QNetworkAccessManager>
#include "qgraphicswebview.h"
#include "qwebpage.h"
Boston, MA 02110-1301, USA.
*/
-#include <QtGui>
-#include <QWebPage>
+#include <QApplication>
+#include <QPainter>
#include <QWebFrame>
+#include <QWebPage>
//! [0]
class Thumbnailer : public QObject
#define WebNotificationPresenter_h
#include "qwebkitplatformplugin.h"
-#include <QtGui>
+
+#include <QBitmap>
+#include <QEvent>
+#include <QGridLayout>
+#include <QLabel>
+#include <QPainter>
+#include <QWidget>
class WebNotificationWidget : public QWidget
{
include(../../../WebKit.pri)
QT += testlib network
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
lessThan(QT_MAJOR_VERSION, 5) {
contains(QT_CONFIG, declarative): QT += declarative
+2011-09-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Fix build against Qt5 after refactor of widgets out of QtGUi
+
+ QWidget and friends now live in the QtWidgets library. We update
+ includes in implementation files and private headers to us the
+ non-module-prefixed path, and leave the lookup for the include
+ path. For public headers we have to ifdef the includes as the
+ user might now have the modules we need in his QT config.
+
+ Finally, QSGCanvas is no longer a QWidget but a QWindow, so we
+ have to update our code and use windowHandle() for setting the
+ parent relationships.
+
+ https://bugs.webkit.org/show_bug.cgi?id=68687
+
+ Reviewed by Andreas Kling.
+
+ * UIProcess/API/qt/qdesktopwebview.cpp:
+ * UIProcess/API/qt/qdesktopwebview.h:
+ * UIProcess/API/qt/tests/tests.pro:
+ * UIProcess/qt/ViewInterface.h:
+ * UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp:
+
2011-09-29 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Force single header include in WebKit2 GTK+ API
#include "qdesktopwebview_p.h"
#include "qweberror.h"
+#include <QFileDialog>
+#include <QGraphicsSceneEvent>
#include <QGraphicsSceneResizeEvent>
#include <QStyleOptionGraphicsItem>
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qsgitem.h>
#include <QtDeclarative/qsgview.h>
#include <QtGui/QCursor>
-#include <QtGui/QFileDialog>
+#include <QtGui/QDrag>
#include <QtGui/QFocusEvent>
-#include <QtGui/QGraphicsSceneEvent>
#include <QtGui/QHoverEvent>
#include <QtGui/QInputMethodEvent>
#include <QtGui/QKeyEvent>
void QDesktopWebViewPrivate::startDrag(Qt::DropActions supportedDropActions, const QImage& dragImage, QMimeData* data, QPoint* clientPosition, QPoint* globalPosition, Qt::DropAction* dropAction)
{
- QWidget* widget = q->canvas();
- if (!widget)
+ QWindow* window = q->canvas();
+ if (!window)
return;
- QDrag* drag = new QDrag(widget);
+ QDrag* drag = new QDrag(window);
drag->setPixmap(QPixmap::fromImage(dragImage));
drag->setMimeData(data);
*dropAction = drag->exec(supportedDropActions);
*globalPosition = QCursor::pos();
- *clientPosition = widget->mapFromGlobal(*globalPosition);
+ *clientPosition = window->mapFromGlobal(*globalPosition);
}
void QDesktopWebViewPrivate::didReceiveViewportArguments(const WebCore::ViewportArguments&)
void QDesktopWebViewPrivate::didChangeToolTip(const QString& newToolTip)
{
// FIXME: Add a proper implementation when Qt 5 supports tooltip.
- q->canvas()->setToolTip(newToolTip);
}
void QDesktopWebViewPrivate::didChangeStatusText(const QString& newMessage)
void QDesktopWebViewPrivate::didChangeCursor(const QCursor& newCursor)
{
// FIXME: add proper cursor handling when Qt 5 supports it.
- q->canvas()->setCursor(newCursor);
}
void QDesktopWebViewPrivate::loadDidBegin()
if (menu->isEmpty())
return;
- QWidget* widget = q->canvas();
- if (!widget)
+ QWindow* window = q->canvas();
+ if (!window)
return;
activeMenu = menu;
- menu->setParent(widget, menu->windowFlags());
+ activeMenu->window()->winId(); // Ensure that the menu has a window
+ Q_ASSERT(activeMenu->window()->windowHandle());
+ activeMenu->window()->windowHandle()->setTransientParent(window);
+
QPoint menuPositionInScene = q->mapToScene(menu->pos()).toPoint();
- menu->exec(widget->mapToGlobal(menuPositionInScene));
+ menu->exec(window->mapToGlobal(menuPositionInScene));
// The last function to get out of exec() clear the local copy.
if (activeMenu == menu)
activeMenu.clear();
if (!selectedFileNames.isEmpty())
selectedFileName = selectedFileNames.at(0);
- QWidget* widget = q->canvas();
- fileDialog = new QFileDialog(widget, QString(), selectedFileName);
+ Q_ASSERT(!fileDialog);
+
+ QWindow* window = q->canvas();
+ if (!window)
+ return;
+
+ fileDialog = new QFileDialog(0, QString(), selectedFileName);
+ fileDialog->window()->winId(); // Ensure that the dialog has a window
+ Q_ASSERT(fileDialog->window()->windowHandle());
+ fileDialog->window()->windowHandle()->setTransientParent(window);
+
fileDialog->open(this, SLOT(onOpenPanelFilesSelected()));
connect(fileDialog, SIGNAL(finished(int)), this, SLOT(onOpenPanelFinished(int)));
QT_END_NAMESPACE
namespace WTR {
- class WebView;
+ class PlatformWebView;
}
class QWEBKIT_EXPORT QDesktopWebView : public QSGPaintedItem {
void init();
- friend class WTR::WebView;
+ friend class WTR::PlatformWebView;
friend class QDesktopWebViewPrivate;
QDesktopWebViewPrivate *d;
};
INCLUDEPATH += $$PWD
include(../../../../../WebKit.pri)
-QT += testlib declarative
+QT += testlib declarative widgets
QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
DEFINES += TESTS_SOURCE_DIR=\\\"$$PWD\\\" \
TEMPLATE = subdirs
-SUBDIRS = qtouchwebview qdesktopwebview commonviewtests qmltests
+SUBDIRS = qtouchwebview qdesktopwebview commonviewtests
+lessThan(QT_MAJOR_VERSION, 5): SUBDIRS += qmltests
#include <QtCore/QSharedPointer>
#include <QtCore/QSize>
-#include <QtGui/QMenu>
+#include <QMenu>
#include <WebKit2/WKBase.h>
class QWebError;
#include "WebPopupItem.h"
#include <QtDeclarative/QSGCanvas>
#include <QtDeclarative/QSGItem>
-#include <QtGui/QStandardItemModel>
+#include <QStandardItemModel>
using namespace WebCore;
, m_selectedIndex(-1)
{
QtWebComboBox* comboBox = m_comboBox.data();
- comboBox->setParent(m_webViewItem->canvas());
+
+ comboBox->window()->winId(); // Ensure that the combobox has a window
+ Q_ASSERT(comboBox->window()->windowHandle());
+ comboBox->window()->windowHandle()->setTransientParent(m_webViewItem->canvas());
+
connect(comboBox, SIGNAL(activated(int)), SLOT(setSelectedIndex(int)));
connect(comboBox, SIGNAL(didHide()), SLOT(onPopupMenuHidden()), Qt::QueuedConnection);
}
+2011-09-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Fix build against Qt5 after refactor of widgets out of QtGUi
+
+ QWidget and friends now live in the QtWidgets library. We update
+ includes in implementation files and private headers to us the
+ non-module-prefixed path, and leave the lookup for the include
+ path. For public headers we have to ifdef the includes as the
+ user might now have the modules we need in his QT config.
+
+ Finally, QSGCanvas is no longer a QWidget but a QWindow, so we
+ have to update our code and use windowHandle() for setting the
+ parent relationships.
+
+ https://bugs.webkit.org/show_bug.cgi?id=68687
+
+ Reviewed by Andreas Kling.
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * DumpRenderTree/qt/ImageDiff.pro:
+ * MiniBrowser/qt/BrowserView.cpp:
+ * MiniBrowser/qt/BrowserView.h:
+ * MiniBrowser/qt/BrowserWindow.cpp:
+ * MiniBrowser/qt/BrowserWindow.h:
+ * MiniBrowser/qt/MiniBrowser.pro:
+ * MiniBrowser/qt/MiniBrowserApplication.h:
+ * MiniBrowser/qt/main.cpp:
+ * QtTestBrowser/QtTestBrowser.pro:
+ * QtTestBrowser/launcherwindow.cpp:
+ * QtTestBrowser/launcherwindow.h:
+ * QtTestBrowser/locationedit.h:
+ * QtTestBrowser/main.cpp:
+ * QtTestBrowser/mainwindow.cpp:
+ * QtTestBrowser/mainwindow.h:
+ * QtTestBrowser/webinspector.h:
+ * QtTestBrowser/webpage.cpp:
+ * QtTestBrowser/webview.cpp:
+ * WebKitTestRunner/PlatformWebView.h:
+ * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+
2011-09-29 Ravi Phaneendra Kasibhatla <ravi.kasibhatla@motorola.com>
Initial implementation of WebInspector for WebKit2 GTK port.
TARGET = DumpRenderTree
CONFIG -= app_bundle
-!isEqual(QT_ARCH,sh4): CONFIG += uitools
+!isEqual(QT_ARCH,sh4) {
+ greaterThan(QT_MAJOR_VERSION, 4):isEmpty(QT.uitools.name) {
+ message("QtUiTools library not found. QWidget plugin loading will be disabled")
+ DEFINES += QT_NO_UITOOLS
+ } else {
+ CONFIG += uitools
+ }
+}
BASEDIR = $$PWD/../
isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../..
QT = core gui network testlib
macx: QT += xml
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
HEADERS = $$BASEDIR/WorkQueue.h \
DumpRenderTreeQt.h \
DEFINES += USE_SYSTEM_MALLOC=1
DEFINES -= QT_ASCII_CAST_WARNINGS
-RESOURCES = DumpRenderTree.qrc
\ No newline at end of file
+RESOURCES = DumpRenderTree.qrc
DESTDIR = $$OUTPUT_DIR/bin
QT = core gui
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
SOURCES = ImageDiff.cpp
#include <qtouchwebpage.h>
#include <qwebnavigationcontroller.h>
-BrowserView::BrowserView(bool useTouchWebView, QWidget* parent)
+BrowserView::BrowserView(bool useTouchWebView, QWindow* parent)
: QSGCanvas(parent)
, m_item(0)
{
#ifndef BrowserView_h
#define BrowserView_h
+#include <QAction>
#include <QtDeclarative/qsgcanvas.h>
#include <qwebkittypes.h>
Q_OBJECT
public:
- BrowserView(bool useTouchWebView, QWidget* parent = 0);
+ BrowserView(bool useTouchWebView, QWindow* parent = 0);
virtual ~BrowserView();
void load(const QString&);
}
#endif
+WindowWrapper::WindowWrapper(QWindow* window, QWidget* widget)
+ : QWidget(widget)
+ , m_window(window)
+{
+ // Throttle resize events a bit
+ m_resizeTimer.setInterval(16);
+ m_resizeTimer.setSingleShot(true);
+ connect(&m_resizeTimer, SIGNAL(timeout()), this, SLOT(doResize()));
+ m_window->setWindowFlags(Qt::FramelessWindowHint);
+}
+
+void WindowWrapper::showEvent(QShowEvent* event)
+{
+ QWidget::showEvent(event);
+ m_window->setParent(window()->windowHandle());
+ m_window->show();
+}
+
+void WindowWrapper::resizeEvent(QResizeEvent* event)
+{
+ QWidget::resizeEvent(event);
+ if (!m_resizeTimer.isActive())
+ m_resizeTimer.start();
+}
+
+void WindowWrapper::doResize()
+{
+ m_window->setGeometry(QRect(mapTo(window(), QPoint(0, 0)), size()));
+}
+
BrowserWindow::BrowserWindow(WindowOptions* options)
: m_urlLoader(0)
, m_browser(0)
connect(desktopWebView, SIGNAL(linkHovered(QUrl, QString)), this, SLOT(onLinkHovered(QUrl, QString)));
}
- this->setCentralWidget(m_browser);
- m_browser->setFocus(Qt::OtherFocusReason);
+ setCentralWidget(new WindowWrapper(m_browser, this));
+ centralWidget()->setFocus(Qt::OtherFocusReason);
QMenu* fileMenu = menuBar()->addMenu("&File");
fileMenu->addAction("New Window", this, SLOT(newWindow()), QKeySequence::New);
void BrowserWindow::urlChanged(const QUrl& url)
{
m_addressBar->setText(url.toString());
- m_browser->setFocus();
+ m_browser->requestActivateWindow();
m_browser->view()->setFocus(true);
}
{
delete m_urlLoader;
delete m_addressBar;
- delete m_browser;
}
#include "MiniBrowserApplication.h"
#include <QStringList>
-#include <QtGui>
+#include <QTimer>
class UrlLoader;
+class WindowWrapper : public QWidget
+{
+ Q_OBJECT
+
+public:
+ WindowWrapper(QWindow* window, QWidget* widget = 0);
+
+protected:
+ void showEvent(QShowEvent* event);
+ void resizeEvent(QResizeEvent* event);
+
+private slots:
+ void doResize();
+
+private:
+ QWindow* m_window;
+ QTimer m_resizeTimer;
+};
+
class BrowserWindow : public QMainWindow {
Q_OBJECT
QT += network declarative
macx:QT+=xml
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
linux-* {
# From Creator's src/rpath.pri:
#ifndef MiniBrowserApplication_h
#define MiniBrowserApplication_h
+#include <QApplication>
+#include <QFileDialog>
#include <QHash>
+#include <QLabel>
+#include <QLineEdit>
+#include <QMainWindow>
+#include <QMenu>
+#include <QMenuBar>
+#include <QShortcut>
+#include <QStatusBar>
#include <QStringList>
+#include <QToolBar>
#include <QTouchEvent>
-#include <QtGui>
+#include <QUrl>
struct WindowOptions {
WindowOptions()
#include "UrlLoader.h"
#include <QLatin1String>
#include <QRegExp>
-#include <QtGui>
int main(int argc, char** argv)
{
fpstimer.h \
cookiejar.h
-!isEqual(QT_ARCH,sh4): CONFIG += uitools
+!isEqual(QT_ARCH,sh4) {
+ greaterThan(QT_MAJOR_VERSION, 4):isEmpty(QT.uitools.name) {
+ message("QtUiTools library not found. QWidget plugin loading will be disabled")
+ DEFINES += QT_NO_UITOOLS
+ } else {
+ CONFIG += uitools
+ }
+}
isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../..
include(../../Source/WebKit.pri)
QT += network
macx:QT+=xml
+greaterThan(QT_MAJOR_VERSION, 4): QT += printsupport
unix:!mac:!symbian:!embedded {
CONFIG += link_pkgconfig
#include "cookiejar.h"
#include "urlloader.h"
+#include <QApplication>
+#include <QCheckBox>
+#include <QComboBox>
#include <QCoreApplication>
+#include <QDialogButtonBox>
+#include <QInputDialog>
+#include <QLabel>
+#ifndef QT_NO_LINEEDIT
+#include <QLineEdit>
+#endif
+#ifndef QT_NO_SHORTCUT
+#include <QMenuBar>
+#endif
+#include <QSlider>
+#include <QSplitter>
+#include <QStatusBar>
+#include <QToolButton>
+#include <QToolTip>
+#include <QVBoxLayout>
#if !defined(QT_NO_FILEDIALOG) && !defined(QT_NO_MESSAGEBOX)
#include <QFileDialog>
#ifndef launcherwindow_h
#define launcherwindow_h
-#include <QtGui>
#include <QtNetwork/QNetworkRequest>
#if defined(QT_CONFIGURED_WITH_OPENGL)
#include <qconfig.h>
#ifndef QT_NO_INPUTDIALOG
-#include <QtGui>
+#include <QApplication>
+#include <QIcon>
+#include <QLabel>
+#include <QLineEdit>
+#include <QStyleOptionFrameV3>
+#include <QTimer>
class LocationEdit : public QLineEdit {
Q_OBJECT
WindowOptions windowOptions;
-
+#include <QApplication>
#include <QDir>
#include <QFile>
#include <QFileInfo>
#include <QFontDatabase>
-
#if defined(Q_WS_X11)
#include <fontconfig/fontconfig.h>
#endif
#include "locationedit.h"
#include "utils.h"
+#include <QAction>
+#ifndef QT_NO_INPUTDIALOG
+#include <QCompleter>
+#endif
+#ifndef QT_NO_FILEDIALOG
+#include <QFileDialog>
+#endif
+
MainWindow::MainWindow()
: m_page(new WebPage(this))
, m_toolBar(0)
#ifndef mainwindow_h
#define mainwindow_h
-#include <QtGui>
#include "webpage.h"
+#include <QMainWindow>
+#include <QStringListModel>
+#include <QToolBar>
+
class LocationEdit;
class MainWindow : public QMainWindow {
#ifndef webinspector_h
#define webinspector_h
-#include <QtGui>
#include "qwebinspector.h"
class WebInspector : public QWebInspector {
#include "launcherwindow.h"
+#include <QAction>
+#include <QApplication>
#include <QAuthenticator>
+#ifndef QT_NO_DESKTOPSERVICES
#include <QDesktopServices>
-#include <QtGui>
+#endif
+#include <QDialogButtonBox>
+#include <QLabel>
+#include <QLayout>
+#ifndef QT_NO_LINEEDIT
+#include <QLineEdit>
+#endif
#include <QtNetwork/QNetworkReply>
#include <QtNetwork/QNetworkRequest>
#include <QtNetwork/QNetworkProxy>
#include "webview.h"
-#include <QtGui>
+#include <QAction>
#include <QGraphicsScene>
+#include <QGraphicsSceneContextMenuEvent>
+#include <QGraphicsSceneMouseEvent>
+#include <QMenu>
+#include <QScrollBar>
+#include <QTimer>
+
+#ifndef QT_NO_ANIMATION
+#include <QAbstractAnimation>
+#include <QAbstractTransition>
+#include <QFinalState>
+#include <QPropertyAnimation>
+#include <QState>
+#include <QStateMachine>
+#endif
WebViewGraphicsBased::WebViewGraphicsBased(QWidget* parent)
: QGraphicsView(parent)
isEmpty(WC_GENERATED_SOURCES_DIR):WC_GENERATED_SOURCES_DIR = ../../../../Source/WebCore/generated
}
-QT += declarative
+QT += declarative widgets
GENERATED_SOURCES_DIR = ../../generated
#define PlatformWebView_h
#if defined(BUILDING_QT__)
-namespace WTR {
-class WebView;
-}
-typedef WTR::WebView* PlatformWKView;
-class QMainWindow;
-typedef QMainWindow* PlatformWindow;
+class QDesktopWebView;
+typedef QDesktopWebView* PlatformWKView;
+class QSGCanvas;
+typedef QSGCanvas* PlatformWindow;
#elif defined(__APPLE__) && __APPLE__
#if __OBJC__
@class WKView;
#include "PlatformWebView.h"
#include "TestController.h"
+#include <QGraphicsSceneMouseEvent>
#include <QKeyEvent>
#include <QtTest/QtTest>
#include <WebKit2/WKPagePrivate.h>
#include "PlatformWebView.h"
#include "qdesktopwebview.h"
+
+#include <QApplication>
#include <QtDeclarative/qsgcanvas.h>
-#include <QtGui>
namespace WTR {
-class WebView : public QSGCanvas {
-public:
- WebView(WKContextRef, WKPageGroupRef);
-
- QDesktopWebView* wkView() const { return m_item; }
- WKPageRef pageRef() const { return m_item->pageRef(); }
-
- virtual ~WebView() { delete m_item; }
-
-private:
- QDesktopWebView* m_item;
-};
-
-WebView::WebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef)
- : m_item(new QDesktopWebView(contextRef, pageGroupRef, rootItem()))
-{
- m_item->setWidth(800);
- m_item->setHeight(600);
-}
-
PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef)
- : m_view(new WebView(contextRef, pageGroupRef))
- , m_window(new QMainWindow())
+ : m_view(new QDesktopWebView(contextRef, pageGroupRef))
+ , m_window(new QSGCanvas)
{
- m_view->setParent(m_window);
- m_window->setCentralWidget(m_view);
+ m_view->setParent(m_window->rootItem());
m_window->setGeometry(0, 0, 800, 600);
QFocusEvent ev(QEvent::WindowActivate);
QApplication::sendEvent(m_view, &ev);
- m_view->wkView()->setFocus(Qt::OtherFocusReason);
+ m_view->setFocus(Qt::OtherFocusReason);
}
PlatformWebView::~PlatformWebView()
bool PlatformWebView::sendEvent(QEvent* event)
{
- return QCoreApplication::sendEvent(m_view->wkView(), event);
+ return QCoreApplication::sendEvent(m_view, event);
}
void PlatformWebView::postEvent(QEvent* event)
{
- QCoreApplication::postEvent(m_view->wkView(), event);
+ QCoreApplication::postEvent(m_view, event);
}
} // namespace WTR
PKGCONFIG += fontconfig
}
-QT = core gui network declarative testlib
+QT = core gui widgets network declarative testlib
HEADERS = \
$$BASEDIR/EventSenderProxy.h \
include(../../../Source/JavaScriptCore/JavaScriptCore.pri)
prependJavaScriptCoreLib(../../JavaScriptCore)
-RESOURCES = WebKitTestRunner.qrc
\ No newline at end of file
+RESOURCES = WebKitTestRunner.qrc