QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
QGCVersionCheck Class Reference

#include <QGCVersionCheck.h>

+ Inheritance diagram for QGCVersionCheck:
+ Collaboration diagram for QGCVersionCheck:

Signals

void newStableVersionChanged ()
 

Public Member Functions

 QGCVersionCheck (QObject *parent=nullptr)
 
void start ()
 Starts the asynchronous download of the stable version file.
 
QString newStableVersion () const
 Newer stable version available for download, empty if none.
 

Static Public Member Functions

static QGCVersionCheck * instance ()
 
static bool isNewerVersion (const QString &currentVersion, const QString &latestVersion)
 
static bool shouldNotify (const QString &latestVersion, const QString &lastNotifiedVersion)
 

Detailed Description

Checks for a newer stable release and notifies the user once per new version. Versions are of the form "v<major>.<minor>.<patch>".

Definition at line 11 of file QGCVersionCheck.h.

Constructor & Destructor Documentation

◆ QGCVersionCheck()

QGCVersionCheck::QGCVersionCheck ( QObject *  parent = nullptr)
explicit

Definition at line 39 of file QGCVersionCheck.cc.

Member Function Documentation

◆ instance()

QGCVersionCheck * QGCVersionCheck::instance ( )
static

◆ isNewerVersion()

bool QGCVersionCheck::isNewerVersion ( const QString &  currentVersion,
const QString &  latestVersion 
)
static
Returns
true if latestVersion parses and is newer than currentVersion

Definition at line 48 of file QGCVersionCheck.cc.

◆ newStableVersion()

QString QGCVersionCheck::newStableVersion ( ) const
inline

Newer stable version available for download, empty if none.

Definition at line 24 of file QGCVersionCheck.h.

Referenced by QGroundControlQmlGlobal::newStableVersion().

◆ newStableVersionChanged

void QGCVersionCheck::newStableVersionChanged ( )
signal

◆ shouldNotify()

bool QGCVersionCheck::shouldNotify ( const QString &  latestVersion,
const QString &  lastNotifiedVersion 
)
static
Returns
true if the user has not yet been told about latestVersion (or anything newer)

Definition at line 55 of file QGCVersionCheck.cc.

Referenced by FirmwarePlugin::isStableFirmwareVersionUnseen().

◆ start()

void QGCVersionCheck::start ( )

Starts the asynchronous download of the stable version file.

Definition at line 66 of file QGCVersionCheck.cc.

References QGCFileDownload::errorString(), QGCFileDownload::finished(), QGCCorePlugin::instance(), QGCCorePlugin::stableVersionCheckFileUrl(), and QGCFileDownload::start().


The documentation for this class was generated from the following files: