From 9ada321257e732540a4a75ec98dbc480cbdb16f4 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Wed, 26 Sep 2018 09:39:35 -0700 Subject: [PATCH] Custom build override for stable version check no longer needed --- src/api/QGCCorePlugin.cc | 10 ++++++++++ src/api/QGCCorePlugin.h | 7 ++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/api/QGCCorePlugin.cc b/src/api/QGCCorePlugin.cc index 0338071ba..c625aa7b0 100644 --- a/src/api/QGCCorePlugin.cc +++ b/src/api/QGCCorePlugin.cc @@ -303,3 +303,13 @@ bool QGCCorePlugin::guidedActionsControllerLogging(void) const { return GuidedActionsControllerLog().isDebugEnabled(); } + +QString QGCCorePlugin::stableVersionCheckFileUrl(void) const +{ +#ifdef QGC_CUSTOM_BUILD + // Custom builds must override to turn on and provide their own location + return QString(); +#else + return QString("https://s3-us-west-2.amazonaws.com/qgroundcontrol/latest/QGC.version.txt"); +#endif +} diff --git a/src/api/QGCCorePlugin.h b/src/api/QGCCorePlugin.h index da1e5f356..22550cfca 100644 --- a/src/api/QGCCorePlugin.h +++ b/src/api/QGCCorePlugin.h @@ -113,15 +113,16 @@ public: virtual QmlObjectListModel* customMapItems(void); /// Returns the url to download the stable version check file. Return QString() to indicate no version check should be performed. - /// Default implemenentation returns QGC Stable file location. Custom builds must override to turn off or provide their own location. + /// Default QGC mainline implemenentation returns QGC Stable file location. Default QGC custom build code returns QString(). + /// Custom builds can override to turn on and provide their own location. /// The contents of this file should be a single line in the form: /// v3.4.4 /// This indicates the latest stable version number. - virtual QString stableVersionCheckFileUrl(void) { return QString("https://s3-us-west-2.amazonaws.com/qgroundcontrol/latest/QGC.version.txt"); } + virtual QString stableVersionCheckFileUrl(void) const; /// Returns the user visible url to show user where to download new stable builds from. /// Custom builds must override to provide their own location. - virtual QString stableDownloadLocation(void) { return QString("qgroundcontrol.com"); } + virtual QString stableDownloadLocation(void) const { return QString("qgroundcontrol.com"); } bool showTouchAreas(void) const { return _showTouchAreas; } bool showAdvancedUI(void) const { return _showAdvancedUI; } -- 2.22.0