aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/tools/error.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2017-03-31 14:34:53 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2017-04-03 07:18:35 +0000
commitb925265d48dca753335e788a9f5efe944ff1a7a6 (patch)
tree57491f191a188a6120891f226ebc10bcd9f509b7 /src/lib/corelib/tools/error.cpp
parent7a412abb420e9fdfbe81ad35f1ee406a20736705 (diff)
Cumulate delayed product errors
If a delayed error leads to other errors later on, we would output the later errors without showing the original - more important - delayed errors. Cumulate delayed product errors and pass them up the stack. Change-Id: Ibdfc6d3e301a80ef265792907b3e4a150a22ef8b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib/tools/error.cpp')
-rw-r--r--src/lib/corelib/tools/error.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/corelib/tools/error.cpp b/src/lib/corelib/tools/error.cpp
index 82e351611..6ebee2879 100644
--- a/src/lib/corelib/tools/error.cpp
+++ b/src/lib/corelib/tools/error.cpp
@@ -208,6 +208,11 @@ void ErrorInfo::appendBacktrace(const QString &description, const CodeLocation &
d->items.append(ErrorItem(description, location, true));
}
+void ErrorInfo::append(const ErrorItem &item)
+{
+ d->items.append(item);
+}
+
void ErrorInfo::append(const QString &description, const CodeLocation &location)
{
d->items.append(ErrorItem(description, location));
@@ -277,4 +282,11 @@ void ErrorInfo::store(Internal::PersistentPool &pool) const
pool.store(d->internalError);
}
+void appendError(ErrorInfo &dst, const ErrorInfo &src)
+{
+ const QList<ErrorItem> &sourceItems = src.items();
+ for (const ErrorItem &item : sourceItems)
+ dst.append(item);
+}
+
} // namespace qbs