KD Reports  1.9
KDReportsErrorDetails.h
1 /****************************************************************************
2 **
3 ** This file is part of the KD Reports library.
4 **
5 ** SPDX-FileCopyrightText: 2007-2020 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 
38  ~ErrorDetails();
39  inline ErrorDetails& operator=( const ErrorDetails& other );
40 
44  QString message() const;
45 
46  void setLine( int line );
47  void setColumn( int column );
48 
52  void setDriverMessage( const QString& message );
53 
54  int line() const;
55  int column() const;
56 
60  QString driverMessage() const;
61 
62  bool hasError() const;
63 
64  inline void swap( ErrorDetails & other ); //krazy:exclude=inline
65 private:
66  friend class XmlElementHandler;
67  ErrorDetailsPrivate* d; //krazy:exclude=dpointer make this const
68 };
69 
70 void ErrorDetails::swap( ErrorDetails & other )
71 {
72  qSwap( d, other.d );
73 }
74 
75 
76 ErrorDetails& ErrorDetails::operator=( const ErrorDetails& other )
77 {
78  ErrorDetails copy( other );
79  swap( copy );
80  return *this;
81 }
82 
83 } // namespace KDReports
84 
85 QT_BEGIN_NAMESPACE
86 template <> inline void qSwap( KDReports::ErrorDetails & lhs, KDReports::ErrorDetails & rhs )
87 {
88  lhs.swap( rhs );
89 }
90 QT_END_NAMESPACE
91 
92 #endif /* KDREPORTSERRORDETAILS_H */
Definition: KDReportsXmlElementHandler.h:80
Definition: KDReportsAbstractTableElement.h:30
Definition: KDReportsErrorDetails.h:30

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/