Browse Source

Custom build override for stable version check no longer needed

QGC4.4
Don Gagne 7 years ago
parent
commit
9ada321257
  1. 10
      src/api/QGCCorePlugin.cc
  2. 7
      src/api/QGCCorePlugin.h

10
src/api/QGCCorePlugin.cc

@ -303,3 +303,13 @@ bool QGCCorePlugin::guidedActionsControllerLogging(void) const @@ -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
}

7
src/api/QGCCorePlugin.h

@ -113,15 +113,16 @@ public: @@ -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; }

Loading…
Cancel
Save