Minor code changes

This commit is contained in:
Alex Spataru 2014-12-22 02:26:51 -06:00
parent df6feef57f
commit 6d84e02980
4 changed files with 25 additions and 25 deletions

View File

@ -26,7 +26,7 @@ DownloadDialog::DownloadDialog (QWidget *parent)
SLOT (ignoreSslErrors (QNetworkReply *, QList<QSslError>)));
}
DownloadDialog::~DownloadDialog() {
DownloadDialog::~DownloadDialog(void) {
delete ui;
}
@ -54,7 +54,7 @@ void DownloadDialog::beginDownload (const QUrl& url) {
showNormal();
}
void DownloadDialog::openDownload() {
void DownloadDialog::openDownload(void) {
if (!m_path.isEmpty()) {
QString url = m_path;
@ -71,7 +71,7 @@ void DownloadDialog::openDownload() {
qWarning() << "QSimpleUpdater: cannot open downloaded file!";
}
void DownloadDialog::cancelDownload() {
void DownloadDialog::cancelDownload(void) {
if (!m_reply->isFinished()) {
QMessageBox _message;
_message.setWindowTitle (tr ("Updater"));
@ -89,7 +89,7 @@ void DownloadDialog::cancelDownload() {
hide();
}
void DownloadDialog::downloadFinished() {
void DownloadDialog::downloadFinished(void) {
ui->stopButton->setText (tr ("Close"));
ui->downloadLabel->setText (tr ("Download complete!"));
ui->timeLabel->setText (tr ("The installer will open in a separate window..."));

View File

@ -22,14 +22,14 @@ class DownloadDialog : public QWidget {
public:
explicit DownloadDialog (QWidget *parent = 0);
~DownloadDialog();
~DownloadDialog(void);
void beginDownload (const QUrl& url);
private slots:
void openDownload();
void cancelDownload();
void downloadFinished();
void openDownload(void);
void cancelDownload(void);
void downloadFinished(void);
void updateProgress (qint64 received, qint64 total);
void ignoreSslErrors (QNetworkReply *reply, const QList<QSslError>& error);

View File

@ -16,7 +16,7 @@ QSimpleUpdater::QSimpleUpdater (QObject *parent)
m_downloadDialog = new DownloadDialog();
}
QString QSimpleUpdater::changeLog() const {
QString QSimpleUpdater::changeLog(void) const {
if (m_changelog.isEmpty()) {
qDebug() << "QSimpleUpdater: change log is empty,"
<< "did you call setChangelogUrl() and checkForUpdates()?";
@ -25,7 +25,7 @@ QString QSimpleUpdater::changeLog() const {
return m_changelog;
}
void QSimpleUpdater::checkForUpdates() {
void QSimpleUpdater::checkForUpdates(void) {
if (!m_reference_url.isEmpty()) {
QNetworkAccessManager *_manager = new QNetworkAccessManager (this);
@ -42,7 +42,7 @@ void QSimpleUpdater::checkForUpdates() {
qDebug() << "QSimpleUpdater: Invalid reference URL";
}
void QSimpleUpdater::openDownloadLink() {
void QSimpleUpdater::openDownloadLink(void) {
if (!m_download_url.isEmpty())
QDesktopServices::openUrl (m_download_url);
@ -52,7 +52,7 @@ void QSimpleUpdater::openDownloadLink() {
}
}
QString QSimpleUpdater::latestVersion() const {
QString QSimpleUpdater::latestVersion(void) const {
if (m_latest_version.isEmpty()) {
qDebug() << "QSimpleUpdater: latest version is empty,"
<< "did you call checkForUpdates() and setReferenceUrl()?";
@ -61,7 +61,7 @@ QString QSimpleUpdater::latestVersion() const {
return m_latest_version;
}
QString QSimpleUpdater::installedVersion() const {
QString QSimpleUpdater::installedVersion(void) const {
if (m_installed_version.isEmpty()) {
qDebug() << "QSimpleUpdater: installed version is empty,"
<< "did you call setApplicationVersion()?";
@ -70,7 +70,7 @@ QString QSimpleUpdater::installedVersion() const {
return m_installed_version;
}
void QSimpleUpdater::downloadLatestVersion() {
void QSimpleUpdater::downloadLatestVersion(void) {
if (!m_download_url.isEmpty())
m_downloadDialog->beginDownload (m_download_url);
@ -80,7 +80,7 @@ void QSimpleUpdater::downloadLatestVersion() {
}
}
bool QSimpleUpdater::newerVersionAvailable() const {
bool QSimpleUpdater::newerVersionAvailable(void) const {
return m_new_version_available;
}

View File

@ -23,29 +23,29 @@ public:
QSimpleUpdater (QObject *parent = 0);
/// Returns the downloaded change log
QString changeLog() const;
QString changeLog(void) const;
/// Returns the downloaded version string
QString latestVersion() const;
QString latestVersion(void) const;
/// Returns the local version, referenced by
/// the setApplicationVersion() function
QString installedVersion() const;
QString installedVersion(void) const;
/// Returns \c true if there's a newer version available
bool newerVersionAvailable() const;
bool newerVersionAvailable(void) const;
/// Checks for updates and calls the appropriate
/// signals when finished
void checkForUpdates();
void checkForUpdates(void);
/// Opens the download URL in a a web browser.
/// The URL is referenced by the \c setDownloadUrl() function
void openDownloadLink();
void openDownloadLink(void);
/// Shows a dialog that downloads the file in the
/// URL referenced by the \c setDownloadUrl() function
void downloadLatestVersion();
void downloadLatestVersion(void);
public slots:
@ -79,9 +79,9 @@ private slots:
void ignoreSslErrors (QNetworkReply *reply, const QList<QSslError>& error);
signals:
void checkingFinished();
void versionCheckFinished();
void changelogDownloadFinished();
void checkingFinished(void);
void versionCheckFinished(void);
void changelogDownloadFinished(void);
private:
QString m_changelog;