diff options
| author | 2016-04-30 18:23:42 +0100 | |
|---|---|---|
| committer | 2016-04-30 18:50:44 +0100 | |
| commit | 505d0768f8392e3c4775425dd97f41e1c829ef44 (patch) | |
| tree | 55dfa35f2e180b4186baf00ffbfd2ee38c0f1c18 /src/modules/notifier | |
| parent | Update my clang-format to 3.8.0 (diff) | |
| download | KVIrc-505d0768f8392e3c4775425dd97f41e1c829ef44.tar.gz KVIrc-505d0768f8392e3c4775425dd97f41e1c829ef44.tar.bz2 KVIrc-505d0768f8392e3c4775425dd97f41e1c829ef44.zip | |
Apply clang-tidy: modernize-use-nullptr
Diffstat (limited to 'src/modules/notifier')
| -rw-r--r-- | src/modules/notifier/NotifierMessage.cpp | 6 | ||||
| -rw-r--r-- | src/modules/notifier/NotifierWindow.cpp | 26 | ||||
| -rw-r--r-- | src/modules/notifier/libkvinotifier.cpp | 4 |
3 files changed, 18 insertions, 18 deletions
diff --git a/src/modules/notifier/NotifierMessage.cpp b/src/modules/notifier/NotifierMessage.cpp index 8154c23ef..fed24e816 100644 --- a/src/modules/notifier/NotifierMessage.cpp +++ b/src/modules/notifier/NotifierMessage.cpp @@ -34,8 +34,8 @@ NotifierMessage::NotifierMessage(QPixmap * pPixmap, const QString & szText) { - m_pLabel0 = 0; - m_pLabel1 = 0; + m_pLabel0 = nullptr; + m_pLabel1 = nullptr; m_szText = szText; m_pPixmap = pPixmap; @@ -80,7 +80,7 @@ void NotifierMessage::updateGui() } else { - m_pLabel0 = 0; + m_pLabel0 = nullptr; } m_pLabel1 = new QLabel(this); diff --git a/src/modules/notifier/NotifierWindow.cpp b/src/modules/notifier/NotifierWindow.cpp index b0f4e703d..4ce8ea027 100644 --- a/src/modules/notifier/NotifierWindow.cpp +++ b/src/modules/notifier/NotifierWindow.cpp @@ -52,7 +52,7 @@ extern NotifierWindow * g_pNotifierWindow; NotifierWindow::NotifierWindow() - : QWidget(0, + : QWidget(nullptr, #if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW) Qt::FramelessWindowHint | Qt::Tool | Qt::WindowStaysOnTopHint) #else @@ -69,11 +69,11 @@ NotifierWindow::NotifierWindow() m_eState = Hidden; m_dOpacity = 0.0; - m_pShowHideTimer = 0; - m_pBlinkTimer = 0; + m_pShowHideTimer = nullptr; + m_pBlinkTimer = nullptr; m_tAutoHideAt = 0; m_tStartedAt = 0; - m_pAutoHideTimer = 0; + m_pAutoHideTimer = nullptr; m_pWndBorder = new NotifierWindowBorder(); @@ -94,8 +94,8 @@ NotifierWindow::NotifierWindow() m_bDiagonalResizing = false; m_bResizing = false; - m_pContextPopup = 0; - m_pDisablePopup = 0; + m_pContextPopup = nullptr; + m_pDisablePopup = nullptr; m_bDragging = false; @@ -123,7 +123,7 @@ NotifierWindow::NotifierWindow() m_pProgressBar->setMaximumWidth(8); m_pProgressBar->installEventFilter(this); - m_pLineEdit = new KviThemedLineEdit(this, 0, "notifier_lineedit"); + m_pLineEdit = new KviThemedLineEdit(this, nullptr, "notifier_lineedit"); QPalette palette = m_pLineEdit->palette(); palette.setColor(m_pLineEdit->backgroundRole(), Qt::transparent); m_pLineEdit->setPalette(palette); @@ -173,14 +173,14 @@ void NotifierWindow::addMessage(KviWindow * pWnd, const QString & szImageId, con QString szMessage = szText; szMessage.replace(QRegExp("\r([^\r])*\r([^\r])+\r"), "\\2"); if(szImageId.isEmpty()) - pIcon = 0; + pIcon = nullptr; else pIcon = g_pIconManager->getImage(szImageId); - NotifierMessage * pMessage = new NotifierMessage(pIcon ? new QPixmap(*pIcon) : 0, szMessage); + NotifierMessage * pMessage = new NotifierMessage(pIcon ? new QPixmap(*pIcon) : nullptr, szMessage); //search for an existing tab - NotifierWindowTab *pTab = 0, *pTmp = 0; + NotifierWindowTab *pTab = nullptr, *pTmp = nullptr; for(int i = 0; i < m_pWndTabs->count(); ++i) { pTmp = (NotifierWindowTab *)m_pWndTabs->widget(i); @@ -238,7 +238,7 @@ void NotifierWindow::stopShowHideTimer() if(!m_pShowHideTimer) return; delete m_pShowHideTimer; - m_pShowHideTimer = 0; + m_pShowHideTimer = nullptr; } void NotifierWindow::stopBlinkTimer() @@ -246,7 +246,7 @@ void NotifierWindow::stopBlinkTimer() if(!m_pBlinkTimer) return; delete m_pBlinkTimer; - m_pBlinkTimer = 0; + m_pBlinkTimer = nullptr; } void NotifierWindow::stopAutoHideTimer() @@ -254,7 +254,7 @@ void NotifierWindow::stopAutoHideTimer() if(!m_pAutoHideTimer) return; delete m_pAutoHideTimer; - m_pAutoHideTimer = 0; + m_pAutoHideTimer = nullptr; m_pProgressBar->setValue(0); } diff --git a/src/modules/notifier/libkvinotifier.cpp b/src/modules/notifier/libkvinotifier.cpp index 4fb6d0199..fa21755df 100644 --- a/src/modules/notifier/libkvinotifier.cpp +++ b/src/modules/notifier/libkvinotifier.cpp @@ -38,7 +38,7 @@ #include <QSplitter> -NotifierWindow * g_pNotifierWindow = 0; +NotifierWindow * g_pNotifierWindow = nullptr; kvi_time_t g_tNotifierDisabledUntil = 0; /* @@ -279,7 +279,7 @@ static bool notifier_module_cleanup(KviModule *) if(g_pNotifierWindow) { delete g_pNotifierWindow; - g_pNotifierWindow = 0; + g_pNotifierWindow = nullptr; } return true; } |
