1
0
mirror of synced 2025-01-30 19:43:43 +01:00

fix: More P2468R2 issues

This commit is contained in:
WerWolv 2023-02-02 21:13:56 +01:00
parent b1edede53a
commit 22ff033b5e
3 changed files with 4 additions and 5 deletions

View File

@ -276,8 +276,7 @@ namespace hex {
}
void openWebpage(std::string url) {
if (url.find("://") == std::string::npos)
if (!url.contains("://"))
url = "https://" + url;
#if defined(OS_WINDOWS)

View File

@ -219,7 +219,7 @@ namespace hex::plugin::builtin {
continue;
for (const auto &newHash : hashes) {
if (newHash->getUnlocalizedName() == hash["type"]) {
if (newHash->getUnlocalizedName() == hash["type"].get<std::string>()) {
auto newFunction = newHash->create(hash["name"]);
newFunction.getType()->load(hash["settings"]);

View File

@ -22,7 +22,7 @@ namespace hex::plugin::windows {
static void detectSystemTheme() {
// Setup system theme change detector
EventManager::subscribe<EventOSThemeChanged>([] {
bool themeFollowSystem = ContentRegistry::Settings::getSetting("hex.builtin.setting.interface", "hex.builtin.setting.interface.color") == api::ThemeManager::NativeTheme;
bool themeFollowSystem = ContentRegistry::Settings::getSetting("hex.builtin.setting.interface", "hex.builtin.setting.interface.color").get<std::string>() == api::ThemeManager::NativeTheme;
if (!themeFollowSystem)
return;
@ -43,7 +43,7 @@ static void detectSystemTheme() {
});
EventManager::subscribe<EventWindowInitialized>([=] {
bool themeFollowSystem = ContentRegistry::Settings::getSetting("hex.builtin.setting.interface", "hex.builtin.setting.interface.color") == api::ThemeManager::NativeTheme;
bool themeFollowSystem = ContentRegistry::Settings::getSetting("hex.builtin.setting.interface", "hex.builtin.setting.interface.color").get<std::string>() == api::ThemeManager::NativeTheme;
if (themeFollowSystem)
EventManager::post<EventOSThemeChanged>();