diff --git a/src/api/QGCCorePlugin.cc b/src/api/QGCCorePlugin.cc index 0338071bae606def913378968d5826a44ca6eb61..c625aa7b046e04d214d70aaf3dc1b44d677e5765 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 da1e5f3567f82db8bec09bb2935a191bf095f087..22550cfca861152320c4c7bbccf93104ebb328fd 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; }