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