summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 @@
1From 604761d49aa1d93ef5cc6d13259dc53dce7f04c4 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 16 Jul 2019 17:52:04 -0700
4Subject: [PATCH] examples/plugins: Replace obsolete screenGeometry
5
6Fixes errors like
7helloworldinputmethod.cpp:93:55: error: 'screenGeometry' is deprecated: Use QGuiApplication::screens() [-Werror,-Wdeprecated-declarations]
8 const QSize screenSize = QApplication::desktop()->screenGeometry().size();
9
10Upstream-Status: Pending
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 examples/plugins/cxx/helloworld/helloworldinputmethod.cpp | 5 +++--
15 examples/plugins/cxx/override/overrideinputmethod.cpp | 5 +++--
16 2 files changed, 6 insertions(+), 4 deletions(-)
17
18diff --git a/examples/plugins/cxx/helloworld/helloworldinputmethod.cpp b/examples/plugins/cxx/helloworld/helloworldinputmethod.cpp
19index eb470a1f..e5e5911d 100644
20--- a/examples/plugins/cxx/helloworld/helloworldinputmethod.cpp
21+++ b/examples/plugins/cxx/helloworld/helloworldinputmethod.cpp
22@@ -18,7 +18,7 @@
23
24 #include <QDebug>
25 #include <QApplication>
26-#include <QDesktopWidget>
27+#include <QScreen>
28
29 namespace {
30
31@@ -90,7 +90,8 @@ void HelloWorldInputMethod::show()
32 }
33
34 // Set size of our container to screen size
35- const QSize screenSize = QApplication::desktop()->screenGeometry().size();
36+ QScreen *screen = QApplication::primaryScreen();
37+ const QSize screenSize = screen->availableSize();
38 mainWidget->parentWidget()->resize(screenSize);
39
40 // Set size of the input method
41diff --git a/examples/plugins/cxx/override/overrideinputmethod.cpp b/examples/plugins/cxx/override/overrideinputmethod.cpp
42index c00160e4..f2f30e1d 100644
43--- a/examples/plugins/cxx/override/overrideinputmethod.cpp
44+++ b/examples/plugins/cxx/override/overrideinputmethod.cpp
45@@ -18,7 +18,7 @@
46
47 #include <QDebug>
48 #include <QApplication>
49-#include <QDesktopWidget>
50+#include <QScreen>
51 #include <QKeyEvent>
52
53 namespace {
54@@ -82,7 +82,8 @@ void OverrideInputMethod::show()
55 }
56
57 // Set size of the input method
58- const QSize &screenSize = QApplication::desktop()->screenGeometry().size();
59+ QScreen *screen = QApplication::primaryScreen();
60+ const QSize screenSize = screen->availableSize();
61 const QSize size(screenSize.width() - 200, 200);
62
63 surface->setGeometry(QRect(QPoint((screenSize.width() - size.width()) / 2,
64--
652.22.0
66
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 \
11 file://maliit-server.desktop \ 11 file://maliit-server.desktop \
12 file://0001-config.pri-Use-O1-optimization-in-DEBUG-flags.patch \ 12 file://0001-config.pri-Use-O1-optimization-in-DEBUG-flags.patch \
13 file://0001-Drop-tr1-namespace-its-not-there-in-c-11-and-newer.patch \ 13 file://0001-Drop-tr1-namespace-its-not-there-in-c-11-and-newer.patch \
14 file://0001-examples-plugins-Replace-obsolete-screenGeometry.patch \
14 " 15 "
15 16
16SRCREV = "60b1b10de14f932420313c547ab801daf522d539" 17SRCREV = "60b1b10de14f932420313c547ab801daf522d539"