KD Reports API Documentation 2.2
Loading...
Searching...
No Matches
KDReportsErrorDetails.cpp
Go to the documentation of this file.
1/****************************************************************************
2**
3** This file is part of the KD Reports library.
4**
5** SPDX-FileCopyrightText: 2007 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6**
7** SPDX-License-Identifier: MIT
8**
9****************************************************************************/
10
13#include <QObject>
14
19
25
27{
28 if (!hasError()) {
29 return QString();
30 }
31
32 if (d->m_line != -1) {
33 return QObject::tr("Error on line %1, column %2: %3").arg(line()).arg(column()).arg(driverMessage());
34 } else {
35 return driverMessage();
36 }
37}
38
40{
41 return d->m_line;
42}
43
45{
46 return d->m_column;
47}
48
50{
51 return d->m_hasError;
52}
53
55{
56 return d->m_message;
57}
58
60{
61 d->m_hasError = true;
62 d->m_line = line;
63}
64
66{
67 d->m_hasError = true;
68 d->m_column = column;
69}
70
72{
73 d->m_hasError = true;
74 d->m_message = message;
75}
76
80
85
87{
88 ErrorDetails copy(other);
89 swap(copy);
90 return *this;
91}
92
94{
95 qSwap(d, other.d);
96}
QT_BEGIN_NAMESPACE void qSwap(KDReports::ErrorDetails &lhs, KDReports::ErrorDetails &rhs)
void setDriverMessage(const QString &message)
ErrorDetails & operator=(const ErrorDetails &other)
void swap(ErrorDetails &other)
QString tr(const char *sourceText, const char *disambiguation, int n)
QString arg(qlonglong a, int fieldWidth, int base, QChar fillChar) const const

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-reports/
Generated on Mon Apr 22 2024 00:05:22 for KD Reports API Documentation by doxygen 1.9.8