Update to spice2x-25-04-25 (pre-apply)

> broken commit
This commit is contained in:
[ ]
2025-05-07 00:25:31 +09:00
parent 04dee88276
commit c94de456b5
543 changed files with 78491 additions and 91698 deletions
+13 -1
View File
@@ -3,6 +3,7 @@
#include <string>
#include <utility>
#include <vector>
#include <cstdint>
enum class OptionType {
Bool,
@@ -14,7 +15,14 @@ enum class OptionType {
struct OptionDefinition {
std::string title;
// unique identifier used for flag matching but also stored in config files
// (should not be changed once published for compat)
std::string name;
// what's displayed in the UI/logs as the flag name
std::string display_name = "";
// slash-delimited list of strings that also work as flag
std::string aliases = "";
// what's displayed in the UI/logs as the tooltip
std::string desc;
OptionType type;
bool hidden = false;
@@ -23,11 +31,13 @@ struct OptionDefinition {
std::string category = "Development";
bool sensitive = false;
std::vector<std::pair<std::string, std::string>> elements = {};
bool disabled = false;
};
class Option {
private:
OptionDefinition definition;
std::string search_string;
public:
std::string value;
@@ -35,7 +45,8 @@ public:
bool disabled = false;
explicit Option(OptionDefinition definition, std::string value = "") :
definition(std::move(definition)), value(std::move(value)) {};
definition(std::move(definition)), value(std::move(value)) {
};
inline const OptionDefinition &get_definition() const {
return this->definition;
@@ -57,4 +68,5 @@ public:
std::vector<std::string> values_text() const;
uint32_t value_uint32() const;
uint64_t value_hex64() const;
bool search_match(const std::string &query_in_lower_case);
};