Changeset View
Changeset View
Standalone View
Standalone View
src/parser/KDbParser.cpp
1 | /* This file is part of the KDE project | 1 | /* This file is part of the KDE project | ||
---|---|---|---|---|---|
2 | Copyright (C) 2003 Lucijan Busch <lucijan@kde.org> | 2 | Copyright (C) 2003 Lucijan Busch <lucijan@kde.org> | ||
3 | Copyright (C) 2004-2017 Jarosław Staniek <staniek@kde.org> | 3 | Copyright (C) 2004-2018 Jarosław Staniek <staniek@kde.org> | ||
4 | 4 | | |||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or | ||
6 | modify it under the terms of the GNU Library General Public | 6 | modify it under the terms of the GNU Library General Public | ||
7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either | ||
8 | version 2 of the License, or (at your option) any later version. | 8 | version 2 of the License, or (at your option) any later version. | ||
9 | 9 | | |||
10 | This library is distributed in the hope that it will be useful, | 10 | This library is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
▲ Show 20 Lines • Show All 201 Lines • ▼ Show 20 Line(s) | |||||
213 | 213 | | |||
214 | int KDbParserError::position() const | 214 | int KDbParserError::position() const | ||
215 | { | 215 | { | ||
216 | return d->position; | 216 | return d->position; | ||
217 | } | 217 | } | ||
218 | 218 | | |||
219 | QDebug operator<<(QDebug dbg, const KDbParserError& error) | 219 | QDebug operator<<(QDebug dbg, const KDbParserError& error) | ||
220 | { | 220 | { | ||
221 | QDebugStateSaver saver(dbg); | ||||
221 | if (error.type().isEmpty() && error.message().isEmpty()) { | 222 | if (error.type().isEmpty() && error.message().isEmpty()) { | ||
222 | return dbg.space() << "KDb:KDbParserError: None"; | 223 | dbg.space() << "KDb:KDbParserError: None"; | ||
223 | } | 224 | } else { | ||
224 | return dbg.space() << "KDb:KDbParserError: type=" << error.type() << "message=" << error.message() | 225 | dbg.space() << "KDb:KDbParserError: type=" << error.type() << "message=" << error.message() | ||
225 | << "pos=" << error.position() << ")"; | 226 | << "pos=" << error.position() << ")"; | ||
226 | } | 227 | } | ||
228 | return dbg.maybeSpace(); | ||||
229 | } |