From 629b6776020bba6af7022f3586b693168315dbdf Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Thu, 3 Aug 2017 18:22:57 +1000 Subject: qtwebkit: fix crash on startup fixes #1868 --- src/qtwebkit-1-fixes.patch | 47 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/src/qtwebkit-1-fixes.patch b/src/qtwebkit-1-fixes.patch index 4590929..e643c16 100644 --- a/src/qtwebkit-1-fixes.patch +++ b/src/qtwebkit-1-fixes.patch @@ -45,3 +45,50 @@ index 1111111..2222222 100644 #endif #include #elif OS(QNX) + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Konstantin Tokarev +Date: Fri, 4 Nov 2016 00:44:49 +0300 +Subject: [PATCH] Fixed crash (probably miscompilation) with MinGW-w64 5.3.0 + +Change-Id: Iac1c5fe1879abfaa299ec909e5928912c2354126 + +taken from: +https://github.com/Martchus/PKGBUILDs/blob/c7b900625449ba7f00539d4e23d2500765bc6f9a/qt5-webkit/mingw-w64/0009-Fixed-crash-probably-miscompilation-with-MinGW-w64-5.patch + +diff --git a/Source/WebKit/qt/WidgetApi/qwebframe.cpp b/Source/WebKit/qt/WidgetApi/qwebframe.cpp +index 1111111..2222222 100644 +--- a/Source/WebKit/qt/WidgetApi/qwebframe.cpp ++++ b/Source/WebKit/qt/WidgetApi/qwebframe.cpp +@@ -119,16 +119,6 @@ QWebFrameAdapter* QWebFramePrivate::createChildFrame(QWebFrameData* frameData) + return newFrame->d; + } + +-QWebFrame *QWebFramePrivate::apiHandle() +-{ +- return q; +-} +- +-QObject *QWebFramePrivate::handle() +-{ +- return q; +-} +- + void QWebFramePrivate::contentsSizeDidChange(const QSize &size) + { + emit q->contentsSizeChanged(size); +diff --git a/Source/WebKit/qt/WidgetApi/qwebframe_p.h b/Source/WebKit/qt/WidgetApi/qwebframe_p.h +index 1111111..2222222 100644 +--- a/Source/WebKit/qt/WidgetApi/qwebframe_p.h ++++ b/Source/WebKit/qt/WidgetApi/qwebframe_p.h +@@ -49,8 +49,8 @@ public: + static QWebFrame* kit(const QWebFrameAdapter*); + + // Adapter implementation +- virtual QWebFrame* apiHandle() OVERRIDE; +- virtual QObject* handle() OVERRIDE; ++ virtual QWebFrame* apiHandle() OVERRIDE { return q; } ++ virtual QObject* handle() OVERRIDE { return q; } + virtual void contentsSizeDidChange(const QSize &) OVERRIDE; + virtual int scrollBarPolicy(Qt::Orientation) const OVERRIDE; + virtual void emitUrlChanged() OVERRIDE; -- cgit v0.12 From f35618ef6da3d553e73ec10cec47a0cfd20e285d Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Fri, 4 Aug 2017 12:17:12 +1000 Subject: qtwebkit: add test --- src/qtwebkit-test.cpp | 22 ++++++++++++++++++++++ src/qtwebkit.mk | 14 ++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 src/qtwebkit-test.cpp diff --git a/src/qtwebkit-test.cpp b/src/qtwebkit-test.cpp new file mode 100644 index 0000000..1248de7 --- /dev/null +++ b/src/qtwebkit-test.cpp @@ -0,0 +1,22 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + * + * from: https://github.com/mxe/mxe/issues/1868 + */ + + +#include + +#include +#include + +int main(int argc, char **argv){ + + QApplication app(argc, argv); + + QWebView *view = new QWebView(); + view->load(QUrl("http://google.com/")); + view->show(); + + app.exec(); +} diff --git a/src/qtwebkit.mk b/src/qtwebkit.mk index c3bcd5d..6ef3984 100644 --- a/src/qtwebkit.mk +++ b/src/qtwebkit.mk @@ -19,4 +19,18 @@ define $(PKG)_BUILD_SHARED cd '$(BUILD_DIR)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' '$(SOURCE_DIR)' $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MAKE) -C '$(BUILD_DIR)' -j 1 install + + # build test manually + # add $(BUILD_TYPE_SUFFIX) for debug builds - see qtbase.mk + $(TARGET)-g++ \ + -W -Wall -std=c++11 \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `$(TARGET)-pkg-config Qt5WebKitWidgets --cflags --libs` + + # batch file to run test programs + (printf 'set PATH=..\\lib;..\\qt5\\bin;..\\qt5\\lib;%%PATH%%\r\n'; \ + printf 'set QT_QPA_PLATFORM_PLUGIN_PATH=..\\qt5\\plugins\r\n'; \ + printf 'test-$(PKG).exe\r\n'; \ + printf 'cmd\r\n';) \ + > '$(PREFIX)/$(TARGET)/bin/test-$(PKG).bat' endef -- cgit v0.12