Changeset View
Changeset View
Standalone View
Standalone View
src/bugzillaintegration/productmapping.h
Show All 18 Lines | |||||
19 | 19 | | |||
20 | #ifndef PRODUCTMAPPING__H | 20 | #ifndef PRODUCTMAPPING__H | ||
21 | #define PRODUCTMAPPING__H | 21 | #define PRODUCTMAPPING__H | ||
22 | 22 | | |||
23 | #include <QObject> | 23 | #include <QObject> | ||
24 | #include <QString> | 24 | #include <QString> | ||
25 | #include <QStringList> | 25 | #include <QStringList> | ||
26 | 26 | | |||
27 | #include "bugzillaintegration/libbugzilla/clients/productclient.h" | ||||
28 | | ||||
27 | class Product; | 29 | class Product; | ||
28 | class BugzillaManager; | 30 | class BugzillaManager; | ||
29 | class CrashedApplication; | 31 | class CrashedApplication; | ||
30 | 32 | | |||
33 | /** | ||||
34 | * Maps our crashed entity to a bugzilla product/component/version. | ||||
35 | */ | ||||
31 | class ProductMapping: public QObject | 36 | class ProductMapping: public QObject | ||
32 | { | 37 | { | ||
33 | Q_OBJECT | 38 | Q_OBJECT | ||
34 | public: | 39 | public: | ||
35 | explicit ProductMapping(const CrashedApplication *, BugzillaManager *, QObject * parent = nullptr); | 40 | explicit ProductMapping(const CrashedApplication *, BugzillaManager *, QObject *parent = nullptr); | ||
36 | 41 | | |||
37 | QString bugzillaProduct() const; | 42 | QString bugzillaProduct() const; | ||
38 | QString bugzillaComponent() const; | 43 | QString bugzillaComponent() const; | ||
39 | QString bugzillaVersion() const; | 44 | QString bugzillaVersion() const; | ||
40 | QStringList relatedBugzillaProducts() const; | 45 | QStringList relatedBugzillaProducts() const; | ||
41 | 46 | | |||
42 | bool bugzillaProductDisabled() const; | 47 | bool bugzillaProductDisabled() const; | ||
43 | bool bugzillaVersionDisabled() const; | 48 | bool bugzillaVersionDisabled() const; | ||
44 | 49 | | |||
45 | private Q_SLOTS: | 50 | private Q_SLOTS: | ||
46 | void checkProductInfo(const Product &); | 51 | void checkProductInfo(const Bugzilla::Product::Ptr); | ||
47 | 52 | | |||
48 | private: | 53 | private: | ||
49 | void map(const QString&); | 54 | void map(const QString&); | ||
50 | void mapUsingInternalFile(const QString&); | 55 | void mapUsingInternalFile(const QString&); | ||
51 | void getRelatedProductsUsingInternalFile(const QString&); | 56 | void getRelatedProductsUsingInternalFile(const QString&); | ||
52 | 57 | | |||
53 | QStringList m_relatedBugzillaProducts; | 58 | QStringList m_relatedBugzillaProducts; | ||
54 | QString m_bugzillaProduct; | 59 | QString m_bugzillaProduct; | ||
55 | QString m_bugzillaComponent; | 60 | QString m_bugzillaComponent; | ||
56 | 61 | | |||
57 | QString m_bugzillaVersionString; | 62 | QString m_bugzillaVersionString; | ||
58 | 63 | | |||
59 | const CrashedApplication * m_crashedAppPtr; | 64 | const CrashedApplication *m_crashedAppPtr = nullptr; | ||
60 | BugzillaManager * m_bugzillaManagerPtr = nullptr; | 65 | BugzillaManager *m_bugzillaManagerPtr = nullptr; | ||
61 | 66 | | |||
62 | bool m_bugzillaProductDisabled; | 67 | bool m_bugzillaProductDisabled; | ||
63 | bool m_bugzillaVersionDisabled; | 68 | bool m_bugzillaVersionDisabled; | ||
64 | | ||||
65 | }; | 69 | }; | ||
66 | 70 | | |||
67 | #endif | 71 | #endif |