lmms
lmms copied to clipboard
Revamp resource embedding
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
getIconPixmapcan now be an absolute file path, to reference a file rather than embedded data. PluginPixmapLoader::pixmapNamenow returns the actual resource name (asPixmapLoaderalready did), so passing that value togetIconPixmapwill produce the same results as callingPluginPixmapLoader::pixmap.- The various resource functions and classes now take
std::string_vieworstd::stringinstead ofQString. 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:
PluginPixmapLoadercan take XPM data too.PixmapLoader::pixmapnow takes optional width and height parameters, likegetIconPixmap.- XPM data can now be entirely const.
I have also done some general cleanup and improvements to the code.