aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-qt
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-07-16 17:55:08 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2019-07-17 10:32:59 +0000
commit708be171f67ed6d63247f4fb7a83d6f858d42fbd (patch)
tree762ca691f6bdfe1db6b787b98e142051a3ff5834 /recipes-qt
parent8f0e74102237fc3d2eeb5012e8fd4ed28ff33503 (diff)
maliit-framework-qt5: Fix build when ptest is enabled
This is primarily seen when using ptest and QT 5.13 Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-qt')
-rw-r--r--recipes-qt/maliit/maliit-framework-qt5/0001-examples-plugins-Replace-obsolete-screenGeometry.patch66
-rw-r--r--recipes-qt/maliit/maliit-framework-qt5_git.bb1
2 files changed, 67 insertions, 0 deletions
diff --git a/recipes-qt/maliit/maliit-framework-qt5/0001-examples-plugins-Replace-obsolete-screenGeometry.patch b/recipes-qt/maliit/maliit-framework-qt5/0001-examples-plugins-Replace-obsolete-screenGeometry.patch
new file mode 100644
index 00000000..84c8aeac
--- /dev/null
+++ b/recipes-qt/maliit/maliit-framework-qt5/0001-examples-plugins-Replace-obsolete-screenGeometry.patch
@@ -0,0 +1,66 @@
+From 604761d49aa1d93ef5cc6d13259dc53dce7f04c4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 16 Jul 2019 17:52:04 -0700
+Subject: [PATCH] examples/plugins: Replace obsolete screenGeometry
+
+Fixes errors like
+helloworldinputmethod.cpp:93:55: error: 'screenGeometry' is deprecated: Use QGuiApplication::screens() [-Werror,-Wdeprecated-declarations]
+ const QSize screenSize = QApplication::desktop()->screenGeometry().size();
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ examples/plugins/cxx/helloworld/helloworldinputmethod.cpp | 5 +++--
+ examples/plugins/cxx/override/overrideinputmethod.cpp | 5 +++--
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/examples/plugins/cxx/helloworld/helloworldinputmethod.cpp b/examples/plugins/cxx/helloworld/helloworldinputmethod.cpp
+index eb470a1f..e5e5911d 100644
+--- a/examples/plugins/cxx/helloworld/helloworldinputmethod.cpp
++++ b/examples/plugins/cxx/helloworld/helloworldinputmethod.cpp
+@@ -18,7 +18,7 @@
+
+ #include <QDebug>
+ #include <QApplication>
+-#include <QDesktopWidget>
++#include <QScreen>
+
+ namespace {
+
+@@ -90,7 +90,8 @@ void HelloWorldInputMethod::show()
+ }
+
+ // Set size of our container to screen size
+- const QSize screenSize = QApplication::desktop()->screenGeometry().size();
++ QScreen *screen = QApplication::primaryScreen();
++ const QSize screenSize = screen->availableSize();
+ mainWidget->parentWidget()->resize(screenSize);
+
+ // Set size of the input method
+diff --git a/examples/plugins/cxx/override/overrideinputmethod.cpp b/examples/plugins/cxx/override/overrideinputmethod.cpp
+index c00160e4..f2f30e1d 100644
+--- a/examples/plugins/cxx/override/overrideinputmethod.cpp
++++ b/examples/plugins/cxx/override/overrideinputmethod.cpp
+@@ -18,7 +18,7 @@
+
+ #include <QDebug>
+ #include <QApplication>
+-#include <QDesktopWidget>
++#include <QScreen>
+ #include <QKeyEvent>
+
+ namespace {
+@@ -82,7 +82,8 @@ void OverrideInputMethod::show()
+ }
+
+ // Set size of the input method
+- const QSize &screenSize = QApplication::desktop()->screenGeometry().size();
++ QScreen *screen = QApplication::primaryScreen();
++ const QSize screenSize = screen->availableSize();
+ const QSize size(screenSize.width() - 200, 200);
+
+ surface->setGeometry(QRect(QPoint((screenSize.width() - size.width()) / 2,
+--
+2.22.0
+
diff --git a/recipes-qt/maliit/maliit-framework-qt5_git.bb b/recipes-qt/maliit/maliit-framework-qt5_git.bb
index 308f3d02..c767d2a1 100644
--- a/recipes-qt/maliit/maliit-framework-qt5_git.bb
+++ b/recipes-qt/maliit/maliit-framework-qt5_git.bb
@@ -11,6 +11,7 @@ SRC_URI = "git://github.com/maliit/framework.git;branch=master \
file://maliit-server.desktop \
file://0001-config.pri-Use-O1-optimization-in-DEBUG-flags.patch \
file://0001-Drop-tr1-namespace-its-not-there-in-c-11-and-newer.patch \
+ file://0001-examples-plugins-Replace-obsolete-screenGeometry.patch \
"
SRCREV = "60b1b10de14f932420313c547ab801daf522d539"