Changeset View
Changeset View
Standalone View
Standalone View
src/bugzillaintegration/parsebugbacktraces.h
Show All 28 Lines | |||||
29 | * Parses a Bugreport to find all the backtraces listed there | 29 | * Parses a Bugreport to find all the backtraces listed there | ||
30 | * NOTE it assumes that the backtraces provided were created | 30 | * NOTE it assumes that the backtraces provided were created | ||
31 | * by gdb | 31 | * by gdb | ||
32 | */ | 32 | */ | ||
33 | class ParseBugBacktraces : QObject | 33 | class ParseBugBacktraces : QObject | ||
34 | { | 34 | { | ||
35 | Q_OBJECT | 35 | Q_OBJECT | ||
36 | public: | 36 | public: | ||
37 | explicit ParseBugBacktraces(const BugReport &bug, QObject *parent = nullptr); | 37 | explicit ParseBugBacktraces(const Bugzilla::Bug::Ptr &bug, QObject *parent = nullptr); | ||
38 | 38 | | |||
39 | void parse(); | 39 | void parse(); | ||
40 | 40 | | |||
41 | enum DuplicateRating { | 41 | enum DuplicateRating { | ||
42 | PerfectDuplicate,//functionnames and stackframe numer match | 42 | PerfectDuplicate,//functionnames and stackframe numer match | ||
43 | MostLikelyDuplicate,//functionnames and stackframe numer match >=90% | 43 | MostLikelyDuplicate,//functionnames and stackframe numer match >=90% | ||
44 | MaybeDuplicate,//functionnames and stackframe numer match >=60% | 44 | MaybeDuplicate,//functionnames and stackframe numer match >=60% | ||
45 | NoDuplicate//functionnames and stackframe numer match <60% | 45 | NoDuplicate//functionnames and stackframe numer match <60% | ||
46 | }; | 46 | }; | ||
47 | 47 | | |||
48 | DuplicateRating findDuplicate(const QList<BacktraceLine> &backtrace); | 48 | DuplicateRating findDuplicate(const QList<BacktraceLine> &backtrace); | ||
49 | 49 | | |||
50 | Q_SIGNALS: | 50 | Q_SIGNALS: | ||
51 | void starting(); | 51 | void starting(); | ||
52 | void newLine(const QString &line); | 52 | void newLine(const QString &line); | ||
53 | 53 | | |||
54 | private: | 54 | private: | ||
55 | void parse(const QString &comment); | 55 | void parse(const QString &comment); | ||
56 | 56 | | |||
57 | private: | 57 | private: | ||
58 | BacktraceParser *m_parser = nullptr; | 58 | BacktraceParser *m_parser = nullptr; | ||
59 | const BugReport m_bug; | 59 | const Bugzilla::Bug::Ptr m_bug; | ||
60 | QList<QList<BacktraceLine> > m_backtraces; | 60 | QList<QList<BacktraceLine> > m_backtraces; | ||
61 | }; | 61 | }; | ||
62 | 62 | | |||
63 | #endif | 63 | #endif |