1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#ifndef STACKFRAME_H
6#define STACKFRAME_H
7
8#include <QCoreApplication>
9#include <QMetaType>
10
11class StackFrameData
12{
13public:
14 StackFrameData();
15 void clear();
16 bool isUsable() const;
17 QString toToolTip() const;
18 QString toString() const;
19
20public:
21 QString level;
22 QString function;
23 QString file; // We try to put an absolute file name in there.
24 QString module; // Sometimes something like "/usr/lib/libstdc++.so.6"
25 QString receiver; // Used in ScriptEngine only.
26 qint32 line = -1;
27 QString address;
28 int64_t frameId = 0;
29 bool usable = true;
30
31 Q_DECLARE_TR_FUNCTIONS(StackHandler)
32};
33
34using StackFrames = QList<StackFrameData>;
35
36Q_DECLARE_METATYPE(StackFrameData)
37#endif // STACKFRAME_H
38