Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Building QtMqtt in ubuntu
Forum Updated to NodeBB v4.3 + New Features

Building QtMqtt in ubuntu

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 572 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    michelarnaud
    wrote on last edited by
    #1

    Hello,
    git clone https://github.com/qt/qtmqtt.git
    cd qtmqtt
    mkdir build
    cd build
    sudo make

    and i changed this line
    //connect(socket, &QAbstractSocket::errorOccurred, this, &QMqttConnection::transportError);
    by this one:
    connect(socket, QOverloadQAbstractSocket::SocketError::of(&QAbstractSocket::error), this, &QMqttConnection::transportError);
    when want to compile the module qtmqtt, but i have this error:

    /home/michel/mqtt/qtmqtt/src/mqtt/qmqtttopicname.cpp:148:48: error: ‘KeepEmptyParts’ is not a member of ‘Qt’
    148 | return d->name.split(QLatin1Char('/'), Qt::KeepEmptyParts);
    | ^~~~~~~~~~~~~~
    /home/michel/mqtt/qtmqtt/src/mqtt/qmqtttopicname.cpp: In function ‘size_t qHash(const QMqttTopicName&, size_t)’:
    /home/michel/mqtt/qtmqtt/src/mqtt/qmqtttopicname.cpp:189:36: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
    189 | return qHash(name.d->name, seed);
    | ^
    In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:47,
    from /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:49,
    from /usr/include/x86_64-linux-gnu/qt5/QtCore/qabstractanimation.h:43,
    from /usr/include/x86_64-linux-gnu/qt5/QtCore/QtCore:6,
    from ../../include/QtMqtt/QtMqttDepends:3:
    /usr/include/x86_64-linux-gnu/qt5/QtCore/qhashfunctions.h:99:41: note: candidate 1: ‘uint qHash(const QString&, uint)’
    99 | Q_CORE_EXPORT Q_DECL_PURE_FUNCTION uint qHash(const QString &key, uint seed = 0) Q_DECL_NOTHROW;
    | ^~~~~
    /home/michel/mqtt/qtmqtt/src/mqtt/qmqtttopicname.cpp:187:8: note: candidate 2: ‘size_t qHash(const QMqttTopicName&, size_t)’
    187 | size_t qHash(const QMqttTopicName &name, size_t seed) Q_DECL_NOTHROW

    Thank you in advance.

    Michel Arnaud

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi am welcome to devnet,

      What version of Qt ?
      What compiler ?
      What code ?

      Also, please do an out of source build.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi am welcome to devnet,

        What version of Qt ?
        What compiler ?
        What code ?

        Also, please do an out of source build.

        M Offline
        M Offline
        michelarnaud
        wrote on last edited by
        #3

        @SGaist
        I resolved the problem
        I use Qt 5.12.8

        and I got the branch back :git clone https://code.qt.io/qt/qtmqtt.git --branch 5.12.8

        Thank you.

        Michel Arnaud

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved