Added option to report bug on GH.
This commit is contained in:
parent
b264e95db4
commit
b8819c2d28
5 changed files with 54 additions and 12 deletions
|
@ -76,7 +76,8 @@ set(FILE_VERSION "2,0,0,1")
|
|||
set(APP_AUTHOR "Martin Rotter")
|
||||
set(APP_URL "http://bitbucket.org/skunkos/rssguard")
|
||||
set(APP_URL_ISSUES "http://bitbucket.org/skunkos/rssguard/issues")
|
||||
set(APP_URL_ISSUES_NEW "http://bitbucket.org/skunkos/rssguard/issues/new")
|
||||
set(APP_URL_ISSUES_NEW_GITHUB "https://github.com/martinrotter/rssguard/issues/new")
|
||||
set(APP_URL_ISSUES_NEW_BITBUCKET "http://bitbucket.org/skunkos/rssguard/issues/new")
|
||||
set(APP_EMAIL "rotter.martinos@gmail.com")
|
||||
set(MINIMUM_QT_VERSION 4.7.3)
|
||||
set(EXE_NAME ${APP_LOW_NAME})
|
||||
|
|
|
@ -31,7 +31,8 @@
|
|||
#define APP_EMAIL "@APP_EMAIL@"
|
||||
#define APP_URL "@APP_URL@"
|
||||
#define APP_URL_ISSUES "@APP_URL_ISSUES@"
|
||||
#define APP_URL_ISSUES_NEW "@APP_URL_ISSUES_NEW@"
|
||||
#define APP_URL_ISSUES_NEW_GITHUB "@APP_URL_ISSUES_NEW_GITHUB@"
|
||||
#define APP_URL_ISSUES_NEW_BITBUCKET "@APP_URL_ISSUES_NEW_BITBUCKET@"
|
||||
#define APP_VERSION "@APP_VERSION@"
|
||||
#define APP_USERAGENT QString("@APP_NAME@/@APP_VERSION@ (@APP_URL@) on @CMAKE_SYSTEM@")
|
||||
|
||||
|
|
|
@ -270,7 +270,8 @@ void FormMain::setupIcons() {
|
|||
m_ui->m_actionAboutGuard->setIcon(icon_theme_factory->fromTheme("application-about"));
|
||||
m_ui->m_actionCheckForUpdates->setIcon(icon_theme_factory->fromTheme("check-for-updates"));
|
||||
m_ui->m_actionDefragmentDatabase->setIcon(icon_theme_factory->fromTheme("defragment-database"));
|
||||
m_ui->m_actionReportBug->setIcon(icon_theme_factory->fromTheme("application-report-bug"));
|
||||
m_ui->m_actionReportBugGitHub->setIcon(icon_theme_factory->fromTheme("application-report-bug"));
|
||||
m_ui->m_actionReportBugBitBucket->setIcon(icon_theme_factory->fromTheme("application-report-bug"));
|
||||
m_ui->m_actionExportFeeds->setIcon(icon_theme_factory->fromTheme("document-export"));
|
||||
m_ui->m_actionImportFeeds->setIcon(icon_theme_factory->fromTheme("document-import"));
|
||||
|
||||
|
@ -394,7 +395,8 @@ void FormMain::createConnections() {
|
|||
// Menu "Help" connections.
|
||||
connect(m_ui->m_actionAboutGuard, SIGNAL(triggered()), this, SLOT(showAbout()));
|
||||
connect(m_ui->m_actionCheckForUpdates, SIGNAL(triggered()), this, SLOT(showUpdates()));
|
||||
connect(m_ui->m_actionReportBug, SIGNAL(triggered()), this, SLOT(reportABug()));
|
||||
connect(m_ui->m_actionReportBugGitHub, SIGNAL(triggered()), this, SLOT(reportABugOnGitHub()));
|
||||
connect(m_ui->m_actionReportBugBitBucket, SIGNAL(triggered()), this, SLOT(reportABugOnBitBucket()));
|
||||
|
||||
// General connections.
|
||||
connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(onAboutToQuit()));
|
||||
|
@ -501,8 +503,24 @@ void FormMain::showUpdates() {
|
|||
qApp->closeLock()->unlock();
|
||||
}
|
||||
|
||||
void FormMain::reportABug() {
|
||||
if (!WebFactory::instance()->openUrlInExternalBrowser(APP_URL_ISSUES_NEW)) {
|
||||
void FormMain::reportABugOnGitHub() {
|
||||
if (!WebFactory::instance()->openUrlInExternalBrowser(APP_URL_ISSUES_NEW_GITHUB)) {
|
||||
if (SystemTrayIcon::isSystemTrayActivated()) {
|
||||
qApp->trayIcon()->showMessage(tr("Cannot open external browser"),
|
||||
tr("Cannot open external browser. Navigate to application website manually."),
|
||||
QSystemTrayIcon::Warning);
|
||||
}
|
||||
else {
|
||||
MessageBox::show(this,
|
||||
QMessageBox::Warning,
|
||||
tr("Cannot open external browser"),
|
||||
tr("Cannot open external browser. Navigate to application website manually."));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FormMain::reportABugOnBitBucket() {
|
||||
if (!WebFactory::instance()->openUrlInExternalBrowser(APP_URL_ISSUES_NEW_BITBUCKET)) {
|
||||
if (SystemTrayIcon::isSystemTrayActivated()) {
|
||||
qApp->trayIcon()->showMessage(tr("Cannot open external browser"),
|
||||
tr("Cannot open external browser. Navigate to application website manually."),
|
||||
|
|
|
@ -113,7 +113,8 @@ class FormMain : public QMainWindow {
|
|||
void showSettings();
|
||||
void showAbout();
|
||||
void showUpdates();
|
||||
void reportABug();
|
||||
void reportABugOnGitHub();
|
||||
void reportABugOnBitBucket();
|
||||
|
||||
private:
|
||||
Ui::FormMain *m_ui;
|
||||
|
|
|
@ -15,7 +15,16 @@
|
|||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
|
@ -39,7 +48,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>979</width>
|
||||
<height>20</height>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="m_menuFile">
|
||||
|
@ -56,7 +65,8 @@
|
|||
<string>&Help</string>
|
||||
</property>
|
||||
<addaction name="m_actionCheckForUpdates"/>
|
||||
<addaction name="m_actionReportBug"/>
|
||||
<addaction name="m_actionReportBugGitHub"/>
|
||||
<addaction name="m_actionReportBugBitBucket"/>
|
||||
<addaction name="m_actionAboutGuard"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="m_menuView">
|
||||
|
@ -500,9 +510,12 @@
|
|||
<string notr="true">I</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="m_actionReportBug">
|
||||
<action name="m_actionReportBugGitHub">
|
||||
<property name="text">
|
||||
<string>Report a &bug...</string>
|
||||
<string>Report a &bug (GitHub)...</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</action>
|
||||
<action name="m_actionSwitchToolBars">
|
||||
|
@ -552,6 +565,14 @@
|
|||
<string>Exports feeds you want to selected file.</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="m_actionReportBugBitBucket">
|
||||
<property name="text">
|
||||
<string>Report a bug (BitBucket)...</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
|
Loading…
Add table
Reference in a new issue