From a74c2f9c382644d2fc79b74ded25a640de91b6cd Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Sun, 27 Nov 2016 12:10:57 +0000 Subject: [PATCH] Deprecate TrainingPeaks .. from December 7th 2016 read access (for downloading from TrainingPeaks) has been revoked, even for paid up members. .. write access (upload) is not revoked. .. This is essentially anti-competitive behaviour and returns TrainingPeaks and their products, once again to that of a 'closed' product. .. We will no longer support their service since we cannot and will not promote such behaviours now or ever. .. We are now considering the best way to purge all other references to their trademarks and remove any indication that their products are endorsed. --- {src/Cloud => deprecated}/TPDownload.cpp | 0 {src/Cloud => deprecated}/TPDownload.h | 0 .../Cloud => deprecated}/TPDownloadDialog.cpp | 0 {src/Cloud => deprecated}/TPDownloadDialog.h | 0 {src/Cloud => deprecated}/TPUpload.cpp | 0 {src/Cloud => deprecated}/TPUpload.h | 0 {src/Cloud => deprecated}/TPUploadDialog.cpp | 0 {src/Cloud => deprecated}/TPUploadDialog.h | 0 src/Core/Settings.cpp | 3 -- src/Core/Settings.h | 3 -- src/Gui/MainWindow.cpp | 32 -------------- src/Gui/MainWindow.h | 4 -- src/Gui/Pages.cpp | 43 ------------------- src/Gui/Pages.h | 5 --- src/src.pro | 6 +-- 15 files changed, 2 insertions(+), 94 deletions(-) rename {src/Cloud => deprecated}/TPDownload.cpp (100%) rename {src/Cloud => deprecated}/TPDownload.h (100%) rename {src/Cloud => deprecated}/TPDownloadDialog.cpp (100%) rename {src/Cloud => deprecated}/TPDownloadDialog.h (100%) rename {src/Cloud => deprecated}/TPUpload.cpp (100%) rename {src/Cloud => deprecated}/TPUpload.h (100%) rename {src/Cloud => deprecated}/TPUploadDialog.cpp (100%) rename {src/Cloud => deprecated}/TPUploadDialog.h (100%) diff --git a/src/Cloud/TPDownload.cpp b/deprecated/TPDownload.cpp similarity index 100% rename from src/Cloud/TPDownload.cpp rename to deprecated/TPDownload.cpp diff --git a/src/Cloud/TPDownload.h b/deprecated/TPDownload.h similarity index 100% rename from src/Cloud/TPDownload.h rename to deprecated/TPDownload.h diff --git a/src/Cloud/TPDownloadDialog.cpp b/deprecated/TPDownloadDialog.cpp similarity index 100% rename from src/Cloud/TPDownloadDialog.cpp rename to deprecated/TPDownloadDialog.cpp diff --git a/src/Cloud/TPDownloadDialog.h b/deprecated/TPDownloadDialog.h similarity index 100% rename from src/Cloud/TPDownloadDialog.h rename to deprecated/TPDownloadDialog.h diff --git a/src/Cloud/TPUpload.cpp b/deprecated/TPUpload.cpp similarity index 100% rename from src/Cloud/TPUpload.cpp rename to deprecated/TPUpload.cpp diff --git a/src/Cloud/TPUpload.h b/deprecated/TPUpload.h similarity index 100% rename from src/Cloud/TPUpload.h rename to deprecated/TPUpload.h diff --git a/src/Cloud/TPUploadDialog.cpp b/deprecated/TPUploadDialog.cpp similarity index 100% rename from src/Cloud/TPUploadDialog.cpp rename to deprecated/TPUploadDialog.cpp diff --git a/src/Cloud/TPUploadDialog.h b/deprecated/TPUploadDialog.h similarity index 100% rename from src/Cloud/TPUploadDialog.h rename to deprecated/TPUploadDialog.h diff --git a/src/Core/Settings.cpp b/src/Core/Settings.cpp index 6e9927d6c..28e1a66c6 100644 --- a/src/Core/Settings.cpp +++ b/src/Core/Settings.cpp @@ -700,9 +700,6 @@ GSettings::upgradeAthlete(QString athlete) { } // --- private --- // - migrateCValue(athlete, GC_TPUSER); - migrateCValue(athlete, GC_TPPASS); - migrateCValue(athlete, GC_TPTYPE); migrateCValue(athlete, GC_RWGPSUSER); migrateCValue(athlete, GC_RWGPSPASS); migrateCValue(athlete, GC_VELOHEROUSER); diff --git a/src/Core/Settings.h b/src/Core/Settings.h index 175f90981..c55d94424 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -250,9 +250,6 @@ // Default view on Diary #define GC_DIARY_VIEW "diaryview" -#define GC_TPUSER "tp/user" -#define GC_TPPASS "tp/pass" -#define GC_TPTYPE "tp/type" #define GC_RWGPSUSER "rwgps/user" #define GC_RWGPSPASS "rwgps/pass" #define GC_TTBUSER "ttb/user" diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index a908a66cb..66010e643 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -72,10 +72,6 @@ #include "WorkoutWizard.h" #include "ErgDBDownloadDialog.h" #include "AddDeviceWizard.h" -#ifdef GC_HAVE_SOAP -#include "TPUploadDialog.h" -#include "TPDownloadDialog.h" -#endif #ifdef GC_HAVE_ICAL #include "CalDAV.h" #endif @@ -455,11 +451,6 @@ MainWindow::MainWindow(const QDir &home) shareMenu->addAction(tr("Synchronise GoogleDrive..."), this, SLOT(syncGoogleDrive()), tr("Ctrl+P")); #endif -#ifdef GC_HAVE_SOAP - shareMenu->addSeparator (); - shareMenu->addAction(tr("&Upload to TrainingPeaks"), this, SLOT(uploadTP()), tr("Ctrl+T")); - shareMenu->addAction(tr("Synchronise TrainingPeaks..."), this, SLOT(downloadTP()), tr("Ctrl+L")); -#endif HelpWhatsThis *helpShare = new HelpWhatsThis(rideMenu); shareMenu->setWhatsThis(helpShare->getWhatsThisText(HelpWhatsThis::MenuBar_Share)); @@ -2088,29 +2079,6 @@ MainWindow::syncLocalFileStore() } -/*---------------------------------------------------------------------- - * TrainingPeaks.com - *--------------------------------------------------------------------*/ - -#ifdef GC_HAVE_SOAP -void -MainWindow::uploadTP() -{ - if (currentTab->context->ride) { - TPUploadDialog uploader(currentTab->context->athlete->cyclist, currentTab->context->ride->ride(), currentTab->context); - uploader.exec(); - } -} - -void -MainWindow::downloadTP() -{ - TPDownloadDialog downloader(currentTab->context); - downloader.exec(); -} -#endif - - /*---------------------------------------------------------------------- * Utility *--------------------------------------------------------------------*/ diff --git a/src/Gui/MainWindow.h b/src/Gui/MainWindow.h index 5846b08b8..a20c65582 100644 --- a/src/Gui/MainWindow.h +++ b/src/Gui/MainWindow.h @@ -203,10 +203,6 @@ class MainWindow : public QMainWindow #endif void share(); void manualProcess(QString); -#ifdef GC_HAVE_SOAP - void uploadTP(); - void downloadTP(); -#endif #if QT_VERSION > 0x050000 void uploadDropbox(); void syncDropbox(); diff --git a/src/Gui/Pages.cpp b/src/Gui/Pages.cpp index e09225060..56b9fb64d 100644 --- a/src/Gui/Pages.cpp +++ b/src/Gui/Pages.cpp @@ -373,46 +373,6 @@ CredentialsPage::CredentialsPage(QWidget *parent, Context *context) : QScrollAre QPixmap passwords = QPixmap(":/images/toolbar/passwords.png"); - ////////////////////////////////////////////////// - // TrainingPeaks - - QLabel *tp = new QLabel(tr("TrainingPeaks")); - tp->setFont(current); - - QLabel *userLabel = new QLabel(tr("Username")); - QLabel *passLabel = new QLabel(tr("Password")); - QLabel *typeLabel = new QLabel(tr("Account Type")); - - tpUser = new QLineEdit(this); - tpUser->setText(appsettings->cvalue(context->athlete->cyclist, GC_TPUSER, "").toString()); - - tpPass = new QLineEdit(this); - tpPass->setEchoMode(QLineEdit::Password); - tpPass->setText(appsettings->cvalue(context->athlete->cyclist, GC_TPPASS, "").toString()); - - tpType = new QComboBox(this); - tpType->addItem("Shared Free"); - tpType->addItem("Coached Free"); - tpType->addItem("Self Coached Premium"); - tpType->addItem("Shared Self Coached Premium"); - tpType->addItem("Coached Premium"); - tpType->addItem("Shared Coached Premium"); - - tpType->setCurrentIndex(appsettings->cvalue(context->athlete->cyclist, GC_TPTYPE, "0").toInt()); - - grid->addWidget(tp, row, 0); - - grid->addWidget(userLabel, ++row, 0); - grid->addWidget(tpUser, row, 1, Qt::AlignLeft | Qt::AlignVCenter); - - grid->addWidget(passLabel, ++row, 0); - grid->addWidget(tpPass, row, 1, Qt::AlignLeft | Qt::AlignVCenter); - - grid->addWidget(typeLabel, ++row, 0); - grid->addWidget(tpType, row, 1, Qt::AlignLeft | Qt::AlignVCenter); - - - ////////////////////////////////////////////////// // Twitter #ifdef GC_HAVE_KQOAUTH @@ -1089,8 +1049,6 @@ void CredentialsPage::dvCALDAVTypeChanged(int type) qint32 CredentialsPage::saveClicked() { - appsettings->setCValue(context->athlete->cyclist, GC_TPUSER, tpUser->text()); - appsettings->setCValue(context->athlete->cyclist, GC_TPPASS, tpPass->text()); appsettings->setCValue(context->athlete->cyclist, GC_RWGPSUSER, rideWithGPSUser->text()); appsettings->setCValue(context->athlete->cyclist, GC_RWGPSPASS, rideWithGPSPass->text()); appsettings->setCValue(context->athlete->cyclist, GC_TTBUSER, ttbUser->text()); @@ -1101,7 +1059,6 @@ CredentialsPage::saveClicked() appsettings->setCValue(context->athlete->cyclist, GC_SPORTPLUSHEALTHPASS, sphPass->text()); appsettings->setCValue(context->athlete->cyclist, GC_SELUSER, selUser->text()); appsettings->setCValue(context->athlete->cyclist, GC_SELPASS, selPass->text()); - appsettings->setCValue(context->athlete->cyclist, GC_TPTYPE, tpType->currentIndex()); appsettings->setCValue(context->athlete->cyclist, GC_WIURL, wiURL->text()); appsettings->setCValue(context->athlete->cyclist, GC_WIUSER, wiUser->text()); appsettings->setCValue(context->athlete->cyclist, GC_WIKEY, wiPass->text()); diff --git a/src/Gui/Pages.h b/src/Gui/Pages.h index 6b6b76e0c..56693655a 100644 --- a/src/Gui/Pages.h +++ b/src/Gui/Pages.h @@ -250,11 +250,6 @@ class CredentialsPage : public QScrollArea Context *context; - QLineEdit *tpUser; - QLineEdit *tpPass; - QComboBox *tpType; - QPushButton *tpTest; - #ifdef GC_HAVE_KQOAUTH QPushButton *twitterAuthorise; #endif diff --git a/src/src.pro b/src/src.pro index 722f30ef8..c40b9b601 100644 --- a/src/src.pro +++ b/src/src.pro @@ -659,8 +659,7 @@ HEADERS += Charts/Aerolab.h Charts/AerolabWindow.h Charts/AllPlot.h Charts/AllPl # cloud services HEADERS += Cloud/CalendarDownload.h Cloud/FileStore.h Cloud/LocalFileStore.h Cloud/OAuthDialog.h Cloud/ShareDialog.h \ - Cloud/SportPlusHealthUploader.h Cloud/TPDownloadDialog.h Cloud/TPDownload.h Cloud/TPUploadDialog.h Cloud/TPUpload.h \ - Cloud/TrainingstagebuchUploader.h Cloud/VeloHeroUploader.h Cloud/WithingsDownload.h + Cloud/SportPlusHealthUploader.h Cloud/TrainingstagebuchUploader.h Cloud/VeloHeroUploader.h Cloud/WithingsDownload.h # core data HEADERS += Core/Athlete.h Core/Context.h Core/DataFilter.h Core/FreeSearch.h Core/GcCalendarModel.h Core/GcUpgrade.h \ Core/IdleTimer.h Core/IntervalItem.h Core/NamedSearch.h Core/RideCache.h Core/RideCacheModel.h Core/RideDB.h \ @@ -737,8 +736,7 @@ SOURCES += Charts/Aerolab.cpp Charts/AerolabWindow.cpp Charts/AllPlot.cpp Charts ## Cloud Services / Web resources SOURCES += Cloud/CalendarDownload.cpp Cloud/FileStore.cpp Cloud/LocalFileStore.cpp Cloud/OAuthDialog.cpp Cloud/ShareDialog.cpp \ - Cloud/SportPlusHealthUploader.cpp Cloud/TPDownload.cpp Cloud/TPDownloadDialog.cpp Cloud/TPUpload.cpp Cloud/TPUploadDialog.cpp \ - Cloud/TrainingstagebuchUploader.cpp Cloud/VeloHeroUploader.cpp Cloud/WithingsDownload.cpp + Cloud/SportPlusHealthUploader.cpp Cloud/TrainingstagebuchUploader.cpp Cloud/VeloHeroUploader.cpp Cloud/WithingsDownload.cpp ## Core Data Structures SOURCES += Core/Athlete.cpp Core/Context.cpp Core/DataFilter.cpp Core/FreeSearch.cpp Core/GcUpgrade.cpp Core/IdleTimer.cpp \