<table><tr><td style="">zzag requested changes to this revision.<br />zzag 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/D26859">View Revision</a></tr></table><br /><div><div><p>Good stuff! There are a couple of coding style issues.</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/D26859#inline-151880">View Inline</a><span style="color: #4b4d51; font-weight: bold;">mock_libinput.h:108</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">bool</span> <span class="n">setClickMethodReturnValue</span> <span style="color: #aa2211">=</span> <span style="color: #601200">0</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">uint32_t</span> <span class="n">num_buttons</span> <span style="color: #aa2211">=</span> <span style="color: #601200">0</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">uint32_t</span> <span class="n">num_strips</span> <span style="color: #aa2211">=</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;">I know that you want to match <tt style="background: #ebebeb; font-size: 13px;">libinput_device_tablet_pad_get_{value}</tt>, but please follow coding 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);">uint32_t buttonCount = 0;</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/D26859#inline-151882">View Inline</a><span style="color: #4b4d51; font-weight: bold;">input.cpp:1550</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: rgba(151, 234, 151, .6);"> <span class="p">}</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">auto</span> <span class="n">manager</span> <span style="color: #aa2211">=</span> <span class="n">server</span><span style="color: #aa2211">-></span><span class="n">tabletManager</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">return</span> <span class="n">manager</span><span style="color: #aa2211">-></span><span class="n">seat</span><span class="p">(</span><span class="n">findSeat</span><span class="p">());</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">No <tt style="background: #ebebeb; font-size: 13px;">auto</tt>.</p>
<p style="padding: 0; margin: 8px;"><a href="https://community.kde.org/Policies/Library_Code_Policy#auto_Keyword" class="remarkup-link" target="_blank" rel="noreferrer">https://community.kde.org/Policies/Library_Code_Policy#auto_Keyword</a></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/D26859#inline-151883">View Inline</a><span style="color: #4b4d51; font-weight: bold;">input.cpp:1633</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: rgba(151, 234, 151, .6);"> <span class="n">Toplevel</span> <span style="color: #aa2211">*</span><span class="n">t</span> <span style="color: #aa2211">=</span> <span class="n">input</span><span class="p">()</span><span style="color: #aa2211">-></span><span class="n">findToplevel</span><span class="p">(</span><span class="n">event</span><span style="color: #aa2211">-></span><span class="n">globalPos</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">t</span> <span style="color: #aa2211">||</span> <span style="color: #aa2211">!</span><span class="n">t</span><span style="color: #aa2211">-></span><span class="n">surface</span><span class="p">())</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">No short names.</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="cpp" 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);"><span class="n">Toplevel</span> <span style="color: #aa2211">*</span><span class="n">toplevel</span> <span style="color: #aa2211">=</span> <span class="p">...</span></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/D26859#inline-151884">View Inline</a><span style="color: #4b4d51; font-weight: bold;">input.cpp:1634-1635</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: rgba(151, 234, 151, .6);"> <span class="n">Toplevel</span> <span style="color: #aa2211">*</span><span class="n">t</span> <span style="color: #aa2211">=</span> <span class="n">input</span><span class="p">()</span><span style="color: #aa2211">-></span><span class="n">findToplevel</span><span class="p">(</span><span class="n">event</span><span style="color: #aa2211">-></span><span class="n">globalPos</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">t</span> <span style="color: #aa2211">||</span> <span style="color: #aa2211">!</span><span class="n">t</span><span style="color: #aa2211">-></span><span class="n">surface</span><span class="p">())</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">return</span> <span style="color: #304a96">false</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Should have braces.</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/D26859#inline-151885">View Inline</a><span style="color: #4b4d51; font-weight: bold;">input_event.h:183</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: rgba(151, 234, 151, .6);"> <span class="n">TabletEvent</span><span class="p">(</span><span class="n">Type</span> <span class="n">t</span><span class="p">,</span> <span style="color: #aa4000">const</span> <span class="n">QPointF</span> <span style="color: #aa2211">&</span><span class="n">pos</span><span class="p">,</span> <span style="color: #aa4000">const</span> <span class="n">QPointF</span> <span style="color: #aa2211">&</span><span class="n">globalPos</span><span class="p">,</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">int</span> <span class="n">device</span><span class="p">,</span> <span style="color: #aa4000">int</span> <span class="n">pointerType</span><span class="p">,</span> <span class="n">qreal</span> <span class="n">pressure</span><span class="p">,</span> <span style="color: #aa4000">int</span> <span class="n">xTilt</span><span class="p">,</span> <span style="color: #aa4000">int</span> <span class="n">yTilt</span><span class="p">,</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">qreal</span> <span class="n">tangentialPressure</span><span class="p">,</span> <span class="n">qreal</span> <span class="n">rotation</span><span class="p">,</span> <span style="color: #aa4000">int</span> <span class="n">z</span><span class="p">,</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">It's off by a single space.</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/D26859#inline-151886">View Inline</a><span style="color: #4b4d51; font-weight: bold;">input_event_spy.h:89</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: rgba(251, 175, 175, .7);"> <span class="n">virtual</span> <span style="color: #aa4000">void</span> <span style="color: #004012">tabletToolEvent</span><span class="p">(<span class="bright"></span></span><span class="bright"></span><span class="n"><span class="bright">Q</span>TabletEvent<span class="bright"></span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">*</span></span><span class="n">event</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">virtual</span> <span style="color: #aa4000">void</span> <span style="color: #004012">tabletToolEvent</span><span class="p">(</span><span class="n">TabletEvent<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">event</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; "> <span class="n">virtual</span> <span style="color: #aa4000">void</span> <span style="color: #004012">tabletToolButtonEvent</span><span class="p">(</span><span style="color: #aa4000">const</span> <span class="n">QSet</span><span style="color: #aa2211"><</span><span class="n">uint</span><span style="color: #aa2211">></span> <span style="color: #aa2211">&</span><span class="n">pressedButtons</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Align pointers and reference to right.</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/D26859#inline-151887">View Inline</a><span style="color: #4b4d51; font-weight: bold;">connection.cpp:510-512</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: rgba(151, 234, 151, .6);"><span style="color: #74777d">// case LIBINPUT_TABLET_TOOL_TYPE_TOTEM:</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #74777d">// toolType = InputRedirection::Totem;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #74777d">// break;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Please don't submit commented code unless there is a reason.</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R108 KWin</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D26859">https://phabricator.kde.org/D26859</a></div></div><br /><div><strong>To: </strong>apol, KWin, Plasma, zzag<br /><strong>Cc: </strong>zzag, kwin, Orage, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart<br /></div>