Commit 5d92ec75 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use nullptr

parent bb1d66d9
...@@ -49,7 +49,7 @@ bool SearchJob::startLocal(const QString &cmdString) ...@@ -49,7 +49,7 @@ bool SearchJob::startLocal(const QString &cmdString)
mProcess->setOutputChannelMode(KProcess::SeparateChannels); mProcess->setOutputChannelMode(KProcess::SeparateChannels);
mProcess->start(); mProcess->start();
if (!mProcess->waitForStarted()) { if (!mProcess->waitForStarted()) {
QString txt = i18n("Error executing search command '%1'.", cmdString ); const QString txt = i18n("Error executing search command '%1'.", cmdString );
Q_EMIT searchError( this, mEntry, txt ); Q_EMIT searchError( this, mEntry, txt );
return false; return false;
} }
......
...@@ -45,7 +45,7 @@ class TOCItem : public NavigatorItem ...@@ -45,7 +45,7 @@ class TOCItem : public NavigatorItem
const TOC *toc() const { return m_toc; } const TOC *toc() const { return m_toc; }
private: private:
TOC *m_toc; TOC *m_toc = nullptr;
}; };
class TOCChapterItem : public TOCItem class TOCChapterItem : public TOCItem
...@@ -75,8 +75,8 @@ class TOCSectionItem : public TOCItem ...@@ -75,8 +75,8 @@ class TOCSectionItem : public TOCItem
bool TOC::m_alreadyWarned = false; bool TOC::m_alreadyWarned = false;
TOC::TOC( NavigatorItem *parentItem ) TOC::TOC( NavigatorItem *parentItem )
: m_parentItem(parentItem)
{ {
m_parentItem = parentItem;
} }
void TOC::build( const QString &file ) void TOC::build( const QString &file )
......
...@@ -65,7 +65,7 @@ class TOC : public QObject ...@@ -65,7 +65,7 @@ class TOC : public QObject
QString m_cacheFile; QString m_cacheFile;
QString m_sourceFile; QString m_sourceFile;
NavigatorItem *m_parentItem = nullptr; NavigatorItem *const m_parentItem;
static bool m_alreadyWarned; static bool m_alreadyWarned;
}; };
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment