kernel/qsqlerror.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5QDebug operator<<(QDebug dbg, const QSqlError &s) -
6{ -
7 dbg.nospace() << "QSqlError(" << s.number() << ", " << s.driverText() << -
8 ", " << s.databaseText() << ')'; -
9 return dbg.space();
never executed: return dbg.space();
0
10} -
11QSqlError::QSqlError(const QString& driverText, const QString& databaseText, ErrorType type, -
12 int number) -
13 : driverError(driverText), databaseError(databaseText), errorType(type), errorNumber(number) -
14{ -
15}
executed: }
Execution Count:309803
309803
16 -
17 -
18 -
19 -
20QSqlError::QSqlError(const QSqlError& other) -
21 : driverError(other.driverError), databaseError(other.databaseError), -
22 errorType(other.errorType), -
23 errorNumber(other.errorNumber) -
24{ -
25}
executed: }
Execution Count:247731
247731
26 -
27 -
28 -
29 -
30 -
31QSqlError& QSqlError::operator=(const QSqlError& other) -
32{ -
33 driverError = other.driverError; -
34 databaseError = other.databaseError; -
35 errorType = other.errorType; -
36 errorNumber = other.errorNumber; -
37 return *this;
executed: return *this;
Execution Count:307300
307300
38} -
39 -
40 -
41 -
42 -
43 -
44bool QSqlError::operator==(const QSqlError& other) const -
45{ -
46 return (errorType == other.errorType);
executed: return (errorType == other.errorType);
Execution Count:1
1
47} -
48 -
49 -
50 -
51 -
52 -
53 -
54bool QSqlError::operator!=(const QSqlError& other) const -
55{ -
56 return (errorType != other.errorType);
executed: return (errorType != other.errorType);
Execution Count:1
1
57} -
58 -
59 -
60 -
61 -
62 -
63 -
64QSqlError::~QSqlError() -
65{ -
66} -
67 -
68 -
69 -
70 -
71 -
72 -
73 -
74QString QSqlError::driverText() const -
75{ -
76 return driverError;
executed: return driverError;
Execution Count:11582
11582
77} -
78 -
79 -
80 -
81 -
82 -
83 -
84 -
85void QSqlError::setDriverText(const QString& driverText) -
86{ -
87 driverError = driverText; -
88}
never executed: }
0
89QString QSqlError::databaseText() const -
90{ -
91 return databaseError;
executed: return databaseError;
Execution Count:11550
11550
92} -
93 -
94 -
95 -
96 -
97 -
98 -
99 -
100void QSqlError::setDatabaseText(const QString& databaseText) -
101{ -
102 databaseError = databaseText; -
103}
never executed: }
0
104 -
105 -
106 -
107 -
108 -
109 -
110 -
111QSqlError::ErrorType QSqlError::type() const -
112{ -
113 return errorType;
executed: return errorType;
Execution Count:18
18
114} -
115 -
116 -
117 -
118 -
119 -
120 -
121 -
122void QSqlError::setType(ErrorType type) -
123{ -
124 errorType = type; -
125}
executed: }
Execution Count:8
8
126int QSqlError::number() const -
127{ -
128 return errorNumber;
executed: return errorNumber;
Execution Count:11581
11581
129} -
130 -
131 -
132 -
133 -
134 -
135 -
136 -
137void QSqlError::setNumber(int number) -
138{ -
139 errorNumber = number; -
140}
executed: }
Execution Count:3
3
141QString QSqlError::text() const -
142{ -
143 QString result = databaseError; -
144 if (!databaseError.endsWith(QLatin1String("\n")))
never evaluated: !databaseError.endsWith(QLatin1String("\n"))
0
145 result += QLatin1Char(' ');
never executed: result += QLatin1Char(' ');
0
146 result += driverError; -
147 return result;
never executed: return result;
0
148} -
149bool QSqlError::isValid() const -
150{ -
151 return errorType != NoError;
executed: return errorType != NoError;
Execution Count:236151
236151
152} -
153 -
154 -
155 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial