Skip to content

Commit 817de2d

Browse files
karimMKleusberg
authored andcommitted
Update Report bug link to include the system information (#1388)
When reporting an issue from the application, via the menu 'Help | Bug report', the new link will add the label 'bug' and include the system information automatically. See issue #1386
1 parent 13d9f98 commit 817de2d

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

src/MainWindow.cpp

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "MainWindow.h"
22
#include "ui_MainWindow.h"
33

4+
#include "Application.h"
45
#include "EditIndexDialog.h"
56
#include "AboutDialog.h"
67
#include "EditTableDialog.h"
@@ -48,6 +49,7 @@
4849
#include <QShortcut>
4950
#include <QTextCodec>
5051
#include <QOpenGLWidget>
52+
#include <QUrlQuery>
5153

5254
MainWindow::MainWindow(QWidget* parent)
5355
: QMainWindow(parent),
@@ -2012,9 +2014,23 @@ void MainWindow::on_actionWiki_triggered()
20122014
QDesktopServices::openUrl(QUrl("https://github.com/sqlitebrowser/sqlitebrowser/wiki"));
20132015
}
20142016

2017+
// 'Help | Bug report...' link will add the system information and set the label 'bug' automatically to the issue
20152018
void MainWindow::on_actionBug_report_triggered()
20162019
{
2017-
QDesktopServices::openUrl(QUrl("https://github.com/sqlitebrowser/sqlitebrowser/issues/new"));
2020+
const QString version = Application::versionString();
2021+
const QString os = QSysInfo::prettyProductName();
2022+
const QString kernelType = QSysInfo::kernelType();
2023+
const QString kernelVersion = QSysInfo::kernelVersion();
2024+
const QString arch = QSysInfo::currentCpuArchitecture();
2025+
const QString body = QString("\n\n\n\n\n\n\n\n> DB4S v%1 on %2 (%3/%4) [%5]").arg(version, os, kernelType, kernelVersion, arch);
2026+
2027+
QUrlQuery query;
2028+
query.addQueryItem("labels", "bug");
2029+
query.addQueryItem("body", body);
2030+
2031+
QUrl url("https://github.com/sqlitebrowser/sqlitebrowser/issues/new");
2032+
url.setQuery(query);
2033+
QDesktopServices::openUrl(url);
20182034
}
20192035

20202036
void MainWindow::on_actionSqlCipherFaq_triggered()

0 commit comments

Comments
 (0)