Seamly2D
Code documentation
FvUpdater Class Reference

#include <fvupdater.h>

Inheritance diagram for FvUpdater:
Collaboration diagram for FvUpdater:

Public Slots

bool CheckForUpdates (bool silentAsMuchAsItCouldGet=true)
 
bool CheckForUpdatesSilent ()
 
bool CheckForUpdatesNotSilent ()
 

Signals

void setProgress (int)
 

Public Member Functions

void SetFeedURL (const QUrl &feedURL)
 
void SetFeedURL (const QString &feedURL)
 
QString GetFeedURL () const
 
bool IsDropOnFinish () const
 
void SetDropOnFinish (bool value)
 

Static Public Member Functions

static FvUpdatersharedUpdater ()
 
static void drop ()
 

Private Slots

void httpFeedDownloadFinished ()
 
void networkError (QNetworkReply::NetworkError)
 
void getFileSize ()
 

Private Member Functions

 FvUpdater ()
 
virtual ~FvUpdater ()
 
void startDownloadFeed (const QUrl &url)
 
void startDownloadFile (QUrl url, QString name)
 
void fileDownloadFinished (QFile *downloadedFile, QString name)
 
void cancelDownloadFeed ()
 
void showErrorDialog (const QString &message, bool showEvenInSilentMode=false)
 
void showInformationDialog (const QString &message, bool showEvenInSilentMode=false)
 
bool showConfirmationDialog (const QString &message, bool showEvenInSilentMode=false)
 
bool releaseIsNewer (const QString &releaseTag)
 
void getPLatformSpecificInstaller (QJsonArray assets)
 

Private Attributes

bool m_silentAsMuchAsItCouldGet
 
QUrl m_feedURL
 
QNetworkAccessManager m_qnam
 
QPointer< QNetworkReply > m_reply
 
bool m_httpRequestAborted
 
bool m_dropOnFinish
 
int m_fileSize {}
 
QString m_releaseName {}
 

Static Private Attributes

static QPointer< FvUpdaterm_Instance
 

Friends

class FvUpdateWindow
 

Detailed Description

Definition at line 48 of file fvupdater.h.

Constructor & Destructor Documentation

◆ FvUpdater()

FvUpdater::FvUpdater ( )
private

Definition at line 82 of file fvupdater.cpp.

Referenced by sharedUpdater().

Member Function Documentation

◆ cancelDownloadFeed()

void FvUpdater::cancelDownloadFeed ( )
private

Definition at line 305 of file fvupdater.cpp.

References m_httpRequestAborted, and m_reply.

Referenced by CheckForUpdates().

◆ CheckForUpdates

bool FvUpdater::CheckForUpdates ( bool  silentAsMuchAsItCouldGet = true)
slot

◆ CheckForUpdatesNotSilent

bool FvUpdater::CheckForUpdatesNotSilent ( )
slot

Definition at line 172 of file fvupdater.cpp.

References CheckForUpdates(), drop(), and m_dropOnFinish.

◆ CheckForUpdatesSilent

bool FvUpdater::CheckForUpdatesSilent ( )
slot

Definition at line 155 of file fvupdater.cpp.

References CheckForUpdates(), drop(), m_dropOnFinish, and qApp.

◆ drop()

void FvUpdater::drop ( )
static

Definition at line 74 of file fvupdater.cpp.

References m_Instance.

Referenced by CheckForUpdatesNotSilent(), CheckForUpdatesSilent(), and httpFeedDownloadFinished().

◆ fileDownloadFinished()

void FvUpdater::fileDownloadFinished ( QFile *  downloadedFile,
QString  name 
)
private

◆ GetFeedURL()

QString FvUpdater::GetFeedURL ( ) const

Definition at line 103 of file fvupdater.cpp.

References m_feedURL.

◆ getFileSize

void FvUpdater::getFileSize ( )
privateslot

Definition at line 180 of file fvupdater.cpp.

References m_fileSize, and m_reply.

Referenced by startDownloadFile().

◆ getPLatformSpecificInstaller()

void FvUpdater::getPLatformSpecificInstaller ( QJsonArray  assets)
private

Definition at line 357 of file fvupdater.cpp.

References startDownloadFile().

Referenced by httpFeedDownloadFinished().

◆ httpFeedDownloadFinished

◆ IsDropOnFinish()

bool FvUpdater::IsDropOnFinish ( ) const

Definition at line 106 of file fvupdater.cpp.

References m_dropOnFinish.

◆ networkError

void FvUpdater::networkError ( QNetworkReply::NetworkError  )
privateslot

Definition at line 450 of file fvupdater.cpp.

References m_fileSize, m_reply, setProgress(), and showErrorDialog().

Referenced by startDownloadFile().

◆ releaseIsNewer()

bool FvUpdater::releaseIsNewer ( const QString &  releaseTag)
private

Definition at line 440 of file fvupdater.cpp.

References m_releaseName.

Referenced by httpFeedDownloadFinished().

◆ SetDropOnFinish()

void FvUpdater::SetDropOnFinish ( bool  value)

Definition at line 109 of file fvupdater.cpp.

References m_dropOnFinish.

◆ SetFeedURL() [1/2]

void FvUpdater::SetFeedURL ( const QString &  feedURL)

Definition at line 98 of file fvupdater.cpp.

References SetFeedURL().

◆ SetFeedURL() [2/2]

void FvUpdater::SetFeedURL ( const QUrl &  feedURL)

Definition at line 95 of file fvupdater.cpp.

References m_feedURL.

Referenced by SetFeedURL().

◆ setProgress

void FvUpdater::setProgress ( int  )
signal

◆ sharedUpdater()

FvUpdater * FvUpdater::sharedUpdater ( )
static

Definition at line 62 of file fvupdater.cpp.

References FvUpdater(), and m_Instance.

◆ showConfirmationDialog()

bool FvUpdater::showConfirmationDialog ( const QString &  message,
bool  showEvenInSilentMode = false 
)
private

Definition at line 420 of file fvupdater.cpp.

References m_silentAsMuchAsItCouldGet.

Referenced by httpFeedDownloadFinished().

◆ showErrorDialog()

void FvUpdater::showErrorDialog ( const QString &  message,
bool  showEvenInSilentMode = false 
)
private

◆ showInformationDialog()

void FvUpdater::showInformationDialog ( const QString &  message,
bool  showEvenInSilentMode = false 
)
private

Definition at line 404 of file fvupdater.cpp.

References m_silentAsMuchAsItCouldGet.

Referenced by fileDownloadFinished(), and httpFeedDownloadFinished().

◆ startDownloadFeed()

void FvUpdater::startDownloadFeed ( const QUrl &  url)
private

Definition at line 278 of file fvupdater.cpp.

References m_qnam, and m_reply.

Referenced by CheckForUpdates(), and httpFeedDownloadFinished().

◆ startDownloadFile()

void FvUpdater::startDownloadFile ( QUrl  url,
QString  name 
)
private

◆ ~FvUpdater()

FvUpdater::~FvUpdater ( )
privatevirtual

Definition at line 90 of file fvupdater.cpp.

References m_reply.

Friends And Related Function Documentation

◆ FvUpdateWindow

friend class FvUpdateWindow
friend

Definition at line 74 of file fvupdater.h.

Member Data Documentation

◆ m_dropOnFinish

bool FvUpdater::m_dropOnFinish
private

◆ m_feedURL

QUrl FvUpdater::m_feedURL
private

◆ m_fileSize

int FvUpdater::m_fileSize {}
private

Definition at line 108 of file fvupdater.h.

Referenced by fileDownloadFinished(), getFileSize(), and networkError().

◆ m_httpRequestAborted

bool FvUpdater::m_httpRequestAborted
private

◆ m_Instance

QPointer< FvUpdater > FvUpdater::m_Instance
staticprivate

Definition at line 93 of file fvupdater.h.

Referenced by drop(), and sharedUpdater().

◆ m_qnam

QNetworkAccessManager FvUpdater::m_qnam
private

Definition at line 104 of file fvupdater.h.

Referenced by startDownloadFeed(), and startDownloadFile().

◆ m_releaseName

QString FvUpdater::m_releaseName {}
private

Definition at line 109 of file fvupdater.h.

Referenced by releaseIsNewer(), and startDownloadFile().

◆ m_reply

QPointer<QNetworkReply> FvUpdater::m_reply
private

◆ m_silentAsMuchAsItCouldGet

bool FvUpdater::m_silentAsMuchAsItCouldGet
private

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