aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/tools/error.h
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2019-03-18 15:02:53 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2019-09-18 15:07:54 +0000
commit9f3a9830162f379d6f856c84668c3664df6d6477 (patch)
treeb32a126840ca81a0881e71051f5c09443ede5a05 /src/lib/corelib/tools/error.h
parent41d8b09239ce0ace2fd8674aaecae1528b1985e4 (diff)
Introduce the session command
Offers a JSON-based API for interaction with other tools via stdin/ stdout. This allows for proper qbs support in IDEs that do not use Qt or even C++. Change-Id: Ib051a40b7ebe1c6e0c3147cca9bd96e7daec1fde Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/lib/corelib/tools/error.h')
-rw-r--r--src/lib/corelib/tools/error.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/corelib/tools/error.h b/src/lib/corelib/tools/error.h
index 4832499af..abad85bad 100644
--- a/src/lib/corelib/tools/error.h
+++ b/src/lib/corelib/tools/error.h
@@ -47,6 +47,7 @@
#include <QtCore/qshareddata.h>
QT_BEGIN_NAMESPACE
+class QJsonObject;
template <class T> class QList;
class QString;
class QStringList;
@@ -68,6 +69,7 @@ public:
QString description() const;
CodeLocation codeLocation() const;
QString toString() const;
+ QJsonObject toJson() const;
bool isBacktraceItem() const;
@@ -97,10 +99,11 @@ public:
void append(const ErrorItem &item);
void append(const QString &description, const CodeLocation &location = CodeLocation());
void prepend(const QString &description, const CodeLocation &location = CodeLocation());
- QList<ErrorItem> items() const;
+ const QList<ErrorItem> items() const;
bool hasError() const { return !items().empty(); }
void clear();
QString toString() const;
+ QJsonObject toJson() const;
bool isInternalError() const;
bool hasLocation() const;