From 7e0c7ab520bcc161685c86a6a76b223a75674898 Mon Sep 17 00:00:00 2001 From: Andrew O'Doherty Date: Mon, 28 May 2018 12:34:07 +0200 Subject: SLES12 compiler warning fixes Fixed some compilation issues: 1. error: declaration of ... shadows a member of 'this' Function parameters named equally as member functions. 2. warning: missing initializer for member Change-Id: Ibe55c244cdf224f0ab6e62db0e2fde98b80ac0da Reviewed-by: Alex Blasche --- src/knx/core/qknxbytearray.cpp | 8 +++--- src/knx/core/qknxbytearray.h | 6 ++--- src/knx/knxproj/qknxgroupaddressinfos.cpp | 10 +++---- src/knx/netip/qknxnetipstruct.cpp | 20 +++++++------- src/knx/netip/qknxnetipstruct.h | 23 ++++++++-------- src/knx/netip/qknxnetipstructheader.cpp | 16 +++++------ src/knx/netip/qknxnetipstructheader.h | 44 +++++++++++++++---------------- src/knx/qknxcontrolfield.cpp | 8 +++--- src/knx/qknxcontrolfield.h | 9 ++++--- 9 files changed, 73 insertions(+), 71 deletions(-) diff --git a/src/knx/core/qknxbytearray.cpp b/src/knx/core/qknxbytearray.cpp index 6a573d6..a93e3fa 100644 --- a/src/knx/core/qknxbytearray.cpp +++ b/src/knx/core/qknxbytearray.cpp @@ -259,18 +259,18 @@ void QKnxByteArray::resize(int size) */ /*! - \fn void QKnxByteArray::set(int i, quint8 value) + \fn void QKnxByteArray::set(int i, quint8 val) - Sets the character at the index position \a i in the byte array to \a value. + Sets the character at the index position \a i in the byte array to \a val. \a i must be a valid index position in the byte array (that is, between 0 and the value returned by size()). */ /*! - \fn void QKnxByteArray::setValue(int i, quint8 value) + \fn void QKnxByteArray::setValue(int i, quint8 val) - Sets the value at the index position \a i in the byte array to \a value. + Sets the value at the index position \a i in the byte array to \a val. If the index \a i is out of bounds, the function does nothing. If you are certain that \a i is within bounds, you can use set() instead, which diff --git a/src/knx/core/qknxbytearray.h b/src/knx/core/qknxbytearray.h index 4f1fdb1..f6feba5 100644 --- a/src/knx/core/qknxbytearray.h +++ b/src/knx/core/qknxbytearray.h @@ -92,11 +92,11 @@ public: void resize(int size); inline quint8 at(int i) const { return m_bytes.at(i); } - inline void set(int i, quint8 value) { m_bytes[i] = value; } + inline void set(int i, quint8 val) { m_bytes[i] = val; } - inline void setValue(int i, quint8 value) + inline void setValue(int i, quint8 val) { - if (i >= 0 && i < m_bytes.size()) m_bytes[i] = value; + if (i >= 0 && i < m_bytes.size()) m_bytes[i] = val; } inline quint8 value(int i, quint8 defaultValue = {}) const { diff --git a/src/knx/knxproj/qknxgroupaddressinfos.cpp b/src/knx/knxproj/qknxgroupaddressinfos.cpp index 510fcab..b82c06f 100644 --- a/src/knx/knxproj/qknxgroupaddressinfos.cpp +++ b/src/knx/knxproj/qknxgroupaddressinfos.cpp @@ -142,7 +142,7 @@ bool QKnxGroupAddressInfosPrivate::readProject(const QKnxProject &project) } projects.insert(project.Id, info); } else { - projects.insert(project.Id, {}); // projects can have empty installations + projects.insert(project.Id, { QString(), {} }); // projects can have empty installations } return status == QKnxGroupAddressInfos::Status::NoError; @@ -369,7 +369,7 @@ QVector QKnxGroupAddressInfos::projectIds() const */ QString QKnxGroupAddressInfos::projectName(const QString &projectId) const { - return d_ptr->projects.value(projectId, {}).name; + return d_ptr->projects.value(projectId, { QString(), {} }).name; } /*! @@ -377,7 +377,7 @@ QString QKnxGroupAddressInfos::projectName(const QString &projectId) const */ QVector QKnxGroupAddressInfos::installations(const QString &projectId) const { - return d_ptr->projects.value(projectId, {}).installations.keys().toVector(); + return d_ptr->projects.value(projectId, { QString(), {} }).installations.keys().toVector(); } /*! @@ -386,7 +386,7 @@ QVector QKnxGroupAddressInfos::installations(const QString &projectId) */ qint32 QKnxGroupAddressInfos::infoCount(const QString &projectId, const QString &installation) const { - const auto installations = d_ptr->projects.value(projectId, {}).installations; + const auto installations = d_ptr->projects.value(projectId, { QString(), {} }).installations; if (installations.isEmpty()) return -1; @@ -404,7 +404,7 @@ QVector QKnxGroupAddressInfos::addressInfos(const QString { if (projectId.isEmpty()) return {}; - return d_ptr->projects.value(projectId, {}).installations.value(installation); + return d_ptr->projects.value(projectId, { QString(), {} }).installations.value(installation); } /*! diff --git a/src/knx/netip/qknxnetipstruct.cpp b/src/knx/netip/qknxnetipstruct.cpp index affe641..124700f 100644 --- a/src/knx/netip/qknxnetipstruct.cpp +++ b/src/knx/netip/qknxnetipstruct.cpp @@ -156,17 +156,17 @@ QT_BEGIN_NAMESPACE */ /*! - \fn template QKnxNetIpStruct::QKnxNetIpStruct(CodeType code, const QKnxByteArray &data = {}) + \fn template QKnxNetIpStruct::QKnxNetIpStruct(CodeType codeType, const QKnxByteArray &dataField = {}) - Creates a new KNXnet/IP structure with the specified \a code and payload - \a data. + Creates a new KNXnet/IP structure with the specified \a codeType and payload + \a dataField. */ /*! - \fn template QKnxNetIpStruct::QKnxNetIpStruct(const QKnxNetIpStructHeader &header, const QKnxByteArray &data = {}) + \fn template QKnxNetIpStruct::QKnxNetIpStruct(const QKnxNetIpStructHeader &headerField, const QKnxByteArray &dataField = {}) - Creates a new KNXnet/IP structure with the specified \a header and payload - \a data. + Creates a new KNXnet/IP structure with the specified \a headerField and payload + \a dataField. The header is expected to be fully set up and all values describing the payload are expected to match the specified payload. @@ -238,16 +238,16 @@ QT_BEGIN_NAMESPACE */ /*! - \fn template QKnxNetIpStruct::setData(const QKnxByteArray &data) + \fn template QKnxNetIpStruct::setData(const QKnxByteArray &dataField) - Sets the data stored in the KNXnet/IP structure to \a data and updates the + Sets the data stored in the KNXnet/IP structure to \a dataField and updates the data size accordingly. */ /*! - \fn template QKnxNetIpStruct::setHeader(const QKnxNetIpStructHeader &header) + \fn template QKnxNetIpStruct::setHeader(const QKnxNetIpStructHeader &headerField) - Sets the header stored in the KNXnet/IP structure to \a header. + Sets the header stored in the KNXnet/IP structure to \a headerField. */ /*! diff --git a/src/knx/netip/qknxnetipstruct.h b/src/knx/netip/qknxnetipstruct.h index 0662ef1..0e2d196 100644 --- a/src/knx/netip/qknxnetipstruct.h +++ b/src/knx/netip/qknxnetipstruct.h @@ -46,15 +46,16 @@ public: QKnxNetIpStruct() = default; ~QKnxNetIpStruct() = default; - QKnxNetIpStruct(CodeType code, const QKnxByteArray &data = {}) - : m_header(code) + QKnxNetIpStruct(CodeType codeType, const QKnxByteArray &dataField = {}) + : m_header(codeType) { - setData(data); + setData(dataField); } - QKnxNetIpStruct(const QKnxNetIpStructHeader &header, const QKnxByteArray &data = {}) - : m_header(header) - , m_data(data) + QKnxNetIpStruct(const QKnxNetIpStructHeader &headerField, + const QKnxByteArray &dataField = {}) + : m_header(headerField) + , m_data(dataField) {} bool isNull() const @@ -82,9 +83,9 @@ public: return m_header; } - void setHeader(const QKnxNetIpStructHeader &header) + void setHeader(const QKnxNetIpStructHeader &headerField) { - m_header = header; + m_header = headerField; } CodeType code() const @@ -102,10 +103,10 @@ public: return m_data; } - void setData(const QKnxByteArray &data) + void setData(const QKnxByteArray &dataField) { - m_data = data; - m_header.setDataSize(data.size()); + m_data = dataField; + m_header.setDataSize(dataField.size()); } QKnxByteArray bytes() const diff --git a/src/knx/netip/qknxnetipstructheader.cpp b/src/knx/netip/qknxnetipstructheader.cpp index 3d977f5..34f7fc2 100644 --- a/src/knx/netip/qknxnetipstructheader.cpp +++ b/src/knx/netip/qknxnetipstructheader.cpp @@ -64,19 +64,19 @@ QT_BEGIN_NAMESPACE */ /*! - \fn template QKnxNetIpStructHeader::QKnxNetIpStructHeader(CodeType code) + \fn template QKnxNetIpStructHeader::QKnxNetIpStructHeader(CodeType codeType) Constructs a valid header object and sets the KNXnet/IP structure identifier - to \a code. + to \a codeType. \sa isValid(), code(), setCode() */ /*! - \fn template QKnxNetIpStructHeader::QKnxNetIpStructHeader(CodeType code, quint16 dataSize) + \fn template QKnxNetIpStructHeader::QKnxNetIpStructHeader(CodeType codeType, quint16 dataFieldSize) Constructs a valid header object and sets the KNXnet/IP structure identifier - to \a code and the data size to \a dataSize and updates the header size and + to \a codeType and the data size to \a dataFieldSize and updates the header size and total size accordingly. \sa isValid(), code(), setCode(), dataSize(), setDataSize() @@ -143,9 +143,9 @@ QT_BEGIN_NAMESPACE */ /*! - \fn template void QKnxNetIpStructHeader::setDataSize(quint16 dataSize) + \fn template void QKnxNetIpStructHeader::setDataSize(quint16 dataFieldSize) - Sets the KNXnet/IP structure data size to \a dataSize and updates the + Sets the KNXnet/IP structure data size to \a dataFieldSize and updates the header and total size accordingly. */ @@ -156,9 +156,9 @@ QT_BEGIN_NAMESPACE */ /*! - \fn template void QKnxNetIpStructHeader::setCode(CodeType code) + \fn template void QKnxNetIpStructHeader::setCode(CodeType codeType) - Sets the KNXnet/IP structure's code identifier to \a code. + Sets the KNXnet/IP structure's code identifier to \a codeType. */ /*! diff --git a/src/knx/netip/qknxnetipstructheader.h b/src/knx/netip/qknxnetipstructheader.h index a808a86..e57cfe4 100644 --- a/src/knx/netip/qknxnetipstructheader.h +++ b/src/knx/netip/qknxnetipstructheader.h @@ -46,22 +46,22 @@ public: QKnxNetIpStructHeader() = default; ~QKnxNetIpStructHeader() = default; - explicit QKnxNetIpStructHeader(CodeType code) - : QKnxNetIpStructHeader(code, 0) + explicit QKnxNetIpStructHeader(CodeType c) + : QKnxNetIpStructHeader(c, 0) {} - QKnxNetIpStructHeader(CodeType code, quint16 dataSize) + QKnxNetIpStructHeader(CodeType c, quint16 dataFieldSize) { - setCode(code); - setDataSize(dataSize); + setCode(c); + setDataSize(dataFieldSize); } template ::value>::type> - QKnxNetIpStructHeader(CodeType code, quint16 dataSize, bool mandatory) + QKnxNetIpStructHeader(CodeType c, quint16 dSize, bool mandatory) { - setCode(code); - setDataSize(dataSize); + setCode(c); + setDataSize(dSize); setMandatory(mandatory); } @@ -97,21 +97,21 @@ public: return totalSize() - size(); } - void setDataSize(quint16 dataSize) + void setDataSize(quint16 dataFieldSize) { // 2.1.3 Structures: If the amount of data exceeds 252 octets, the length octet shall // be 0xff and the next two octets shall contain the length as a 16 bit value. Then the // structure data shall start at the fifth octet. const auto tmp = code(); - setSize(dataSize > 0xfc ? 4 : 2); + setSize(dataFieldSize > 0xfc ? 4 : 2); - if (dataSize > 0xfc) { + if (dataFieldSize > 0xfc) { setByte(0, 0xff); - setByte(1, quint8((dataSize + 4) >> 8)); - setByte(2, quint8(dataSize + 4)); + setByte(1, quint8((dataFieldSize + 4) >> 8)); + setByte(2, quint8(dataFieldSize + 4)); } else { - setByte(0, quint8(dataSize + 2)); + setByte(0, quint8(dataFieldSize + 2)); } setCode(tmp); } @@ -121,9 +121,9 @@ public: return codeType(); } - void setCode(CodeType code) + void setCode(CodeType c) { - setCodeType(code); + setCodeType(c); } quint8 byte(quint8 index) const @@ -197,9 +197,9 @@ public: } private: - void setSize(quint8 size) + void setSize(quint8 structSize) { - m_bytes[0] = size; + m_bytes[0] = structSize; } void setByte(quint8 index, quint8 value) @@ -227,24 +227,24 @@ private: template typename std::enable_if::value, void>::type - /* void */ setCodeType(CodeType code) + /* void */ setCodeType(CodeType c) { if (isNull()) { setSize(2); setByte(0, 2); } - setByte(size() - 1, (quint8(code) & ~(1 << 7)) | (quint8(isMandatory()) << 7)); + setByte(size() - 1, (quint8(c) & ~(1 << 7)) | (quint8(isMandatory()) << 7)); } template typename std::enable_if::value, void>::type - /* void */ setCodeType(CodeType code) + /* void */ setCodeType(CodeType c) { if (isNull()) { setSize(2); setByte(0, 2); } - setByte(size() - 1, quint8(code)); + setByte(size() - 1, quint8(c)); } template diff --git a/src/knx/qknxcontrolfield.cpp b/src/knx/qknxcontrolfield.cpp index 6a10ad3..e6f9702 100644 --- a/src/knx/qknxcontrolfield.cpp +++ b/src/knx/qknxcontrolfield.cpp @@ -198,9 +198,9 @@ const std::bitset<8> gPriorityMask = 0x0c; */ /*! - \fn QKnxControlField::setRepeat(QKnxControlField::Repeat repeat) + \fn QKnxControlField::setRepeat(QKnxControlField::Repeat rep) - Sets the repetition flag to \a repeat. + Sets the repetition flag to \a rep. */ /*! @@ -219,9 +219,9 @@ const std::bitset<8> gPriorityMask = 0x0c; */ /*! - \fn QKnxControlField::setConfirm(QKnxControlField::Confirm confirm) + \fn QKnxControlField::setConfirm(QKnxControlField::Confirm conf) - Sets the confirm flag to \a confirm. + Sets the confirm flag to \a conf. */ /*! diff --git a/src/knx/qknxcontrolfield.h b/src/knx/qknxcontrolfield.h index 02a0ddb..a418b79 100644 --- a/src/knx/qknxcontrolfield.h +++ b/src/knx/qknxcontrolfield.h @@ -77,8 +77,9 @@ public: Q_ENUM(Repeat) QKnxControlField::Repeat repeat() const // ### Qt6: Replace byte() with m_ctrl1 { return static_cast (quint8(testBit(byte(), 5))); } - void setRepeat(QKnxControlField::Repeat repeat) // ### Qt6: Replace byte() with m_ctrl1 - { m_ctrl1 = setBit(byte(), bool(static_cast (repeat)), 5); } + void setRepeat(QKnxControlField::Repeat rep) // ### Qt6: Replace byte() with m_ctrl1 + { m_ctrl1 = setBit(byte(), bool(static_cast (rep)), 5); } + enum class Broadcast : quint8 { @@ -121,8 +122,8 @@ public: Q_ENUM(Confirm) QKnxControlField::Confirm confirm() const // ### Qt6: Replace byte() with m_ctrl1 { return static_cast (quint8(testBit(byte(), 0))); } - void setConfirm(QKnxControlField::Confirm confirm) // ### Qt6: Replace byte() with m_ctrl1 - { m_ctrl1 = setBit(byte(), bool(static_cast (confirm)), 0); } + void setConfirm(QKnxControlField::Confirm conf) // ### Qt6: Replace byte() with m_ctrl1 + { m_ctrl1 = setBit(byte(), bool(static_cast (conf)), 0); } quint8 byte() const { return quint8(m_ctrl1.to_ulong()); } QKnxByteArray bytes() const { return { byte() }; } -- cgit v1.2.3 From fcfb67bf242ae9db81588cfe0495bb9785bd1546 Mon Sep 17 00:00:00 2001 From: Karsten Heimrich Date: Wed, 28 Aug 2019 12:00:58 +0200 Subject: Revert "Fix gcc version check" This reverts commit ee2f01020005b1baa63de918be1dc75ae581f7b1. A parent commit introduced a compilation fix that makes this patchset superfluous. Enables the SLES12 target. Change-Id: I8028104cf5fafb23bf3dea3c551659f807d65044 Reviewed-by: Alex Blasche --- config.tests/compiletest/compiletest.pro | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config.tests/compiletest/compiletest.pro b/config.tests/compiletest/compiletest.pro index 66f8581..b4d29a1 100644 --- a/config.tests/compiletest/compiletest.pro +++ b/config.tests/compiletest/compiletest.pro @@ -1,5 +1,8 @@ - gcc:!clang:lessThan(QT_GCC_MAJOR_VERSION, 5) { - SOURCES += main_less_5.cpp +gcc { + versionAtLeast(QT_GCC_MAJOR_VERSION, 5) \ + SOURCES += main.cpp + else: \ + SOURCES += main_less_5.cpp } else { SOURCES += main.cpp } -- cgit v1.2.3 From a0014eeb418c5eb71c1e087d4c3932353b625e99 Mon Sep 17 00:00:00 2001 From: Karsten Heimrich Date: Wed, 28 Aug 2019 12:01:12 +0200 Subject: Revert "Fix compile error after we added SLES_12" This reverts commit 29d53975d559c9d2acce78167bacbe384e2d825a. A parent commit introduced a compilation fix that makes this patchset superfluous. Enables the SLES12 target. Change-Id: Ie66b6400956f5a918b031d9007f6df276c331750 Reviewed-by: Alex Blasche --- config.tests/compiletest/compiletest.pro | 8 ------- config.tests/compiletest/main.cpp | 32 --------------------------- config.tests/compiletest/main_less_5.cpp | 32 --------------------------- configure.json | 5 ----- qtknx.pro | 5 ----- src/knx/configure.json | 37 -------------------------------- 6 files changed, 119 deletions(-) delete mode 100644 config.tests/compiletest/compiletest.pro delete mode 100644 config.tests/compiletest/main.cpp delete mode 100644 config.tests/compiletest/main_less_5.cpp delete mode 100644 configure.json delete mode 100644 src/knx/configure.json diff --git a/config.tests/compiletest/compiletest.pro b/config.tests/compiletest/compiletest.pro deleted file mode 100644 index b4d29a1..0000000 --- a/config.tests/compiletest/compiletest.pro +++ /dev/null @@ -1,8 +0,0 @@ -gcc { - versionAtLeast(QT_GCC_MAJOR_VERSION, 5) \ - SOURCES += main.cpp - else: \ - SOURCES += main_less_5.cpp -} else { - SOURCES += main.cpp -} diff --git a/config.tests/compiletest/main.cpp b/config.tests/compiletest/main.cpp deleted file mode 100644 index 6afec07..0000000 --- a/config.tests/compiletest/main.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/****************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtKnx module. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -******************************************************************************/ - -int main(int /*argc*/, char** /*argv*/) -{ - return 0; -} diff --git a/config.tests/compiletest/main_less_5.cpp b/config.tests/compiletest/main_less_5.cpp deleted file mode 100644 index f9bf68f..0000000 --- a/config.tests/compiletest/main_less_5.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/****************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtKnx module. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -******************************************************************************/ - -int main(int /*argc*/, char** /*argv*/) -{ - return 0 /* forcibly broken compile test */ -} diff --git a/configure.json b/configure.json deleted file mode 100644 index 78a1945..0000000 --- a/configure.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "subconfigs": [ - "src/knx" - ] -} diff --git a/qtknx.pro b/qtknx.pro index db1bea4..118b159 100644 --- a/qtknx.pro +++ b/qtknx.pro @@ -6,8 +6,3 @@ requires(!integrity) load(configure) load(qt_parts) - -include($$OUT_PWD/src/knx/qtknx-config.pri) -QT_FOR_CONFIG += knx-private - -requires(qtConfig(compiletest)) diff --git a/src/knx/configure.json b/src/knx/configure.json deleted file mode 100644 index 92c66b0..0000000 --- a/src/knx/configure.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "module": "knx", - "testDir": "../../config.tests", - - "tests": { - "compiletest": { - "label": "Minimum compiler version", - "type": "compile", - "test": "compiletest" - } - }, - - "features": { - "compiletest": { - "label": "Minimum compiler version detected", - "condition": "tests.compiletest", - "output": [ "privateFeature" ] - } - }, - - "report": [ - { - "type": "note", - "condition": "!features.compiletest", - "message": "QtKnx: Your compiler is not officially supported or was not detected properly." - } - ], - - "summary": [ - { - "section": "Qt KNX", - "entries": [ - "compiletest" - ] - } - ] -} -- cgit v1.2.3 From 35f6e58cd747a3d19a503c7fa49bb74aeaedd87e Mon Sep 17 00:00:00 2001 From: Karsten Heimrich Date: Tue, 17 Sep 2019 14:59:34 +0200 Subject: Fix compile issues * missing namespace * use right constructor Change-Id: I8e76cf4250af5519c9c4888db34ddfd6471ffec4 Reviewed-by: Alex Blasche Reviewed-by: Lucie Gerard --- examples/knx/discoverer/main.cpp | 2 +- examples/knx/knxproj/main.cpp | 4 ++-- src/knx/netip/qknxnetipserverdescriptionagent.cpp | 4 ++++ src/knx/qknxadditionalinfo.cpp | 2 +- src/knx/qknxaddress.cpp | 4 ++-- src/knx/qknxcontrolfield.cpp | 2 +- src/knx/qknxextendedcontrolfield.cpp | 2 +- tests/auto/qknxnetipcri/tst_qknxnetipcri.cpp | 2 +- tests/auto/qknxnetipknxaddressesdib/tst_qknxnetipknxaddressesdib.cpp | 2 +- 9 files changed, 14 insertions(+), 10 deletions(-) diff --git a/examples/knx/discoverer/main.cpp b/examples/knx/discoverer/main.cpp index d9944cb..2a42634 100644 --- a/examples/knx/discoverer/main.cpp +++ b/examples/knx/discoverer/main.cpp @@ -188,7 +188,7 @@ int main(int argc, char *argv[]) const auto servers = agent.discoveredServers(); if (servers.size() > 0) { - qInfo().noquote() << endl << QString::fromLatin1("%1 server(s) found on the network.") + qInfo().noquote() << Qt::endl << QString::fromLatin1("%1 server(s) found on the network.") .arg(servers.size()); for (auto server : servers) { qInfo().noquote() << QString::fromLatin1(" Network interface: %1, address: %2") diff --git a/examples/knx/knxproj/main.cpp b/examples/knx/knxproj/main.cpp index d838bbf..3781a98 100644 --- a/examples/knx/knxproj/main.cpp +++ b/examples/knx/knxproj/main.cpp @@ -55,7 +55,7 @@ int main(int argc, char *argv[]) bool verbose = cliParser.isSet(verboseOption); if (!cliParser.isSet(projFilePathOption)) { - qInfo() << "Error: Missing project file name" << endl; + qInfo() << "Error: Missing project file name" << Qt::endl; cliParser.showHelp(EXIT_FAILURE); } @@ -93,7 +93,7 @@ int main(int argc, char *argv[]) qInfo().noquote() << QString::fromLatin1(" %1: %2") .arg(addInfo.name()).arg(addInfo.address().toString()); } - qInfo() << endl; + qInfo() << Qt::endl; } } diff --git a/src/knx/netip/qknxnetipserverdescriptionagent.cpp b/src/knx/netip/qknxnetipserverdescriptionagent.cpp index 5735ed7..596cbbb 100644 --- a/src/knx/netip/qknxnetipserverdescriptionagent.cpp +++ b/src/knx/netip/qknxnetipserverdescriptionagent.cpp @@ -213,7 +213,11 @@ void QKnxNetIpServerDescriptionAgentPrivate::setupSocket() continue; setAndEmitServerDescriptionReceived({ m_server, response.deviceHardware(), +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) response.supportedFamilies() }); +#else + response.supportedFamilies(), {}, {} }); +#endif } }); } diff --git a/src/knx/qknxadditionalinfo.cpp b/src/knx/qknxadditionalinfo.cpp index 6226313..611bdb5 100644 --- a/src/knx/qknxadditionalinfo.cpp +++ b/src/knx/qknxadditionalinfo.cpp @@ -318,7 +318,7 @@ QDebug operator<<(QDebug debug, const QKnxAdditionalInfo &info) { QDebugStateSaver _(debug); if (info.isValid()) { - QDebug &dbg = debug.nospace().noquote() << "0x" << hex << qSetFieldWidth(2) + QDebug &dbg = debug.nospace().noquote() << "0x" << Qt::hex << qSetFieldWidth(2) << qSetPadChar(QLatin1Char('0')); const auto rawData = info.bytes(); for (quint8 byte : qAsConst(rawData)) diff --git a/src/knx/qknxaddress.cpp b/src/knx/qknxaddress.cpp index 46a0cc2..439847e 100644 --- a/src/knx/qknxaddress.cpp +++ b/src/knx/qknxaddress.cpp @@ -421,8 +421,8 @@ QDebug operator<<(QDebug debug, const QKnxAddress &address) QDebugStateSaver _(debug); if (address.isValid()) { const auto rawData = address.bytes(); - debug.nospace().noquote() << "0x" << hex << qSetFieldWidth(2) << qSetPadChar(QLatin1Char('0')) - << rawData.at(0) << hex << rawData.at(1); + debug.nospace().noquote() << "0x" << Qt::hex << qSetFieldWidth(2) + << qSetPadChar(QLatin1Char('0')) << rawData.at(0) << Qt::hex << rawData.at(1); } else { debug.nospace().noquote() << "0x1nv4l1d"; } diff --git a/src/knx/qknxcontrolfield.cpp b/src/knx/qknxcontrolfield.cpp index e6f9702..b3c2d65 100644 --- a/src/knx/qknxcontrolfield.cpp +++ b/src/knx/qknxcontrolfield.cpp @@ -319,7 +319,7 @@ QKnxControlField::Builder QKnxControlField::builder() QDebug operator<<(QDebug debug, const QKnxControlField &field) { QDebugStateSaver _(debug); - debug.nospace().noquote() << "0x" << hex << qSetFieldWidth(2) << qSetPadChar(QLatin1Char('0')) + debug.nospace().noquote() << "0x" << Qt::hex << qSetFieldWidth(2) << qSetPadChar(QLatin1Char('0')) << field.bytes(); return debug; } diff --git a/src/knx/qknxextendedcontrolfield.cpp b/src/knx/qknxextendedcontrolfield.cpp index 849aa2f..65bedc9 100644 --- a/src/knx/qknxextendedcontrolfield.cpp +++ b/src/knx/qknxextendedcontrolfield.cpp @@ -234,7 +234,7 @@ QKnxExtendedControlField::Builder QKnxExtendedControlField::builder() QDebug operator<<(QDebug debug, const QKnxExtendedControlField &field) { QDebugStateSaver _(debug); - debug.nospace().noquote() << "0x" << hex << qSetFieldWidth(2) << qSetPadChar(QLatin1Char('0')) + debug.nospace().noquote() << "0x" << Qt::hex << qSetFieldWidth(2) << qSetPadChar(QLatin1Char('0')) << field.bytes(); return debug; } diff --git a/tests/auto/qknxnetipcri/tst_qknxnetipcri.cpp b/tests/auto/qknxnetipcri/tst_qknxnetipcri.cpp index 2deae37..de9dea8 100644 --- a/tests/auto/qknxnetipcri/tst_qknxnetipcri.cpp +++ b/tests/auto/qknxnetipcri/tst_qknxnetipcri.cpp @@ -190,7 +190,7 @@ void tst_QKnxNetIpCri::testAdditionalData() QKnxNetIpCriProxy cri(frame); QCOMPARE(cri.isValid(), true); QCOMPARE(cri.isExtended(), false); - QCOMPARE(cri.individualAddress(), {}); + QCOMPARE(cri.individualAddress(), QKnxAddress{}); QKnxAddress address { QKnxAddress::Type::Individual, 2013 }; frame = QKnxNetIpCriProxy::builder() diff --git a/tests/auto/qknxnetipknxaddressesdib/tst_qknxnetipknxaddressesdib.cpp b/tests/auto/qknxnetipknxaddressesdib/tst_qknxnetipknxaddressesdib.cpp index c3722c9..2e956b7 100644 --- a/tests/auto/qknxnetipknxaddressesdib/tst_qknxnetipknxaddressesdib.cpp +++ b/tests/auto/qknxnetipknxaddressesdib/tst_qknxnetipknxaddressesdib.cpp @@ -77,7 +77,7 @@ void tst_QKnxNetIpKnxAddressesDib::testConstructorWithOneArgument() QKnxNetIpKnxAddressesDibProxy view(addresses); QCOMPARE(view.isValid(), true); QCOMPARE(view.descriptionType(), QKnxNetIp::DescriptionType::KnxAddresses); - QCOMPARE(view.individualAddresses(), { QKnxAddress::createIndividual(1, 1, 1) }); + QCOMPARE(view.individualAddresses(), QVector { QKnxAddress::createIndividual(1, 1, 1) }); } void tst_QKnxNetIpKnxAddressesDib::testConstructorWithTwoArguments() -- cgit v1.2.3