Initialize m_tocEnabled

Othewise we get an unitialized memory use

==38984== Conditional jump or move depends on uninitialised value(s)
==38984==    at 0xE5B0125: Okular::Part::slotNewConfig() (part.cpp:3000)
==38984==    by 0xE59FAF1: Okular::Part::Part(QWidget*, QObject*, QList<QVariant> const&) (part.cpp:595)
==38984==    by 0xE5BB596: QObject* KPluginFactory::createPartInstance<Okular::Part>(QWidget*, QObject*, QList<QVariant> const&) (kpluginfactory.h:526)
==38984==    by 0x5401674: KPluginFactory::create(char const*, QWidget*, QObject*, QList<QVariant> const&, QString const&) (in /usr/lib/libKF5CoreAddons.so.5.70.0)
==38984==    by 0x124543: KParts::ReadWritePart* KPluginFactory::create<KParts::ReadWritePart>(QObject*, QList<QVariant> const&) (kpluginfactory.h:545)
==38984==    by 0x11D126: Shell::Shell(QString const&) (shell.cpp:97)
==38984==    by 0x11B250: Okular::main(QStringList const&, QString const&) (okular_main.cpp:169)
==38984==    by 0x118418: main (main.cpp:82)
remotes/origin/work/aacid/use_mimes_open_dialog
Albert Astals Cid 6 years ago committed by Nate Graham
parent d195633b16
commit 3e6028c0fb
  1. 2
      part.cpp

@ -309,7 +309,7 @@ Part::Part(QWidget *parentWidget,
QObject *parent,
const QVariantList &args)
: KParts::ReadWritePart(parent),
m_tempfile( nullptr ), m_documentOpenWithPassword( false ), m_swapInsteadOfOpening( false ), m_isReloading( false ), m_fileWasRemoved( false ), m_showMenuBarAction( nullptr ), m_showFullScreenAction( nullptr ), m_actionsSearched( false ),
m_tempfile( nullptr ), m_documentOpenWithPassword( false ), m_swapInsteadOfOpening( false ), m_tocEnabled( false ), m_isReloading( false ), m_fileWasRemoved( false ), m_showMenuBarAction( nullptr ), m_showFullScreenAction( nullptr ), m_actionsSearched( false ),
m_cliPresentation(false), m_cliPrint(false), m_cliPrintAndExit(false), m_embedMode(detectEmbedMode(parentWidget, parent, args)), m_generatorGuiClient(nullptr), m_keeper( nullptr )
{
// make sure that the component name is okular otherwise the XMLGUI .rc files are not found

Loading…
Cancel
Save