diff options
| author | Tannin <devnull@localhost> | 2014-11-28 11:19:20 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-11-28 11:19:20 +0100 |
| commit | 99de80e7224f2491fb7518e32f195ad6a912b624 (patch) | |
| tree | ef8f1d3ba16b7681beaae5cf67d0f5671e486061 /src/nxmaccessmanager.cpp | |
| parent | 78f628e0af2f2df562c40ac1424b432b6a969055 (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/nxmaccessmanager.cpp')
| -rw-r--r-- | src/nxmaccessmanager.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/nxmaccessmanager.cpp b/src/nxmaccessmanager.cpp index 18568dad..db314be6 100644 --- a/src/nxmaccessmanager.cpp +++ b/src/nxmaccessmanager.cpp @@ -44,7 +44,7 @@ using namespace MOShared; NXMAccessManager::NXMAccessManager(QObject *parent, const QString &moVersion)
: QNetworkAccessManager(parent)
- , m_LoginReply(NULL)
+ , m_LoginReply(nullptr)
, m_ProgressDialog()
, m_MOVersion(moVersion)
, m_LoginAttempted(false)
@@ -56,9 +56,9 @@ NXMAccessManager::NXMAccessManager(QObject *parent, const QString &moVersion) NXMAccessManager::~NXMAccessManager()
{
- if (m_LoginReply != NULL) {
+ if (m_LoginReply != nullptr) {
m_LoginReply->deleteLater();
- m_LoginReply = NULL;
+ m_LoginReply = nullptr;
}
}
@@ -104,13 +104,13 @@ bool NXMAccessManager::loggedIn() const bool NXMAccessManager::loginWaiting() const
{
- return m_LoginReply != NULL;
+ return m_LoginReply != nullptr;
}
void NXMAccessManager::login(const QString &username, const QString &password)
{
- if (m_LoginReply != NULL) {
+ if (m_LoginReply != nullptr) {
return;
}
@@ -168,7 +168,7 @@ void NXMAccessManager::loginTimeout() {
emit loginFailed(tr("timeout"));
m_LoginReply->deleteLater();
- m_LoginReply = NULL;
+ m_LoginReply = nullptr;
m_LoginAttempted = false; // this usually means we might have usccess later
m_LoginTimeout.stop();
m_Username.clear();
@@ -180,10 +180,10 @@ void NXMAccessManager::loginError(QNetworkReply::NetworkError) {
m_ProgressDialog.hide();
m_LoginTimeout.stop();
- if (m_LoginReply != NULL) {
+ if (m_LoginReply != nullptr) {
emit loginFailed(m_LoginReply->errorString());
m_LoginReply->deleteLater();
- m_LoginReply = NULL;
+ m_LoginReply = nullptr;
} else {
emit loginFailed(tr("Unknown error"));
}
@@ -216,7 +216,7 @@ void NXMAccessManager::loginFinished() m_LoginTimeout.stop();
m_LoginReply->deleteLater();
- m_LoginReply = NULL;
+ m_LoginReply = nullptr;
m_Username.clear();
m_Password.clear();
}
|
