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)
mProcess->setOutputChannelMode(KProcess::SeparateChannels);
mProcess->start();
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 );
return false;
}
......
......@@ -45,7 +45,7 @@ class TOCItem : public NavigatorItem
const TOC *toc() const { return m_toc; }
private:
TOC *m_toc;
TOC *m_toc = nullptr;
};
class TOCChapterItem : public TOCItem
......@@ -75,8 +75,8 @@ class TOCSectionItem : public TOCItem
bool TOC::m_alreadyWarned = false;
TOC::TOC( NavigatorItem *parentItem )
: m_parentItem(parentItem)
{
m_parentItem = parentItem;
}
void TOC::build( const QString &file )
......
......@@ -65,7 +65,7 @@ class TOC : public QObject
QString m_cacheFile;
QString m_sourceFile;
NavigatorItem *m_parentItem = nullptr;
NavigatorItem *const m_parentItem;
static bool m_alreadyWarned;
};
......
Markdown is supported
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