mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-11 06:15:05 +00:00
plugin: Add function to open an URL
This commit is contained in:
parent
21d455b674
commit
48ba34538e
2 changed files with 12 additions and 0 deletions
|
@ -294,3 +294,11 @@ std::filesystem::path streamfx::config_file_path(std::string_view file)
|
||||||
throw std::runtime_error("obs_module_get_config_path returned nullptr");
|
throw std::runtime_error("obs_module_get_config_path returned nullptr");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_FRONTEND
|
||||||
|
bool streamfx::open_url(std::string_view url)
|
||||||
|
{
|
||||||
|
QUrl qurl = QString::fromUtf8(url.data());
|
||||||
|
return QDesktopServices::openUrl(qurl);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -28,4 +28,8 @@ namespace streamfx {
|
||||||
|
|
||||||
std::filesystem::path data_file_path(std::string_view file);
|
std::filesystem::path data_file_path(std::string_view file);
|
||||||
std::filesystem::path config_file_path(std::string_view file);
|
std::filesystem::path config_file_path(std::string_view file);
|
||||||
|
|
||||||
|
#ifdef ENABLE_FRONTEND
|
||||||
|
bool open_url(std::string_view url);
|
||||||
|
#endif
|
||||||
} // namespace streamfx
|
} // namespace streamfx
|
||||||
|
|
Loading…
Reference in a new issue