<table><tr><td style="">ngraham requested changes to this revision.<br />ngraham 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/D19838">View Revision</a></tr></table><br /><div><div><p>Mostly good, just a new nitpicks and suggestions:</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/D19838#inline-111413">View Inline</a><span style="color: #4b4d51; font-weight: bold;">powerdevilcore.cpp:256</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 class="n">QString</span> <span class="n">activity</span> <span style="color: #aa2211">=</span> <span class="n">m_activityConsumer</span><span style="color: #aa2211">-></span><span class="n">currentActivity</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">qCDebug</span><span class="p">(</span><span class="n">POWERDEVIL</span><span class="p">)</span> <span style="color: #aa2211"><<</span> <span style="color: #766510">"We are now in<span class="bright">to</span> activity "</span> <span style="color: #aa2211"><<</span> <span class="n">activity</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">qCDebug</span><span class="p">(</span><span class="n">POWERDEVIL</span><span class="p">)</span> <span style="color: #aa2211"><<</span> <span style="color: #766510">"We are now in activity "</span> <span style="color: #aa2211"><<</span> <span class="n">activity</span><span class="p">;<span class="bright"></span></span><span class="bright"> </span><span style="color: #74777d"><span class="bright">// into? direction?</span></span>
</div><div style="padding: 0 8px; margin: 0 4px; "> <span class="n">KConfigGroup</span> <span style="color: #004012">activitiesConfig</span><span class="p">(</span><span class="n">m_profilesConfig</span><span class="p">,</span> <span style="color: #766510">"Activities"</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I'd say "using activity <whatever>"</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/D19838#inline-111414">View Inline</a><span style="color: #4b4d51; font-weight: bold;">powerdevilcore.cpp:330</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">emitNotification</span><span class="p">(</span><span class="n">QStringLiteral</span><span class="p">(</span><span style="color: #766510">"powerdevilerror"</span><span class="p">),</span> <span class="n">i18n</span><span class="p">(</span><span style="color: #766510">"<span class="bright">The p</span>rofile </span><span style="color: #bb6622">\"</span><span style="color: #766510">%1</span><span style="color: #bb6622">\"</span><span style="color: #766510"> has been selected, "</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #766510">"but <span class="bright">it</span> does not exist.</span><span style="color: #bb6622">\n</span><span style="color: #766510">Please check your PowerDevil configuration."</span><span class="p">,</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">emitNotification</span><span class="p">(</span><span class="n">QStringLiteral</span><span class="p">(</span><span style="color: #766510">"powerdevilerror"</span><span class="p">),</span> <span class="n">i18n</span><span class="p">(</span><span style="color: #766510">"<span class="bright">P</span>rofile </span><span style="color: #bb6622">\"</span><span style="color: #766510">%1</span><span style="color: #bb6622">\"</span><span style="color: #766510"> has been selected, "</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #766510">"but <span class="bright">the profile</span> does not exist.</span><span style="color: #bb6622">\n</span><span style="color: #766510">Please check your PowerDevil configuration."</span><span class="p">,</span>
</div><div style="padding: 0 8px; margin: 0 4px; "> <span class="n">profileId</span><span class="p">));</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Remove "the profile"</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/D19838#inline-111415">View Inline</a><span style="color: #4b4d51; font-weight: bold;">powerdevilcore.cpp:367</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: #aa2211"><<</span> <span class="n">actionName</span> <span style="color: #aa2211"><<</span> <span style="color: #766510">"a non-existent action. This is usually due to an installation problem,"</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #766510">" <span class="bright">or to </span>a configuration problem, or<span class="bright"> simply</span> the action is not supported"</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #766510">" a configuration problem, or the action is not supported"</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; "> <span class="p">}</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">"or the action is not supported" -> "or the action not being supported"</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/D19838#inline-111417">View Inline</a><span style="color: #4b4d51; font-weight: bold;">powerdevilcore.cpp:541</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 class="n">msg</span> <span style="color: #aa2211">=</span> <span class="n">i18nc</span><span class="p">(</span><span style="color: #766510">"Placeholder is device name"</span><span class="p">,</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #766510">"The battery in <span class="bright">your mouse </span>(</span><span style="color: #bb6622">\"</span><span style="color: #766510">%1</span><span style="color: #bb6622">\"</span><span style="color: #766510">) is low, and the device may turn<span class="bright"> itself</span> off at any time. "</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #766510">"Please re<span class="bright">plac</span>e or <span class="bright">charg</span>e the battery<span class="bright"> as soon as possible</span>."</span><span class="p">,</span> <span class="n">name</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #766510">"The battery in (</span><span style="color: #bb6622">\"</span><span style="color: #766510">%1</span><span style="color: #bb6622">\"</span><span style="color: #766510">) is <span class="bright">running </span>low, and the device may turn off at any time. "</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #766510">"Please re<span class="bright">charg</span>e or <span class="bright">replac</span>e the battery."</span><span class="p">,</span> <span class="n">name</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Are we 100% sure that <tt style="background: #ebebeb; font-size: 13px;">name</tt> will always be a good enough string that the user will recognize it as their mouse? (not a rhetorical question, I really am wondering :) )</p>
<p style="padding: 0; margin: 8px;">Same for other instances below too.</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/D19838#inline-111419">View Inline</a><span style="color: #4b4d51; font-weight: bold;">powerdevilcore.cpp:607</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">PowerDevil</span><span style="color: #aa2211">::</span><span class="n">BundledActions</span><span style="color: #aa2211">::</span><span class="n">SuspendSession</span><span style="color: #aa2211">::</span><span style="color: #a0a000">ToDiskMode</span><span class="p">:</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">m_criticalBatteryNotification</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">"<span class="bright">Your b</span>attery level <span class="bright">is </span>critical<span class="bright">, the</span> computer will <span class="bright">be</span> hibernat<span class="bright">ed</span> in 60 seconds."</span><span class="p">));</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">m_criticalBatteryNotification</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">"<span class="bright">B</span>attery level critical<span class="bright">. Your</span> computer will <span class="bright">go into</span> hibernat<span class="bright">ion mode</span> in 60 seconds."</span><span class="p">));</span>
</div><div style="padding: 0 8px; margin: 0 4px; "> <span class="n">m_criticalBatteryNotification</span><span style="color: #aa2211">-></span><span class="n">setActions</span><span class="p">(</span><span class="n">actions</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">"go into" -> "enter" ?</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/D19838#inline-111420">View Inline</a><span style="color: #4b4d51; font-weight: bold;">powerdevilcore.cpp:612</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">PowerDevil</span><span style="color: #aa2211">::</span><span class="n">BundledActions</span><span style="color: #aa2211">::</span><span class="n">SuspendSession</span><span style="color: #aa2211">::</span><span style="color: #a0a000">ToRamMode</span><span class="p">:</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">m_criticalBatteryNotification</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">"<span class="bright">Your b</span>attery level <span class="bright">is </span>critical<span class="bright">, the</span> computer will <span class="bright">be suspended</span> in 60 seconds."</span><span class="p">));</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">m_criticalBatteryNotification</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">"<span class="bright">B</span>attery level critical<span class="bright">. Your</span> computer will <span class="bright">go to sleep</span> in 60 seconds."</span><span class="p">));<span class="bright"></span></span><span class="bright"> </span><span style="color: #74777d"><span class="bright">// go into sleep mode?</span></span>
</div><div style="padding: 0 8px; margin: 0 4px; "> <span class="n">m_criticalBatteryNotification</span><span style="color: #aa2211">-></span><span class="n">setActions</span><span class="p">(</span><span class="n">actions</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">"go to sleep" is just fine 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/D19838#inline-111422">View Inline</a><span style="color: #4b4d51; font-weight: bold;">powerdevilcore.cpp:643</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 class="p">}</span> <span style="color: #aa4000">else</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">emitRichNotification</span><span class="p">(</span><span class="n">QStringLiteral</span><span class="p">(</span><span style="color: #766510">"pluggedin"</span><span class="p">),</span> <span class="n">i18n</span><span class="p">(</span><span style="color: #766510">"Running on AC power"</span><span class="p">),</span> <span class="n">i18n</span><span class="p">(</span><span style="color: #766510">"The power adapt<span class="bright">o</span>r has been plugged in."</span><span class="p">));</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">emitRichNotification</span><span class="p">(</span><span class="n">QStringLiteral</span><span class="p">(</span><span style="color: #766510">"pluggedin"</span><span class="p">),</span> <span class="n">i18n</span><span class="p">(</span><span style="color: #766510">"Running on AC power"</span><span class="p">),</span> <span class="n">i18n</span><span class="p">(</span><span style="color: #766510">"The power adapt<span class="bright">e</span>r has been plugged in."</span><span class="p">));<span class="bright"></span></span><span class="bright"> </span><span style="color: #74777d"><span class="bright">//uniform spelling throughout (either -er or -or, not both)</span></span>
</div><div style="padding: 0 8px; margin: 0 4px; "> <span class="p">}</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Not sure this comment is really necessary :)</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R122 Powerdevil</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D19838">https://phabricator.kde.org/D19838</a></div></div><br /><div><strong>To: </strong>rooty, VDG, Plasma, broulik, ngraham, filipf<br /><strong>Cc: </strong>plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>