Changeset View
Changeset View
Standalone View
Standalone View
src/bugzillaintegration/reportassistantpages_bugzilla_duplicates.h
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | 47 | public: | |||
---|---|---|---|---|---|
52 | void aboutToHide() override; | 52 | void aboutToHide() override; | ||
53 | 53 | | |||
54 | bool isComplete() override; | 54 | bool isComplete() override; | ||
55 | bool showNextPage() override; | 55 | bool showNextPage() override; | ||
56 | 56 | | |||
57 | private Q_SLOTS: | 57 | private Q_SLOTS: | ||
58 | /* Search related methods */ | 58 | /* Search related methods */ | ||
59 | void searchMore(); | 59 | void searchMore(); | ||
60 | void performSearch(); | | |||
61 | void stopCurrentSearch(); | 60 | void stopCurrentSearch(); | ||
62 | 61 | | |||
63 | void markAsSearching(bool); | 62 | void markAsSearching(bool); | ||
64 | 63 | | |||
65 | bool canSearchMore(); | 64 | bool canSearchMore(); | ||
66 | 65 | | |||
67 | void searchFinished(const BugMapList&); | 66 | void searchFinished(const QList<Bugzilla::Bug::Ptr> &); | ||
68 | void searchError(QString); | 67 | void searchError(QString); | ||
69 | void analyzedDuplicates(KJob *job); | 68 | void analyzedDuplicates(KJob *job); | ||
70 | 69 | | |||
71 | void resetDates(); | | |||
72 | | ||||
73 | /* Duplicates list related methods */ | 70 | /* Duplicates list related methods */ | ||
74 | void openSelectedReport(); | 71 | void openSelectedReport(); | ||
75 | void itemClicked(QTreeWidgetItem *, int); | 72 | void itemClicked(QTreeWidgetItem *, int); | ||
76 | void itemClicked(QListWidgetItem *); | 73 | void itemClicked(QListWidgetItem *); | ||
77 | void showReportInformationDialog(int, bool relatedButtonEnabled = true); | 74 | void showReportInformationDialog(int, bool relatedButtonEnabled = true); | ||
78 | void itemSelectionChanged(); | 75 | void itemSelectionChanged(); | ||
79 | 76 | | |||
80 | /* Selected duplicates list related methods */ | 77 | /* Selected duplicates list related methods */ | ||
81 | void addPossibleDuplicateNumber(int); | 78 | void addPossibleDuplicateNumber(int); | ||
82 | void removeSelectedDuplicate(); | 79 | void removeSelectedDuplicate(); | ||
83 | 80 | | |||
84 | void showDuplicatesPanel(bool); | 81 | void showDuplicatesPanel(bool); | ||
85 | 82 | | |||
86 | void possibleDuplicateSelectionChanged(); | 83 | void possibleDuplicateSelectionChanged(); | ||
87 | 84 | | |||
88 | /* Attach to bug related methods */ | 85 | /* Attach to bug related methods */ | ||
89 | void attachToBugReport(int); | 86 | void attachToBugReport(int); | ||
90 | void cancelAttachToBugReport(); | 87 | void cancelAttachToBugReport(); | ||
91 | void informationClicked(const QString &activatedLink); | 88 | void informationClicked(const QString &activatedLink); | ||
92 | 89 | | |||
93 | private: | 90 | private: | ||
94 | bool m_searching; | 91 | bool m_searching = false; | ||
95 | bool m_foundDuplicate; | 92 | bool m_foundDuplicate = false; | ||
96 | 93 | | |||
97 | Ui::AssistantPageBugzillaDuplicates ui; | 94 | Ui::AssistantPageBugzillaDuplicates ui; | ||
98 | 95 | | |||
99 | //Dates of current Results | | |||
100 | QDate m_startDate; | | |||
101 | QDate m_endDate; | | |||
102 | //Dates of searching process | | |||
103 | QDate m_searchingStartDate; | | |||
104 | QDate m_searchingEndDate; | | |||
105 | | ||||
106 | KGuiItem m_searchMoreGuiItem; | 96 | KGuiItem m_searchMoreGuiItem; | ||
107 | KGuiItem m_retrySearchGuiItem; | 97 | KGuiItem m_retrySearchGuiItem; | ||
108 | DuplicateFinderJob::Result m_result; | 98 | DuplicateFinderJob::Result m_result; | ||
99 | | ||||
100 | int m_offset = -1; | ||||
101 | bool m_atEnd = false; | ||||
109 | }; | 102 | }; | ||
110 | 103 | | |||
111 | /** Internal bug-info dialog **/ | 104 | /** Internal bug-info dialog **/ | ||
112 | class BugzillaReportInformationDialog : public QDialog | 105 | class BugzillaReportInformationDialog : public QDialog | ||
113 | { | 106 | { | ||
114 | Q_OBJECT | 107 | Q_OBJECT | ||
115 | 108 | | |||
116 | public: | 109 | public: | ||
117 | explicit BugzillaReportInformationDialog(BugzillaDuplicatesPage*parent=nullptr); | 110 | explicit BugzillaReportInformationDialog(BugzillaDuplicatesPage*parent=nullptr); | ||
118 | ~BugzillaReportInformationDialog() override; | 111 | ~BugzillaReportInformationDialog() override; | ||
119 | 112 | | |||
120 | void showBugReport(int bugNumber, bool relatedButtonEnabled = true); | 113 | void showBugReport(int bugNumber, bool relatedButtonEnabled = true); | ||
121 | 114 | | |||
122 | void markAsDuplicate(); | 115 | void markAsDuplicate(); | ||
123 | void attachToBugReport(); | 116 | void attachToBugReport(); | ||
124 | void cancelAssistant(); | 117 | void cancelAssistant(); | ||
125 | 118 | | |||
126 | private Q_SLOTS: | 119 | private Q_SLOTS: | ||
127 | void bugFetchFinished(BugReport,QObject *); | 120 | void bugFetchFinished(Bugzilla::Bug::Ptr bug, QObject *); | ||
121 | void onCommentsFetched(QList<Bugzilla::Comment::Ptr> bugComments, | ||||
122 | QObject *jobOwner); | ||||
123 | | ||||
128 | void bugFetchError(QString, QObject *); | 124 | void bugFetchError(QString, QObject *); | ||
129 | 125 | | |||
130 | void reloadReport(); | 126 | void reloadReport(); | ||
131 | 127 | | |||
132 | void relatedReportClicked(); | 128 | void relatedReportClicked(); | ||
133 | 129 | | |||
134 | void toggleShowOwnBacktrace(bool); | 130 | void toggleShowOwnBacktrace(bool); | ||
135 | 131 | | |||
136 | Q_SIGNALS: | 132 | Q_SIGNALS: | ||
137 | void possibleDuplicateSelected(int); | 133 | void possibleDuplicateSelected(int); | ||
138 | void attachToBugReportSelected(int); | 134 | void attachToBugReportSelected(int); | ||
139 | 135 | | |||
140 | private: | 136 | private: | ||
141 | Ui::AssistantPageBugzillaDuplicatesDialog ui; | 137 | Ui::AssistantPageBugzillaDuplicatesDialog ui; | ||
142 | bool m_relatedButtonEnabled; | 138 | bool m_relatedButtonEnabled; | ||
143 | BugzillaDuplicatesPage * m_parent; | 139 | BugzillaDuplicatesPage * m_parent; | ||
144 | 140 | | |||
145 | int m_bugNumber; | 141 | int m_bugNumber; | ||
146 | QString m_closedStateString; | 142 | QString m_closedStateString; | ||
147 | int m_duplicatesCount; | 143 | int m_duplicatesCount; | ||
148 | QPushButton* m_suggestButton; | 144 | QPushButton* m_suggestButton; | ||
145 | | ||||
146 | Bugzilla::Bug::Ptr m_bug = nullptr; | ||||
149 | }; | 147 | }; | ||
150 | 148 | | |||
151 | class BugzillaReportConfirmationDialog : public QDialog | 149 | class BugzillaReportConfirmationDialog : public QDialog | ||
152 | { | 150 | { | ||
153 | Q_OBJECT | 151 | Q_OBJECT | ||
154 | 152 | | |||
155 | public: | 153 | public: | ||
156 | BugzillaReportConfirmationDialog(int bugNumber, bool commonCrash, QString closedState, | 154 | BugzillaReportConfirmationDialog(int bugNumber, bool commonCrash, QString closedState, | ||
Show All 18 Lines |