aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-09-24 03:30:32 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2018-09-25 09:22:19 +0000
commitdb45ea6ad839c176b9a01a15de74034d14012a76 (patch)
tree943810c73ec0ba859df837a344e0d4016dd5193a
parentd498eb607514eefaf0548c4377d5c8cdbdcb46c3 (diff)
qtwebkit-examples: Fix build with QT 5.11
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--recipes-qt/qt5/qtwebkit-examples/0001-Fix-build-with-qt-5.11.patch48
-rw-r--r--recipes-qt/qt5/qtwebkit-examples_git.bb2
2 files changed, 50 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtwebkit-examples/0001-Fix-build-with-qt-5.11.patch b/recipes-qt/qt5/qtwebkit-examples/0001-Fix-build-with-qt-5.11.patch
new file mode 100644
index 00000000..57e318b0
--- /dev/null
+++ b/recipes-qt/qt5/qtwebkit-examples/0001-Fix-build-with-qt-5.11.patch
@@ -0,0 +1,48 @@
+From e07f1fcba5a291ef0ab31fd85fbc4836eda19a66 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 24 Sep 2018 03:14:29 -0700
+Subject: [PATCH] Fix build with qt 5.11
+
+Fixes
+
+examples/webkitwidgets/scroller/wheel/main.cpp:93:84: error: cannot call
+member function 'int QRandomGenerator::bounded(int)' without object
+ m_wheel1->scrollTo(m_wheel1->currentIndex() +
+QRandomGenerator::bounded(200));
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ examples/webkitwidgets/scroller/wheel/main.cpp | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/examples/webkitwidgets/scroller/wheel/main.cpp b/examples/webkitwidgets/scroller/wheel/main.cpp
+index 11fad08..9a6a225 100644
+--- a/examples/webkitwidgets/scroller/wheel/main.cpp
++++ b/examples/webkitwidgets/scroller/wheel/main.cpp
+@@ -40,7 +40,7 @@
+
+ #include <QtWidgets>
+ #include <qmath.h>
+-
++#include <QRandomGenerator>
+ #include "wheelwidget.h"
+
+ class MainWindow : public QMainWindow
+@@ -90,9 +90,9 @@ public:
+ private slots:
+ void rotateRandom()
+ {
+- m_wheel1->scrollTo(m_wheel1->currentIndex() + QRandomGenerator::bounded(200));
+- m_wheel2->scrollTo(m_wheel2->currentIndex() + QRandomGenerator::bounded(200));
+- m_wheel3->scrollTo(m_wheel3->currentIndex() + QRandomGenerator::bounded(200));
++ m_wheel1->scrollTo(m_wheel1->currentIndex() + QRandomGenerator::global()->bounded(200));
++ m_wheel2->scrollTo(m_wheel2->currentIndex() + QRandomGenerator::global()->bounded(200));
++ m_wheel3->scrollTo(m_wheel3->currentIndex() + QRandomGenerator::global()->bounded(200));
+ }
+
+ private:
+--
+2.19.0
+
diff --git a/recipes-qt/qt5/qtwebkit-examples_git.bb b/recipes-qt/qt5/qtwebkit-examples_git.bb
index c19fecdb..4b635bdf 100644
--- a/recipes-qt/qt5/qtwebkit-examples_git.bb
+++ b/recipes-qt/qt5/qtwebkit-examples_git.bb
@@ -11,6 +11,8 @@ LIC_FILES_CHKSUM = " \
file://examples/webkitwidgets/imageanalyzer/imageanalyzer.cpp;endline=39;md5=b0739af76072fbe303dc04b6941e054f \
"
+SRC_URI += "file://0001-Fix-build-with-qt-5.11.patch"
+
PACKAGECONFIG ?= "examples"
DEPENDS += "qtwebkit qtxmlpatterns"