GODT-175: Add option to attach logs for bug reports

This commit is contained in:
Alexander Bilyak
2021-10-11 13:24:41 +00:00
committed by Jakub
parent b259de238e
commit e49d2e1be7
11 changed files with 248 additions and 38 deletions

View File

@ -19,6 +19,8 @@
package qt
import "github.com/therecipe/qt/core"
func (f *FrontendQt) setVersion() {
f.qml.SetVersion(f.programVersion)
}
@ -41,5 +43,21 @@ func (f *FrontendQt) setCurrentEmailClient() {
}
func (f *FrontendQt) reportBug(description, address, emailClient string, includeLogs bool) {
//TODO
defer f.qml.ReportBugFinished()
if err := f.bridge.ReportBug(
core.QSysInfo_ProductType(),
core.QSysInfo_PrettyProductName(),
description,
"Unknown account",
address,
emailClient,
includeLogs,
); err != nil {
f.log.WithError(err).Error("Failed to report bug")
f.qml.BugReportSendError()
return
}
f.qml.BugReportSendSuccess()
}

View File

@ -74,7 +74,7 @@ type User interface {
type Bridger interface {
UserManager
ReportBug(osType, osVersion, description, accountName, address, emailClient string) error
ReportBug(osType, osVersion, description, accountName, address, emailClient string, attachLogs bool) error
AllowProxy()
DisallowProxy()
EnableCache() error