<table><tr><td style="">mwolff requested changes to this revision.<br />mwolff added a comment.<br />This revision now requires changes to proceed.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D4232" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>some more nitpicks (sorry!), but at least fixing the memory leaks is a must</p></div></div><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D4232#inline-17289" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">CMakeLists.txt:54</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/config-kdev-debuggers.h.cmake
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> ${CMAKE_CURRENT_BINARY_DIR}/config-kdev-debuggers.h )
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">kdev-debuggers? config-gdb-plugin.h is more like it</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D4232#inline-17290" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">config-kdev-debuggers.h.cmake:1</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span class="err">/*</span> <span class="err">This</span> <span class="err">file</span> <span class="err">is</span> <span class="err">generated</span> <span class="err">from</span> <span class="err">template</span> <span class="err">using</span> <span class="err">CMAKE</span> <span class="err">*/</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">please still add a proper copyright header</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D4232#inline-17291" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">config-kdev-debuggers.h.cmake:3</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; color: #888888;">(Empty.)</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">use #cmakedefine01</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D4232#inline-17292" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">memviewdlg.cpp:130</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #ffd0d0;"> <span class="bright"></span><span class="n"><span class="bright">connect</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="n">KDevelop</span><span style="color: #aa2211">::</span><span class="n">ICore</span><span style="color: #aa2211">::</span><span class="n">self</span><span class="p">()</span><span style="color: #aa2211">-></span><span class="n">debugController</span><span class="p">()<span class="bright">,</span></span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #ffd0d0;"> <span class="bright"> </span><span class="n"><span class="bright">SIGNAL</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">currentSessionChanged</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">KDevelop</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">::</span></span><span class="bright"></span><span class="n"><span class="bright">IDebugSession</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">*</span></span><span class="bright"></span><span class="p"><span class="bright">)),</span></span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="bright"></span><span class="n"><span class="bright">KDevelop</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">::</span></span><span class="bright"></span><span class="n"><span class="bright">IDebugController</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">*</span></span><span class="bright"> </span><span class="n"><span class="bright">pDC</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">=</span></span><span class="bright"> </span><span class="n">KDevelop</span><span style="color: #aa2211">::</span><span class="n">ICore</span><span style="color: #aa2211">::</span><span class="n">self</span><span class="p">()</span><span style="color: #aa2211">-></span><span class="n">debugController</span><span class="p">()<span class="bright">;</span></span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="bright"></span><span class="n"><span class="bright">Q_ASSERT</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">pDC</span></span><span class="bright"></span><span class="p"><span class="bright">);</span></span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;"><tt style="background: #ebebeb; font-size: 13px;">auto debugController = ...</tt></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D4232#inline-17293" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">memviewdlg.cpp:133</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #ffd0d0;"><span class="bright"> </span><span class="n"><span class="bright">SLOT</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">currentSessionChanged</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">KDevelop</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">::</span></span><span class="bright"></span><span class="n"><span class="bright">IDebugSession</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">*</span></span><span class="bright"></span><span class="p"><span class="bright">)));</span></span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="n">connect</span><span class="p">(</span><span class="n">pDC</span><span class="p">,</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span style="color: #aa2211">&</span><span class="n">KDevelop</span><span style="color: #aa2211">::</span><span class="n">IDebugController</span><span style="color: #aa2211">::</span><span class="n">currentSessionChanged</span><span class="p">,</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">style:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">connect(debugController, &...,
this, &...);</pre></div></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D4232#inline-17294" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">memviewdlg.cpp:158</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #ffd0d0;"> <span class="bright"></span><span class="n"><span class="bright">khexedit2_widget</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">=</span></span><span class="bright"> </span><span class="n"><span class="bright">KHE</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">::</span></span><span class="bright"></span><span class="n"><span class="bright">create</span>Byte<span class="bright">sEditWidget</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span style="color: #aa4000"><span class="bright">this</span></span><span class="bright"></span><span class="p"><span class="bright">)</span>;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #ffd0d0;"> <span class="bright"></span><span style="color: #aa4000"><span class="bright">if</span></span><span class="bright"> </span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">!</span></span><span class="bright"></span><span class="n"><span class="bright">khexedit2_widget</span></span><span class="bright"></span><span class="p"><span class="bright">)</span></span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="bright"></span><span class="n"><span class="bright">m_memViewModel</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">=</span></span><span class="bright"> </span><span style="color: #aa4000"><span class="bright">new</span></span><span class="bright"> </span><span class="n"><span class="bright">Okteta</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">::</span></span><span class="n">Byte<span class="bright">ArrayModel</span></span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="bright"></span><span class="n"><span class="bright">m_memViewView</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">=</span></span><span class="bright"> </span><span style="color: #aa4000"><span class="bright">new</span></span><span class="bright"> </span><span class="n"><span class="bright">Okteta</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">::</span></span><span class="bright"></span><span class="n"><span class="bright">ByteArrayColumnView</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span style="color: #aa4000"><span class="bright">this</span></span><span class="bright"></span><span class="p"><span class="bright">);</span></span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">missing parent</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D4232#inline-17295" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">memviewdlg.cpp:255</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #ffd0d0;"> <span class="bright"></span><span class="n"><span class="bright">KHE</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">::</span></span><span class="bright"></span><span class="n"><span class="bright">BytesEditInterface</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">*</span></span><span class="bright"> </span><span class="n"><span class="bright">bytesEditor</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">=</span></span><span class="bright"> </span><span class="n"><span class="bright">KHE</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">::</span></span><span class="bright"></span><span class="n"><span class="bright">bytesEditInterface</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">khexedit2_widget</span></span><span class="bright"></span><span class="p"><span class="bright">)</span>;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #ffd0d0;"> <span class="bright"></span><span class="n"><span class="bright">bytesEditor</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">-></span></span><span class="bright"></span><span class="n"><span class="bright">set</span>Data<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span style="color: #aa4000"><span class="bright">this</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">-></span></span><span class="bright"></span><span class="n"><span class="bright">data_</span></span><span class="bright"></span><span class="p"><span class="bright">,</span></span><span class="bright"> </span><span style="color: #601200"><span class="bright">0</span></span><span class="bright"></span><span class="p"><span class="bright">)</span>;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #ffd0d0;">
</div><div style="padding: 0 8px; margin: 0 4px; background: #ffd0d0;"> <span style="color: #aa4000">delete</span><span class="p">[]</span> <span style="color: #aa4000">this</span><span style="color: #aa2211">-></span><span class="n">data_</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #ffd0d0;"> <span style="color: #aa4000">this</span><span style="color: #aa2211">-></span><span class="n">data_</span> <span style="color: #aa2211">=</span> <span style="color: #aa4000">new</span> <span style="color: #aa4000">char</span><span class="p">[</span><span class="n">amount_</span><span class="p">];</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="bright"></span><span style="color: #aa4000"><span class="bright">delete</span></span><span class="bright"></span><span class="p"><span class="bright">[]</span></span><span class="bright"> </span><span style="color: #aa4000"><span class="bright">this</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">-></span></span><span class="bright"></span><span class="n"><span class="bright">m_memData</span></span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="bright"></span><span style="color: #aa4000"><span class="bright">this</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">-></span></span><span class="bright"></span><span class="n"><span class="bright">m_mem</span>Data<span class="bright"></span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">=</span></span><span class="bright"> </span><span style="color: #aa4000"><span class="bright">new</span></span><span class="bright"> </span><span style="color: #aa4000"><span class="bright">char</span></span><span class="bright"></span><span class="p"><span class="bright">[</span></span><span class="bright"></span><span class="n"><span class="bright">m_memAmount</span></span><span class="bright"></span><span class="p"><span class="bright">]</span>;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">remove this-></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D4232#inline-17296" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">memviewdlg.h:116</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #ffd0d0;"> <span class="n">QString</span> <span class="bright"></span><span class="n"><span class="bright">s</span>tart<span class="bright">AsString_</span></span><span class="bright"></span><span class="p"><span class="bright">,</span></span><span class="bright"> </span><span class="n"><span class="bright">a</span>mount<span class="bright">AsString_</span></span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #ffd0d0;"> <span style="color: #aa4000">char</span><span style="color: #aa2211">*</span> <span class="bright"></span><span class="n"><span class="bright">data_</span></span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="n">QString</span> <span class="bright"></span><span class="n"><span class="bright">m_memS</span>tart<span class="bright">Str</span></span><span class="bright"></span><span class="p"><span class="bright">,</span></span><span class="bright"> </span><span class="n"><span class="bright">m_memA</span>mount<span class="bright">Str</span></span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span style="color: #aa4000">char</span><span style="color: #aa2211">*</span> <span class="bright"></span><span class="n"><span class="bright">m_memData</span></span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span style="color: #aa4000">int</span> <span class="n">m_debuggerState</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I know, old code, but this is leaked. I cannot find a dtor that deletes it at least. Use a proper container class, like QByteArray or {Q,std::}vector<char></p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D4232" rel="noreferrer">https://phabricator.kde.org/D4232</a></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>volden, KDevelop, mwolff<br /><strong>Cc: </strong>mwolff, kossebau, kdevelop-devel, Pilzschaf, akshaydeo, surgenight, arrowdodger<br /></div>