Skip to content

Commit

Permalink
Add Report a Bug to the Help menu to assist in creating bug reports
Browse files Browse the repository at this point in the history
Signed-off-by: Werner Macho <werner.macho@gmail.com>
  • Loading branch information
mach0 authored and m-kuhn committed Nov 17, 2015
1 parent eeef84b commit 79616fd
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -1480,12 +1480,14 @@ void QgisApp::createActions()
#ifdef Q_OS_MAC
mActionHelpContents->setShortcut( QString( "Ctrl+?" ) );
mActionQgisHomePage->setShortcut( QString() );
mActionReportaBug->setShortcut( QString() );
#endif

mActionHelpContents->setEnabled( QFileInfo( QgsApplication::pkgDataPath() + "/doc/index.html" ).exists() );

connect( mActionHelpContents, SIGNAL( triggered() ), this, SLOT( helpContents() ) );
connect( mActionHelpAPI, SIGNAL( triggered() ), this, SLOT( apiDocumentation() ) );
connect( mActionReportaBug, SIGNAL( triggered() ), this, SLOT( reportaBug() ) );
connect( mActionNeedSupport, SIGNAL( triggered() ), this, SLOT( supportProviders() ) );
connect( mActionQgisHomePage, SIGNAL( triggered() ), this, SLOT( helpQgisHomePage() ) );
connect( mActionCheckQgisVersion, SIGNAL( triggered() ), this, SLOT( checkQgisVersion() ) );
Expand Down Expand Up @@ -8106,6 +8108,10 @@ void QgisApp::apiDocumentation()
}
}

void QgisApp::reportaBug()
{
openURL( tr( "https://qgis.org/en/site/getinvolved/development/index.html#bugs-features-and-issues" ), false );
}
void QgisApp::supportProviders()
{
openURL( tr( "https://qgis.org/en/site/forusers/commercial_support.html" ), false );
Expand Down
3 changes: 3 additions & 0 deletions src/app/qgisapp.h
Expand Up @@ -400,6 +400,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow

QAction *actionHelpContents() { return mActionHelpContents; }
QAction *actionHelpAPI() { return mActionHelpAPI; }
QAction *actionReportaBug() { return mActionReportaBug; }
QAction *actionQgisHomePage() { return mActionQgisHomePage; }
QAction *actionCheckQgisVersion() { return mActionCheckQgisVersion; }
QAction *actionAbout() { return mActionAbout; }
Expand Down Expand Up @@ -952,6 +953,8 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
void helpContents();
//! Open the API documentation in a browser
void apiDocumentation();
//! Open the Bugtracker page in a browser
void reportaBug();
//! Open the QGIS support page
void supportProviders();
//! Open the QGIS homepage in users browser
Expand Down
10 changes: 9 additions & 1 deletion src/ui/qgisapp.ui
Expand Up @@ -17,7 +17,7 @@
<x>0</x>
<y>0</y>
<width>1050</width>
<height>27</height>
<height>22</height>
</rect>
</property>
<property name="toolTip">
Expand Down Expand Up @@ -200,6 +200,9 @@
</property>
<addaction name="mActionHelpContents"/>
<addaction name="mActionHelpAPI"/>
<addaction name="separator"/>
<addaction name="mActionReportaBug"/>
<addaction name="separator"/>
<addaction name="mActionNeedSupport"/>
<addaction name="separator"/>
<addaction name="mActionQgisHomePage"/>
Expand Down Expand Up @@ -2376,6 +2379,11 @@ Acts on currently active editable layer</string>
<string>Add circular string by radius</string>
</property>
</action>
<action name="mActionReportaBug">
<property name="text">
<string>Report an issue</string>
</property>
</action>
</widget>
<resources>
<include location="../../images/images.qrc"/>
Expand Down

0 comments on commit 79616fd

Please sign in to comment.