<table><tr><td style="">elvisangelaccio requested changes to this revision.<br />elvisangelaccio added inline comments.<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/D3303" rel="noreferrer">View Revision</a></tr></table><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/D3303#inline-13002" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">archive_kerfuffle.cpp:182</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">QStringList</span></span><span class="bright"> </span><span class="n"><span class="bright">processedMethods</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">methods</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 style="color: #aa4000">if</span> <span class="p">(<span class="bright"></span></span><span class="bright"></span><span class="n"><span class="bright">processed</span>Methods<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">size</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 style="color: #601200"><span class="bright">1</span></span> <span style="color: #aa2211">&&</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #ffd0d0;"> <span class="bright"></span><span class="n"><span class="bright">processedM</span>ethod<span class="bright">s</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">contains</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">Q</span>String<span class="bright">Literal</span></span><span class="p">(</span><span style="color: #766510">"Store"<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">)</span>))</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: #aa4000">if</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">property</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span style="color: #766510"><span class="bright">"compression</span>Methods<span class="bright">"</span></span><span class="bright"></span><span class="p"><span class="bright">).</span></span><span class="bright"></span><span class="n"><span class="bright">toStringList</span></span><span class="bright"></span><span class="p"><span class="bright">().</span></span><span class="bright"></span><span class="n"><span class="bright">contains</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">method</span></span><span class="bright"></span><span class="p"><span class="bright">)</span></span> <span style="color: #aa2211">&&</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="bright"></span><span class="n"><span class="bright">m</span>ethod<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">QLatin1</span>String</span><span class="p">(</span><span style="color: #766510">"Store"</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;">Double lookup, we can just use <tt style="background: #ebebeb; font-size: 13px;">methods</tt> here.</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/D3303#inline-13003" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">archive_kerfuffle.cpp:196</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 style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">property</span><span class="p">(</span><span style="color: #766510">"encryptionMethods"</span><span class="p">).</span><span class="n">toStringList</span><span class="p">().</span><span class="n">contains</span><span class="p">(</span><span class="n">method</span><span class="p">))</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="n">methods</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="n">method</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Same here, use <tt style="background: #ebebeb; font-size: 13px;">methods</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/D3303#inline-13005" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">archiveformat.cpp:48-49</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 style="color: #aa4000">const</span> <span class="n">QString</span><span style="color: #aa2211">&</span> <span class="n">defaultCompressionMethod<span class="bright"></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>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span style="color: #aa4000">const</span> <span class="n">QString</span><span style="color: #aa2211">&</span> <span class="n">defaultCompressionMethod<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="n">QVariantMap</span> <span class="n">encryptionMethods</span><span class="p">,</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="n">QString</span> <span class="n">defaultEncryptionMethod</span><span class="p">)</span> <span style="color: #aa2211">:</span>
</div><div style="padding: 0 8px; margin: 0 4px; "> <span class="n">m_mimeType</span><span class="p">(</span><span class="n">mimeType</span><span class="p">),</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Pass by reference</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/D3303#inline-13004" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">archiveformat.h:50-51</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 style="color: #aa4000">const</span> <span class="n">QString</span><span style="color: #aa2211">&</span> <span class="n">defaultCompressionMethod<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 style="color: #aa4000">const</span> <span class="n">QString</span><span style="color: #aa2211">&</span> <span class="n">defaultCompressionMethod<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="n">QVariantMap</span> <span class="n">encryptionMethods</span><span class="p">,</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="n">QString</span> <span class="n">defaultEncryptionMethod</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Pass by reference.</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/D3303#inline-13006" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">cliproperties.cpp:264</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="n">QString</span> <span class="n">cliMethod</span> <span style="color: #aa2211">=</span> <span class="n">ArchiveFormat</span><span style="color: #aa2211">::</span><span class="n">fromMetadata</span><span class="p">(</span><span class="n">m_mimeType</span><span class="p">,</span> <span class="n">m_metaData</span><span class="p">).</span><span class="n">encryptionMethods</span><span class="p">().</span><span class="n">value</span><span class="p">(</span><span class="n">method</span><span class="p">).</span><span class="n">toString</span><span class="p">();</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Double lookup, let's use a variable to hold the archive format object.</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/D3303#inline-13007" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">compressionoptionswidget.cpp:277</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 style="color: #aa4000">if</span> <span class="p">(</span><span class="n">value</span> <span style="color: #aa2211">==</span> <span class="n">QLatin1String</span><span class="p">(</span><span style="color: #766510">"RAR4"</span><span class="p">))</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="n">encMethodComboBox</span><span style="color: #aa2211">-></span><span class="n">clear</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="n">encMethodComboBox</span><span style="color: #aa2211">-></span><span class="n">insertItem</span><span class="p">(</span><span style="color: #601200">0</span><span class="p">,</span> <span class="n">QStringLiteral</span><span class="p">(</span><span style="color: #766510">"AES128"</span><span class="p">));</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">This can be moved before the if/else</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/D3303#inline-13008" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">propertiesdialog.cpp:87</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: #aa4000">case</span> <span class="n">Archive</span><span style="color: #aa2211">::</span><span style="color: #a0a000">Encrypted</span><span class="p">:</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #ffd0d0;"> <span class="n">m_ui</span><span style="color: #aa2211">-></span><span class="n">lblPasswordProtected</span><span style="color: #aa2211">-></span><span class="n">setText</span><span class="p">(</span><span class="n">i18n</span><span class="p">(</span><span style="color: #766510">"yes (<span class="bright">excluding the list of files)"</span></span><span class="p">));</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="n">m_ui</span><span style="color: #aa2211">-></span><span class="n">lblPasswordProtected</span><span style="color: #aa2211">-></span><span class="n">setText</span><span class="p">(</span><span class="n">i18n</span><span class="p">(</span><span style="color: #766510">"yes (<span class="bright">%1 encryption)"</span></span><span class="bright"></span><span class="p"><span class="bright">,</span></span><span class="bright"> </span><span class="n"><span class="bright">archive</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">property</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span style="color: #766510"><span class="bright">"encryptionMethods"</span></span><span class="bright"></span><span class="p"><span class="bright">).</span></span><span class="bright"></span><span class="n"><span class="bright">toStringList</span></span><span class="bright"></span><span class="p"><span class="bright">().</span></span><span class="bright"></span><span class="n"><span class="bright">join</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">QStringLiteral</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span style="color: #766510"><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; "> <span style="color: #aa4000">break</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I would keep the information about simple VS header-encryption. How about something like this:</p>
<p style="padding: 0; margin: 8px;">Password-protected: No | Only files content (<enc. method>) | Yes (<enc. method>)</p>
<p style="padding: 0; margin: 8px;">The last case is header encryption, but we don't really need to be that specific. After all it's our default in the CreateDialog, so a simple Yes could be enough here.</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>rARK Ark</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D3303" rel="noreferrer">https://phabricator.kde.org/D3303</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>rthomsen, elvisangelaccio<br /><strong>Cc: </strong>kde-utils-devel, tctara<br /></div>