KD Reports API Documentation  2.0
KDReportsErrorDetails.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** This file is part of the KD Reports library.
4 **
5 ** SPDX-FileCopyrightText: 2007-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6 **
7 ** SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDAB-KDReports OR LicenseRef-KDAB-KDReports-US
8 **
9 ** Licensees holding valid commercial KD Reports licenses may use this file in
10 ** accordance with the KD Reports Commercial License Agreement provided with
11 ** the Software.
12 **
13 ** Contact info@kdab.com if any conditions of this licensing are not clear to you.
14 **
15 ****************************************************************************/
16 
17 #ifndef KDREPORTSERRORDETAILS_H
18 #define KDREPORTSERRORDETAILS_H
19 
20 #include "KDReportsGlobal.h"
21 #include <QtAlgorithms>
22 
23 namespace KDReports {
24 class ErrorDetailsPrivate;
25 class XmlElementHandler;
26 
30 class KDREPORTS_EXPORT ErrorDetails
31 {
32 public:
33  ErrorDetails();
34  explicit ErrorDetails(const QString &message);
35  ErrorDetails(const ErrorDetails &other);
36 
37  ~ErrorDetails();
38  inline ErrorDetails &operator=(const ErrorDetails &other);
39 
43  QString message() const;
44 
45  void setLine(int line);
46  void setColumn(int column);
47 
51  void setDriverMessage(const QString &message);
52 
53  int line() const;
54  int column() const;
55 
59  QString driverMessage() const;
60 
61  bool hasError() const;
62 
63  inline void swap(ErrorDetails &other); // krazy:exclude=inline
64 private:
65  friend class XmlElementHandler;
66  ErrorDetailsPrivate *d; // krazy:exclude=dpointer make this const
67 };
68 
70 {
71  qSwap(d, other.d);
72 }
73 
74 ErrorDetails &ErrorDetails::operator=(const ErrorDetails &other)
75 {
76  ErrorDetails copy(other);
77  swap(copy);
78  return *this;
79 }
80 
81 } // namespace KDReports
82 
83 QT_BEGIN_NAMESPACE
84 template <>
86 {
87  lhs.swap(rhs);
88 }
89 QT_END_NAMESPACE
90 
91 #endif /* KDREPORTSERRORDETAILS_H */
KDReports::ErrorDetails::swap
void swap(ErrorDetails &other)
Definition: KDReportsErrorDetails.h:83
KDReports::ErrorDetails::ErrorDetails
ErrorDetails()
Definition: KDReportsErrorDetails.cpp:21
KDReports::XmlElementHandler
Definition: KDReportsXmlElementHandler.h:84
KDReportsGlobal.h
KDReports::ErrorDetailsPrivate
Definition: KDReportsErrorDetails_p.h:50
qSwap
QT_BEGIN_NAMESPACE void qSwap(KDReports::ErrorDetails &lhs, KDReports::ErrorDetails &rhs)
Definition: KDReportsErrorDetails.h:85
KDReports::ErrorDetails
Definition: KDReportsErrorDetails.h:44
KDREPORTS_EXPORT
#define KDREPORTS_EXPORT
Definition: KDReportsGlobal.h:29
KDReports::ErrorDetails::operator=
ErrorDetails & operator=(const ErrorDetails &other)
Definition: KDReportsErrorDetails.h:88
KDReports
Definition: KDReportsAbstractReportLayout_p.h:30

© 2007-2021 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 Sat Jan 8 2022 02:38:32 for KD Reports API Documentation by doxygen 1.8.17