From 708be171f67ed6d63247f4fb7a83d6f858d42fbd Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 16 Jul 2019 17:55:08 -0700 Subject: 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 --- ...s-plugins-Replace-obsolete-screenGeometry.patch | 66 ++++++++++++++++++++++ recipes-qt/maliit/maliit-framework-qt5_git.bb | 1 + 2 files changed, 67 insertions(+) create mode 100644 recipes-qt/maliit/maliit-framework-qt5/0001-examples-plugins-Replace-obsolete-screenGeometry.patch (limited to 'recipes-qt/maliit') 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 +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 +--- + 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 + #include +-#include ++#include + + 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 + #include +-#include ++#include + #include + + 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" -- cgit v1.2.3