Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Qt6 port #53

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft

Initial Qt6 port #53

wants to merge 15 commits into from

Conversation

JamiKettunen
Copy link

@JamiKettunen JamiKettunen commented Nov 13, 2024

Builds as tested on Qt 6.8.0. Current status: asteroid-calculator with patches runs!

My AsteroidOS package integration work for Chimera Linux which this PR is a part of along with all other patches can be found at https://github.com/JamiKettunen/cports/commits/hybris/; I'll likely update this description when I have more stuff of interest to share..

This is a typo in all the existing docs.
@JamiKettunen JamiKettunen marked this pull request as draft November 13, 2024 01:45
@FlorentRevest
Copy link
Member

Oh nice! This is a very welcome step 😄 do you have broader plans regarding Qt6 adoption in Asteroid or was that a one-off experiment ? And if so, is there any way we could help or support you with that ?

@JamiKettunen
Copy link
Author

I do want to get all of the AsteroidOS UI and apps running on top of Qt6 with Halium/libhybris yes, but we'll see how large this ends up being as yet another project I've decided to undertake for some reason 🤣

@JamiKettunen

This comment was marked as outdated.

It's a POSIX sh script as indicated by its shebang.
To fix the following observed build warning:
src/app/asteroidapp.cpp:80:13: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
   80 |             translator->load(QLocale(), appName(), ".", "/usr/share/translations", ".qm");
      |             ^~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Re-use the already existing listing of controls used for documentation
generation as well.

WIP because this will be replaced by qt_add_qml_module()
Fixes runtime warnings such as:
  qt.qml.context: qrc:/org/asteroid/controls/qml/BorderGestureArea.qml:160:5 Parameter "mouse" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.

As an alternative the following also would work:
  function onPressed(mouse) { ... }
This doesn't work on Chimera Linux which uses the FreeBSD grep(1); adds
a new build-time dependency on xmllint which I'm not sure how to feel
about yet.
It's worth revisiting if this makes sense to keep as a dependency with
some repeatable benchmarks where a quantifiable difference may or may
not be observed when running this on a watch.

If this is to be removed cmake/FindMapplauncherd_qt*.cmake additionally
should also be gone.
Let's adopt QTP0001 already and move all per-application resources under
qrc:/qt/qml/AsteroidApp/
This one (for now at least) retains the manually written plugin instead
of generating one since it also changes the default font instead of just
calling qmlRegisterType for each C++ QML component:

  QGuiApplication::setFont(QFont("Noto Sans"));

If another way to accomplish the same task globally for anything using
org.asteroid.controls is found the same as one commit above for
org.asteroid.utils can also be done here and controls_plugin.* can be
done away with.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants