diff --git a/api/cpp/include/slint_string.h b/api/cpp/include/slint_string.h index f1a31c898e6..d4da51a630c 100644 --- a/api/cpp/include/slint_string.h +++ b/api/cpp/include/slint_string.h @@ -243,6 +243,13 @@ struct StyledText return *this; } + /// Move-assigns \a other to this StyledText instance. + StyledText &operator=(StyledText &&other) + { + std::swap(inner, other.inner); + return *this; + } + /// Returns true if \a a is equal to \a b; otherwise returns false. friend bool operator==(const StyledText &a, const StyledText &b) { @@ -250,7 +257,7 @@ struct StyledText } private: - void *paragraphs; + void *inner; }; namespace private_api {