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

Revamp resource embedding #7241

Merged
merged 1 commit into from
May 12, 2024
Merged

Revamp resource embedding #7241

merged 1 commit into from
May 12, 2024

Conversation

DomClark
Copy link
Member

@DomClark DomClark commented May 6, 2024

This doesn't offer any immediate benefits, but is part of the work I'm doing towards a plugin manager and scanning system. I've separated it out into its own PR for easier reviewing, since it stands well on its own anyway.

The main changes that are relevant to my other work are these:

  • The resource name passed to getIconPixmap can now be an absolute file path, to reference a file rather than embedded data.
  • PluginPixmapLoader::pixmapName now returns the actual resource name (as PixmapLoader already did), so passing that value to getIconPixmap will produce the same results as calling PluginPixmapLoader::pixmap.
  • The various resource functions and classes now take std::string_view or std::string instead of QString. The vast majority of calls to these pass string literals, so this has no effect in most cases. However, it helps reduce unnecessary Qt usage, and makes it simpler to use with standard library strings in the future.

Other noteable changes:

  • PluginPixmapLoader can take XPM data too.
  • PixmapLoader::pixmap now takes optional width and height parameters, like getIconPixmap.
  • XPM data can now be entirely const.

I have also done some general cleanup and improvements to the code.

@DomClark DomClark merged commit 95e5f97 into LMMS:master May 12, 2024
9 checks passed
@DomClark DomClark deleted the embed-revamp branch May 12, 2024 16:38
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.

3 participants