iOS support
This commit is contained in:
parent
9ecad33138
commit
0104c18332
@ -195,7 +195,12 @@ void DownloadDialog::updateProgress (qint64 received, qint64 total) {
|
||||
}
|
||||
|
||||
void DownloadDialog::ignoreSslErrors (QNetworkReply *reply, const QList<QSslError> &error) {
|
||||
#ifndef Q_OS_IOS
|
||||
reply->ignoreSslErrors (error);
|
||||
#else
|
||||
Q_UNUSED (reply);
|
||||
Q_UNUSED (error);
|
||||
#endif
|
||||
}
|
||||
|
||||
float DownloadDialog::roundNumber (const float &input) {
|
||||
|
@ -13,13 +13,11 @@
|
||||
|
||||
#include <math.h>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
namespace Ui {
|
||||
class DownloadDialog;
|
||||
}
|
||||
|
||||
class DownloadDialog : public QWidget
|
||||
{
|
||||
class DownloadDialog : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
@ -193,5 +193,10 @@ void QSimpleUpdater::processDownloadedChangelog (QNetworkReply *reply) {
|
||||
}
|
||||
|
||||
void QSimpleUpdater::ignoreSslErrors (QNetworkReply *reply, const QList<QSslError> &error) {
|
||||
#ifndef Q_OS_IOS
|
||||
reply->ignoreSslErrors (error);
|
||||
#else
|
||||
Q_UNUSED (reply);
|
||||
Q_UNUSED (error);
|
||||
#endif
|
||||
}
|
@ -16,62 +16,61 @@
|
||||
|
||||
#include "dialogs/download_dialog.h"
|
||||
|
||||
class QSimpleUpdater : public QObject
|
||||
{
|
||||
class QSimpleUpdater : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QSimpleUpdater (QObject *parent = 0);
|
||||
|
||||
/// Returns the downloaded change log
|
||||
/// Returns the downloaded change log
|
||||
QString changeLog() const;
|
||||
|
||||
/// Returns the downloaded version string
|
||||
QString latestVersion() const;
|
||||
/// Returns the downloaded version string
|
||||
QString latestVersion() const;
|
||||
|
||||
/// Returns the local version, referenced by
|
||||
/// the setApplicationVersion() function
|
||||
/// Returns the local version, referenced by
|
||||
/// the setApplicationVersion() function
|
||||
QString installedVersion() const;
|
||||
|
||||
/// Returns \c true if there's a newer version available
|
||||
bool newerVersionAvailable() const;
|
||||
/// Returns \c true if there's a newer version available
|
||||
bool newerVersionAvailable() const;
|
||||
|
||||
/// Checks for updates and calls the appropriate
|
||||
/// signals when finished
|
||||
/// Checks for updates and calls the appropriate
|
||||
/// signals when finished
|
||||
void checkForUpdates();
|
||||
|
||||
/// Opens the download URL in a a web browser.
|
||||
/// The URL is referenced by the \c setDownloadUrl() function
|
||||
/// Opens the download URL in a a web browser.
|
||||
/// The URL is referenced by the \c setDownloadUrl() function
|
||||
void openDownloadLink();
|
||||
|
||||
/// Shows a dialog that downloads the file in the
|
||||
/// URL referenced by the \c setDownloadUrl() function
|
||||
/// Shows a dialog that downloads the file in the
|
||||
/// URL referenced by the \c setDownloadUrl() function
|
||||
void downloadLatestVersion();
|
||||
|
||||
public slots:
|
||||
|
||||
/// Changes the URL that we can open in a web browser or
|
||||
/// download. Its recommended to use fixed URLs if you
|
||||
/// want to automatically download and install your updates
|
||||
/// Changes the URL that we can open in a web browser or
|
||||
/// download. Its recommended to use fixed URLs if you
|
||||
/// want to automatically download and install your updates
|
||||
void setDownloadUrl (const QString &url);
|
||||
|
||||
/// Changes the reference URL, which contains ONLY the latest
|
||||
/// version of your application as a plain text file.
|
||||
/// Examples include:
|
||||
/// - 1.2.3
|
||||
/// - 5.4.0
|
||||
/// - 0.1.2
|
||||
/// - etc.
|
||||
/// Changes the reference URL, which contains ONLY the latest
|
||||
/// version of your application as a plain text file.
|
||||
/// Examples include:
|
||||
/// - 1.2.3
|
||||
/// - 5.4.0
|
||||
/// - 0.1.2
|
||||
/// - etc.
|
||||
void setReferenceUrl (const QString &url);
|
||||
|
||||
/// Changes the change log URL, which contains the change log
|
||||
/// of your application. The change log can be any file you
|
||||
/// like, however, its recommended to write it in plain text,
|
||||
/// such as TXT, HTML and RTF files.
|
||||
/// Changes the change log URL, which contains the change log
|
||||
/// of your application. The change log can be any file you
|
||||
/// like, however, its recommended to write it in plain text,
|
||||
/// such as TXT, HTML and RTF files.
|
||||
void setChangelogUrl (const QString &url);
|
||||
|
||||
/// Tells the updater the version of the installed
|
||||
/// copy of your application.
|
||||
/// Tells the updater the version of the installed
|
||||
/// copy of your application.
|
||||
void setApplicationVersion (const QString &version);
|
||||
|
||||
private slots:
|
||||
|
Loading…
x
Reference in New Issue
Block a user