[{"id":1762886,"web_url":"http://patchwork.ozlabs.org/comment/1762886/","msgid":"<20170904234402.35899509@gmx.net>","list_archive_url":null,"date":"2017-09-04T21:44:02","subject":"Re: [Buildroot] [RFC PATCH] qt5tools: Install QDesignerExportWidget\n\tinclude","submitter":{"id":43323,"url":"http://patchwork.ozlabs.org/api/people/43323/","name":"Peter Seiderer","email":"ps.report@gmx.net"},"content":"Hello Alan,\n\nOn Wed, 30 Aug 2017 09:03:30 +0300, Alan Yaniger <alan@tkos.co.il> wrote:\n\n> To build a custom widget exposed to QtDesigner, the widget should \n> include the file QtUiPlugin/QDesignerExportWidget. Without this patch,\n> the include file is not installed in ${STAGING_DIR}/usr/include/qt5. \n> \n\nWould have expected no dependency for the non-plugin-code, but even\nthe example from [1],[2] uses the QDesingerExportWidget include in the\nnon-plugin-code...\n\nI would prefer some solution like:\n\ndiff --git a/analogclock.h b/analogclock.h\nindex b81a81e..1ac4b0f 100644\n--- a/analogclock.h\n+++ b/analogclock.h\n@@ -52,7 +52,11 @@\n #define ANALOGCLOCK_H\n \n #include <QWidget>\n+#if defined(COMPILE_FOR_DESINGER_PLUGIN)\n #include <QtUiPlugin/QDesignerExportWidget>\n+#else\n+#define QDESIGNER_WIDGET_EXPORT\n+#endif\n\nto use QDesignerExportWidget/QDESIGNER_WIDGET_EXPORT only for the plugin compile...\n\n> The file QDesignerExportWidget in the qt5tools tarball is just an \n> include of the file qdesignerexportwidget.h, which itself includes the\n\nYes.\n\n> file qdesignerexportwidget.h, identified by a relative path \n> \"../../src/designer/src/uiplugin/qdesignerexportwidget.h\". That \n\nNo, you located the wrong file from build/qt5tools-5.9.1/include/QtUiPlugin/qdesignerexportwidget.h\nthe right one would be build/qt5tools-5.9.1/src/designer/src/uiplugin/qdesignerexportwidget.h\nwhich is the one which would be installed from the build/qt5tools-5.9.1/src/designer/src/uiplugin/Makefile\n\n> relative path will not work in the staging dir, so just copy \n> qdesignerexportwidget.h into staging, and give it the name \n> QtUiPlugin/QDesignerExportWidget.\n> \n> If anyone has a better way to install this file, using the Qt build \n> system instead of \"cp\", I would be happy to revise the patch.\n\nUse the install_targ_headers target in build/qt5tools-5.9.1/src/designer/src/uiplugin/Makefile\nbut this will install some more (unneeded) headers...\n\n> \n> Signed-off-by: Alan Yaniger <alan@tkos.co.il>\n> ---\n>  package/qt5/qt5tools/qt5tools.mk | 15 ++++++++++++++-\n>  1 file changed, 14 insertions(+), 1 deletion(-)\n> \n> diff --git a/package/qt5/qt5tools/qt5tools.mk b/package/qt5/qt5tools/qt5tools.mk\n> index 3638b74..96a3c65 100644\n> --- a/package/qt5/qt5tools/qt5tools.mk\n> +++ b/package/qt5/qt5tools/qt5tools.mk\n> @@ -31,7 +31,7 @@ QT5TOOLS_BUILD_DIRS_$(BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS) += \\\n>  \tlinguist/lconvert linguist/lrelease linguist/lupdate\n>  ifeq ($(BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS),y)\n>  # use install target to copy cmake module files\n> -define QT5TOOLS_INSTALL_STAGING_CMDS\n> +define QT5TOOLS_LINGUIST_TOOLS_INSTALL_STAGING_CMDS\n>  \t$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/linguist install\n>  endef\n>  endif\n> @@ -58,6 +58,19 @@ define QT5TOOLS_BUILD_CMDS\n>  \t\t$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/$(p)$(sep))\n>  endef\n>  \n> +ifeq ($(BR2_PACKAGE_QT5TOOLS_QTPLUGININFO),y)\n\nThis has nothing to do with the qtplugininfo executable, add an\nextra config option in the Config.in file, e.g.:\n\n  config BR2_PACKAGE_QT5TOOLS_DESIGNER_HEADERS\n         boot \"qtdesigner minimal headers\"\n         help\n           Install the qtdesigner minimal header files for\n           the QtUiPlugin/QDesignerExportWidget include (does\n           not compile/install the complete designer).\n\n> +define QT5TOOLS_QTPLUGININFO_INSTALL_STAGING_CMDS\n> +\t$(INSTALL) -D -m0644 \\\n> +\t\t$(@D)/src/designer/src/uiplugin/qdesignerexportwidget.h \\\n> +\t\t$(STAGING_DIR)/usr/include/qt5/QtUiPlugin/QDesignerExportWidget\n> +endef\n> +endif\n\nChange to install qt5tools-5.9.1/include/QtUiPlugin/QDesignerExportWidget\nand qt5tools-5.9.1/src/designer/src/uiplugin/qdesignerexportwidget.h\ninto the $(STAGING_DIR)/usr/include/qt5/QtUiPlugin directory...\n\nRegards,\nPeter\n\n[1] http://doc.qt.io/qt-5/qtdesigner-customwidgetplugin-example.html\n[2] http://doc.qt.io/qt-5/qtdesigner-customwidgetplugin-analogclock-h.html\n\n> +\n> +define QT5TOOLS_INSTALL_STAGING_CMDS\n> +\t$(QT5TOOLS_LINGUIST_TOOLS_INSTALL_STAGING_CMDS)\n> +\t$(QT5TOOLS_QTPLUGININFO_INSTALL_STAGING_CMDS)\n> +endef\n> +\n>  define QT5TOOLS_INSTALL_TARGET_CMDS\n>  \t$(foreach p,$(QT5TOOLS_INSTALL_TARGET_y), \\\n>  \t\t$(INSTALL) -D -m0755 $(@D)/bin/$(p) $(TARGET_DIR)/usr/bin/$(p)$(sep))","headers":{"Return-Path":"<buildroot-bounces@busybox.net>","X-Original-To":["incoming@patchwork.ozlabs.org","buildroot@lists.busybox.net"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","buildroot@osuosl.org"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=busybox.net\n\t(client-ip=140.211.166.136; helo=silver.osuosl.org;\n\tenvelope-from=buildroot-bounces@busybox.net;\n\treceiver=<UNKNOWN>)","Received":["from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmNf92BN3z9s7h\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 07:44:17 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 78DF72F91E;\n\tMon,  4 Sep 2017 21:44:15 +0000 (UTC)","from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id vf87G7Ns20XG; Mon,  4 Sep 2017 21:44:14 +0000 (UTC)","from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 6D57B2DE2C;\n\tMon,  4 Sep 2017 21:44:14 +0000 (UTC)","from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 900411C2252\n\tfor <buildroot@lists.busybox.net>;\n\tMon,  4 Sep 2017 21:44:12 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 8B2602DE2C\n\tfor <buildroot@lists.busybox.net>;\n\tMon,  4 Sep 2017 21:44:12 +0000 (UTC)","from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id hxa-ZiK19wsC for <buildroot@lists.busybox.net>;\n\tMon,  4 Sep 2017 21:44:11 +0000 (UTC)","from mout.gmx.net (mout.gmx.net [212.227.17.20])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 1745C2D309\n\tfor <buildroot@buildroot.org>; Mon,  4 Sep 2017 21:44:10 +0000 (UTC)","from localhost ([188.110.58.117]) by mail.gmx.com (mrgmx103\n\t[212.227.17.168]) with ESMTPSA (Nemesis) id 0MdaiW-1e7d2v11I4-00PLnV;\n\tMon, 04 Sep 2017 23:44:05 +0200"],"X-Virus-Scanned":["amavisd-new at osuosl.org","amavisd-new at osuosl.org"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","Date":"Mon, 4 Sep 2017 23:44:02 +0200","From":"Peter Seiderer <ps.report@gmx.net>","To":"Alan Yaniger <alan@tkos.co.il>","Message-ID":"<20170904234402.35899509@gmx.net>","In-Reply-To":"<1504073010-14243-1-git-send-email-alan@tkos.co.il>","References":"<1504073010-14243-1-git-send-email-alan@tkos.co.il>","X-Mailer":"Claws Mail 3.11.0 (GTK+ 2.24.31; x86_64-suse-linux-gnu)","MIME-Version":"1.0","X-Provags-ID":"V03:K0:q+XbNLIZidyzW6MnjxQy3DLwwADHbKA1tkzkrfIuAJF2V4e4L6z\n\t0NjmA+9m/y/gmDUiAwizLTiVbVF1g9cf3zn7L4ooJZSYybjul8fbdTOiZ1gR6t2avz648e6\n\t9lTCUnYhOvmCdZ/jd6Z/0YdUJ0tQk3304+k5cPddYrmu5o42pMRMgdeBlQMrZ6pscQHWsYx\n\t1bGCFNNlPokqyLvuhAGiw==","X-UI-Out-Filterresults":"notjunk:1; V01:K0:oPdqEPji3kw=:qp3o264MjeJ1V7khWP6wXA\n\tWEVKfMDLAhDeLmHVkqKpOJdh3eItCPQT0+vJCTN84/mW5oipntm4GxbPbbDdR9iyECS0cnlp8\n\tCC51PytcEIUvT1/dEooPwpsQ3pHpqzCgdRgzB9PzrO0/vVKx72JVol5qW4tIz1BvdN+D3kHzN\n\twyc5zy6nhTOfF9sI1Ksy7Qs39QamPBc0ywNZ4ps2mivdQu6vNgelcfWuFPBphygUJgq9+D1vy\n\tU2QVu1V3l506FqCbbTm3qKeC+CBxUm4hyKs2bCRoXJKA0qRqvloleaVghO5FbGX9zn37o+Hxt\n\tVk7PfWLitN+nqCgMbc4HowXIDCGvHic7TcGMVooJLQ8N3xRbzcjdxpALdtMR4V9EJmaPq6nIA\n\tUtqUnVVTZRh8adq2uqQMohNxVvPL6Fqhk3g+XSA6XkhnaM4Gq7qZCskRI+NRf9yr0bIpesuMv\n\tTeMrRBDWGVK7hWQjEciuxGxdYwtuifk0J2l5tVkTv6e3Uuy0ANTXM6lH8mCb8v58SFiAbQM1s\n\tkfusyod0+ulhphttpnbt3KbSJvuWKNJ5/hgeM7Bm8omQisYv2bd3tbvzLyidC6lmWSO+SoYP0\n\tO27qtwbM/WKqgQ+IoAwU6tKgHJc+ILVFWxVJvWdjsAohF91NffKMbtqAPaZsNvDOvPcFgxTmX\n\t13z4O0JNWg8SjYRC2es7sF1uRniJuRfyHdiFJs4mO5e3zUTSsQgWkZVSBttHQujmgH4BM+lEF\n\txQ+TZn2zoHTKa/saXjbls/9/KzfLHMF7hHc4gBUZEUtjx1Fz70xOp9jX887ww82mQ1PeZrZRi\n\tUSprZOS0jE+SGHtm7EkejgDAuk2UGluXXblQEexjyEP4KkqTqk=","Cc":"buildroot@buildroot.org","Subject":"Re: [Buildroot] [RFC PATCH] qt5tools: Install QDesignerExportWidget\n\tinclude","X-BeenThere":"buildroot@busybox.net","X-Mailman-Version":"2.1.18-1","Precedence":"list","List-Id":"Discussion and development of buildroot <buildroot.busybox.net>","List-Unsubscribe":"<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>","List-Archive":"<http://lists.busybox.net/pipermail/buildroot/>","List-Post":"<mailto:buildroot@busybox.net>","List-Help":"<mailto:buildroot-request@busybox.net?subject=help>","List-Subscribe":"<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"buildroot-bounces@busybox.net","Sender":"\"buildroot\" <buildroot-bounces@busybox.net>"}}]