summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2022-11-21 13:02:52 +0100
committerIvan Solovev <ivan.solovev@qt.io>2022-11-22 18:11:40 +0100
commite79c2bed3071d1c066ac1691c6bea8806736876e (patch)
treec280b81696275d805ba5583a20f9b302f47a919c /src
parentb0eede2dc58df1805a0745ff72e9dee51a08e9e5 (diff)
QCanFrameProcessor: rename errorDescription() -> errorString()
Qt classes normally use errorString() to provide the string representation of an error, so we should do the same. This commit amends fb5b117312df3e156beac0aebbd9891571dfa8bd. Task-number: QTBUG-98910 Change-Id: I759e7b62337ba6602b67a097ac74881a6fe96ffe Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
Diffstat (limited to 'src')
-rw-r--r--src/serialbus/qcanframeprocessor.cpp26
-rw-r--r--src/serialbus/qcanframeprocessor.h2
-rw-r--r--src/serialbus/qcanframeprocessor_p.h2
3 files changed, 15 insertions, 15 deletions
diff --git a/src/serialbus/qcanframeprocessor.cpp b/src/serialbus/qcanframeprocessor.cpp
index 4c4b3cc..a07022d 100644
--- a/src/serialbus/qcanframeprocessor.cpp
+++ b/src/serialbus/qcanframeprocessor.cpp
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
and desired values.
Errors can occur during the encoding or decoding process. In such cases
- the \l error() and \l errorDescription() methods can be used to get the
+ the \l error() and \l errorString() methods can be used to get the
information about the error.
Some non-critical problems may occur as well. Such problems will be logged,
@@ -84,10 +84,10 @@ QT_BEGIN_NAMESPACE
\value UnsupportedFrameFormat The format of the received frame is not
supported and cannot be parsed.
\value DecodingError An error occurred during decoding. Use
- \l errorDescription() to get a string representation
+ \l errorString() to get a string representation
of the error.
\value EncodingError An error occurred during encoding. Use
- \l errorDescription() to get a string representation
+ \l errorString() to get a string representation
of the error.
*/
@@ -204,12 +204,12 @@ QCanFrameProcessor &QCanFrameProcessor::operator=(const QCanFrameProcessor &othe
\endlist
If an error occurred during the encoding, an invalid \l QCanBusFrame is
- returned. In such cases, the \l error() and \l errorDescription() methods
+ returned. In such cases, the \l error() and \l errorString() methods
can be used to get information about the errors.
\note Calling this method clears all previous errors and warnings.
- \sa addMessageDescriptions(), error(), errorDescription(), warnings()
+ \sa addMessageDescriptions(), error(), errorString(), warnings()
*/
QCanBusFrame QCanFrameProcessor::prepareFrame(QtCanBus::UniqueId uniqueId,
const QVariantMap &signalValues)
@@ -314,7 +314,7 @@ QCanBusFrame QCanFrameProcessor::prepareFrame(QtCanBus::UniqueId uniqueId,
/*!
Returns the last error.
- \sa errorDescription(), prepareFrame(), parseFrame()
+ \sa errorString(), prepareFrame(), parseFrame()
*/
QCanFrameProcessor::Error QCanFrameProcessor::error() const
{
@@ -326,16 +326,16 @@ QCanFrameProcessor::Error QCanFrameProcessor::error() const
\sa error(), prepareFrame(), parseFrame()
*/
-QString QCanFrameProcessor::errorDescription() const
+QString QCanFrameProcessor::errorString() const
{
- return d->errorDescription;
+ return d->errorString;
}
/*!
Returns the list of warnings generated during the last encoding or decoding
call.
- \sa error(), errorDescription(), prepareFrame(), parseFrame()
+ \sa error(), errorString(), prepareFrame(), parseFrame()
*/
QStringList QCanFrameProcessor::warnings() const
{
@@ -461,12 +461,12 @@ bool QCanFrameProcessor::equals(const QCanFrameProcessor &lhs, const QCanFramePr
If an error occurred during the decoding, a result with empty
\l {QCanFrameProcessor::ParseResult::}{signalValues} is returned.
- In such cases, the \l error() and \l errorDescription() methods can be used
+ In such cases, the \l error() and \l errorString() methods can be used
to get information about the errors.
\note Calling this method clears all previous errors and warnings.
- \sa addMessageDescriptions(), error(), errorDescription(), warnings()
+ \sa addMessageDescriptions(), error(), errorString(), warnings()
*/
QCanFrameProcessor::ParseResult QCanFrameProcessor::parseFrame(const QCanBusFrame &frame)
{
@@ -575,14 +575,14 @@ QCanFrameProcessor::ParseResult QCanFrameProcessor::parseFrame(const QCanBusFram
void QCanFrameProcessorPrivate::resetErrors()
{
error = QCanFrameProcessor::Error::NoError;
- errorDescription.clear();
+ errorString.clear();
warnings.clear();
}
void QCanFrameProcessorPrivate::setError(QCanFrameProcessor::Error err, const QString &desc)
{
error = err;
- errorDescription = desc;
+ errorString = desc;
}
void QCanFrameProcessorPrivate::addWarning(const QString &warning)
diff --git a/src/serialbus/qcanframeprocessor.h b/src/serialbus/qcanframeprocessor.h
index 963f308..d74fd25 100644
--- a/src/serialbus/qcanframeprocessor.h
+++ b/src/serialbus/qcanframeprocessor.h
@@ -58,7 +58,7 @@ public:
ParseResult parseFrame(const QCanBusFrame &frame);
Error error() const;
- QString errorDescription() const;
+ QString errorString() const;
QStringList warnings() const;
QList<QCanMessageDescription> messageDescriptions() const;
diff --git a/src/serialbus/qcanframeprocessor_p.h b/src/serialbus/qcanframeprocessor_p.h
index ab69831..9921146 100644
--- a/src/serialbus/qcanframeprocessor_p.h
+++ b/src/serialbus/qcanframeprocessor_p.h
@@ -45,7 +45,7 @@ public:
static QCanFrameProcessorPrivate *get(const QCanFrameProcessor &processor);
QCanFrameProcessor::Error error = QCanFrameProcessor::Error::NoError;
- QString errorDescription;
+ QString errorString;
QStringList warnings;
QHash<QtCanBus::UniqueId, QCanMessageDescription> messages;
QCanUniqueIdDescription uidDescription;