On Tue, Jun 03, 2014 at 10:47:37AM -0400, Denys Dmytriyenko wrote: > On Tue, Jun 03, 2014 at 02:39:44PM +0000, Cooper Jr., Franklin wrote: > > It would be nice if we can drop the Qt 5 specific patches and simply allow > > the "clean" sources to work for both Qt 4 and Qt 5. > > > > http://www.kdab.com/automated-porting-from-qt-4-to-qt-5/ > > http://stackoverflow.com/questions/18663331/how-to-check-the-selected-version-of-qt-in-a-pro-file > > The .pro file should be easy, but the sources are rather involved. It's up to > you if you want to use the method to pre-process the sources to work with qt4 > and qt5...
Franklin, So, how would you like to proceed in this case? You own the source repository. Do you want me to submit a patch for .pro file change? I don't feel very comfortable with the .cpp changes suggested in the first link - looked finicky to me. I'll leave that to you to decide. As of this patch - do you want me to push it as is for now or should I wait for the source change? -- Denys > > > -----Original Message----- > > > From: [email protected] [mailto:meta-arago- > > > [email protected]] On Behalf Of Denys Dmytriyenko > > > Sent: Monday, June 02, 2014 9:30 PM > > > To: [email protected] > > > Subject: [meta-arago] [PATCH 2/5] refresh-screen: convert to Qt5 > > > > > > From: Denys Dmytriyenko <[email protected]> > > > > > > Use qt-provider to build it against Qt4 or Qt5 > > > > > > Signed-off-by: Denys Dmytriyenko <[email protected]> > > > --- > > > ...een.pro-add-widgets-module-to-the-project.patch | 26 > > > ++++++++++++++++++++++ ...place-QtGui-header-with-QtWidgets-for- > > > Qt5.patch | 26 ++++++++++++++++++++++ > > > .../recipes-core/matrix/refresh-screen_2.0.bb | 17 +++++++++----- > > > 3 files changed, 64 insertions(+), 5 deletions(-) create mode 100644 > > > meta- > > > arago-extras/recipes-core/matrix/refresh-screen/0001-refresh-screen.pro-add- > > > widgets-module-to-the-project.patch > > > create mode 100644 meta-arago-extras/recipes-core/matrix/refresh- > > > screen/0002-Replace-QtGui-header-with-QtWidgets-for-Qt5.patch > > > > > > diff --git a/meta-arago-extras/recipes-core/matrix/refresh-screen/0001- > > > refresh-screen.pro-add-widgets-module-to-the-project.patch b/meta-arago- > > > extras/recipes-core/matrix/refresh-screen/0001-refresh-screen.pro-add- > > > widgets-module-to-the-project.patch > > > new file mode 100644 > > > index 0000000..b9a1f80 > > > --- /dev/null > > > +++ b/meta-arago-extras/recipes-core/matrix/refresh-screen/0001-refresh- > > > +++ screen.pro-add-widgets-module-to-the-project.patch > > > @@ -0,0 +1,26 @@ > > > +From 3969a5b06cfa28e531080cfdb12ea69ada870f36 Mon Sep 17 00:00:00 > > > 2001 > > > +From: Denys Dmytriyenko <[email protected]> > > > +Date: Mon, 12 May 2014 21:07:32 -0400 > > > +Subject: [PATCH] refresh-screen.pro: add widgets module to the project > > > +for Qt5 > > > + > > > +Signed-off-by: Denys Dmytriyenko <[email protected]> > > > +--- > > > + refresh_screen.pro | 2 +- > > > + 1 file changed, 1 insertion(+), 1 deletion(-) > > > + > > > +diff --git a/refresh_screen.pro b/refresh_screen.pro index > > > +afe5c25..a79abd0 100644 > > > +--- a/refresh_screen.pro > > > ++++ b/refresh_screen.pro > > > +@@ -4,7 +4,7 @@ > > > + # > > > + #------------------------------------------------- > > > + > > > +-QT += core gui > > > ++QT += core gui widgets > > > + > > > + TARGET = refresh_screen > > > + TEMPLATE = app > > > +-- > > > +1.9.2 > > > + > > > diff --git a/meta-arago-extras/recipes-core/matrix/refresh-screen/0002- > > > Replace-QtGui-header-with-QtWidgets-for-Qt5.patch b/meta-arago- > > > extras/recipes-core/matrix/refresh-screen/0002-Replace-QtGui-header-with- > > > QtWidgets-for-Qt5.patch > > > new file mode 100644 > > > index 0000000..66c002d > > > --- /dev/null > > > +++ b/meta-arago-extras/recipes-core/matrix/refresh-screen/0002-Replace- > > > +++ QtGui-header-with-QtWidgets-for-Qt5.patch > > > @@ -0,0 +1,26 @@ > > > +From 60a8e6c8ea763ed88442f16509cae99d8e43918e Mon Sep 17 00:00:00 > > > 2001 > > > +From: Denys Dmytriyenko <[email protected]> > > > +Date: Mon, 12 May 2014 21:01:57 -0400 > > > +Subject: [PATCH] Replace QtGui header with QtWidgets for Qt5 > > > + > > > +Signed-off-by: Denys Dmytriyenko <[email protected]> > > > +--- > > > + main.cpp | 2 +- > > > + 1 file changed, 1 insertion(+), 1 deletion(-) > > > + > > > +diff --git a/main.cpp b/main.cpp > > > +index c5744d8..5a61904 100644 > > > +--- a/main.cpp > > > ++++ b/main.cpp > > > +@@ -36,7 +36,7 @@ > > > + * > > > + */ > > > + > > > +-#include <QtGui/QApplication> > > > ++#include <QtWidgets/QApplication> > > > + #include "mainwindow.h" > > > + > > > + int main(int argc, char *argv[]) > > > +-- > > > +1.9.2 > > > + > > > diff --git a/meta-arago-extras/recipes-core/matrix/refresh-screen_2.0.bb > > > b/meta-arago-extras/recipes-core/matrix/refresh-screen_2.0.bb > > > index 2696978..fc41f32 100644 > > > --- a/meta-arago-extras/recipes-core/matrix/refresh-screen_2.0.bb > > > +++ b/meta-arago-extras/recipes-core/matrix/refresh-screen_2.0.bb > > > @@ -4,21 +4,28 @@ LICENSE = "BSD" > > > LIC_FILES_CHKSUM = > > > "file://main.cpp;beginline=9;endline=37;md5=884b90f5bf0d711fe32c4f04b527 > > > 6496" > > > SECTION = "multimedia" > > > > > > +inherit qt-provider > > > + > > > # Make sure that QT font libraries have been installed -RDEPENDS_${PN} += > > > "qt4-embedded-fonts" > > > +RDEPENDS_${PN} += "${QT_RDEPENDS_FONTS}" > > > > > > -PR = "r4" > > > +PR = "r5" > > > > > > SRCREV = "4dfdf85f17033f950e01f25341665f979edde6c3" > > > BRANCH ?= "master" > > > > > > SRC_URI = "git://gitorious.org/matrix-gui-v2/refresh- > > > screen.git;protocol=git;branch=${BRANCH}" > > > > > > -S = "${WORKDIR}/git" > > > +QT5_DIFF = " \ > > > +file://0001-refresh-screen.pro-add-widgets-module-to-the-project.patch > > > +\ file://0002-Replace-QtGui-header-with-QtWidgets-for-Qt5.patch \ " > > > > > > -inherit qt4e > > > +SRC_URI += "${@base_conditional('QT_PROVIDER', 'qt5', "${QT5_DIFF}", '', > > > d)}" > > > + > > > +S = "${WORKDIR}/git" > > > > > > do_install() { > > > install -d ${D}/${bindir} > > > - install -m 0755 ${S}/refresh_screen ${D}/${bindir} > > > + install -m 0755 ${B}/refresh_screen ${D}/${bindir} > > > } > > > -- > > > 1.9.2 > > > > > > _______________________________________________ > > > meta-arago mailing list > > > [email protected] > > > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago > > _______________________________________________ > > meta-arago mailing list > > [email protected] > > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago > _______________________________________________ > meta-arago mailing list > [email protected] > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago _______________________________________________ meta-arago mailing list [email protected] http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
