<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 15-10-14 11:09 AM, Jonathan Bagg
      wrote:<br>
    </div>
    <blockquote cite="mid:561E7035.6060509@lenbrook.com" type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div class="moz-cite-prefix">On 15-10-14 05:52 AM, Trent Lloyd
        wrote:<br>
      </div>
      <blockquote cite="mid:2EFEA7E9-93B4-4198-B14C-5B2C65F1E8D6@bur.st"
        type="cite"> <br class="">
        <div>
          <blockquote type="cite" class="">
            <div class="">On 11 Oct 2015, at 4:48 AM, Michael Jones <<a
                moz-do-not-send="true" class="moz-txt-link-abbreviated"
                href="mailto:avahi@jonesmz.com"><a class="moz-txt-link-abbreviated" href="mailto:avahi@jonesmz.com">avahi@jonesmz.com</a></a>>
              wrote:</div>
            <br class="Apple-interchange-newline">
            <div class="">
              <div dir="ltr" class=""><br class="">
                <div class="gmail_extra">
                  <div class="gmail_quote">
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      Trent<br class="">
                      <br class="">
                      I had a look at avahi-qt in 0.6.32-rc and it looks
                      like there is still no QT5 support.  I found this
                      patch for QT5 support...<br class="">
                      <br class="">
                      <a moz-do-not-send="true"
href="http://lists.freedesktop.org/archives/avahi/2014-October/002305.html"
                        rel="noreferrer" target="_blank" class="">http://lists.freedesktop.org/archives/avahi/2014-October/002305.html</a><br
                        class="">
                      <br class="">
                      If I pass an AvahiPoll from avahi_qt_poll_get() to
                      avahi_client_new() the program will segfault with
                      Qt5 (Qt4 works fine).  I have a Qt class that
                      wraps avahi-client.  In order to get it to work
                      with Qt5, I need to distribute a modified
                      avahi-qt.<br class="">
                      <br class="">
                      Jon<br class="">
                      <br class="">
                    </blockquote>
                    <div class=""><br class="">
                      <br class="">
                    </div>
                    <div class="">I'm the author of that Qt 5 patch.<br
                        class="">
                      <br class="">
                    </div>
                    <div class="">I'd be happy to lend assistance to
                      getting it integrated into an upcoming Avahi
                      release. I wasn't able to post it to the avahi bug
                      tracker, since the Trac instance wasn't accepting
                      new registrations for quite a while.<br class="">
                      <br class="">
                    </div>
                    <div class="">Saying this without looking at the
                      full changelist for Avahi, I'd say that it's
                      pretty likely to apply cleanly to the new version.
                      It was minimally invasive.<br class="">
                    </div>
                    <div class=""><br class="">
                    </div>
                    <div class="">Please contact me if assistance is
                      desired. </div>
                  </div>
                </div>
              </div>
            </div>
          </blockquote>
          <br class="">
        </div>
        <div>It does apply fine, had to make a slight tweak to set
          -fPIC.</div>
        <div><br class="">
        </div>
        <div>Is there a project somewhere that compiles against this? In
          any case I think we should make an example/test app as we
          don’t have one at all for QT right now.</div>
      </blockquote>
      <blockquote cite="mid:2EFEA7E9-93B4-4198-B14C-5B2C65F1E8D6@bur.st"
        type="cite"><br>
        <div>Converted into pull request here:</div>
        <div><a moz-do-not-send="true"
            href="https://github.com/lathiat/avahi/pull/19" class="">https://github.com/lathiat/avahi/pull/19</a></div>
      </blockquote>
      I pulled this and tried compiling avahi<br>
      <br>
      ./configure --disable-qt3 --disable-gtk --disable-gtk3
      --disable-mono --disable-manpages --disable-glib --disable-gobject<br>
      make<br>
      <br>
      make[2]: *** No rule to make target `avahi-qt5.pc', needed by
      `all-am'.  Stop.<br>
    </blockquote>
    avahi-qt5.pc.in was missing.  It is in the original Qt5 patch.
    Perhaps it was not added to the commit.<br>
    <br>
    My Qt project compiles and works against this avahi with Qt5 support
    with both Qt4 and Qt5.  Great, Thanks!<br>
    <br>
    My Qt project's header modification<br>
    #if QT_VERSION >= 0x050000<br>
    #include <avahi-qt5/qt-watch.h><br>
    #else<br>
    #include <avahi-qt4/qt-watch.h><br>
    #endif<br>
    <br>
    My Qt project's .pro file modification<br>
    lessThan(QT_MAJOR_VERSION, 5) {<br>
        LIBS+= -lavahi-client -lavahi-common -lavahi-qt4<br>
    }<br>
    equals(QT_MAJOR_VERSION, 5) {<br>
        LIBS+= -lavahi-client -lavahi-common -lavahi-qt5<br>
    }
    <pre class="moz-signature" cols="72">-- 
Jonathan Bagg
Embedded Systems Developer
NAD Electronics | Lenbrook Industries Limited
633 Granite Court, Pickering, Ontario, Canada L1W 3K1 | 905-831-0799 ext 4478 | <a class="moz-txt-link-freetext" href="http://www.nadelectronics.com">http://www.nadelectronics.com</a></pre>
  </body>
</html>