<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>C++ on Ilya's Blog</title><link>https://ilyabiz.com/tags/c++/</link><description>Recent content in C++ on Ilya's Blog</description><generator>Hugo</generator><language>en-DE</language><copyright>2026 Ilya Bizyaev</copyright><lastBuildDate>Fri, 23 Feb 2024 23:17:07 +0000</lastBuildDate><atom:link href="https://ilyabiz.com/tags/c++/feed.xml" rel="self" type="application/rss+xml"/><item><title>cursor-shape-v1 in Chromium and Electron</title><link>https://ilyabiz.com/2024/02/cursor-shape-v1-in-chromium-and-electron/</link><pubDate>Fri, 23 Feb 2024 23:17:07 +0000</pubDate><guid isPermaLink="false">https://ilyabiz.com/?p=777</guid><description>&lt;p&gt;Just in time for KDE Plasma 6, &lt;a href="https://chromereleases.googleblog.com/2024/02/stable-channel-update-for-desktop_20.html"&gt;Chromium 122&lt;/a&gt; and &lt;a href="https://github.com/electron/electron/releases/tag/v29.0.0" title="Electron 29"&gt;Electron 29&lt;/a&gt; have been released! They contain &lt;a href="https://chromium-review.googlesource.com/c/chromium/src/+/5196950" title="patch"&gt;my patch&lt;/a&gt; that adds support for Wayland&amp;rsquo;s new &lt;a href="https://wayland.app/protocols/cursor-shape-v1" title="cursor-shape-v1"&gt;cursor-shape-v1&lt;/a&gt; extension protocol.&lt;/p&gt;
&lt;p&gt;When running natively in a Plasma 6 Wayland session, up-to-date Chromium-based browsers and Electron apps should now always use the correct mouse cursor theme and have the cursor drawn in the correct size, even when running in a Flatpak sandbox.&lt;/p&gt;
&lt;p&gt;You can enable Chromium&amp;rsquo;s native Wayland support by setting &lt;a href="chrome://flags/#ozone-platform-hint"&gt;chrome://flags/#ozone-platform-hint&lt;/a&gt; to “Auto” or with a &lt;a href="https://wiki.archlinux.org/title/chromium#Native_Wayland_support" title="command-line flag"&gt;command-line flag&lt;/a&gt;. There are &lt;a href="https://wiki.archlinux.org/title/Wayland#Electron" title="multiple ways"&gt;multiple ways&lt;/a&gt; to apply this preference to Electron apps as well.&lt;/p&gt;</description><content:encoded><![CDATA[<p>Just in time for KDE Plasma 6, <a href="https://chromereleases.googleblog.com/2024/02/stable-channel-update-for-desktop_20.html">Chromium 122</a> and <a href="https://github.com/electron/electron/releases/tag/v29.0.0" title="Electron 29">Electron 29</a> have been released! They contain <a href="https://chromium-review.googlesource.com/c/chromium/src/+/5196950" title="patch">my patch</a> that adds support for Wayland&rsquo;s new <a href="https://wayland.app/protocols/cursor-shape-v1" title="cursor-shape-v1">cursor-shape-v1</a> extension protocol.</p>
<p>When running natively in a Plasma 6 Wayland session, up-to-date Chromium-based browsers and Electron apps should now always use the correct mouse cursor theme and have the cursor drawn in the correct size, even when running in a Flatpak sandbox.</p>
<p>You can enable Chromium&rsquo;s native Wayland support by setting <a href="chrome://flags/#ozone-platform-hint">chrome://flags/#ozone-platform-hint</a> to “Auto” or with a <a href="https://wiki.archlinux.org/title/chromium#Native_Wayland_support" title="command-line flag">command-line flag</a>. There are <a href="https://wiki.archlinux.org/title/Wayland#Electron" title="multiple ways">multiple ways</a> to apply this preference to Electron apps as well.</p>
<p>To check whether an app runs natively on Wayland or relies on the XWayland compatibility layer, you can look up <code>kwin</code> in any KRunner-enabled search bar (e.g. in the app launcher) and select “Open KWin debug console”.</p>
<p>Hope this helps! 😃</p>
]]></content:encoded></item><item><title>Automatic QML import by Qt deployment tools</title><link>https://ilyabiz.com/2018/11/automatic-qml-import-by-qt-deployment-tools/</link><pubDate>Sun, 25 Nov 2018 22:57:05 +0000</pubDate><guid isPermaLink="false">https://ilyabiz.com/?p=360</guid><description>&lt;p&gt;There was a small problem with Qt&amp;rsquo;s deployment tools that could, however, cause some struggle for beginners. windeployqt, macdeployqt and linuxdeployqt could not add a third-party Qt Quick module (i.e. one that is not located inside Qt&amp;rsquo;s installation directory, like &lt;a href="https://www.kde.org/products/kirigami/"&gt;Kirigami&lt;/a&gt;) to the resulting bundle.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Kirigami QML module files in a file manager" loading="lazy" src="https://ilyabiz.com/2018/11/automatic-qml-import-by-qt-deployment-tools/kirigami-qml-module.png"&gt;&lt;/p&gt;
&lt;p&gt;It was, of course, possible to workaround the issue by copying the missing files to their expected locations with &lt;a href="https://invent.kde.org/network/kaidan/-/blob/163523212016418dcc10929aefe4abecf692c127/utils/build-mac.sh#L173"&gt;a script&lt;/a&gt; or manually. For non-systemwide Qt installations, there was also an option of installing the libraries by side with Qt&amp;rsquo;s own modules. However, these are still platform-dependent workarounds we shouldn&amp;rsquo;t rely on long-term.&lt;/p&gt;</description><content:encoded><![CDATA[<p>There was a small problem with Qt&rsquo;s deployment tools that could, however, cause some struggle for beginners. windeployqt, macdeployqt and linuxdeployqt could not add a third-party Qt Quick module (i.e. one that is not located inside Qt&rsquo;s installation directory, like <a href="https://www.kde.org/products/kirigami/">Kirigami</a>) to the resulting bundle.</p>
<p><img alt="Kirigami QML module files in a file manager" loading="lazy" src="/2018/11/automatic-qml-import-by-qt-deployment-tools/kirigami-qml-module.png"></p>
<p>It was, of course, possible to workaround the issue by copying the missing files to their expected locations with <a href="https://invent.kde.org/network/kaidan/-/blob/163523212016418dcc10929aefe4abecf692c127/utils/build-mac.sh#L173">a script</a> or manually. For non-systemwide Qt installations, there was also an option of installing the libraries by side with Qt&rsquo;s own modules. However, these are still platform-dependent workarounds we shouldn&rsquo;t rely on long-term.</p>
<p>I faced this issue when trying to package <a href="https://kaidan.im">Kaidan</a>, a Qt Quick XMPP client, as an AppImage. After a <a href="https://github.com/probonopd/linuxdeployqt/issues/319">discussion</a> with linuxdeployqt&rsquo;s contributors and some research, I found that internally the tool uses <code>qmlimportscanner</code> to locate the imported modules, but only passes <code>QT_INSTALL_QML</code> (Qt&rsquo;s own modules location) to the scanner. It was clearly missing an option to list custom import paths, like <code>-qmlimport</code>. That was easy to fix, <a href="https://github.com/probonopd/linuxdeployqt/pull/320">and so I did</a>.</p>
<p>linuxdeployqt is a fork of macdeployqt, and so I decided it makes sense to upstream my changes. I <a href="https://forum.qt.io/topic/95157/deploying-3rdparty-qt-quick-plugins-on-macos">made sure</a> I&rsquo;m not missing anything, then started a <a href="https://codereview.qt-project.org/242083">Gerrit revision</a>.</p>
<p>While my changes were pending approval, I looked into windeployqt&rsquo;s sources and submitted a <a href="https://codereview.qt-project.org/242315">matching revision</a> to that tool.</p>
<p>When <a href="https://github.com/probonopd/linuxdeployqt/commit/8b3ded6a4ce66a88a48463caec92a7306e2d0069">all</a> <a href="https://code.qt.io/cgit/qt/qttools.git/commit/?h=dev&amp;id=24189b5f0935914a979b7e9d3786bec8f9f019bc">three</a> <a href="https://code.qt.io/cgit/qt/qttools.git/commit/?h=dev&amp;id=3d3ec897712f590e9e4e5ffad4b7017e235295cb">commits</a> had been merged, I <a href="https://codereview.qt-project.org/244161">documented</a> my changes.</p>
<h3 id="conclusion">Conclusion</h3>
<p>Starting with Qt 5.13 there&rsquo;ll be an option in Qt deployment tools ( <code>-qmlimport</code>) to specify custom import paths for Qt Quick libraries. As a nice bonus, this option also allows to choose between multiple versions of a library installed at different locations. For a more in-depth explanation of the change, please refer to <a href="https://github.com/probonopd/linuxdeployqt/issues/319#issuecomment-426755469">this comment</a>.</p>
<p>Contributing to Qt is not that difficult, and making even a small useful change feels so nice 🙂</p>
<p><img alt="Kaidan XMPP login screen running on macOS" loading="lazy" src="/2018/11/automatic-qml-import-by-qt-deployment-tools/kaidan-login.jpg"></p>
<p>If you hesitated to try <a href="https://www.kde.org/products/kirigami/">Kirigami</a> in your project because of deployment quirks, give it a go now! Join us on <a href="irc://chat.freenode.net/kde-kirigami">IRC</a> or <a href="https://matrix.to/#/#kirigami:matrix.org">Matrix</a>, take a look at the <a href="https://api.kde.org/kirigami-index.html">docs</a> and have fun creating! 😃</p>
]]></content:encoded></item><item><title>C++ Russia 2018</title><link>https://ilyabiz.com/2018/05/cpp-russia-2018/</link><pubDate>Tue, 22 May 2018 16:52:54 +0000</pubDate><guid isPermaLink="false">https://ilyabizyaev.wordpress.com/?p=202</guid><description>&lt;p&gt;Better late than never, right? 🙂&lt;/p&gt;
&lt;p&gt;I finally got a small break from the endless studies, so I decided to share my experience during &lt;a href="https://cppconf.ru"&gt;C++ Russia 2018&lt;/a&gt;, an amazing C++ developer conference that I was lucky to attend as a volunteer.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Ilya wearing a C++ Russia 2018 volunteer shirt" loading="lazy" src="https://ilyabiz.com/2018/05/cpp-russia-2018/volunteer-selfie.jpg"&gt;&lt;/p&gt;
&lt;p&gt;The conference is a fun 3-day-long event hosted by the C++ Russia User Group, and an opportunity to listen to deep knowledge and practical wisdom of speakers from all over the world. This year&amp;rsquo;s keynote speaker was Jon Kalb, a C++ developer with 25-years of experience.&lt;/p&gt;</description><content:encoded><![CDATA[<p>Better late than never, right? 🙂</p>
<p>I finally got a small break from the endless studies, so I decided to share my experience during <a href="https://cppconf.ru">C++ Russia 2018</a>, an amazing C++ developer conference that I was lucky to attend as a volunteer.</p>
<p><img alt="Ilya wearing a C++ Russia 2018 volunteer shirt" loading="lazy" src="/2018/05/cpp-russia-2018/volunteer-selfie.jpg"></p>
<p>The conference is a fun 3-day-long event hosted by the C++ Russia User Group, and an opportunity to listen to deep knowledge and practical wisdom of speakers from all over the world. This year&rsquo;s keynote speaker was Jon Kalb, a C++ developer with 25-years of experience.</p>
<p>I managed to attend a number of talks, including:</p>
<ul>
<li><strong>Interactive C++ Compilation (REPL): The Lean Way</strong> by Viktor Kirilov</li>
<li><strong>C++ No-Launch Code Debugging</strong> by Anastasia Kazakova</li>
<li><strong>Building in Docker with Conan</strong> by Evgeny Lukyanets</li>
<li><strong>Concept Based Testing</strong> by Dietmar Kühl</li>
<li><strong>CMake Pitfalls and Where to Find Them</strong> by Dmitry Kozhevnikov</li>
<li><strong>WebAssembly Transition: Is It Worth It?</strong> by Pavel Bulatov</li>
</ul>
<p><img alt="Dietmar Kühl giving a talk about concept-based testing" loading="lazy" src="/2018/05/cpp-russia-2018/concepts-testing-talk.jpg"></p>
<p>I have also met many interesting people, some developers I previously messaged with, and made new friends 🙂</p>
<p>I would like to thank Sergey Platonov, the event manager, for this awesome experience.</p>
<figure>
    <img loading="lazy" src="registration-table.jpg"
         alt="The C&#43;&#43; Russia registration table ready for attendees"/> <figcaption>
            <p>Registration Awaits!</p>
        </figcaption>
</figure>

<figure>
    <img loading="lazy" src="plasma-presentation-room.jpg"
         alt="KDE Plasma displayed in a C&#43;&#43; Russia presentation room"/> <figcaption>
            <p>KDE software lights up the place!</p>
        </figcaption>
</figure>

<figure>
    <img loading="lazy" src="volunteer-team.jpg"
         alt="Five volunteers behind the scenes at C&#43;&#43; Russia 2018"/> <figcaption>
            <p>The Brave Team behind the scenes</p>
        </figcaption>
</figure>

]]></content:encoded></item></channel></rss>