Fix QAction for Download Chart...

.. a snafu using the same action twice for add chart and then
   for download chart in chartbar/mainwindow
This commit is contained in:
Mark Liversedge
2016-05-29 21:41:20 +01:00
parent 1d68627177
commit 72fde27565
3 changed files with 4 additions and 4 deletions

View File

@@ -124,8 +124,8 @@ ChartBar::ChartBar(Context *context) : QWidget(context->mainWindow), context(con
chartMenu = barMenu->addMenu(tr("Add Chart"));
#ifdef GC_HAS_CLOUD_DB
barMenu->addAction(tr("Download Chart..."));
connect(barMenu, SIGNAL(triggered(QAction*)), context->mainWindow, SLOT(addChartFromCloudDB(QAction*)));
QAction *cloudAction = barMenu->addAction(tr("Download Chart..."));
connect(cloudAction, SIGNAL(triggered(bool)), context->mainWindow, SLOT(addChartFromCloudDB()));
#endif
// menu
connect(menuButton, SIGNAL(clicked()), this, SLOT(menuPopup()));

View File

@@ -913,7 +913,7 @@ MainWindow::addChart(QAction*action)
#ifdef GC_HAS_CLOUD_DB
void
MainWindow::addChartFromCloudDB(QAction*)
MainWindow::addChartFromCloudDB()
{
if (!(appsettings->cvalue(currentTab->context->athlete->cyclist, GC_CLOUDDB_TC_ACCEPTANCE, false).toBool())) {
CloudDBAcceptConditionsDialog acceptDialog(currentTab->context->athlete->cyclist);

View File

@@ -233,7 +233,7 @@ class MainWindow : public QMainWindow
void cloudDBuserEditChart();
void cloudDBcuratorEditChart();
void cloudDBshowStatus();
void addChartFromCloudDB(QAction *);
void addChartFromCloudDB();
#endif
// save and restore state to context
void saveGCState(Context *);