<table><tr><td style="">kossebau added a comment.
</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>Now some more detailed look at the code. Code not tested so far.</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-16762" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">CMakeLists.txt: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; background: #d0ffd0;">find_package( OktetaCore )
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">set_package_properties(KastenControllers PROPERTIES
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Only needed for expliciteness, OktetaGui pulls this in as required dep, so would fail itself if OktetaCore is not present.</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-16763" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">CMakeLists.txt:71</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;">if(OktetaGui_FOUND AND OktetaCore_FOUND)
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> target_link_libraries(kdevgdb okteta2core okteta2gui)
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> list(APPEND kdevtest_gdb_LINK_LIBS
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Here use the imported target names <tt style="background: #ebebeb; font-size: 13px;">OktetaCore</tt> and <tt style="background: #ebebeb; font-size: 13px;">OktetaGui</tt>.<br />
Again OktetaCore is only needed for expliciteness, will be pulled in by OktetaGui.</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-16764" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">memviewdlg.cpp:99-100</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; "> <span style="color: #74777d">// so don't set s_appNotStarted here.</span>
</div><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="p">(</span><span style="color: #601200">0</span><span class="p">),</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #ffd0d0;"> <span class="bright"></span><span class="n"><span class="bright">a</span>mount<span class="bright">_</span></span><span class="p">(</span><span style="color: #601200">0</span><span class="p">),</span> <span class="bright"></span><span class="n"><span class="bright">data_</span></span><span class="p">(</span><span style="color: #601200">0</span><span class="p">),</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #ffd0d0;"> <span class="n">debuggerState<span class="bright">_</span></span><span class="p">(</span><span style="color: #601200">0</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="p">(</span><span style="color: #601200">0</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_memA</span>mount</span><span class="p">(</span><span style="color: #601200">0</span><span class="p">),</span> <span class="bright"></span><span class="n"><span class="bright">m_memData</span></span><span class="p">(</span><span style="color: #601200">0</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_</span>debuggerState</span><span class="p">(</span><span style="color: #601200">0</span><span class="p">)</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">While touching the lines, nullptr for all pointers</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-16765" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">memviewdlg.cpp:243-251</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">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">setData</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 class="n"><span class="bright">amount_</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">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">ByteArrayModel</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">OldModel</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_memViewModel</span></span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="n">m_memViewModel</span> <span style="color: #aa2211">=</span> <span style="color: #aa4000">new</span> <span class="n">Okteta</span><span style="color: #aa2211">::</span><span class="n">ByteArrayModel</span><span class="p">(</span> <span style="color: #aa4000">reinterpret_cast</span><span style="color: #aa2211"><</span><span class="n">Okteta</span><span style="color: #aa2211">::</span><span class="n">Byte</span><span style="color: #aa2211">*></span><span class="p">(</span><span style="color: #aa4000">this</span><span style="color: #aa2211">-></span><span class="n">m_memData</span><span class="p">),</span> <span class="n">m_memAmount</span> <span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span style="color: #74777d">// get attributes</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="n">m_memViewModel</span><span style="color: #aa2211">-></span><span class="n">setReadOnly</span><span class="p">(</span> <span class="n">OldModel</span><span style="color: #aa2211">-></span><span class="n">isReadOnly</span><span class="p">()</span> <span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="n">m_memViewModel</span><span style="color: #aa2211">-></span><span class="n">setAutoDelete</span><span class="p">(</span> <span class="n">OldModel</span><span style="color: #aa2211">-></span><span class="n">autoDelete</span><span class="p">()</span> <span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">This should be doable by simply resetting the data of the existing model, using ByteArrayModel::setData(), like (untested):</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);">m_memViewModel->setData(reinterpret_cast<Okteta::Byte*>(m_memData), m_memAmount);</pre></div>
<p style="padding: 0; margin: 8px;"><a href="https://api.kde.org/4.x-api/kdesdk-apidocs/okteta/html/classOkteta_1_1ByteArrayModel.html#a44f6d09a054f80603978f7ce387085dc" class="remarkup-link" target="_blank" rel="noreferrer">https://api.kde.org/4.x-api/kdesdk-apidocs/okteta/html/classOkteta_1_1ByteArrayModel.html#a44f6d09a054f80603978f7ce387085dc</a></p>
<p style="padding: 0; margin: 8px;">Or did you try and meet a flaw with that?</p></div></div></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<br /><strong>Cc: </strong>kossebau, kdevelop-devel, Pilzschaf, akshaydeo, surgenight, arrowdodger<br /></div>