Fix C++ build

With ImageInner::StaticTextures (the variant) and StaticTextures (the
struct), we need to disambiguate for the generated enum contructor
functions. This is done by prefixing the enum variant with their name.
This commit is contained in:
Simon Hausmann 2022-03-03 14:39:11 +01:00
parent f1dae75d53
commit 583c7a1b80
4 changed files with 5 additions and 3 deletions

View file

@ -15,13 +15,13 @@ namespace slint {
struct Image
{
public:
Image() : data(Data::None()) { }
Image() : data(Data::ImageInner_None()) { }
/// Load an image from an image file
static Image load_from_path(const SharedString &file_path)
{
Image img;
img.data = Data::AbsoluteFilePath(file_path);
img.data = Data::ImageInner_AbsoluteFilePath(file_path);
return img;
}