Move Strava secrets to Secrets and make Pages.cpp more robust incase Secrets.h gets picked up along the way in the future.

This commit is contained in:
Magnus Gille
2016-01-07 01:34:19 -05:00
parent 78834c1bfc
commit 08dca02f13
3 changed files with 9 additions and 6 deletions

View File

@@ -42,6 +42,7 @@
#include "GoogleDrive.h"
#endif
#include "LocalFileStore.h"
#include "Secrets.h"
//
// Main Config Page - tabs for each sub-page
@@ -522,7 +523,7 @@ CredentialsPage::CredentialsPage(QWidget *parent, Context *context) : QScrollAre
stravaAuthorise = new QPushButton(tr("Authorise"), this);
#ifndef GC_STRAVA_CLIENT_SECRET
#ifdef GC_STRAVA_NO_CLIENT
stravaAuthorise->setEnabled(false);
#endif

View File

@@ -63,8 +63,15 @@
#define GC_DROPBOX_CLIENT_SECRET "__GC_DROPBOX_CLIENT_SECRET__"
#endif
//Strava / see also Athlete parameter, default value.
#ifndef GC_STRAVA_CLIENT_ID
#define GC_STRAVA_CLIENT_ID "83" // client id
#endif
#ifndef GC_STRAVA_CLIENT_SECRET
#define GC_STRAVA_CLIENT_SECRET "__GC_STRAVA_CLIENT_SECRET__"
#define GC_STRAVA_NO_CLIENT
#endif
#ifndef GC_CYCLINGANALYTICS_CLIENT_SECRET

View File

@@ -42,11 +42,6 @@
//Google Calendar-CALDAV oauthkeys / see also Athlete parameter
#define GC_GOOGLE_CALENDAR_CLIENT_ID "426009671216-c588t1u6hafep30tfs7g0g1nuo72s8ko.apps.googleusercontent.com"
//Strava / see also Athlete parameter
#ifndef GC_STRAVA_CLIENT_ID
#define GC_STRAVA_CLIENT_ID "83" // client id
#endif
//Cycling Analytics / see also Athlete parameter
#define GC_CYCLINGANALYTICS_CLIENT_ID "1504958" // app id