Add "Feature Request..." entry and body templates in both types of issue

New entry under Help menu for requesting issues with the same template
used for a New Issue inside GitHub.

The "Bug Report..." entry has also been updated for adding the
corresponding template body.

Separators added in Help menu, since there are currently several different
options.

See related issue #1497
This commit is contained in:
mgrojo
2018-09-10 22:17:02 +02:00
parent dfa599de44
commit 5b4dea9b7c
3 changed files with 52 additions and 2 deletions

View File

@@ -2272,7 +2272,7 @@ void MainWindow::on_actionWiki_triggered()
QDesktopServices::openUrl(QUrl("https://github.com/sqlitebrowser/sqlitebrowser/wiki"));
}
// 'Help | Bug report...' link will add the system information and set the label 'bug' automatically to the issue
// 'Help | Bug Report...' link will set an appropiate body, add the system information and set the label 'bug' automatically to the issue
void MainWindow::on_actionBug_report_triggered()
{
const QString version = Application::versionString();
@@ -2288,7 +2288,17 @@ void MainWindow::on_actionBug_report_triggered()
else
sqlite_version = QString("SQLCipher Version ") + sqlcipher_version + QString(" (based on SQLite %1)").arg(sqlite_version);
const QString body = QString("\n\n\n\n\n\n\n\n> DB4S v%1 on %2 (%3/%4) [%5]\n> using %6\n> and Qt %7")
const QString body =
QString("Details for the issue\n"
"--------------------\n\n"
"#### What did you do?\n\n\n"
"#### What did you expect to see?\n\n\n"
"#### What did you see instead?\n\n\n"
"Useful extra information\n"
"-------------------------\n"
"> DB4S v%1 on %2 (%3/%4) [%5]\n"
"> using %6\n"
"> and Qt %7")
.arg(version, os, kernelType, kernelVersion, arch, sqlite_version, QT_VERSION_STR);
QUrlQuery query;
@@ -2300,6 +2310,29 @@ void MainWindow::on_actionBug_report_triggered()
QDesktopServices::openUrl(url);
}
// 'Help | Feature Request...' link will set an appropiate body and add the label 'enhancement' automatically to the issue
void MainWindow::on_actionFeature_Request_triggered()
{
const QString body =
QString("Describe the new feature\n"
"--------------------------\n\n\n"
"Additional info\n"
"---------------\n"
"Please answer these questions before submitting your feature request.\n\n"
"#### Is your feature request related to an issue? Please include the issue number.\n\n\n"
"#### Does this feature exist in another product or project? Please provide a link.\n\n\n"
"#### Do you have a screenshot? Please add screenshots to help explain your idea.\n");
QUrlQuery query;
query.addQueryItem("labels", "enhancement");
query.addQueryItem("body", body);
QUrl url("https://github.com/sqlitebrowser/sqlitebrowser/issues/new");
url.setQuery(query);
QDesktopServices::openUrl(url);
}
void MainWindow::on_actionSqlCipherFaq_triggered()
{
QDesktopServices::openUrl(QUrl("https://discuss.zetetic.net/c/sqlcipher/sqlcipher-faq"));

View File

@@ -269,6 +269,7 @@ private slots:
void checkNewVersion(const QString& versionstring, const QString& url);
void on_actionWiki_triggered();
void on_actionBug_report_triggered();
void on_actionFeature_Request_triggered();
void on_actionSqlCipherFaq_triggered();
void on_actionWebsite_triggered();
void on_actionDonatePatreon_triggered();

View File

@@ -1015,11 +1015,15 @@ You can drag SQL statements from an object row and drop them into other applicat
<string>&amp;Help</string>
</property>
<addaction name="helpWhatsThisAction"/>
<addaction name="separator"/>
<addaction name="actionWebsite"/>
<addaction name="actionWiki"/>
<addaction name="actionSqlCipherFaq"/>
<addaction name="separator"/>
<addaction name="actionBug_report"/>
<addaction name="actionFeature_Request"/>
<addaction name="actionDonatePatreon"/>
<addaction name="separator"/>
<addaction name="helpAboutAction"/>
</widget>
<widget class="QMenu" name="menuTools">
@@ -1763,6 +1767,18 @@ You can drag SQL statements from the Schema column and drop them into the SQL ed
<enum>QAction::NoRole</enum>
</property>
</action>
<action name="actionFeature_Request">
<property name="icon">
<iconset resource="icons/icons.qrc">
<normaloff>:/icons/browser_open</normaloff>:/icons/browser_open</iconset>
</property>
<property name="text">
<string>Feature Re&amp;quest...</string>
</property>
<property name="menuRole">
<enum>QAction::NoRole</enum>
</property>
</action>
<action name="actionWebsite">
<property name="icon">
<iconset resource="icons/icons.qrc">