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/help | |
| 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/help')
| -rw-r--r-- | src/modules/help/HelpIndex.cpp | 10 | ||||
| -rw-r--r-- | src/modules/help/HelpWidget.cpp | 4 | ||||
| -rw-r--r-- | src/modules/help/libkvihelp.cpp | 10 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/modules/help/HelpIndex.cpp b/src/modules/help/HelpIndex.cpp index 3fba3c74d..bd5d772be 100644 --- a/src/modules/help/HelpIndex.cpp +++ b/src/modules/help/HelpIndex.cpp @@ -77,7 +77,7 @@ QDataStream & operator<<(QDataStream & s, const Document & l) } HelpIndex::HelpIndex(const QString & dp, const QString & hp) - : QObject(0), docPath(dp) + : QObject(nullptr), docPath(dp) { Q_UNUSED(hp); @@ -93,7 +93,7 @@ HelpIndex::HelpIndex(const QString & dp, const QString & hp) } HelpIndex::HelpIndex(const QStringList & dl, const QString & hp) - : QObject(0) + : QObject(nullptr) { Q_UNUSED(hp); docList = dl; @@ -172,7 +172,7 @@ void HelpIndex::insertInDict(const QString & str, int docNum) { if(str == QLatin1String("amp") || str == QLatin1String("nbsp")) return; - Entry * e = 0; + Entry * e = nullptr; if(dict.count()) e = dict[str]; @@ -351,7 +351,7 @@ QStringList HelpIndex::query(const QStringList & terms, const QStringList & term QList<Term> termList; for(QStringList::ConstIterator it = terms.begin(); it != terms.end(); ++it) { - Entry * e = 0; + Entry * e = nullptr; if((*it).contains(QLatin1Char('*'))) { QVector<Document> wcts = setupDummyTerm(getWildcardTerms(*it)); @@ -533,7 +533,7 @@ QVector<Document> HelpIndex::setupDummyTerm(const QStringList & terms) QList<Term> termList; for(QStringList::ConstIterator it = terms.begin(); it != terms.end(); ++it) { - Entry * e = 0; + Entry * e = nullptr; if(dict[*it]) { e = dict[*it]; diff --git a/src/modules/help/HelpWidget.cpp b/src/modules/help/HelpWidget.cpp index bdf6ec329..d8e3dbd33 100644 --- a/src/modules/help/HelpWidget.cpp +++ b/src/modules/help/HelpWidget.cpp @@ -59,8 +59,8 @@ HelpWidget::HelpWidget(QWidget * par, bool bIsStandalone) g_pHelpWidgetList->append(this); m_bIsStandalone = bIsStandalone; - new QShortcut(QKeySequence::Copy, this, SLOT(slotCopy()), 0, Qt::WidgetWithChildrenShortcut); - new QShortcut(QKeySequence::Find, this, SLOT(slotShowHideFind()), 0, bIsStandalone ? Qt::WidgetWithChildrenShortcut : Qt::WindowShortcut); + new QShortcut(QKeySequence::Copy, this, SLOT(slotCopy()), nullptr, Qt::WidgetWithChildrenShortcut); + new QShortcut(QKeySequence::Find, this, SLOT(slotShowHideFind()), nullptr, bIsStandalone ? Qt::WidgetWithChildrenShortcut : Qt::WindowShortcut); // layout m_pLayout = new QVBoxLayout(this); diff --git a/src/modules/help/libkvihelp.cpp b/src/modules/help/libkvihelp.cpp index c5dde5b99..d526c77a5 100644 --- a/src/modules/help/libkvihelp.cpp +++ b/src/modules/help/libkvihelp.cpp @@ -36,9 +36,9 @@ #include <QFileInfo> #include <QSplitter> -HelpIndex * g_pDocIndex = 0; -KviPointerList<HelpWidget> * g_pHelpWidgetList = 0; -KviPointerList<HelpWindow> * g_pHelpWindowList = 0; +HelpIndex * g_pDocIndex = nullptr; +KviPointerList<HelpWidget> * g_pHelpWidgetList = nullptr; +KviPointerList<HelpWindow> * g_pHelpWindowList = nullptr; /* @doc: help.open @@ -246,11 +246,11 @@ static bool help_module_cleanup(KviModule *) while(g_pHelpWidgetList->first()) delete g_pHelpWidgetList->first(); delete g_pHelpWidgetList; - g_pHelpWidgetList = 0; + g_pHelpWidgetList = nullptr; while(g_pHelpWindowList->first()) g_pHelpWindowList->first()->close(); delete g_pHelpWindowList; - g_pHelpWindowList = 0; + g_pHelpWindowList = nullptr; return true; } |
