summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-09-18 13:39:12 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-09-18 13:42:08 +0200
commit83a6b2a299d40513feb292dd041d1aa12e29fa13 (patch)
tree7044110b6b8af8c52667a3432648ecef9164def6
parentcfd7b61bea8a5b12ee0959d6c5722e17bba689d7 (diff)
parent605aabe1549d22dd5b3c283e5bf9c0088e14704d (diff)
Merge "Merge remote-tracking branch 'origin/5.15' into dev"
-rw-r--r--config.tests/compiletest/compiletest.pro5
-rw-r--r--config.tests/compiletest/main.cpp32
-rw-r--r--config.tests/compiletest/main_less_5.cpp32
-rw-r--r--configure.json5
-rw-r--r--examples/knx/discoverer/main.cpp2
-rw-r--r--examples/knx/knxproj/main.cpp4
-rw-r--r--qtknx.pro5
-rw-r--r--src/knx/configure.json37
-rw-r--r--src/knx/core/qknxbytearray.cpp8
-rw-r--r--src/knx/core/qknxbytearray.h9
-rw-r--r--src/knx/knxproj/qknxgroupaddressinfos.cpp10
-rw-r--r--src/knx/netip/qknxnetipserverdescriptionagent.cpp4
-rw-r--r--src/knx/netip/qknxnetipstruct.cpp20
-rw-r--r--src/knx/netip/qknxnetipstruct.h23
-rw-r--r--src/knx/netip/qknxnetipstructheader.cpp16
-rw-r--r--src/knx/netip/qknxnetipstructheader.h44
-rw-r--r--src/knx/qknxadditionalinfo.cpp2
-rw-r--r--src/knx/qknxaddress.cpp4
-rw-r--r--src/knx/qknxcontrolfield.cpp10
-rw-r--r--src/knx/qknxcontrolfield.h9
-rw-r--r--src/knx/qknxextendedcontrolfield.cpp2
-rw-r--r--tests/auto/qknxnetipcri/tst_qknxnetipcri.cpp2
-rw-r--r--tests/auto/qknxnetipknxaddressesdib/tst_qknxnetipknxaddressesdib.cpp2
23 files changed, 89 insertions, 198 deletions
diff --git a/config.tests/compiletest/compiletest.pro b/config.tests/compiletest/compiletest.pro
deleted file mode 100644
index 66f8581..0000000
--- a/config.tests/compiletest/compiletest.pro
+++ /dev/null
@@ -1,5 +0,0 @@
- gcc:!clang:lessThan(QT_GCC_MAJOR_VERSION, 5) {
- 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/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/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"
- ]
- }
- ]
-}
diff --git a/src/knx/core/qknxbytearray.cpp b/src/knx/core/qknxbytearray.cpp
index 53ed547..bfec17d 100644
--- a/src/knx/core/qknxbytearray.cpp
+++ b/src/knx/core/qknxbytearray.cpp
@@ -262,18 +262,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 efc1a02..b48b9c5 100644
--- a/src/knx/core/qknxbytearray.h
+++ b/src/knx/core/qknxbytearray.h
@@ -92,14 +92,15 @@ public:
void resize(int size);
inline quint8 at(int i) const { return m_bytes.at(i); }
- inline void set(int i, quint8 value) {
+
+ inline void set(int i, quint8 val) {
Q_ASSERT(i >= 0 && i < size());
- m_bytes[i] = value;
+ 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<QString> 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<QString> 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<QString> 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<QKnxGroupAddressInfo> 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/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/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 <typename CodeType> QKnxNetIpStruct<CodeType>::QKnxNetIpStruct(CodeType code, const QKnxByteArray &data = {})
+ \fn template <typename CodeType> QKnxNetIpStruct<CodeType>::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 <typename CodeType> QKnxNetIpStruct<CodeType>::QKnxNetIpStruct(const QKnxNetIpStructHeader<CodeType> &header, const QKnxByteArray &data = {})
+ \fn template <typename CodeType> QKnxNetIpStruct<CodeType>::QKnxNetIpStruct(const QKnxNetIpStructHeader<CodeType> &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 <typename CodeType> QKnxNetIpStruct<CodeType>::setData(const QKnxByteArray &data)
+ \fn template <typename CodeType> QKnxNetIpStruct<CodeType>::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 <typename CodeType> QKnxNetIpStruct<CodeType>::setHeader(const QKnxNetIpStructHeader<CodeType> &header)
+ \fn template <typename CodeType> QKnxNetIpStruct<CodeType>::setHeader(const QKnxNetIpStructHeader<CodeType> &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<CodeType> &header, const QKnxByteArray &data = {})
- : m_header(header)
- , m_data(data)
+ QKnxNetIpStruct(const QKnxNetIpStructHeader<CodeType> &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<CodeType> &header)
+ void setHeader(const QKnxNetIpStructHeader<CodeType> &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 <typename CodeType> QKnxNetIpStructHeader<CodeType>::QKnxNetIpStructHeader(CodeType code)
+ \fn template <typename CodeType> QKnxNetIpStructHeader<CodeType>::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 <typename CodeType> QKnxNetIpStructHeader<CodeType>::QKnxNetIpStructHeader(CodeType code, quint16 dataSize)
+ \fn template <typename CodeType> QKnxNetIpStructHeader<CodeType>::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 <typename CodeType> void QKnxNetIpStructHeader<CodeType>::setDataSize(quint16 dataSize)
+ \fn template <typename CodeType> void QKnxNetIpStructHeader<CodeType>::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 <typename CodeType> void QKnxNetIpStructHeader<CodeType>::setCode(CodeType code)
+ \fn template <typename CodeType> void QKnxNetIpStructHeader<CodeType>::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 <typename T = CodeType,
typename = typename std::enable_if<is_type<T, QKnxNetIp::SearchParameterType>::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<class T = CodeType>
typename std::enable_if<is_type<T, QKnxNetIp::SearchParameterType>::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<class T = CodeType>
typename std::enable_if<!is_type<T, QKnxNetIp::SearchParameterType>::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<class T = CodeType>
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 6a10ad3..b3c2d65 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.
*/
/*!
@@ -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/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<Repeat> (quint8(testBit(byte(), 5))); }
- void setRepeat(QKnxControlField::Repeat repeat) // ### Qt6: Replace byte() with m_ctrl1
- { m_ctrl1 = setBit(byte(), bool(static_cast<int> (repeat)), 5); }
+ void setRepeat(QKnxControlField::Repeat rep) // ### Qt6: Replace byte() with m_ctrl1
+ { m_ctrl1 = setBit(byte(), bool(static_cast<int> (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<Confirm> (quint8(testBit(byte(), 0))); }
- void setConfirm(QKnxControlField::Confirm confirm) // ### Qt6: Replace byte() with m_ctrl1
- { m_ctrl1 = setBit(byte(), bool(static_cast<int> (confirm)), 0); }
+ void setConfirm(QKnxControlField::Confirm conf) // ### Qt6: Replace byte() with m_ctrl1
+ { m_ctrl1 = setBit(byte(), bool(static_cast<int> (conf)), 0); }
quint8 byte() const { return quint8(m_ctrl1.to_ulong()); }
QKnxByteArray bytes() const { return { byte() }; }
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> { QKnxAddress::createIndividual(1, 1, 1) });
}
void tst_QKnxNetIpKnxAddressesDib::testConstructorWithTwoArguments()