Use const references rather than just const
This commit is contained in:
parent
b807c388f1
commit
aaa1d12c68
@ -107,7 +107,7 @@ bool QSimpleUpdater::newerVersionAvailable() {
|
|||||||
return m_new_version_available;
|
return m_new_version_available;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QSimpleUpdater::setDownloadUrl(const QString url) {
|
void QSimpleUpdater::setDownloadUrl(const QString &url) {
|
||||||
// Change the download URL if the issued URL is valid
|
// Change the download URL if the issued URL is valid
|
||||||
if (!url.isEmpty()) {
|
if (!url.isEmpty()) {
|
||||||
m_download_url.setUrl(url);
|
m_download_url.setUrl(url);
|
||||||
@ -119,7 +119,7 @@ void QSimpleUpdater::setDownloadUrl(const QString url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QSimpleUpdater::setReferenceUrl(const QString url) {
|
void QSimpleUpdater::setReferenceUrl(const QString &url) {
|
||||||
// Change the reference URL if the issued URL is valid
|
// Change the reference URL if the issued URL is valid
|
||||||
if (!url.isEmpty()) {
|
if (!url.isEmpty()) {
|
||||||
m_reference_url.setUrl(url);
|
m_reference_url.setUrl(url);
|
||||||
@ -131,7 +131,7 @@ void QSimpleUpdater::setReferenceUrl(const QString url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QSimpleUpdater::setChangelogUrl(const QString url) {
|
void QSimpleUpdater::setChangelogUrl(const QString &url) {
|
||||||
// Change the changelog URL if the issued URL is valid
|
// Change the changelog URL if the issued URL is valid
|
||||||
if (!url.isEmpty()) {
|
if (!url.isEmpty()) {
|
||||||
m_changelog_url.setUrl(url);
|
m_changelog_url.setUrl(url);
|
||||||
@ -143,7 +143,7 @@ void QSimpleUpdater::setChangelogUrl(const QString url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QSimpleUpdater::setApplicationVersion(const QString version) {
|
void QSimpleUpdater::setApplicationVersion(const QString &version) {
|
||||||
// Change the installed application version if the issued string is valid
|
// Change the installed application version if the issued string is valid
|
||||||
if (!version.isEmpty()) {
|
if (!version.isEmpty()) {
|
||||||
m_installed_version = version;
|
m_installed_version = version;
|
||||||
@ -264,6 +264,6 @@ void QSimpleUpdater::processDownloadedChangelog(QNetworkReply *reply) {
|
|||||||
emit checkingFinished();
|
emit checkingFinished();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QSimpleUpdater::ignoreSslErrors (QNetworkReply *reply, QList<QSslError> error) {
|
void QSimpleUpdater::ignoreSslErrors (QNetworkReply *reply, const QList<QSslError> &error) {
|
||||||
reply->ignoreSslErrors (error);
|
reply->ignoreSslErrors (error);
|
||||||
}
|
}
|
||||||
|
@ -27,15 +27,15 @@ public:
|
|||||||
bool newerVersionAvailable();
|
bool newerVersionAvailable();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setDownloadUrl(const QString url);
|
void setDownloadUrl(const QString &url);
|
||||||
void setReferenceUrl(const QString url);
|
void setReferenceUrl(const QString &url);
|
||||||
void setChangelogUrl(const QString url);
|
void setChangelogUrl(const QString &url);
|
||||||
void setApplicationVersion(const QString version);
|
void setApplicationVersion(const QString &version);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void checkDownloadedVersion(QNetworkReply *reply);
|
void checkDownloadedVersion(QNetworkReply *reply);
|
||||||
void processDownloadedChangelog(QNetworkReply *reply);
|
void processDownloadedChangelog(QNetworkReply *reply);
|
||||||
void ignoreSslErrors(QNetworkReply *reply, QList<QSslError> error);
|
void ignoreSslErrors(QNetworkReply *reply, const QList<QSslError> &error);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void checkingFinished();
|
void checkingFinished();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user