<table><tr><td style="">broulik 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/D14060">View Revision</a></tr></table><br /><div><div></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/D14060#inline-73934">View Inline</a><span style="color: #4b4d51; font-weight: bold;">testkwaylandbackend.cpp:88</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">// and thus connect to our internal test server.</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">setenv</span><span class="p">(</span><span style="color: #766510">"WAYLAND_DISPLAY"</span><span class="p">,</span> <span class="n">s_socketName</span><span class="p">.</span><span class="n">toLocal8Bit</span><span class="p">()<span class="bright">,</span></span><span class="bright"> </span><span style="color: #601200"><span class="bright">1</span></span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">setenv</span><span class="p">(</span><span style="color: #766510">"WAYLAND_DISPLAY"</span><span class="p">,</span> <span class="n">s_socketName</span><span class="p">.</span><span class="n">toLocal8Bit</span><span class="p">()<span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">constData</span></span><span class="bright"></span><span class="p"><span class="bright">(),</span></span><span class="bright"> </span><span style="color: #304a96"><span class="bright">true</span></span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; "> <span class="n">m_server</span><span style="color: #aa2211">-></span><span class="n">start</span><span class="p">();</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Why <tt style="background: #ebebeb; font-size: 13px;">true</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/D14060#inline-73935">View Inline</a><span style="color: #4b4d51; font-weight: bold;">testlog.cpp:52</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">QStandardPaths</span><span style="color: #aa2211">::</span><span class="n">setTestModeEnabled</span><span class="p">(</span><span style="color: #304a96">true</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">m_defaultLogFile</span> <span style="color: #aa2211">=</span> <span class="n">QStandardPaths</span><span style="color: #aa2211">::</span><span class="n">writableLocation</span><span class="p">(</span><span class="n">QStandardPaths</span><span style="color: #aa2211">::</span><span class="n">GenericDataLocation</span><span class="p">)</span> <span style="color: #aa2211">+</span> <span style="color: #766510">"/kscreen/kscreen.log"</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">m_defaultLogFile</span> <span style="color: #aa2211">=</span> <span class="n">QStandardPaths</span><span style="color: #aa2211">::</span><span class="n">writableLocation</span><span class="p">(</span><span class="n">QStandardPaths</span><span style="color: #aa2211">::</span><span class="n">GenericDataLocation</span><span class="p">)</span> <span style="color: #aa2211">+</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 style="color: #766510">"/kscreen/kscreen.log"<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 class="p">}</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I thought when concatenating the advantage of <tt style="background: #ebebeb; font-size: 13px;">QStringLiteral</tt> don't cut it since you already have a string so should be <tt style="background: #ebebeb; font-size: 13px;">QLatin1String</tt> instead?</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/D14060#inline-73937">View Inline</a><span style="color: #4b4d51; font-weight: bold;">testqscreenbackend.cpp:62</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">m_backend</span> <span style="color: #aa2211">=</span> <span class="n">qgetenv</span><span class="p">(</span><span style="color: #766510">"KSCREEN_BACKEND"</span><span class="p">)<span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">constData</span></span><span class="bright"></span><span class="p"><span class="bright">(</span>);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">m_backend</span> <span style="color: #aa2211">=</span> <span class="bright"></span><span class="n"><span class="bright">QString</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">fromUtf8</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="n">qgetenv</span><span class="p">(</span><span style="color: #766510">"KSCREEN_BACKEND"</span><span class="p">));</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Not from local 8 bit?</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/D14060#inline-73936">View Inline</a><span style="color: #4b4d51; font-weight: bold;">testqscreenbackend.cpp:174</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">QVariantMap</span> <span class="n">info</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="bright"> </span><span class="n"><span class="bright">info</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">"id"</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">output</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">id</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;">Could use initializer list</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/D14060#inline-73938">View Inline</a><span style="color: #4b4d51; font-weight: bold;">testscreenconfig.cpp:104</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">QCOMPARE</span><span class="p">(</span><span class="n">output</span><span style="color: #aa2211">-></span><span class="n">name</span><span class="p">(),</span> <span class="n">QString</span><span class="p">(</span><span style="color: #766510">"LVDS1"</span><span class="p">));</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">QCOMPARE</span><span class="p">(</span><span class="n">output</span><span style="color: #aa2211">-></span><span class="n">name</span><span class="p">(),</span> <span class="n">QString<span class="bright">Literal</span></span><span class="p">(</span><span style="color: #766510">"LVDS1"</span><span class="p">));</span>
</div><div style="padding: 0 8px; margin: 0 4px; "> <span class="n">QCOMPARE</span><span class="p">(</span><span class="n">output</span><span style="color: #aa2211">-></span><span class="n">type</span><span class="p">(),</span> <span class="n">Output</span><span style="color: #aa2211">::</span><span class="n">Panel</span><span class="p">);</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;">QLatin1String</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/D14060#inline-73939">View Inline</a><span style="color: #4b4d51; font-weight: bold;">parser.cpp:187</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 style="color: #aa4000">if</span> <span class="p">(</span><span class="n">map</span><span class="p">.</span><span class="n">contains</span><span class="p">(</span><span style="color: #766510">"size"</span><span class="p">))</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">output</span><span style="color: #aa2211">-></span><span class="n">setSize</span><span class="p">(</span><span class="n">Parser</span><span style="color: #aa2211">::</span><span class="n">sizeFromJson</span><span class="p">(</span><span class="n">map</span><span class="p">[</span><span style="color: #766510">"size"</span><span class="p">].</span><span class="n">toMap</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 class="n">map</span><span class="p">.</span><span class="n">contains</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 style="color: #766510">"size"<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: rgba(151, 234, 151, .6);"> <span class="n">output</span><span style="color: #aa2211">-></span><span class="n">setSize</span><span class="p">(</span><span class="n">Parser</span><span style="color: #aa2211">::</span><span class="n">sizeFromJson</span><span class="p">(</span><span class="n">map</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 style="color: #766510">"size"<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">)</span>].</span><span class="n">toMap</span><span class="p">()));</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;">QLatin1String</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/D14060#inline-73940">View Inline</a><span style="color: #4b4d51; font-weight: bold;">xrandr11.cpp:174</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">xcb_generic_error_t</span> <span style="color: #aa2211">*</span><span class="n">err</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">const</span> <span style="color: #aa4000">int</span> <span class="n">sizeId</span> <span style="color: #aa2211">=</span> <span class="n">mode</span><span style="color: #aa2211">-></span><span class="n">id</span><span class="p">().</span><span class="n">split</span><span class="p">(<span class="bright"></span></span><span class="bright"></span><span style="color: #766510"><span class="bright">"-"</span></span><span class="p">).</span><span class="n">first</span><span class="p">().</span><span class="n">toInt</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">const</span> <span style="color: #aa4000">int</span> <span class="n">sizeId</span> <span style="color: #aa2211">=</span> <span class="n">mode</span><span style="color: #aa2211">-></span><span class="n">id</span><span class="p">().</span><span class="n">split</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><span class="n">first</span><span class="p">().</span><span class="n">toInt</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; "> <span style="color: #aa4000">auto</span> <span class="n">cookie</span> <span style="color: #aa2211">=</span> <span class="n">xcb_randr_set_screen_config</span><span class="p">(</span><span class="n">XCB</span><span style="color: #aa2211">::</span><span class="n">connection</span><span class="p">(),</span> <span class="n">xcbScreen</span><span style="color: #aa2211">-></span><span class="n">root</span><span class="p">,</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;">QLatin1Char</tt>?</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R110 KScreen Library</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D14060">https://phabricator.kde.org/D14060</a></div></div><br /><div><strong>To: </strong>gladhorn, Plasma, davidedmundson<br /><strong>Cc: </strong>broulik, davidedmundson, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>