About: Use Qt.createComponent to create About Page
This MR replaces the AboutPage.qml
file with Qt.createComponent
, which my understand is that this is a re-usable Kirigami-Addons component that can automatically create the AboutPage using the project's defined KAboutData
in main.cpp
. This means having a dedicated file is not necessary, and we can simply change the topAboutComp
component (which I believe is the component that gets loaded when the aboutAction
is triggered, although I'm not too familiar with all the specifics) to use the URL to the KirigamiAddons QML file that displays the AboutPage FormCard.
Applications which use pages to do this can use something to the effect of pageStack.push
to push the component, but some applications would need to use the URL to the component directly I believe. That is why for this MR, I used Qt.createComponent().url
, but why other MRs like for Plasma System Monitor (plasma-systemmonitor!277 (merged)) or Francis (utilities/francis!20 (merged)), they don't use this .url
property.
This MR should not result in any visual difference for the AboutPage, in Widescreen or Mobile configurations.
Before
After (This MR)
Note: This MR does mean that Discover will require Kirigami-Addons v1.1.0 as far as I'm aware. I am not sure if this needs to be explicitly specified in, for example, CMakeLists.txt
(it is changed in Plasma System Monitor MR, but was not requested when I opened the Francis MR). Let me know if I need to update anything here or made any mistakes, or if this is undesired and was not used for a reason. I am not super familiar with the ins and outs of when these types of components are or are not used, it just seems like other applications are porting to use this and that it helps centralize the layout and creation of these "standard" pages.
All feedback is welcome. Thanks!