summaryrefslogtreecommitdiff
path: root/src/selfupdater.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2014-11-28 11:19:20 +0100
committerTannin <devnull@localhost>2014-11-28 11:19:20 +0100
commit99de80e7224f2491fb7518e32f195ad6a912b624 (patch)
treeef8f1d3ba16b7681beaae5cf67d0f5671e486061 /src/selfupdater.cpp
parent78f628e0af2f2df562c40ac1424b432b6a969055 (diff)
replaced all uses of NULL with nullptr
fixed a few placed where NULL was used as a number or boolean
Diffstat (limited to 'src/selfupdater.cpp')
-rw-r--r--src/selfupdater.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/selfupdater.cpp b/src/selfupdater.cpp
index 0f75e392..0c222ebb 100644
--- a/src/selfupdater.cpp
+++ b/src/selfupdater.cpp
@@ -48,7 +48,7 @@ typedef Archive* (*CreateArchiveType)();
template <typename T> T resolveFunction(QLibrary &lib, const char *name)
{
T temp = reinterpret_cast<T>(lib.resolve(name));
- if (temp == NULL) {
+ if (temp == nullptr) {
throw std::runtime_error(QObject::tr("invalid 7-zip32.dll: %1").arg(lib.errorString()).toLatin1().constData());
}
return temp;
@@ -94,7 +94,6 @@ SelfUpdater::~SelfUpdater()
void SelfUpdater::setUserInterface(QWidget *widget)
{
- m_Progress.setVisible(false);
m_Parent = widget;
}
@@ -163,7 +162,7 @@ void SelfUpdater::download(const QString &downloadLink, const QString &fileName)
void SelfUpdater::downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
{
- if (m_Reply != NULL) {
+ if (m_Reply != nullptr) {
if (m_Canceled) {
m_Reply->abort();
} else {
@@ -177,7 +176,7 @@ void SelfUpdater::downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
void SelfUpdater::downloadReadyRead()
{
- if (m_Reply != NULL) {
+ if (m_Reply != nullptr) {
m_UpdateFile.write(m_Reply->readAll());
}
}
@@ -187,7 +186,7 @@ void SelfUpdater::downloadFinished()
{
int error = QNetworkReply::NoError;
- if (m_Reply != NULL) {
+ if (m_Reply != nullptr) {
m_UpdateFile.write(m_Reply->readAll());
error = m_Reply->error();
@@ -199,7 +198,7 @@ void SelfUpdater::downloadFinished()
m_Progress.hide();
m_Reply->close();
m_Reply->deleteLater();
- m_Reply = NULL;
+ m_Reply = nullptr;
}
m_UpdateFile.close();